index.vue 43 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915
  1. <template>
  2. <view>
  3. <ujp-navbar title="月卡购买" :show="false" ></ujp-navbar>
  4. <!-- 头部图片 -->
  5. <view class="background">
  6. <view class="banner">
  7. <ujp-swiper bg-color="#fff"
  8. :img-mode="'scaleToFill'" height="120"
  9. :list="bannerList" @click="clickBanner" :name="'picUrl'" >
  10. </ujp-swiper>
  11. </view>
  12. <!-- 选项列表 -->
  13. <view class="option-list">
  14. <view class="list-item" @click="getScanCode">
  15. <view class="icon iconfont" style="background: linear-gradient(45deg,#00B962,#5FE4A6);">
  16. &#xe61a;
  17. </view>
  18. <view class="text oldTextjp2" oldstyle="font-size: 18px;">
  19. 扫码充电
  20. </view>
  21. </view>
  22. <view class="list-item" @click="fastRecharge">
  23. <view class="icon iconfont" style="background: linear-gradient(45deg,#23AD9B,#4BD2C0);">
  24. &#xe629;
  25. </view>
  26. <view class="text oldTextjp2" oldstyle="font-size: 18px;">
  27. 快速充值
  28. </view>
  29. </view>
  30. <view class="list-item" @click="chargingRecord">
  31. <view class="icon iconfont" style="background: linear-gradient(45deg,#407DE4,#6FA5FF );">
  32. &#xe625;
  33. </view>
  34. <view class="text oldTextjp2" oldstyle="font-size: 18px;">
  35. 充电记录
  36. </view>
  37. </view>
  38. <view class="list-item" @click="toSearchPile">
  39. <view class="icon iconfont" style="background: linear-gradient(45deg,#6366FF,#9D9FFF);">
  40. &#xe622;
  41. </view>
  42. <view class="text oldTextjp2" oldstyle="font-size: 18px;">
  43. 附近站点
  44. </view>
  45. </view>
  46. </view>
  47. <!-- 充值活动 -->
  48. <view class=" top-up" v-if="activityList.length > 0 && !activityListShow">
  49. <view class="card-box">
  50. <view class="card" v-for="(item,index) in activityList" :key="item.id"
  51. @click="rechargeActivity(item)">
  52. <img :src="item.picUrl" alt="">
  53. </view>
  54. </view>
  55. </view>
  56. <u-modal v-model="showOss" class="showOss"
  57. :show-title="false" :show-confirm-button="false" >
  58. <view class="slot-content">
  59. <u-image width="250px" style="margin: auto;min-height: 250px;"
  60. mode="widthFix" @click="clickBanner(showOssIndex,true)"
  61. :src="showOssImg">
  62. <view slot="loading" style="height: 200px;" >
  63. <u-loading mode="flower" size="186" >
  64. </u-loading>
  65. </view>
  66. </u-image>
  67. <u-image width="36px" style="margin: auto;"
  68. mode="widthFix" @click="showOss=false"
  69. src="../../assets/img/if-close-line-circled.png"></u-image>
  70. </view>
  71. </u-modal>
  72. <u-modal v-model="showTop" class="showOss"
  73. :show-title="false" :show-confirm-button="false" >
  74. <view class="slot-content" v-if="bannerListTop.length" >
  75. <view class="couponmain" v-if="bannerListTop[showTopIndex].topmodel=='coupon'">
  76. <view class="main" >
  77. <!-- 专享优惠券 -->
  78. <view class="exclusive">
  79. <p class="exclusive1">恭喜你</p>
  80. <p class="exclusive2">获得{{bannerListTop[showTopIndex].value}}元月卡卷</p>
  81. <view class="img" >
  82. <img src="../../assets/img/Frame915.png" alt="">
  83. <view class="num">
  84. {{bannerListTop[showTopIndex].value}}<span class="unit">元</span>
  85. </view>
  86. <view class="unit2">月卡优惠券</view>
  87. <view class="ticket-info">
  88. <view class="ticket-name" >
  89. {{bannerListTop[showTopIndex].text}}
  90. </view>
  91. </view>
  92. </view>
  93. <view class="exclusive-text"> 持月卡在指定站点充电,充电服务费全免</view>
  94. <button class="exclusive-btn"
  95. @click="clickBannerTop()"
  96. shape="circle">立即开通</button>
  97. </view>
  98. </view>
  99. </view>
  100. <u-image width="250px;" v-else
  101. bgColor="#ff000000"
  102. style="margin: auto;min-height: 250px;"
  103. mode="widthFix" @click="clickBannerTop()"
  104. :src="showTopImg"
  105. >
  106. <view slot="loading" style="height: 200px;" >
  107. <u-loading mode="flower" size="186" >
  108. </u-loading>
  109. </view>
  110. </u-image>
  111. <view
  112. @click="showTopIndex++"
  113. v-show="showTopIndex!=bannerListTop.length-1"
  114. >
  115. <u-button class="choice-btn"
  116. @click="nextTop(showTopIndex)"
  117. style="width: 80%;margin-top: 10px;" shape="circle">下一条({{showTopIndex+1}}/{{bannerListTop.length}})</u-button>
  118. </view>
  119. <u-image width="36px"
  120. v-show="showTopIndex==bannerListTop.length-1"
  121. style="margin: auto; margin-top: 10px;"
  122. mode="widthFix" @click="showTop=false"
  123. src="../../assets/img/if-close-line-circled.png"></u-image>
  124. </view>
  125. </u-modal>
  126. <!-- 模式选择 -->
  127. <u-mask :show="show">
  128. <view class="wrap">
  129. <view class="shema" @tap.stop>
  130. <view class="title">
  131. 设置浏览模式
  132. </view>
  133. <view class="">
  134. <u-radio-group v-model="value">
  135. <u-radio v-for="(item, index) in list" :key="index" :name="item.name" :disabled="item.disabled" active-color="#00B962">
  136. {{item.name}}
  137. <p v-if="item.name == '长辈模式'">字体更大 看的清楚</p>
  138. <p v-if="item.name == '标准模式'">信息丰富 功能全面</p>
  139. </u-radio>
  140. </u-radio-group>
  141. </view>
  142. <view class="hint">可在 {{""}}我的-设置 {{""}}页面中切换</view>
  143. <view class="btn-box">
  144. <u-button class="choice-btn" type="success" shape="circle" @click="elderClick">我选好了</u-button>
  145. </view>
  146. </view>
  147. </view>
  148. </u-mask>
  149. <!-- <view class="top-up-title oldTextjp" oldstyle="font-size:20px;"><text class="line"></text>最新活动</view>
  150. <view class="img-box">
  151. <view class="img-1" v-for="(item,index) in activityList" :key="item.id"
  152. @click="rechargeActivity(item)">
  153. <img :src="item.picUrl" alt="">
  154. </view>
  155. </view> -->
  156. </view>
  157. <!-- 最新活动 -->
  158. <view class=" top-up" v-if="activityList.length > 0 && activityListShow">
  159. <view class="top-up-title oldTextjp" oldstyle="font-size:20px;"><text class="line"></text>最新活动</view>
  160. <view class="img-box2">
  161. <view class="left-image" :style="{backgroundImage: 'url(' + activityDateList.picUrl + ')'}" @click="rechargeActivity(activityDateList)">
  162. <p>{{activityDateList.name}}</p>
  163. <view class="time-activities">
  164. 距活动结束仅剩 <text class="time">{{description}}</text>
  165. </view>
  166. </view>
  167. <view class="right-image">
  168. <img class="margin-bottom" v-for="(item,index) in activityList" :key="item.id"
  169. @click="rechargeActivity(item)" :src="item.narrowUrl" alt="">
  170. <!-- <img class="margin-bottom" src="../../assets/img/topup2.png" alt="" @click="rechargeActivity(0)">
  171. <img class="margin-bottom" src="../../assets/img/topup3.png" alt="" @click="rechargeActivity(1)"> -->
  172. </view>
  173. </view>
  174. </view>
  175. <template v-if="message == 'getLocation:ok' && stationList.length != 0 && chargeList.length == 0">
  176. <view class=" top-up" >
  177. <view class="top-up-title oldTextjp" oldstyle="font-size:20px;"><text class="line"></text>附近站点
  178. <view class="pack-up" v-show="!listShow" @click="listShow=true" >
  179. 收起<text class="iconfont">&#xe607;</text>
  180. </view>
  181. <view class="pack-up" v-if="listShow" @click="listShow=false" >
  182. 展开<text class="iconfont">&#xe62c;</text>
  183. </view>
  184. </view>
  185. </view>
  186. <!-- 附近站点 -->
  187. <view class="station" v-for="(stationData,i) in stationList" :key="i"
  188. v-show="!listShow||i==0"
  189. @click="gotoUrl('pages/searchPile/stationAndPile/stationDetails?id=' + stationData.id)">
  190. <view class="head">
  191. <view class="title oldTextjp" oldstyle="font-size: 20px;">
  192. {{stationData.name}}
  193. </view>
  194. <view class="distance oldTextjp2" oldstyle="font-size: 16px;">
  195. <text class="iconfont" style="color:#666666">&#xe615;</text>{{stationData.distance!=null&&stationData.distance>0.1 ? stationData.distance.toFixed(1)+'公里':'小于100米'}}
  196. </view>
  197. </view>
  198. <view class="sign" v-if="stationData.stationType==50">
  199. {{stationData.address}}
  200. </view>
  201. <view class="sign" v-else>
  202. <template v-if="personInfo&&personInfo.userType!=1">
  203. <view class="sign-1" v-if="stationData.giveDiscount&&stationData.discountRatio">会员服务费{{stationData.discountRatio/10}}折</view>
  204. <view class="sign-2" v-if="stationData.tagList.length != 0" v-for="(tagName,tagIndex) in stationData.tagList" :key="tagIndex">{{tagName}}</view>
  205. </template>
  206. </view>
  207. <view class="price-free oldTextClass">
  208. <view class="price">
  209. <view class="price-1">
  210. <text class="num">
  211. {{!stationData.giveDiscount ? (stationData.electricityPrice+stationData.servicePrice).toFixed(2)
  212. : (stationData.electricityPrice+stationData.discountServicePrice).toFixed(2)}}</text>
  213. <text class="unit " oldstyle="font-size: 48rpx;">元/度 起</text>
  214. </view>
  215. <view class="price-2 " oldstyle="font-size: 48rpx;" v-if="stationData.giveDiscount">
  216. <text class="num">{{(stationData.electricityPrice+stationData.servicePrice).toFixed(2)}}</text>
  217. <text class="unit ">元/度 起</text>
  218. </view>
  219. </view>
  220. <view class="free" v-if="stationData.category=='超充'" >
  221. <view class="fast" >
  222. <view class="sp-font">
  223. </view>
  224. <view class="num">
  225. {{stationData.fastAvailableNum}}/{{stationData.fastNum}}
  226. </view>
  227. </view>
  228. </view>
  229. <view class="free" v-else>
  230. <view class="fast" v-if="stationData.type == '1' || stationData.type == '1,2'">
  231. <view class="fast-font">
  232. </view>
  233. <view class="num">
  234. {{stationData.fastAvailableNum}}/{{stationData.fastNum}}
  235. </view>
  236. </view>
  237. <view class="slow oldTextjp2"
  238. oldstyle="margin-left: 1px;"
  239. v-if="stationData.type == '2' || stationData.type == '1,2'">
  240. <view class="slow-font">
  241. </view>
  242. <view class="num">
  243. {{stationData.slowAvailableNum}}/{{stationData.slowNum}}
  244. </view>
  245. </view>
  246. </view>
  247. </view>
  248. </view>
  249. <view class="bottom" @click="goSearch()" >
  250. <view class="bot">
  251. <view class="bot-line"></view>
  252. <view class="bot-text " style="color: #00B962;" >点击查看更多站点</view>
  253. <view class="bot-line"></view>
  254. </view>
  255. </view>
  256. </template>
  257. <!-- 定位 -->
  258. <view class="location-box" v-if="message != 'getLocation:ok' && stationList.length == 0 && chargeList.length == 0">
  259. <view class="location">
  260. <view class="location-text">
  261. <view class="text-1 oldTextjp" oldstyle="font-size: 20px;">
  262. 定位中...
  263. </view>
  264. <view class="text-2 oldTextjp2" oldstyle="font-size: 16px;">
  265. 授权定位后可查询附近充电站
  266. </view>
  267. <view class="text-3 oldTextjp2" oldstyle="font-size: 16px;" @click="getPoint()">
  268. 重新定位
  269. </view>
  270. </view>
  271. <view class="img-box">
  272. <img src="static/img/暂无网络信号-缺省页 1.png">
  273. </view>
  274. </view>
  275. </view>
  276. <!-- 充电状态 -->
  277. <view class="state1 state" v-if="chargeList.length > 0" v-for="(item,index) in chargeList" :key="item.id"
  278. @click="gotoUrl('pages/searchPile/chargeProcess/dcCharging?id=' + item.id)">
  279. <view class="state-text">
  280. <view class="text-1 oldTextjp" oldstyle="font-size: 20px;">
  281. {{item.statusText}}
  282. </view>
  283. <view v-if="item.status == '0'" class="text-2 oldTextjp2" oldstyle="font-size: 16px;">
  284. 启动中
  285. </view>
  286. <view v-if="item.status == '1'" class="text-2 oldTextjp2" oldstyle="font-size: 16px;">
  287. 已充{{item.dueFee != null ? item.dueFee.toFixed(2) : '0.00'}}元
  288. </view>
  289. <!-- <view v-if="item.status == '2'" class="text-2" style="color: red;">
  290. 超出时间将收取占位费
  291. </view> -->
  292. <view v-if="item.status == '4'" class="text-2 oldTextjp2" oldstyle="font-size: 16px;">
  293. <span v-if="item.waitNum==1">请耐心等待</span>
  294. <span v-else >前方等待{{item.waitNum-1}}位</span>
  295. </view>
  296. <view class="text-3 oldTextjp2" oldstyle="font-size: 16px;">
  297. <p style=" width: 160%;"> {{item.stationName}}/{{item.deviceName}}&nbsp;&nbsp;当前电价{{item.chargingCostPrice.toFixed(2)}}元/度</p>
  298. </view>
  299. </view>
  300. <view class="img-box" style="height: 110px;">
  301. <img v-if="item.status == '0'" src="static/img/等待中-缺省页.png">
  302. <img v-if="item.status == '1'" src="static/img/充电中-缺省页.png">
  303. <img v-if="item.status == '2'" src="static/img/已充满-缺省页.png">
  304. <img v-if="item.status == '4'" src="static/img/等待中-缺省页.png">
  305. </view>
  306. </view>
  307. <!-- 新闻 -->
  308. <view class="news-title" v-if="newsList.length > 0">
  309. <view class="news-title-left oldTextjp" oldstyle="font-size:20px;">
  310. <view class="line" style="margin-top:4px;"></view>新闻公告
  311. </view>
  312. <view class="more oldTextjp2" oldstyle="font-size:16px;" @click="toNewsNotice">更多<view class="more-icon iconfont"> &#xe600;</view>
  313. </view>
  314. </view>
  315. <view class="news">
  316. <view class="news-content" v-for="(item,index) in newsList" :key="index"
  317. @click="gotoUrl('pages/article/articleDetails?id=' + item.id)">
  318. <view class="content-text">
  319. <view class="content-title oldTextjp2" oldstyle="font-size: 18px;">{{item.title}}</view>
  320. <view class="news-time">{{item.createTime?item.createTime.slice(5,10):''}}</view>
  321. </view>
  322. <view class="content-img">
  323. <img :src="item.pic ? item.pic : 'static/img/image_default.png'" alt="">
  324. </view>
  325. </view>
  326. </view>
  327. <view class="bottom" >
  328. <view class="bot">
  329. <view class="bot-line"></view>
  330. <view class="bot-text oldTextjp2" oldstyle="font-size: 14px;">已经到底了</view>
  331. <view class="bot-line"></view>
  332. </view>
  333. </view>
  334. <!-- 导航栏 -->
  335. <view class="navigation">
  336. <view class="login-prompt" v-if="!userId">
  337. 登录显示更多会员服务
  338. <text class="button" @click="toLogin">登录/注册</text>
  339. </view>
  340. </view>
  341. <Tabbar :current="0" ref="tabbarMain" :elderStatus="elderStatus"></Tabbar>
  342. </view>
  343. </template>
  344. <script>
  345. import * as API from '@/apis/index.js'
  346. import * as newsApi from '@/apis/news.js'
  347. import * as WxJsApi from '@/utils/wxJsApi.js'
  348. import * as siteApi from '@/apis/site.js'
  349. import * as loginApi from '@/apis/login.js'
  350. import MapLoader from '@/utils/AMap'
  351. import Tabbar from '@/components/Tabbar.vue'
  352. import {
  353. newDate,
  354. currentTimeStamp,
  355. parseUnixTime,
  356. secondsDistance,
  357. hourDistanceArr
  358. } from '@/utils'
  359. export default {
  360. components: {
  361. Tabbar
  362. },
  363. data() {
  364. return {
  365. listShow:false,
  366. stationList: [],
  367. bannerList:[],
  368. bannerListTop:[],
  369. timeOut: false,
  370. pointTimeOut: true,
  371. chargeList: [],
  372. activityList: [],
  373. userId: '',
  374. newsList: [],
  375. pageIndex: 1,
  376. recordsTotal: 0,
  377. longitude: '',
  378. latitude: '',
  379. message: '',
  380. indexLogo: '',
  381. showOss:false,
  382. showOssImg:'',
  383. showOssIndex:'',
  384. showTop:false,
  385. showTopImg:'',
  386. showTopIndex:0,
  387. show: false,
  388. list: [{
  389. name: '长辈模式',
  390. disabled: false
  391. },
  392. {
  393. name: '标准模式',
  394. disabled: false
  395. },
  396. ],
  397. // u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
  398. value: '长辈模式',
  399. elderStatus: false,
  400. fontMode: '',
  401. description: '00:00:00',
  402. activityDate: '',
  403. activityDateList: {},
  404. activityListShow: false,
  405. personInfo:{},
  406. }
  407. },
  408. onLoad(op) {
  409. if (op.jpcode) {
  410. var k = API.codeOperation(op.jpcode)
  411. if (k) {
  412. uni.navigateTo({
  413. url: k
  414. })
  415. }
  416. }
  417. },
  418. onUnload() {
  419. this.timeOut = false;
  420. this.pointTimeOut = false;
  421. },
  422. onHide() {
  423. this.timeOut = false;
  424. this.pointTimeOut = false;
  425. },
  426. onReachBottom() {
  427. // if (this.newsList.length < this.recordsTotal) {
  428. // this.myLoadmore();
  429. // }
  430. },
  431. onShow() {
  432. if(this.$refs.tabbarMain){
  433. this.$refs.tabbarMain.setcount(0);
  434. }
  435. if( !this.pointTimeOut ){
  436. this.pointTimeOut=true
  437. this.getPointTimeOut();
  438. }
  439. this.getUserInfo();
  440. },
  441. onReady() {
  442. // if (this.carhelp.get("getElderModeClass")) {
  443. // if(this.carhelp.get("getElderModeClass") == "长辈模式") {
  444. // this.fontMode = '1';
  445. // } else {
  446. // this.fontMode = '0';
  447. // }
  448. // API.changeFont({fontMode: this.fontMode}).then((res) => {
  449. // }).catch(error => {
  450. // uni.showToast({
  451. // title: error,
  452. // icon: "none"
  453. // })
  454. // })
  455. // }
  456. //this.getUserInfo();
  457. WxJsApi.getWxConfig(['getLocation', 'addEventListener', 'scanQRCode']).then((res) => {
  458. // //(res)
  459. }).catch(error => {
  460. //(res)
  461. })
  462. this.getBannerInfo("homepage");
  463. this.getBannerInfoTop("home-top");
  464. this.getPointTimeOut();
  465. this.getNewsList();
  466. this.getActivityInfoList();
  467. // if(process.env.NODE_ENV === "development"){
  468. // this.message="getLocation:ok"
  469. // this.longitude=112.28541;
  470. // this.latitude=30.308354;
  471. // this.searchStationData()
  472. // }
  473. },
  474. methods: {
  475. goSearch() {
  476. this.$refs.tabbarMain.beforeSwitch(1)
  477. },
  478. nextTop(index){
  479. this.showTopImg=this.bannerListTop[index+1].picUrl;
  480. this.showTopIndex=index+1;
  481. },
  482. getDescriptionTime() {
  483. var date = this.activityDate;
  484. var dateMonth1 = new Date().getMonth()+1;
  485. var dateDay1 = new Date().getDate();
  486. var dateMonth2 = parseInt(date.slice(5,7));
  487. var dateDay2 = parseInt(date.slice(8,10));
  488. if(dateMonth1 < dateMonth2) {
  489. var days = new Date(new Date().getFullYear(), dateMonth1, 0).getDate();
  490. dateDay2 = dateDay2 + days;
  491. console.log(dateDay2)
  492. }
  493. if(dateDay1 < dateDay2-2) {
  494. this.description = dateDay2 - dateDay1 + '天'
  495. } else {
  496. var dateTime2=new Date(date).getTime()
  497. var c=hourDistanceArr(new Date(),new Date(dateTime2))
  498. if(c[0] < 10) {
  499. c[0] = '0'+c[0];
  500. }
  501. if(c[1] < 10) {
  502. c[1] = '0'+c[1];
  503. }
  504. if(c[2] < 10) {
  505. c[2] = '0'+c[2];
  506. }
  507. this.description = c[0]+':'+c[1]+':'+c[2];
  508. if(this.description == '00:00:00') {
  509. this.activityListShow = false;
  510. }
  511. setTimeout(()=>{
  512. this.getDescriptionTime();
  513. },1000)
  514. }
  515. },
  516. getUserInfo() {
  517. uni.showLoading({
  518. title: "加载中",
  519. mask: true,
  520. })
  521. loginApi.findByOpenId({
  522. openId: this.carhelp.getOpenId(),
  523. noerror:true,
  524. }).then((res) => {
  525. uni.hideLoading();
  526. if (res.code == 200&&res.result) {
  527. this.personInfo=res.data.regUser;
  528. var token = res ? res.data.token : '';
  529. this.carhelp.setPersonInfo(res.data.regUser );
  530. this.carhelp.setToken(token);
  531. this.carhelp.setPersonInfoPlus(res.data);
  532. }
  533. console.log("--------------")
  534. if (res.data&&res.data.regUser) {
  535. if(res.data.regUser.fontMode == null) {
  536. this.show = true;
  537. } else {
  538. this.show = false;
  539. this.fontMode = res.data.regUser.fontMode;
  540. if(this.fontMode == '1') {
  541. this.carhelp.set("getElderModeClass", "长辈模式");
  542. } else {
  543. this.carhelp.set("getElderModeClass", "标准模式");
  544. }
  545. }
  546. this.userId = res.data.regUser.id;
  547. this.getFindChargeData();
  548. if (this.carhelp.get("getElderModeClass")) {
  549. if(this.carhelp.get("getElderModeClass") == "长辈模式") {
  550. this.elderStatus = true;
  551. } else {
  552. this.elderStatus = false;
  553. }
  554. }
  555. }else{
  556. this.carhelp.set("getElderModeClass", "长辈模式");
  557. this.elderStatus = true;
  558. var obj=this.carhelp.get("friends_invitation")
  559. // this.carhelp.set("friends_invitation",{
  560. // op:op,
  561. // date:new Date().getTime()
  562. // })
  563. if(obj&&false){
  564. if(obj.date+1000*60*60*24 > new Date().getTime() ){
  565. this.friendsInvitation(obj)
  566. }
  567. }
  568. }
  569. }).catch(error => {
  570. uni.showToast({
  571. title: error,
  572. icon: "none"
  573. })
  574. })
  575. },
  576. friendsInvitation(obj){
  577. uni.showLoading({
  578. title: "加载中",
  579. mask: true,
  580. })
  581. API.findActivity({
  582. id:obj.op.id,
  583. code:obj.op.icode
  584. }).then((res) => {
  585. uni.hideLoading()
  586. obj.activityInfo=res.data.activityInfo;
  587. var name=res.data.activityInfo.name;
  588. var title="参与活动"
  589. var okbtn="前往注册"
  590. var endTime=res.data.activityInfo.endTime;
  591. if(endTime&&secondsDistance(newDate(endTime))>0){
  592. name="活动已结束"
  593. okbtn="继续注册"
  594. title="提示"
  595. obj=null
  596. }
  597. this.carhelp.set("friends_invitation",obj)
  598. uni.showModal({
  599. title:title,
  600. content:name,
  601. confirmText:okbtn,
  602. success: res1 => {
  603. if (res1.confirm) {
  604. uni.navigateTo({
  605. url: '/pages/login/login'
  606. })
  607. } else if (res1.cancel) {
  608. //('用户点击取消');
  609. }
  610. }
  611. })
  612. }).catch(error => {
  613. uni.showToast({
  614. title: error,icon: "none"
  615. })
  616. })
  617. },
  618. clickBannerTop(){
  619. var mod = this.bannerListTop[this.showTopIndex];
  620. this.showTop=false;
  621. this.clickBanner(0,true,mod)
  622. },
  623. clickBanner(index,bl,modout){
  624. var uurl="";
  625. var mod = this.bannerList[index]
  626. if(modout){
  627. mod=modout;
  628. }
  629. mod.clickUrl=mod.linkUrl
  630. if (mod.linkPicUrl&&!bl) {
  631. this.showOss=true;
  632. this.showOssImg=mod.linkPicUrl;
  633. this.showOssIndex=index;
  634. }else if (mod.clickUrl == null) {
  635. } else if (mod.clickUrl.indexOf('http') == 0) {
  636. window.location = mod.clickUrl+uurl;
  637. }
  638. else if (mod.clickUrl.slice(-5) == 'login' && this.userId) {
  639. } else if (mod.clickUrl.indexOf('#/') == 0) {
  640. if (mod.clickUrl.indexOf("?") == -1) {
  641. mod.clickUrl += '?';
  642. }
  643. var url=mod.clickUrl.split("#")[1]
  644. //window.location = mod.clickUrl;
  645. uni.navigateTo({
  646. url: url+uurl
  647. })
  648. } else if (mod.clickUrl == '#' || mod.clickUrl == '') {
  649. } else {
  650. uni.navigateTo({
  651. url: mod.clickUrl+uurl
  652. })
  653. }
  654. },
  655. getBannerInfoTop(code){
  656. uni.showLoading({
  657. title: "加载中",
  658. mask: true,
  659. })
  660. var nowtime = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d}')
  661. newsApi.getBannerInfo(code).then((res) => {
  662. this.bannerListTop =res.data;
  663. var time=this.carhelp.get("bannerListTop");
  664. if(this.bannerListTop.length&&!(time&&nowtime==time)){
  665. this.showTop=true;
  666. this.showTopImg=this.bannerListTop[0].picUrl;
  667. this.showTopIndex=0;
  668. this.carhelp.set("bannerListTop",nowtime);
  669. }
  670. if (this.userId) {
  671. API.readCoupon().then((res2) => {
  672. var mod=res2.data.userCoupon;
  673. console.log(mod)
  674. if(mod){
  675. var obj={
  676. topmodel:"coupon",
  677. value:mod.value,
  678. text:mod.describe,
  679. linkUrl:"#/pages/monthlyCardActivity/monthlyCardBuy",
  680. }
  681. this.bannerListTop =[
  682. obj,...res.data
  683. ]
  684. if(!(time&&nowtime==time)){
  685. this.showTop=true;
  686. this.showTopImg=this.bannerListTop[0].picUrl;
  687. this.showTopIndex=0;
  688. this.carhelp.set("bannerListTop",nowtime);
  689. }
  690. }
  691. }).catch(error2 => {
  692. uni.showToast({
  693. title: error2,icon: "none"
  694. })
  695. })
  696. }
  697. uni.hideLoading()
  698. //document.getElementsByClassName("uni-swiper-wrapper")[0].parentNode.style="background-color: rgb(255, 255, 255); height: 120px;"
  699. }).catch(error => {
  700. uni.showToast({
  701. title: error,icon: "none"
  702. })
  703. })
  704. },
  705. getBannerInfo(code){
  706. uni.showLoading({
  707. title: "加载中",
  708. mask: true,
  709. })
  710. newsApi.getBannerInfo(code).then((res) => {
  711. this.bannerList =res.data;
  712. uni.hideLoading()
  713. //document.getElementsByClassName("uni-swiper-wrapper")[0].parentNode.style="background-color: rgb(255, 255, 255); height: 120px;"
  714. }).catch(error => {
  715. uni.showToast({
  716. title: error,icon: "none"
  717. })
  718. })
  719. },
  720. elderClick() {
  721. if(this.value == "长辈模式") {
  722. this.elderStatus = true;
  723. this.carhelp.set("getElderModeClass", "长辈模式");
  724. this.fontMode = '1';
  725. } else {
  726. this.elderStatus = false;
  727. this.carhelp.set("getElderModeClass", "标准模式");
  728. this.fontMode = '0';
  729. }
  730. API.changeFont({fontMode: this.fontMode}).then((res) => {
  731. this.show = false;
  732. }).catch(error => {
  733. uni.showToast({
  734. title: error,
  735. icon: "none"
  736. })
  737. })
  738. },
  739. getPointTimeOut() {
  740. setTimeout(() => {
  741. if (this.pointTimeOut) {
  742. this.getPoint();
  743. }
  744. }, 1000)
  745. },
  746. getFindChargeData() {
  747. API.findChargeData().then((res) => {
  748. this.chargeList = res.data.chargingRecordList;
  749. var list = res.data.chargingRecordList;
  750. for (var i = 0; i < list.length; i++) {
  751. if (list[i].status == '1' || list[i].status == '4') {
  752. this.timeOut = true;
  753. }
  754. }
  755. if (this.timeOut&&this.pointTimeOut) {
  756. setTimeout(() => {
  757. this.getFindChargeData();
  758. }, 5000)
  759. }
  760. }).catch(error => {
  761. uni.showToast({
  762. title: error,
  763. icon: "none"
  764. })
  765. })
  766. },
  767. toSearchPile() {
  768. uni.navigateTo({
  769. url: '/pages/searchPile/searchPile'
  770. })
  771. },
  772. toLogin() {
  773. uni.navigateTo({
  774. url: '/pages/login/login'
  775. })
  776. },
  777. toNewsNotice() {
  778. uni.navigateTo({
  779. url: '/pages/article/newsNotice'
  780. })
  781. },
  782. //微信扫二维码
  783. getScanCode() {
  784. if (this.userId) {
  785. WxJsApi.scanQRCode(1).then(res => {
  786. //("scanQRCode------" + res)
  787. if (res) {
  788. API.scanCode(res).then((response) => {
  789. }).catch(error => {
  790. uni.showToast({
  791. title: error,
  792. icon: "none"
  793. })
  794. })
  795. }
  796. }).catch(error => {
  797. })
  798. } else {
  799. uni.navigateTo({
  800. url: '/pages/login/login'
  801. })
  802. }
  803. },
  804. fastRecharge() {
  805. if (this.userId) {
  806. uni.navigateTo({
  807. url: '/pages/user/finance/recharge'
  808. })
  809. } else {
  810. uni.navigateTo({
  811. url: '/pages/login/login'
  812. })
  813. }
  814. },
  815. chargingRecord() {
  816. if (this.userId) {
  817. uni.navigateTo({
  818. url: '/pages/record/index'
  819. })
  820. } else {
  821. uni.navigateTo({
  822. url: '/pages/login/login'
  823. })
  824. }
  825. },
  826. rechargeActivity(item) {
  827. if (this.userId) {
  828. var uurl="&uid="+this.userId;
  829. var mod = item
  830. if (mod.clickUrl == null) {
  831. } else if (mod.clickUrl.indexOf('http') == 0) {
  832. window.location = mod.clickUrl+uurl;
  833. } else if (mod.clickUrl.indexOf('#/') == 0) {
  834. if (mod.clickUrl.indexOf("?") == -1) {
  835. mod.clickUrl += '?';
  836. }
  837. var url=mod.clickUrl.split("#")[1]
  838. //window.location = mod.clickUrl;
  839. uni.navigateTo({
  840. url: url+uurl
  841. })
  842. } else if (mod.clickUrl == '#' || mod.clickUrl == '') {
  843. } else {
  844. uni.navigateTo({
  845. url: mod.clickUrl+uurl
  846. })
  847. }
  848. } else {
  849. uni.navigateTo({
  850. url: '/pages/login/login'
  851. })
  852. }
  853. },
  854. getActivityInfoList() {
  855. uni.showLoading({
  856. title: "加载中",
  857. mask: true,
  858. })
  859. API.activityInfoList({
  860. pageIndex: 1,
  861. pageSize: 10
  862. }).then((res) => {
  863. uni.hideLoading()
  864. var list = res.data.data;
  865. for (let i = 0; i < list.length; i++) {
  866. if(list[i].type==2&&list[i].endTime != null) {
  867. this.activityListShow = true;
  868. var reg=new RegExp('-','gi');
  869. this.activityDate = list[i].endTime.replace(reg,'/');
  870. console.log(this.activityDate)
  871. this.activityDateList = list[i];
  872. list.splice(i, 1);
  873. this.getDescriptionTime();
  874. }
  875. }
  876. this.activityList = list;
  877. }).catch(error => {
  878. uni.showToast({
  879. title: error,
  880. icon: "none"
  881. })
  882. })
  883. },
  884. searchStationData(){
  885. var data={
  886. longitude: this.longitude,
  887. latitude: this.latitude,
  888. pageSize:6
  889. }
  890. if (this.carhelp.getPersonInfo()) {
  891. data.openId=this.carhelp.getOpenId()
  892. }
  893. siteApi.searchStationData(data).then((response) => {
  894. this.stationList = response.data.data;
  895. if(response.data.data.length){
  896. var stationDataList = response.data.data;
  897. MapLoader().then(AMap1 => {
  898. for(var i in stationDataList){
  899. var item=stationDataList[i]
  900. var lnglat = new AMap.LngLat(this.longitude,this.latitude);
  901. var myDistance = lnglat.distance([item.longitude,item.latitude]);
  902. item.distance = myDistance/1000;
  903. console.log(item.distance)
  904. }
  905. })
  906. //this.stationData = stationDataList;
  907. }
  908. }).catch(error => {
  909. uni.showToast({
  910. title: error,
  911. icon: "none"
  912. })
  913. })
  914. },
  915. getPoint() {
  916. WxJsApi.getLocation().then((res) => {
  917. this.latitude = parseFloat(res.latitude);
  918. this.longitude = parseFloat(res.longitude);
  919. this.message = res.errMsg;
  920. if (res.errMsg != 'getLocation:ok') {
  921. uni.showToast({
  922. title: res
  923. })
  924. } else {
  925. this.searchStationData()
  926. }
  927. }).catch(error => {
  928. uni.showToast({
  929. title: error,
  930. icon: "none"
  931. })
  932. })
  933. },
  934. getNewsList(bl) {
  935. uni.showLoading({
  936. title: "加载中",
  937. mask: true,
  938. })
  939. if (bl) {
  940. this.newsList = [];
  941. this.pageIndex = 1;
  942. }
  943. newsApi.newsInfoList({
  944. pageIndex: this.pageIndex,
  945. pageSize:3,
  946. }).then((res) => {
  947. uni.hideLoading()
  948. this.newsList = [
  949. ...this.newsList,
  950. ...res.data.data
  951. ];
  952. this.recordsTotal = res.data.recordsTotal
  953. }).catch(error => {
  954. uni.showToast({
  955. title: error,
  956. icon: "none"
  957. })
  958. })
  959. },
  960. myLoadmore() {
  961. //this.pageIndex += 1;
  962. //this.getNewsList()
  963. },
  964. }
  965. }
  966. </script>
  967. <style lang="scss" scoped>
  968. .couponmain{
  969. .main{
  970. margin: 100px auto 0;
  971. position: relative;
  972. .content{
  973. padding: 24px;
  974. padding-top: 50px;
  975. background-color: #fff;
  976. box-shadow: 0px 0px 0px 1px rgba(254, 229, 147, 100);
  977. border: 2px solid rgba(253, 217, 141, 100);
  978. border-radius: 8px;
  979. .img{
  980. width: 44vw;
  981. height: 134px;
  982. position: absolute;
  983. top: -88px;
  984. right: 0px;
  985. img{
  986. width: 100%;
  987. height: 100%;
  988. }
  989. }
  990. .title{
  991. font-size: 16px;
  992. color: rgba(84, 45, 45, 100);
  993. margin-bottom: 13px;
  994. }
  995. .text{
  996. line-height: 24px;
  997. color: rgba(84, 45, 45, 100);
  998. font-size: 16px;
  999. text-align: justify;
  1000. text-decoration:underline;
  1001. text-decoration-color:#ECE3BA;
  1002. text-indent: 32px;
  1003. }
  1004. .sign{
  1005. text-align: right;
  1006. margin-top: 8px;
  1007. font-size: 16px;
  1008. }
  1009. }
  1010. // 专享优惠券
  1011. .exclusive{
  1012. background-color: #F5E4C8;
  1013. margin-top: 20px;
  1014. padding: 32rpx 32rpx 32rpx 32rpx ;
  1015. box-shadow: 0px 0px 0px 1px rgba(254, 229, 147, 100);
  1016. border: 2px solid rgba(253, 217, 141, 100);
  1017. border-radius: 8px;
  1018. .exclusive1{
  1019. font-size: 48rpx;
  1020. color: rgba(51, 51, 51, 1);
  1021. font-family: SourceHanSerif-bold;
  1022. }
  1023. .exclusive2{
  1024. font-family: PingFangSC-regular;
  1025. color: rgba(51, 51, 51, 1);
  1026. font-size: 36rpx;
  1027. }
  1028. p{
  1029. width: 100%;
  1030. text-align: center;
  1031. //color: rgba(255, 73, 75, 100);
  1032. //font-size: 20px;
  1033. }
  1034. .img{
  1035. // width: 74.4vw;
  1036. // height: 84px;
  1037. margin-top: 16px;
  1038. position: relative;
  1039. img{
  1040. width: 100%;
  1041. height: 100%;
  1042. }
  1043. }
  1044. .num{
  1045. font-size:54rpx;
  1046. color: rgba(252, 237, 179, 100);
  1047. position: absolute;
  1048. top:10px;
  1049. left: 8vw;
  1050. font-weight: 600;
  1051. .unit{
  1052. font-size: 24rpx;
  1053. color: rgba(252, 237, 179, 100);
  1054. }
  1055. }
  1056. .unit2{
  1057. font-size: 12px;
  1058. color: #FFF;
  1059. position: absolute;
  1060. top: 90rpx;
  1061. left: 24rpx;
  1062. }
  1063. .exclusive-text{
  1064. color: #333333;
  1065. font-size: 16rpx;
  1066. }
  1067. .exclusive-btn{
  1068. width: 80%;
  1069. margin-top: 48rpx;
  1070. border-radius: 50px;
  1071. background: linear-gradient(90.58deg, rgba(225,208,165,1) 0.05%,rgba(228,190,132,1) 98.67%);
  1072. color: rgba(51, 51, 51, 1);
  1073. font-size: 36rpx;
  1074. text-align: center;
  1075. box-shadow: 0px 8rpx 20rpx 0px rgba(184, 155, 103, 40);
  1076. font-family: -apple-system;
  1077. // width: 87.4%;
  1078. // margin-top: 20px;
  1079. // background-image: linear-gradient(#ffff00, #ff9600);
  1080. // color: #521e00;
  1081. // font-size: 20px;
  1082. // border-radius: 50px;
  1083. }
  1084. .ticket-info{
  1085. width: 40vw;
  1086. text-align: center;
  1087. position: absolute;
  1088. top: 18px;
  1089. right: 16rpx;
  1090. .ticket-name{
  1091. line-height: 40rpx;
  1092. color: rgba(16, 16, 16, 100);
  1093. font-size: 16rpx;
  1094. }
  1095. .condition{
  1096. line-height: 22px;
  1097. color: #8a6f6f;
  1098. font-size: 12px;
  1099. }
  1100. }
  1101. }
  1102. }
  1103. }
  1104. .oldTextClassF{
  1105. .station .price-free .price-1 .num{
  1106. font-size: 48rpx !important;
  1107. line-height: 40rpx;
  1108. font-weight: bold;
  1109. }
  1110. }
  1111. /deep/.u-image__loading{
  1112. background:#ff000000;
  1113. }
  1114. // 头部图片
  1115. img {
  1116. width: 100%;
  1117. height: 100%;
  1118. }
  1119. .background{
  1120. background: linear-gradient(#D6EEDC,#FFFFFF );
  1121. padding-top: 16px;
  1122. }
  1123. .banner {
  1124. width: 91.4%;
  1125. margin: 0 auto ;
  1126. border-radius: 12px;
  1127. height: 120px;
  1128. overflow: hidden;
  1129. }
  1130. // 选项列表
  1131. .option-list {
  1132. padding-top: 15px;
  1133. line-height: 20px;
  1134. border-radius: 8px;
  1135. text-align: center;
  1136. margin: auto;
  1137. display: flex;
  1138. justify-content: space-around;
  1139. .list-item {
  1140. // 图标
  1141. .icon {
  1142. width: 40px;
  1143. height: 40px;
  1144. border-radius: 99px;
  1145. line-height: 40px;
  1146. font-size: 24px;
  1147. text-align: center;
  1148. margin: auto;
  1149. color: #ffffff;
  1150. }
  1151. .text{
  1152. margin-top: 4px;
  1153. }
  1154. }
  1155. }
  1156. .flex{
  1157. display: flex;
  1158. }
  1159. // 站点
  1160. .pack-up{
  1161. float: right;
  1162. font-size: 16px;
  1163. color: rgba(119, 119, 119, 100);
  1164. }
  1165. // 附近站点改版
  1166. .station{
  1167. width: 91.4%;
  1168. border-radius: 8px;
  1169. padding: 12px 12px 12px 11px;
  1170. background-color: #fff;
  1171. margin: 8px auto 0;
  1172. .head{
  1173. display: flex;
  1174. justify-content: space-between;
  1175. align-items: center;
  1176. .title{
  1177. color: rgba(16, 16, 16, 100);
  1178. font-size: 32rpx;
  1179. font-weight: 550;
  1180. width: 440rpx;
  1181. text-overflow:ellipsis;
  1182. overflow:hidden;
  1183. white-space:nowrap;
  1184. }
  1185. .distance{
  1186. width: 80px;
  1187. color: rgba(102, 102, 102, 100);
  1188. font-size: 24rpx;
  1189. .iconfont{
  1190. font-size: 24rpx;
  1191. margin-right: 4rpx;
  1192. }
  1193. }
  1194. }
  1195. .sign{
  1196. display: flex;
  1197. flex-wrap: wrap;
  1198. margin-top: 16rpx;
  1199. .sign-1{
  1200. line-height: 40rpx;
  1201. border-radius: 8rpx;
  1202. background-color: rgba(255, 255, 255, 100);
  1203. color: rgba(255, 139, 0, 100);
  1204. font-size: 24rpx;
  1205. text-align: center;
  1206. border: 1px solid rgba(255, 139, 0, 100);
  1207. padding: 0 8rpx;
  1208. margin-right:16rpx;
  1209. margin-bottom: 8rpx;
  1210. }
  1211. .sign-2{
  1212. line-height: 40rpx;
  1213. border-radius: 8rpx;
  1214. background-color: rgba(255, 255, 255, 100);
  1215. color: rgba(153, 153, 153, 100);
  1216. font-size: 24rpx;
  1217. text-align: center;
  1218. border: 1px solid rgba(204, 204, 204, 100);
  1219. padding: 0 8rpx;
  1220. margin-right: 16rpx;
  1221. margin-bottom: 8rpx;
  1222. }
  1223. }
  1224. .price-free{
  1225. display: flex;
  1226. justify-content: space-between;
  1227. margin-top: 8rpx;
  1228. .price{
  1229. display: flex;
  1230. align-items: baseline;
  1231. }
  1232. .price-1{
  1233. .num{
  1234. color: rgba(255, 98, 0, 100);
  1235. font-size: 44rpx;
  1236. }
  1237. .unit{
  1238. font-size: 12px;
  1239. color: rgba(153, 153, 153, 100);
  1240. }
  1241. }
  1242. .price-2{
  1243. font-size: 24rpx;
  1244. color: rgba(153, 153, 153, 100);
  1245. margin-left: 8rpx;
  1246. text-decoration: line-through;
  1247. }
  1248. }
  1249. .free{
  1250. display: flex;
  1251. align-items: center;
  1252. .slow,.fast{
  1253. display: flex;
  1254. .sp-font{
  1255. width: 40rpx;
  1256. height: 40rpx;
  1257. line-height: 40rpx;
  1258. border-radius: 4px;
  1259. background-color: #7a68f6;
  1260. color: #fff;
  1261. font-size: 28rpx;
  1262. text-align: center;
  1263. margin-right: 2rpx;
  1264. }
  1265. .fast-font{
  1266. width: 40rpx;
  1267. height: 40rpx;
  1268. line-height: 40rpx;
  1269. border-radius: 8rpx;
  1270. background-color: rgba(186, 240, 215, 100);
  1271. color: rgba(0, 130, 69, 100);
  1272. font-size: 28rpx;
  1273. text-align: center;
  1274. margin-right: 8rpx;
  1275. }
  1276. .slow-font{
  1277. width: 40rpx;
  1278. height: 40rpx;
  1279. line-height: 40rpx;
  1280. border-radius: 8rpx;
  1281. background-color: rgba(226, 226, 226, 100);
  1282. color: rgba(128, 128, 128, 100);
  1283. font-size: 28rpx;
  1284. text-align: center;
  1285. margin-right: 8rpx;
  1286. }
  1287. .num{
  1288. font-size: 32rpx;color: rgba(0, 145, 67, 100);
  1289. line-height: 40rpx;
  1290. }
  1291. }
  1292. .slow{
  1293. margin-left: 24rpx;
  1294. }
  1295. }
  1296. }
  1297. //定位
  1298. .location {
  1299. width: 91.4%;
  1300. background-color: #ffffff;
  1301. height: 120px;
  1302. display: flex;
  1303. justify-content: space-between;
  1304. margin: 20px auto 0;
  1305. border-radius: 8px;
  1306. border: #F2F4F4 1px;
  1307. .location-text {
  1308. padding: 24px 0 0 28px;
  1309. .text-1 {
  1310. height: 16px;
  1311. line-height: 16px;
  1312. color: rgba(16, 16, 16, 100);
  1313. font-size: 16px;
  1314. text-align: left;
  1315. }
  1316. .text-2 {
  1317. height: 17px;
  1318. line-height: 17px;
  1319. color: rgba(102, 102, 102, 100);
  1320. font-size: 12px;
  1321. text-align: left;
  1322. margin-top: 4px;
  1323. white-space: nowrap; //强制不换行
  1324. text-overflow: ellipsis; //文本超出出现省略号
  1325. overflow: hidden;
  1326. }
  1327. .text-3 {
  1328. width: 80px;
  1329. height: 24px;
  1330. line-height: 22px;
  1331. border-radius: 50px;
  1332. color: rgba(0, 185, 98, 100);
  1333. font-size: 12px;
  1334. text-align: center;
  1335. border: 1px solid rgba(0, 185, 98, 100);
  1336. margin-top: 11px;
  1337. }
  1338. }
  1339. .img-box {
  1340. width: 120px;
  1341. height: 120px;
  1342. margin-right: 20px;
  1343. }
  1344. }
  1345. .state {
  1346. width: 91.4%;
  1347. background-color: #ffffff;
  1348. height: 120px;
  1349. display: flex;
  1350. margin: 20px auto 0;
  1351. border-radius: 8px;
  1352. border: #F2F4F4 1px;
  1353. .state-text {
  1354. width: 61.8%;
  1355. padding: 24px 0 0 28px;
  1356. .text-1 {
  1357. height: 16px;
  1358. line-height: 16px;
  1359. color: blueviolet;
  1360. font-size: 16px;
  1361. text-align: left;
  1362. }
  1363. .text-2 {
  1364. height: 17px;
  1365. line-height: 17px;
  1366. color: #101010;
  1367. text-align: left;
  1368. margin-top: 12px;
  1369. }
  1370. .text-3 {
  1371. font-size: 12px;
  1372. line-height: 20px;
  1373. margin-top: 6px;
  1374. color: #999999;
  1375. }
  1376. }
  1377. .img-box {
  1378. width: 120px;
  1379. height: 120px;
  1380. margin-right: 20px;
  1381. }
  1382. }
  1383. //充值
  1384. .top-up {
  1385. width: 91.4%;
  1386. margin: 12px auto 0 ;
  1387. .top-up-title {
  1388. color: rgba(16, 16, 16, 100);
  1389. font-size: 16px;
  1390. }
  1391. .card-box{
  1392. display: flex;
  1393. justify-content: space-between;
  1394. padding: 0 0 16px 0;
  1395. .card{
  1396. width: 48.3%;
  1397. height: 65px;
  1398. img{
  1399. width: 100%;
  1400. height: 100%;
  1401. }
  1402. }
  1403. }
  1404. .img-box2{
  1405. margin-top: 12px;
  1406. display: flex;
  1407. justify-content: space-between;
  1408. img{
  1409. width: 100%;
  1410. height: 100%;
  1411. }
  1412. .left-image{
  1413. width: 48.3%;
  1414. height: 166px;
  1415. padding: 8px 0 0 12px;
  1416. // background: url(@/assets/img/topup1.png);
  1417. background-repeat: no-repeat;
  1418. background-position: 30% 10%;
  1419. background-size: cover;
  1420. p{
  1421. color: rgba(56, 47, 33, 100);
  1422. font-size: 24px;
  1423. line-height: 28px;
  1424. font-weight: 600;
  1425. }
  1426. .time-activities{
  1427. color: rgba(56, 39, 14, 100);
  1428. font-size: 16px;
  1429. line-height: 22px;
  1430. margin-top: 4px;
  1431. .time{
  1432. margin-left: 4px;
  1433. color: #fa3534;
  1434. font-weight: bold;
  1435. }
  1436. }
  1437. }
  1438. .right-image{
  1439. width: 48.3%;
  1440. display: flex;
  1441. flex-direction: column;
  1442. justify-content: space-between;
  1443. .margin-top{
  1444. margin-top: 12px;
  1445. }
  1446. img{
  1447. height: 77px;
  1448. }
  1449. };
  1450. }
  1451. }
  1452. // 小竖线
  1453. .line {
  1454. display: inline-block;
  1455. width: 3px;
  1456. height: 12px;
  1457. margin-right: 7px;
  1458. background-color: rgba(0, 145, 67, 100);
  1459. }
  1460. // 新闻公告
  1461. .news-title {
  1462. padding: 0 16px;
  1463. margin-top: 12px;
  1464. color: rgba(16, 16, 16, 100);
  1465. font-size: 16px;
  1466. display: flex;
  1467. justify-content: space-between;
  1468. background-color: #F2F4F4;
  1469. .news-title-left {
  1470. display: flex;
  1471. }
  1472. .more {
  1473. font-size: 14px;
  1474. color: #777777;
  1475. display: flex;
  1476. line-height: 20px;
  1477. .more-icon {
  1478. font-size: 24px
  1479. }
  1480. }
  1481. }
  1482. .news {
  1483. background-color: #fff;
  1484. width: 91.4%;
  1485. margin: 12px auto 0;
  1486. border-radius: 8px;
  1487. .news-content {
  1488. display: flex;
  1489. justify-content: space-between;
  1490. padding: 12px;
  1491. .content-text {
  1492. width: 56.2%;
  1493. height: 100%;
  1494. line-height: 21px;
  1495. color: #101010;
  1496. text-align: left;
  1497. font-size: 14px;
  1498. }
  1499. .content-title {
  1500. width: 100%;
  1501. overflow: hidden;
  1502. text-overflow: ellipsis;
  1503. display: -webkit-box;
  1504. -webkit-box-orient: vertical;
  1505. -webkit-line-clamp: 3;
  1506. }
  1507. .content-img {
  1508. width: 40.57%;
  1509. height: 100%;
  1510. border-radius: 4px;
  1511. overflow: hidden;
  1512. img {
  1513. width: 100%;
  1514. height: 80%;
  1515. }
  1516. }
  1517. .news-time {
  1518. margin-top: 5%;
  1519. color: #999999;
  1520. width: 80px;
  1521. height: 20px;
  1522. font-size: 14px;
  1523. }
  1524. }
  1525. }
  1526. .bottom {
  1527. width: 100%;
  1528. height: 60px;
  1529. .bot {
  1530. width: 100%;
  1531. margin: 0 auto;
  1532. padding: 0 17.3%;
  1533. justify-content: space-between;
  1534. display: flex;
  1535. .bot-line {
  1536. margin-top: 20px;
  1537. width: 21.3%;
  1538. height: 0px;
  1539. border: 1px solid rgba(207, 210, 213, 100);
  1540. }
  1541. .bot-text {
  1542. white-space: nowrap;
  1543. height: 17px;
  1544. margin-top: 13px;
  1545. margin-left: 12px;
  1546. margin-right: 12px;
  1547. font-size: 12px;
  1548. text-align: center;
  1549. color: rgba(182, 189, 195, 100);
  1550. }
  1551. }
  1552. }
  1553. // 导航栏
  1554. .navigation {
  1555. width: 100%;
  1556. // height: 40px;
  1557. padding: 10px 0;
  1558. background-color: #fff;
  1559. position: fixed;
  1560. bottom: 0;
  1561. left: 0;
  1562. display: flex;
  1563. justify-content: space-around;
  1564. text-align: center;
  1565. color: #999999;
  1566. .nav-icon {
  1567. width: 54px;
  1568. font-size: 24px
  1569. }
  1570. .nav-text {
  1571. font-size: 14px;
  1572. }
  1573. }
  1574. .shema {
  1575. width: 70%;
  1576. padding-bottom: 20px;
  1577. border-radius: 16px;
  1578. background-color: #fff;
  1579. position: fixed;
  1580. top: 100px;
  1581. left: 0;
  1582. right: 0;
  1583. margin: 0 auto;
  1584. z-index: 9999;
  1585. .title {
  1586. height: 33px;
  1587. color: rgba(16, 16, 16, 100);
  1588. font-size: 24px;
  1589. text-align: center;
  1590. padding: 16px 0;
  1591. }
  1592. .u-radio-group {
  1593. margin: 16px 5vw;
  1594. }
  1595. /deep/.u-radio {
  1596. width: 60vw !important;
  1597. padding: 24px 24px 40px;
  1598. line-height: 20px;
  1599. border-radius: 16px;
  1600. text-align: center;
  1601. border: #101010 1px solid;
  1602. margin-top: 12px;
  1603. }
  1604. /deep/ .u-radio__label {
  1605. text-align: left;
  1606. height: 24px;
  1607. // color: rgba(0, 185, 98, 100);
  1608. font-size: 24px;
  1609. }
  1610. p {
  1611. height: 22px;
  1612. color: rgba(102, 102, 102, 100);
  1613. font-size: 14px;
  1614. margin-top: 12px;
  1615. white-space: nowrap
  1616. }
  1617. .hint {
  1618. text-align: center;
  1619. }
  1620. .btn-box {
  1621. margin-top: 20px;
  1622. .choice-btn {
  1623. width: 80%;
  1624. }
  1625. }
  1626. }
  1627. .wrap {
  1628. display: flex;
  1629. align-items: center;
  1630. justify-content: center;
  1631. height: 100%;
  1632. }
  1633. // 登录提示
  1634. .login-prompt {
  1635. width: 91.4%;
  1636. height: 40px;
  1637. line-height: 40px;
  1638. border-radius: 50px;
  1639. text-align: left;
  1640. padding-left: 16px;
  1641. padding-right: 4px;
  1642. background-color: rgba(0, 0, 0, 0.6);
  1643. position: fixed;
  1644. bottom: 75px;
  1645. color: #ffffff;
  1646. .button {
  1647. width: 88px;
  1648. height: 32px;
  1649. line-height: 32px;
  1650. border-radius: 50px;
  1651. background-color: rgba(0, 185, 98, 100);
  1652. text-align: center;
  1653. float: right;
  1654. margin-top: 4px;
  1655. }
  1656. }
  1657. .showOss{
  1658. /deep/.u-model,/deep/.u-mode-center-box{
  1659. background-color: transparent;
  1660. }
  1661. }
  1662. </style>