index.vue 65 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763
  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" :img-mode="'scaleToFill'" height="120" :list="bannerList"
  8. @click="clickBanner" :name="'picUrl'">
  9. </ujp-swiper>
  10. </view>
  11. <!-- 选项列表 -->
  12. <view class="option-list">
  13. <view class="list-item" @click="getScanCode">
  14. <view class="icon iconfont" style="background: linear-gradient(45deg,#00B962,#5FE4A6);">
  15. &#xe61a;
  16. </view>
  17. <view class="text oldTextjp2" oldstyle="font-size: 18px;">
  18. 扫码充电
  19. </view>
  20. </view>
  21. <view class="list-item" @click="fastRecharge">
  22. <view class="icon iconfont" style="background: linear-gradient(45deg,#23AD9B,#4BD2C0);">
  23. &#xe629;
  24. </view>
  25. <view class="text oldTextjp2" oldstyle="font-size: 18px;">
  26. 快速充值
  27. </view>
  28. </view>
  29. <view class="list-item" @click="chargingRecord">
  30. <view class="icon iconfont" style="background: linear-gradient(45deg,#407DE4,#6FA5FF );">
  31. &#xe625;
  32. </view>
  33. <view class="text oldTextjp2" oldstyle="font-size: 18px;">
  34. 充电记录
  35. </view>
  36. </view>
  37. <view class="list-item" @click="toSearchPile">
  38. <view class="icon iconfont" style="background: linear-gradient(45deg,#6366FF,#9D9FFF);">
  39. &#xe622;
  40. </view>
  41. <view class="text oldTextjp2" oldstyle="font-size: 18px;">
  42. 附近站点
  43. </view>
  44. </view>
  45. </view>
  46. <!-- 充值活动 -->
  47. <view class=" top-up" v-if="activityList.length > 0 && !activityListShow">
  48. <view class="card-box">
  49. <view class="card" v-for="(item,index) in activityList" :key="item.id"
  50. @click="rechargeActivity(item)">
  51. <img :src="item.picUrl" alt="">
  52. </view>
  53. </view>
  54. </view>
  55. <u-modal v-if="false" v-model="showNt" class="showOss" :show-title="false" :show-confirm-button="false">
  56. <view class="slot-content">
  57. <u-image width="600" style="margin: auto;min-height: 250px;" mode="widthFix" v-show="showNtStep==0"
  58. src="@/assets/img/nt/f5surprised-1.png">
  59. <view slot="loading" style="height: 200px;">
  60. <u-loading mode="flower" size="186">
  61. </u-loading>
  62. </view>
  63. </u-image>
  64. <view style="color: #ecc07d;
  65. font-size: 64rpx;
  66. position: relative;
  67. top: -220rpx;
  68. right: -100rpx; width: 400rpx;" @click="showNtStepClick" v-show="showNtStep==0">
  69. <span>.</span>
  70. </view>
  71. <u-image width="600" style="margin: auto;;min-height: 250px;" mode="widthFix"
  72. v-show="showNtStep==1" src="@/assets/img/nt/f5surprised-2.png">
  73. </u-image>
  74. <u-image width="600" style="margin: auto;;min-height: 250px;" mode="widthFix"
  75. v-show="showNtStep==2" src="@/assets/img/nt/nt-activity-3.png">
  76. </u-image>
  77. <u-image width="500" style="color: #FFFFFF;
  78. font-size: 64rpx;
  79. position: relative;
  80. top: -540rpx;
  81. right: -60rpx;height: 0;
  82. " mode="widthFix" v-show="showNtStep==2" src="@/assets/img/nt/f5surprised-3.png">
  83. </u-image>
  84. <u-image width="36px" v-show="showNtStep==1||showNtStep==2" style="margin: auto; " mode="widthFix"
  85. @click="showNt=false" src="../../assets/img/if-close-line-circled.png"></u-image>
  86. <view style="color: #ecc07d;
  87. font-size: 72rpx;
  88. position: relative;
  89. top: -280rpx;
  90. right: -144rpx; width: 310rpx;" @click="showNtStepClick" v-show="showNtStep==2">
  91. <span>.</span>
  92. </view>
  93. <view style="color: #FFFFFF;
  94. font-size: 64rpx;
  95. position: relative;
  96. top: -688rpx;
  97. right: -80rpx;" :style="{
  98. right:showNtValue>99?'-80rpx':(showNtValue>9?'-95rpx':'-110rpx')
  99. }" v-show="showNtStep==1"><b>{{showNtValue}}</b>
  100. <span style="font-size: 28rpx;">元</span>
  101. </view>
  102. <view style="color: #ecc07d;
  103. font-size: 72rpx;
  104. position: relative;
  105. top: -390rpx;
  106. right: -144rpx; width: 310rpx;" @click="showNtStepClick" v-show="showNtStep==1">
  107. <span>.</span>
  108. </view>
  109. <view v-show="showNtStep==1" style="color: #ecc07d;
  110. font-size: 32rpx;
  111. position: relative;
  112. top: -180rpx;
  113. right: -60rpx; width: 440rpx;">注:逢5红包用完后下次才可以领取新红包哦!</view>
  114. </view>
  115. </u-modal>
  116. <u-modal v-model="showOss" class="showOss" :show-title="false" :show-confirm-button="false">
  117. <view class="slot-content">
  118. <u-image width="250px" style="margin: auto;min-height: 250px;" mode="widthFix"
  119. @click="clickBanner(showOssIndex,true)" :src="showOssImg">
  120. <view slot="loading" style="height: 200px;">
  121. <u-loading mode="flower" size="186">
  122. </u-loading>
  123. </view>
  124. </u-image>
  125. <u-image width="36px" style="margin: auto;" mode="widthFix" @click="showOss=false"
  126. src="../../assets/img/if-close-line-circled.png"></u-image>
  127. </view>
  128. </u-modal>
  129. <!-- 专享优惠券 -->
  130. <!--
  131. <view class="couponmain" v-if="false&&bannerListTop[showTopIndex].topmodel=='coupon'">
  132. <view class="main">
  133. <view class="exclusive">
  134. <p class="exclusive1">恭喜你</p>
  135. <p class="exclusive2">获得{{bannerListTop[showTopIndex].value}}元月卡卷</p>
  136. <view class="img">
  137. <img src="../../assets/img/Frame915.png" alt="">
  138. <view class="num">
  139. {{bannerListTop[showTopIndex].value}}<span class="unit">元</span>
  140. </view>
  141. <view class="unit2">月卡优惠券</view>
  142. <view class="ticket-info">
  143. <view class="ticket-name">
  144. {{bannerListTop[showTopIndex].text}}
  145. </view>
  146. </view>
  147. </view>
  148. <view class="exclusive-text"> 持月卡在指定站点充电,充电服务费全免</view>
  149. <button class="exclusive-btn" @click="clickBannerTop()" shape="circle">立即开通</button>
  150. </view>
  151. </view>
  152. </view> -->
  153. <u-modal v-model="showTop" class="showOss" :show-title="false" :show-confirm-button="false">
  154. <view class="slot-content" >
  155. <swiper class="swiper" circular :indicator-dots="true" :autoplay="true" :interval="5000"
  156. :duration="500">
  157. <swiper-item class="swiperitem" v-for="(item,i) in bannerListTop" :key="i">
  158. <u-image width="250px;" bgColor="#ff000000" style="margin: auto;min-height: 250px;"
  159. mode="widthFix" @click="clickBannerTopI(i)" :src="item.picUrl">
  160. <view slot="loading" style="height: 200px;">
  161. <u-loading mode="flower" size="186">
  162. </u-loading>
  163. </view>
  164. </u-image>
  165. </swiper-item>
  166. <swiper-item class="swiperitem" v-if="showNt">
  167. <u-image width="600" style="margin: auto;min-height: 250px;" mode="widthFix" v-show="showNtStep==0"
  168. src="@/assets/img/nt/f5surprised-1.png">
  169. <view slot="loading" style="height: 200px;">
  170. <u-loading mode="flower" size="186">
  171. </u-loading>
  172. </view>
  173. </u-image>
  174. <view style="color: #ecc07d;
  175. font-size: 64rpx;
  176. position: relative;
  177. top: -220rpx;
  178. right: -100rpx; width: 400rpx;" @click="showNtStepClick" v-show="showNtStep==0">
  179. <span>.</span>
  180. </view>
  181. <u-image width="600" style="margin: auto;;min-height: 250px;" mode="widthFix"
  182. v-show="showNtStep==1" src="@/assets/img/nt/f5surprised-2.png">
  183. </u-image>
  184. <u-image width="600" style="margin: auto;min-height: 250px;" mode="widthFix"
  185. v-show="showNtStep==2" src="@/assets/img/nt/nt-activity-3.png">
  186. </u-image>
  187. <u-image width="500" style="color: #FFFFFF;
  188. font-size: 64rpx;
  189. position: relative;
  190. top: -540rpx;
  191. right: -60rpx;height: 0;
  192. " mode="widthFix" v-show="showNtStep==2" src="@/assets/img/nt/f5surprised-3.png">
  193. </u-image>
  194. <u-image width="36px" v-show="showNtStep==1||showNtStep==2" style="margin: auto; " mode="widthFix"
  195. @click="showNt=false" src="../../assets/img/if-close-line-circled.png"></u-image>
  196. <view style="color: #ecc07d;
  197. font-size: 72rpx;
  198. position: relative;
  199. top: -280rpx;
  200. right: -144rpx; width: 310rpx;" @click="showNtStepClick" v-show="showNtStep==2">
  201. <span>.</span>
  202. </view>
  203. <view style="color: #FFFFFF;
  204. font-size: 64rpx;
  205. position: relative;
  206. top: -688rpx;
  207. right: -80rpx;" :style="{
  208. right:showNtValue>99?'-80rpx':(showNtValue>9?'-95rpx':'-110rpx')
  209. }" v-show="showNtStep==1"><b>{{showNtValue}}</b>
  210. <span style="font-size: 28rpx;">元</span>
  211. </view>
  212. <view style="color: #ecc07d;
  213. font-size: 72rpx;
  214. position: relative;
  215. top: -390rpx;
  216. right: -144rpx; width: 310rpx;" @click="showNtStepClick" v-show="showNtStep==1">
  217. <span>.</span>
  218. </view>
  219. <!-- <view v-show="showNtStep==1" style="color: #ecc07d;
  220. font-size: 32rpx;
  221. position: relative;
  222. top: -180rpx;
  223. right: -60rpx; width: 440rpx;">注:逢5红包用完后下次才可以领取新红包哦!</view> -->
  224. </swiper-item>
  225. </swiper>
  226. <u-image width="36px"
  227. style="margin: auto; margin-top: 10px;" mode="widthFix" @click="showTop=false"
  228. src="../../assets/img/if-close-line-circled.png"></u-image>
  229. </view>
  230. </u-modal>
  231. <!-- 模式选择 -->
  232. <u-mask :show="show">
  233. <view class="wrap">
  234. <view class="shema" @tap.stop>
  235. <view class="title">
  236. 设置浏览模式
  237. </view>
  238. <view class="">
  239. <u-radio-group v-model="value">
  240. <u-radio v-for="(item, index) in list" :key="index" :name="item.name"
  241. :disabled="item.disabled" active-color="#00B962">
  242. {{item.name}}
  243. <p v-if="item.name == '长辈模式'">字体更大 看的清楚</p>
  244. <p v-if="item.name == '标准模式'">信息丰富 功能全面</p>
  245. </u-radio>
  246. </u-radio-group>
  247. </view>
  248. <view class="hint">可在 {{""}}我的-设置 {{""}}页面中切换</view>
  249. <view class="btn-box">
  250. <u-button class="choice-btn" type="success" shape="circle"
  251. @click="elderClick">我选好了</u-button>
  252. </view>
  253. </view>
  254. </view>
  255. </u-mask>
  256. <!-- <view class="top-up-title oldTextjp" oldstyle="font-size:20px;"><text class="line"></text>最新活动</view>
  257. <view class="img-box">
  258. <view class="img-1" v-for="(item,index) in activityList" :key="item.id"
  259. @click="rechargeActivity(item)">
  260. <img :src="item.picUrl" alt="">
  261. </view>
  262. </view> -->
  263. </view>
  264. <!-- 最新活动 -->
  265. <view class=" top-up" v-if="activityList.length > 0 && activityListShow">
  266. <view class="top-up-title oldTextjp" oldstyle="font-size:20px;"><text class="line"></text>最新活动</view>
  267. <view class="img-box2">
  268. <view class="left-image" :style="{backgroundImage: 'url(' + activityDateList.picUrl + ')'}"
  269. @click="rechargeActivity(activityDateList)">
  270. <p>{{activityDateList.name}}</p>
  271. <view class="time-activities">
  272. 距活动结束仅剩 <text class="time">{{description}}</text>
  273. </view>
  274. </view>
  275. <view class="right-image">
  276. <img class="margin-bottom" v-for="(item,index) in activityList" :key="item.id"
  277. @click="rechargeActivity(item)" :src="item.narrowUrl" alt="">
  278. <!-- <img class="margin-bottom" src="../../assets/img/topup2.png" alt="" @click="rechargeActivity(0)">
  279. <img class="margin-bottom" src="../../assets/img/topup3.png" alt="" @click="rechargeActivity(1)"> -->
  280. </view>
  281. </view>
  282. </view>
  283. <template v-if="message == 'getLocation:ok' && stationList.length != 0 && chargeList.length == 0">
  284. <view class=" top-up">
  285. <view class="top-up-title oldTextjp" oldstyle="font-size:20px;"><text class="line"></text>附近站点
  286. <view class="pack-up" v-show="!listShow" @click="listShow=true">
  287. 收起<text class="iconfont">&#xe607;</text>
  288. </view>
  289. <view class="pack-up" v-if="listShow" @click="listShow=false">
  290. 展开<text class="iconfont">&#xe62c;</text>
  291. </view>
  292. </view>
  293. </view>
  294. <!-- 附近站点 -->
  295. <view class="station" v-for="(stationData,i) in stationList" :key="i" v-show="!listShow||i==0"
  296. @click="gotoUrl('pages/searchPile/stationAndPile/stationDetails?id=' + stationData.id)">
  297. <view class="head">
  298. <view class="title oldTextjp" oldstyle="font-size: 20px;">
  299. {{stationData.name}}
  300. </view>
  301. <view class="distance ">
  302. <text class="iconfont"
  303. style="color:#666666">&#xe615;</text>{{stationData.distance!=null&&stationData.distance>0.1 ? stationData.distance.toFixed(1)+'公里':'小于100米'}}
  304. </view>
  305. </view>
  306. <view class="sign" v-if="stationData.stationType==50">
  307. <view class="sign-tag sign-0" v-if="stationData.isRecommend">推荐</view>
  308. <view class="sign-tag sign-5" v-if="stationData.isAlways">常用</view>
  309. {{stationData.address}}
  310. </view>
  311. <view class="sign" v-else>
  312. <view class="sign-tag sign-0" v-if="stationData.isRecommend">推荐</view>
  313. <view class="sign-tag sign-5" v-if="stationData.isAlways">常用</view>
  314. <!-- -->
  315. <view class="sign-1"
  316. v-if="stationData.giveDiscount&&stationData.discountRatio&&stationData.discountRatio!=100">
  317. 会员服务费{{discountRatio10(stationData.discountRatio)}}折</view>
  318. <view class="sign-3" v-if="stationData.category=='超充'">160kW超充站</view>
  319. <view class="sign-4"
  320. v-if="stationData.nightLowPriceEnabled">
  321. 夜间超低价</view>
  322. <view class="sign-2" v-if="stationData.tagList.length != 0"
  323. v-for="(tagName,tagIndex) in stationData.tagList" :key="tagIndex">{{tagName}}</view>
  324. </view>
  325. <view class="price-free oldTextClass">
  326. <view class="price" v-if="personInfo&&personInfo.userType==2">
  327. <view class="price-1">
  328. <text class="num">
  329. {{!stationData.giveDiscount ? (stationData.electricityPrice+stationData.servicePrice).toFixed(2)
  330. : (stationData.electricityPrice+stationData.discountServicePrice).toFixed(2)}}</text>
  331. <text class="unit " oldstyle="font-size: 48rpx;">元/度</text>
  332. </view>
  333. <view class="price-2 " oldstyle="font-size: 48rpx;" v-if="stationData.giveDiscount">
  334. <text
  335. class="num">{{(stationData.electricityPrice+stationData.servicePrice).toFixed(2)}}</text>
  336. <text class="unit ">元/度</text>
  337. </view>
  338. </view>
  339. <!-- 游客价格-->
  340. <view class="price" v-else>
  341. <view class="price-1">
  342. <text class="num">
  343. {{(stationData.electricityPrice+stationData.servicePrice).toFixed(2)}}</text>
  344. <text class="unit " oldstyle="font-size: 48rpx;">元/度</text>
  345. </view>
  346. <view class="price-3 " oldstyle="font-size: 48rpx;" v-if="stationData.giveDiscount">
  347. <text class="num1">会员</text>
  348. <text class="num">{{ (stationData.electricityPrice+stationData.discountServicePrice).toFixed(2)}}</text>
  349. <text class="unit ">元/度</text>
  350. </view>
  351. </view>
  352. <view class="free">
  353. <view class="fast" v-if="stationData.fastNum">
  354. <view class="fast-font">
  355. </view>
  356. <view class="num">
  357. {{stationData.fastAvailableNum}}/{{stationData.fastNum}}
  358. </view>
  359. </view>
  360. <view class="slow oldTextjp2" oldstyle="margin-left: 1px;" v-if="stationData.slowNum">
  361. <view class="slow-font">
  362. </view>
  363. <view class="num">
  364. {{stationData.slowAvailableNum}}/{{stationData.slowNum}}
  365. </view>
  366. </view>
  367. </view>
  368. </view>
  369. </view>
  370. <view class="bottom" @click="searchStationData(true)" v-if="recordsTotal2!=stationList.length">
  371. <view class="bot">
  372. <view class="bot-line"></view>
  373. <view class="bot-text " style="color: #00B962;">点击查看更多站点</view>
  374. <view class="bot-line"></view>
  375. </view>
  376. </view>
  377. <view class="bottom" v-else>
  378. <view class="bot">
  379. <view class="bot-line"></view>
  380. <view class="bot-text " style="color: #00B962;">已经到底了</view>
  381. <view class="bot-line"></view>
  382. </view>
  383. </view>
  384. </template>
  385. <template v-if="loading&&message == 'getLocation:ok' && stationList.length == 0 && chargeList.length == 0">
  386. <view class="location-box">
  387. <view class="location">
  388. <view class="location-text">
  389. <view class="text-1 oldTextjp" oldstyle="font-size: 20px;">
  390. {{loading?'查询失败':'加载中'}}
  391. </view>
  392. <view class="text-2 oldTextjp2" oldstyle="font-size: 16px;">
  393. {{loading?'未查询到可用的站点':'正在为你查找附近的站点'}}
  394. </view>
  395. <view class="text-3 oldTextjp2"
  396. v-if="loading"
  397. oldstyle="font-size: 16px;" @click="toSearchPile" >
  398. 去找桩
  399. </view>
  400. </view>
  401. <view class="img-box">
  402. <img src="static/img/暂无网络信号-缺省页 1.png">
  403. </view>
  404. </view>
  405. </view>
  406. </template>
  407. <!-- 定位 -->
  408. <view class="location-box"
  409. v-if="message != 'getLocation:ok' && stationList.length == 0 && chargeList.length == 0">
  410. <view class="location">
  411. <view class="location-text">
  412. <view class="text-1 oldTextjp" oldstyle="font-size: 20px;">
  413. 定位中...
  414. </view>
  415. <view class="text-2 oldTextjp2" oldstyle="font-size: 16px;">
  416. 授权定位后可查询附近充电站
  417. </view>
  418. <view class="text-3 oldTextjp2" oldstyle="font-size: 16px;" @click="getPoint()">
  419. 重新定位
  420. </view>
  421. </view>
  422. <view class="img-box">
  423. <img src="static/img/暂无网络信号-缺省页 1.png">
  424. </view>
  425. </view>
  426. </view>
  427. <!-- 附近站点 -->
  428. <view class="station" v-for="(stationData,i) in defaultStation" :key="i" v-if="stationList.length == 0 && chargeList.length == 0"
  429. @click="gotoUrl('pages/searchPile/stationAndPile/stationDetails?id=' + stationData.id)">
  430. <view class="head">
  431. <view class="title oldTextjp" oldstyle="font-size: 20px;">
  432. {{stationData.name}}
  433. </view>
  434. <view class="distance " v-if="false">
  435. <text class="iconfont"
  436. style="color:#666666">&#xe615;</text>{{stationData.distance!=null&&stationData.distance>0.1 ? stationData.distance.toFixed(1)+'公里':'小于100米'}}
  437. </view>
  438. </view>
  439. <view class="sign" >
  440. <view class="sign-tag sign-0" >推荐</view>
  441. <template v-if="personInfo&&personInfo.userType!=1">
  442. <!-- -->
  443. <view class="sign-1"
  444. v-if="stationData.giveDiscount&&stationData.discountRatio&&stationData.discountRatio!=100">
  445. 会员服务费{{discountRatio10(stationData.discountRatio)}}折</view>
  446. <view class="sign-3" v-if="stationData.category=='超充'">160kW超充站</view>
  447. <view class="sign-4"
  448. v-if="stationData.nightLowPriceEnabled">
  449. 夜间超低价</view>
  450. </template>
  451. <view class="sign-2" v-if="stationData.tagList.length != 0"
  452. v-for="(tagName,tagIndex) in stationData.tagList" :key="tagIndex">{{tagName}}</view>
  453. </view>
  454. <view class="price-free oldTextClass">
  455. <view class="price">
  456. <view class="price-1">
  457. <text class="num">
  458. {{!stationData.giveDiscount ? (stationData.electricityPrice+stationData.servicePrice).toFixed(2)
  459. : (stationData.electricityPrice+stationData.discountServicePrice).toFixed(2)}}</text>
  460. <text class="unit " oldstyle="font-size: 48rpx;">元/度</text>
  461. </view>
  462. <view class="price-2 " oldstyle="font-size: 48rpx;" v-if="stationData.giveDiscount">
  463. <text
  464. class="num">{{(stationData.electricityPrice+stationData.servicePrice).toFixed(2)}}</text>
  465. <text class="unit ">元/度</text>
  466. </view>
  467. </view>
  468. <view class="free">
  469. <view class="fast" v-if="stationData.fastNum">
  470. <view class="fast-font">
  471. </view>
  472. <view class="num">
  473. {{stationData.fastAvailableNum}}/{{stationData.fastNum}}
  474. </view>
  475. </view>
  476. <view class="slow oldTextjp2" oldstyle="margin-left: 1px;" v-if="stationData.slowNum">
  477. <view class="slow-font">
  478. </view>
  479. <view class="num">
  480. {{stationData.slowAvailableNum}}/{{stationData.slowNum}}
  481. </view>
  482. </view>
  483. </view>
  484. </view>
  485. </view>
  486. <!-- 新闻 -->
  487. <view class="news-title" v-if="chargeList.length > 0">
  488. <view class="news-title-left oldTextjp" oldstyle="font-size:20px;">
  489. <view class="line" style="margin-top:4px;"></view>充电车辆
  490. <view class="lineBox" v-if="chargeList.length > 1">{{chargeList.length }}</view>
  491. </view>
  492. <view class="more oldTextjp2" oldstyle="font-size:16px;" v-if="chargeList.length > 3" @click="toAll">查看全部
  493. <view class="more-icon iconfont"> &#xe600;</view>
  494. </view>
  495. </view>
  496. <!-- 充电状态 -->
  497. <view class="state1 state" v-if="chargeList.length > 0" v-for="(item,index) in chargeList" v-show="index<3"
  498. :key="item.id" @click="gotoUrl('pages/searchPile/chargeProcess/dcCharging?id=' + item.id)">
  499. <view class="state-text">
  500. <view class="text-1 " oldstyle="font-size: 20px;">
  501. <span v-if="item.carNumber">{{item.carNumber}}</span>
  502. {{item.statusText}}...
  503. </view>
  504. <view v-if="item.status == '0'" class="text-2 " oldstyle="font-size: 16px;">
  505. 启动中
  506. </view>
  507. <view v-if="item.status == '1'" class="text-2 " oldstyle="font-size: 16px;">
  508. 已充
  509. <span
  510. class="text-21">{{item.electricQuantity?(item.electricQuantity/10000).toFixed(1):'0.0'}}度</span>
  511. 合计<span class="text-22">{{item.dueFee != null ? item.dueFee.toFixed(2) : '0.00'}}元</span>
  512. <view style="display: initial;" v-if="item.endSoc">电量<span class="text-21">{{item.endSoc}}%</span>
  513. </view>
  514. </view>
  515. <!-- <view v-if="item.status == '2'" class="text-2" style="color: red;">
  516. 超出时间将收取占位费
  517. </view> -->
  518. <view v-if="item.status == '4'" class="text-2 oldTextjp2" oldstyle="font-size: 16px;">
  519. <span v-if="item.waitNum==1">请耐心等待</span>
  520. <span v-else>前方等待{{item.waitNum-1}}位</span>
  521. </view>
  522. <view class="text-3 " oldstyle="font-size: 16px;">
  523. <p style=" width: 160%;">
  524. {{item.deviceName}}枪{{item.channelNo}}/{{item.stationName}}<br />当前电价{{item.chargingCostPrice.toFixed(2)}}元/度
  525. </p>
  526. </view>
  527. </view>
  528. <view class="img-box4">
  529. <img v-if="item.status == '0'" src="static/img/等待中-缺省页.png">
  530. <img v-if="item.status == '1'" src="static/img/充电中-缺省页.png">
  531. <img v-if="item.status == '2'" src="static/img/已充满-缺省页.png">
  532. <img v-if="item.status == '4'" src="static/img/等待中-缺省页.png">
  533. <view class="img-view">
  534. <view class="more-icon iconfont">查看 &#xe600;</view>
  535. </view>
  536. </view>
  537. </view>
  538. <view class="bottom" v-if="chargeList.length > 3" @click="toAll()">
  539. <view class="bot">
  540. <view class="bot-line"></view>
  541. <view class="bot-text " style="color: #00B962;">点击查看全部充电车辆</view>
  542. <view class="bot-line"></view>
  543. </view>
  544. </view>
  545. <!-- 新闻 -->
  546. <view class="news-title" v-if="newsList.length > 0">
  547. <view class="news-title-left oldTextjp" oldstyle="font-size:20px;">
  548. <view class="line" style="margin-top:4px;"></view>新闻公告
  549. </view>
  550. <view class="more oldTextjp2" oldstyle="font-size:16px;" @click="toNewsNotice">更多<view
  551. class="more-icon iconfont"> &#xe600;</view>
  552. </view>
  553. </view>
  554. <view class="news">
  555. <view class="news-content" v-for="(item,index) in newsList" :key="index"
  556. @click="gotoUrl('pages/article/articleDetails?id=' + item.id)">
  557. <view class="content-text">
  558. <view class="content-title oldTextjp2" oldstyle="font-size: 18px;">{{item.title}}</view>
  559. <view class="news-time">{{item.createTime?item.createTime.slice(5,10):''}}</view>
  560. </view>
  561. <view class="content-img">
  562. <img :src="item.pic ? item.pic : 'static/img/image_default.png'" alt="">
  563. </view>
  564. </view>
  565. </view>
  566. <view class="bottom">
  567. <view class="bot">
  568. <view class="bot-line"></view>
  569. <view class="bot-text oldTextjp2" oldstyle="font-size: 14px;">已经到底了</view>
  570. <view class="bot-line"></view>
  571. </view>
  572. </view>
  573. <!-- 导航栏 -->
  574. <view class="navigation">
  575. <view class="login-prompt" v-if="!userId">
  576. 登录显示更多会员服务
  577. <text class="button" @click="toLogin">登录/注册</text>
  578. </view>
  579. </view>
  580. <Tabbar :current="0" ref="tabbarMain" :elderStatus="elderStatus"></Tabbar>
  581. </view>
  582. </template>
  583. <script>
  584. import * as API from '@/apis/index.js'
  585. import * as newsApi from '@/apis/news.js'
  586. import * as WxJsApi from '@/utils/wxJsApi.js'
  587. import * as siteApi from '@/apis/site.js'
  588. import * as loginApi from '@/apis/login.js'
  589. import * as userApi from '@/apis/user.js'
  590. import MapLoader from '@/utils/AMap'
  591. import Tabbar from '@/components/Tabbar.vue'
  592. import {
  593. newDate,
  594. currentTimeStamp,
  595. parseUnixTime,
  596. secondsDistance,
  597. hourDistanceArr
  598. } from '@/utils'
  599. export default {
  600. components: {
  601. Tabbar
  602. },
  603. data() {
  604. return {
  605. listShow: false,
  606. stationList: [],
  607. bannerList: [],
  608. bannerListTop: [],
  609. timeOut: false,
  610. pointTimeOut: true,
  611. chargeList: [],
  612. activityList: [],
  613. userId: '',
  614. newsList: [],
  615. pageIndex: 1,
  616. recordsTotal: 0,
  617. longitude: '',
  618. latitude: '',
  619. message: '',
  620. indexLogo: '',
  621. showOss: false,
  622. showOssImg: '',
  623. showOssIndex: '',
  624. loading:false,
  625. showTop: false,
  626. showTopImg: '',
  627. showTopIndex: 0,
  628. show: false,
  629. list: [{
  630. name: '长辈模式',
  631. disabled: false
  632. },
  633. {
  634. name: '标准模式',
  635. disabled: false
  636. },
  637. ],
  638. // u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
  639. value: '长辈模式',
  640. elderStatus: false,
  641. fontMode: '',
  642. description: '00:00:00',
  643. activityDate: '',
  644. activityDateList: {},
  645. activityListShow: false,
  646. personInfo: {},
  647. showNt: false,
  648. showNtStep: 0,
  649. showNtValue: 30,
  650. couponList: [],
  651. couponSelect: {},
  652. pageIndex2: 1,
  653. recordsTotal2: 0,
  654. defaultStation:[],
  655. }
  656. },
  657. onLoad(op) {
  658. if (op.jpcode) {
  659. var k = API.codeOperation(op.jpcode)
  660. if (k) {
  661. uni.navigateTo({
  662. url: k
  663. })
  664. }
  665. }
  666. },
  667. onUnload() {
  668. this.timeOut = false;
  669. this.pointTimeOut = false;
  670. },
  671. onHide() {
  672. this.timeOut = false;
  673. this.pointTimeOut = false;
  674. },
  675. onReachBottom() {
  676. // if (this.newsList.length < this.recordsTotal) {
  677. // this.myLoadmore();
  678. // }
  679. },
  680. onShow() {
  681. if (this.$refs.tabbarMain) {
  682. this.$refs.tabbarMain.setcount(0);
  683. }
  684. if (!this.pointTimeOut) {
  685. this.pointTimeOut = true
  686. this.getPointTimeOut();
  687. }
  688. this.getUserInfo();
  689. },
  690. onReady() {
  691. // if (this.carhelp.get("getElderModeClass")) {
  692. // if(this.carhelp.get("getElderModeClass") == "长辈模式") {
  693. // this.fontMode = '1';
  694. // } else {
  695. // this.fontMode = '0';
  696. // }
  697. // API.changeFont({fontMode: this.fontMode}).then((res) => {
  698. // }).catch(error => {
  699. // uni.showToast({
  700. // title: error,
  701. // icon: "none"
  702. // })
  703. // })
  704. // }
  705. //this.getUserInfo();
  706. WxJsApi.getWxConfig(['getLocation', 'addEventListener', 'scanQRCode']).then((res) => {
  707. // //(res)
  708. }).catch(error => {
  709. //(res)
  710. })
  711. this.getBannerInfo("homepage");
  712. this.getBannerInfoTop("home-top");
  713. //this.getBannerInfoTop("home-top");
  714. this.getPointTimeOut();
  715. this.getNewsList();
  716. this.getActivityInfoList();
  717. this.getChargingStationDetail()
  718. },
  719. methods: {
  720. getChargingStationDetail(){
  721. var defaultStation=process.car.defaultStation
  722. for(var item in defaultStation){
  723. siteApi.getChargingStationDetail({
  724. stationId:defaultStation[item]
  725. }).then((res) => {
  726. var station=res.data.station
  727. //this.MapLoaderthen(station)
  728. this.defaultStation.push(station)
  729. }).catch(error => {
  730. uni.showToast({
  731. title: error,
  732. icon: "none"
  733. })
  734. })
  735. }
  736. },
  737. getf5surprised() {
  738. userApi.exchangeGroupDetail("逢5红包").then((res) => {
  739. var message = res.message;
  740. this.couponList = res.data;
  741. if (this.couponList.length) {
  742. var list = res.data;
  743. var x = 0;
  744. for (var i in list) {
  745. var obj = list[i]
  746. if (!obj.probability) {
  747. continue;
  748. }
  749. var end = x + obj.probability;
  750. obj.start = x;
  751. obj.end = end;
  752. x = end;
  753. }
  754. var code = parseInt(Math.random() * x)
  755. // console.log(code)
  756. // console.log(list)
  757. var selectObj = null;
  758. for (var i in list) {
  759. var obj = list[i]
  760. if (!obj.probability) {
  761. continue;
  762. }
  763. if (code >= obj.start && code < obj.end) {
  764. selectObj = obj;
  765. this.couponSelect = selectObj;
  766. break
  767. }
  768. }
  769. if (selectObj) {
  770. this.showNt = true
  771. this.showTop = true;
  772. this.showNtStep = 0;
  773. this.showNtValue = this.couponSelect.totalDiscount
  774. } else {
  775. //this.getBannerInfoTop("home-top");
  776. }
  777. //console.log(selectObj)
  778. // this.exchangeDetailF5(selectObj.key);
  779. } else if (message == '1001') { //
  780. //周五,但是因为手里有卷, 所以不能抽
  781. var nowtime = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d}')
  782. var time = this.carhelp.get("getf5surprised-time");
  783. if ((time && nowtime == time)) {
  784. //this.getBannerInfoTop("home-top");
  785. } else {
  786. this.carhelp.set("getf5surprised-time", nowtime);
  787. }
  788. this.showNt = true
  789. this.showTop = true;
  790. this.showNtStep = 2;
  791. } else {
  792. //this.getBannerInfoTop("home-top");
  793. }
  794. }).catch(error => {
  795. uni.showToast({
  796. title: error,
  797. icon: "none"
  798. })
  799. })
  800. },
  801. getNewYear() {
  802. //var obj=this.carhelp.get("newyear_activity2023-2-15")
  803. //
  804. var sz = ["1615623336912621591", "1615623336912621590"];
  805. var code = parseInt(Math.random() * 2)
  806. this.carhelp.set("newyear_activity2023-2-15", {
  807. nt: sz[code],
  808. code: code,
  809. status: 0
  810. })
  811. //先查询另一个领取过没
  812. userApi.exchangeDetail({
  813. key: sz[code == 0 ? 1 : 0]
  814. }).then((res) => {
  815. if (!res.data.enabled) {
  816. if (res.data.code == 2) {
  817. //未开始
  818. } else {
  819. //已经结束
  820. }
  821. //this.getBannerInfoTop("home-top");
  822. } else if (res.data.status == 1) {
  823. //this.getBannerInfoTop("home-top");
  824. //已经兑换,或者不能兑换
  825. } else if (res.data.status == 2) {
  826. // this.showNtValue=res.data.totalDiscount
  827. this.exchangeDetail(sz[code]);
  828. } else {
  829. //res.data.status==0
  830. //this.showNtValue=res.data.totalDiscount
  831. this.exchangeDetail(sz[code], sz[code == 0 ? 1 : 0]);
  832. }
  833. }).catch(error => {
  834. //this.showNt = false;
  835. uni.showToast({
  836. title: error,
  837. icon: "none"
  838. })
  839. })
  840. },
  841. exchangeDetail(exchangeCode, code2) {
  842. uni.showLoading({
  843. title: "加载中",
  844. mask: true,
  845. })
  846. userApi.exchangeDetail({
  847. key: exchangeCode
  848. }).then((res) => {
  849. uni.hideLoading();
  850. //
  851. if (!res.data.enabled) {
  852. if (res.data.code == 2) {
  853. //未开始
  854. } else {
  855. //已经结束
  856. }
  857. //this.getBannerInfoTop("home-top");
  858. } else if (res.data.status == 1) {
  859. //this.getBannerInfoTop("home-top");
  860. //已经兑换,
  861. } else if (res.data.status == 2) {
  862. if (code2) {
  863. //试试另一张卷
  864. var c = this.carhelp.get("newyear_activity2023-2-15")
  865. if (c) {
  866. this.carhelp.set("newyear_activity2023-2-15", {
  867. nt: code2,
  868. code: c.code == 0 ? 1 : 0,
  869. status: 0
  870. })
  871. }
  872. this.exchangeDetail(code2)
  873. } else {
  874. //this.getBannerInfoTop("home-top");
  875. }
  876. //不能兑换
  877. } else {
  878. this.showNt = true
  879. this.showTop = true;
  880. this.showNtStep = 0;
  881. this.showNtValue = res.data.totalDiscount
  882. }
  883. }).catch(error => {
  884. //this.showNt = false;
  885. uni.showToast({
  886. title: error,
  887. icon: "none"
  888. })
  889. })
  890. },
  891. redeemF5(exchangeCode) {
  892. uni.showLoading({
  893. title: "加载中",
  894. mask: true,
  895. })
  896. userApi.exchangeByGroupFive({
  897. key: exchangeCode
  898. }).then((res) => {
  899. uni.hideLoading();
  900. this.showNtStep = 1
  901. var nowtime = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d}')
  902. this.carhelp.set("getf5surprised-time", nowtime);
  903. }).catch(error => {
  904. //this.showNt = false;
  905. uni.showToast({
  906. title: error,
  907. icon: "none"
  908. })
  909. })
  910. },
  911. redeemNow(exchangeCode) {
  912. uni.showLoading({
  913. title: "加载中",
  914. mask: true,
  915. })
  916. userApi.exchange({
  917. key: exchangeCode
  918. }).then((res) => {
  919. uni.hideLoading();
  920. this.showNtStep = 1
  921. this.carhelp.set("newyear_activity2023-2-15", {
  922. nt: exchangeCode,
  923. status: 1
  924. })
  925. }).catch(error => {
  926. //this.showNt = false;
  927. uni.showToast({
  928. title: error,
  929. icon: "none"
  930. })
  931. })
  932. },
  933. showNtStepClick() {
  934. if (this.showNtStep == 0) {
  935. if (this.personInfo.userType != 1) {
  936. this.redeemF5(this.couponSelect.key);
  937. } else {
  938. //this.showNt = false;
  939. uni.showModal({
  940. title: "提示",
  941. content: "游客无法兑换,请先注册为会员后再兑换",
  942. confirmText: "前往注册",
  943. success: res1 => {
  944. if (res1.confirm) {
  945. uni.navigateTo({
  946. url: '/pages/login/login'
  947. })
  948. } else if (res1.cancel) {
  949. //('用户点击取消');
  950. }
  951. }
  952. })
  953. }
  954. } else if (this.showNtStep == 1 || this.showNtStep == 2 || this.showNtStep == 3 || this.showNtStep == 4) {
  955. //this.showNt = false;
  956. uni.navigateTo({
  957. url: "/pages/user/coupon/myCoupon"
  958. })
  959. }
  960. },
  961. test() {
  962. if (process.env.NODE_ENV === "development") {
  963. }
  964. },
  965. goSearch() {
  966. this.$refs.tabbarMain.beforeSwitch(1)
  967. },
  968. nextTop(index) {
  969. this.showTopImg = this.bannerListTop[index + 1].picUrl;
  970. this.showTopIndex = index + 1;
  971. },
  972. getDescriptionTime() {
  973. var date = this.activityDate;
  974. var dateMonth1 = new Date().getMonth() + 1;
  975. var dateDay1 = new Date().getDate();
  976. var dateMonth2 = parseInt(date.slice(5, 7));
  977. var dateDay2 = parseInt(date.slice(8, 10));
  978. if (dateMonth1 < dateMonth2) {
  979. var days = new Date(new Date().getFullYear(), dateMonth1, 0).getDate();
  980. dateDay2 = dateDay2 + days;
  981. console.log(dateDay2)
  982. }
  983. if (dateDay1 < dateDay2 - 2) {
  984. this.description = dateDay2 - dateDay1 + '天'
  985. } else {
  986. var dateTime2 = new Date(date).getTime()
  987. var c = hourDistanceArr(new Date(), new Date(dateTime2))
  988. if (c[0] < 10) {
  989. c[0] = '0' + c[0];
  990. }
  991. if (c[1] < 10) {
  992. c[1] = '0' + c[1];
  993. }
  994. if (c[2] < 10) {
  995. c[2] = '0' + c[2];
  996. }
  997. this.description = c[0] + ':' + c[1] + ':' + c[2];
  998. if (this.description == '00:00:00') {
  999. this.activityListShow = false;
  1000. }
  1001. setTimeout(() => {
  1002. this.getDescriptionTime();
  1003. }, 1000)
  1004. }
  1005. },
  1006. getUserInfo() {
  1007. uni.showLoading({
  1008. title: "加载中",
  1009. mask: true,
  1010. })
  1011. loginApi.findByOpenId({
  1012. openId: this.carhelp.getOpenId(),
  1013. noerror: true,
  1014. }).then((res) => {
  1015. uni.hideLoading();
  1016. if (res.code == 200 && res.result) {
  1017. this.personInfo = res.data.regUser;
  1018. var token = res ? res.data.token : '';
  1019. this.carhelp.setPersonInfo(res.data.regUser);
  1020. this.carhelp.setToken(token);
  1021. this.carhelp.setPersonInfoPlus(res.data);
  1022. }
  1023. console.log("--------------")
  1024. if (res.data && res.data.regUser) {
  1025. if (res.data.regUser.fontMode == null) {
  1026. this.show = true;
  1027. } else {
  1028. this.show = false;
  1029. this.fontMode = res.data.regUser.fontMode;
  1030. if (this.fontMode == '1') {
  1031. this.carhelp.set("getElderModeClass", "长辈模式");
  1032. } else {
  1033. this.carhelp.set("getElderModeClass", "标准模式");
  1034. }
  1035. }
  1036. this.userId = res.data.regUser.id;
  1037. this.getFindChargeData();
  1038. if (this.carhelp.get("getElderModeClass")) {
  1039. if (this.carhelp.get("getElderModeClass") == "长辈模式") {
  1040. this.elderStatus = true;
  1041. } else {
  1042. this.elderStatus = false;
  1043. }
  1044. }
  1045. } else {
  1046. this.carhelp.set("getElderModeClass", "长辈模式");
  1047. this.elderStatus = true;
  1048. var obj = this.carhelp.get("friends_invitation")
  1049. // this.carhelp.set("friends_invitation",{
  1050. // op:op,
  1051. // date:new Date().getTime()
  1052. // })
  1053. if (obj && false) {
  1054. if (obj.date + 1000 * 60 * 60 * 24 > new Date().getTime()) {
  1055. this.friendsInvitation(obj)
  1056. }
  1057. }
  1058. }
  1059. }).catch(error => {
  1060. uni.showToast({
  1061. title: error,
  1062. icon: "none"
  1063. })
  1064. })
  1065. },
  1066. friendsInvitation(obj) {
  1067. uni.showLoading({
  1068. title: "加载中",
  1069. mask: true,
  1070. })
  1071. API.findActivity({
  1072. id: obj.op.id,
  1073. code: obj.op.icode
  1074. }).then((res) => {
  1075. uni.hideLoading()
  1076. obj.activityInfo = res.data.activityInfo;
  1077. var name = res.data.activityInfo.name;
  1078. var title = "参与活动"
  1079. var okbtn = "前往注册"
  1080. var endTime = res.data.activityInfo.endTime;
  1081. if (endTime && secondsDistance(newDate(endTime)) > 0) {
  1082. name = "活动已结束"
  1083. okbtn = "继续注册"
  1084. title = "提示"
  1085. obj = null
  1086. }
  1087. this.carhelp.set("friends_invitation", obj)
  1088. uni.showModal({
  1089. title: title,
  1090. content: name,
  1091. confirmText: okbtn,
  1092. success: res1 => {
  1093. if (res1.confirm) {
  1094. uni.navigateTo({
  1095. url: '/pages/login/login'
  1096. })
  1097. } else if (res1.cancel) {
  1098. //('用户点击取消');
  1099. }
  1100. }
  1101. })
  1102. }).catch(error => {
  1103. uni.showToast({
  1104. title: error,
  1105. icon: "none"
  1106. })
  1107. })
  1108. },
  1109. clickBannerTopI(i) {
  1110. var mod = this.bannerListTop[i];
  1111. //this.showTop = false;
  1112. this.clickBanner(0, true, mod)
  1113. },
  1114. clickBannerTop() {
  1115. var mod = this.bannerListTop[this.showTopIndex];
  1116. this.showTop = false;
  1117. this.clickBanner(0, true, mod)
  1118. },
  1119. clickBanner(index, bl, modout) {
  1120. var uurl = "";
  1121. var mod = this.bannerList[index]
  1122. if (modout) {
  1123. mod = modout;
  1124. }
  1125. mod.clickUrl = mod.linkUrl
  1126. if (mod.linkPicUrl && !bl) {
  1127. this.showOss = true;
  1128. this.showOssImg = mod.linkPicUrl;
  1129. this.showOssIndex = index;
  1130. } else if (mod.clickUrl == null) {
  1131. } else if (mod.clickUrl.indexOf('http') == 0) {
  1132. window.location = mod.clickUrl + uurl;
  1133. } else if (mod.clickUrl.slice(-5) == 'login' && this.userId) {
  1134. } else if (mod.clickUrl.indexOf('#/') == 0) {
  1135. if (mod.clickUrl.indexOf("?") == -1) {
  1136. mod.clickUrl += '?';
  1137. }
  1138. var url = mod.clickUrl.split("#")[1]
  1139. //window.location = mod.clickUrl;
  1140. uni.navigateTo({
  1141. url: url + uurl
  1142. })
  1143. } else if (mod.clickUrl == '#' || mod.clickUrl == '') {
  1144. } else {
  1145. uni.navigateTo({
  1146. url: mod.clickUrl + uurl
  1147. })
  1148. }
  1149. },
  1150. getBannerInfoTop(code) {
  1151. var nowtime = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d}')
  1152. var time = this.carhelp.get("bannerListTop");
  1153. if ((time && nowtime == time)) {
  1154. return;
  1155. }
  1156. uni.showLoading({
  1157. title: "加载中",
  1158. mask: true,
  1159. })
  1160. newsApi.getBannerInfo(code).then((res) => {
  1161. this.bannerListTop = res.data;
  1162. if (this.bannerListTop.length) {
  1163. this.showTop = true;
  1164. this.showTopImg = this.bannerListTop[0].picUrl;
  1165. this.showTopIndex = 0;
  1166. this.carhelp.set("bannerListTop", nowtime);
  1167. }
  1168. //this.test()
  1169. var userInfo = this.carhelp.getPersonInfo();
  1170. if (userInfo && userInfo.id) {
  1171. this.getf5surprised()
  1172. } else {
  1173. }
  1174. uni.hideLoading()
  1175. //document.getElementsByClassName("uni-swiper-wrapper")[0].parentNode.style="background-color: rgb(255, 255, 255); height: 120px;"
  1176. }).catch(error => {
  1177. uni.showToast({
  1178. title: error,
  1179. icon: "none"
  1180. })
  1181. })
  1182. },
  1183. getBannerInfo(code) {
  1184. uni.showLoading({
  1185. title: "加载中",
  1186. mask: true,
  1187. })
  1188. newsApi.getBannerInfo(code).then((res) => {
  1189. this.bannerList = res.data;
  1190. uni.hideLoading()
  1191. //document.getElementsByClassName("uni-swiper-wrapper")[0].parentNode.style="background-color: rgb(255, 255, 255); height: 120px;"
  1192. }).catch(error => {
  1193. uni.showToast({
  1194. title: error,
  1195. icon: "none"
  1196. })
  1197. })
  1198. },
  1199. elderClick() {
  1200. if (this.value == "长辈模式") {
  1201. this.elderStatus = true;
  1202. this.carhelp.set("getElderModeClass", "长辈模式");
  1203. this.fontMode = '1';
  1204. } else {
  1205. this.elderStatus = false;
  1206. this.carhelp.set("getElderModeClass", "标准模式");
  1207. this.fontMode = '0';
  1208. }
  1209. API.changeFont({
  1210. fontMode: this.fontMode
  1211. }).then((res) => {
  1212. this.show = false;
  1213. }).catch(error => {
  1214. uni.showToast({
  1215. title: error,
  1216. icon: "none"
  1217. })
  1218. })
  1219. },
  1220. getPointTimeOut() {
  1221. setTimeout(() => {
  1222. if (this.pointTimeOut) {
  1223. this.getPoint();
  1224. }
  1225. }, 1000)
  1226. },
  1227. getFindChargeData() {
  1228. API.findChargeData().then((res) => {
  1229. this.chargeList = res.data.chargingRecordList;
  1230. var list = res.data.chargingRecordList;
  1231. for (var i = 0; i < list.length; i++) {
  1232. if (list[i].status == '1' || list[i].status == '4') {
  1233. this.timeOut = true;
  1234. }
  1235. }
  1236. if (this.timeOut && this.pointTimeOut) {
  1237. setTimeout(() => {
  1238. this.getFindChargeData();
  1239. }, 5000)
  1240. }
  1241. }).catch(error => {
  1242. uni.showToast({
  1243. title: error,
  1244. icon: "none"
  1245. })
  1246. })
  1247. },
  1248. toAll() {
  1249. uni.navigateTo({
  1250. url: '/pages/index/all'
  1251. })
  1252. },
  1253. toSearchPile() {
  1254. uni.navigateTo({
  1255. url: '/pages/searchPile/searchPile'
  1256. })
  1257. },
  1258. toLogin() {
  1259. uni.navigateTo({
  1260. url: '/pages/login/login'
  1261. })
  1262. },
  1263. toNewsNotice() {
  1264. uni.navigateTo({
  1265. url: '/pages/article/newsNotice'
  1266. })
  1267. },
  1268. //微信扫二维码
  1269. getScanCode() {
  1270. if (this.userId) {
  1271. WxJsApi.scanQRCode(1).then(res => {
  1272. //("scanQRCode------" + res)
  1273. if (res) {
  1274. API.scanCode(res).then((response) => {
  1275. }).catch(error => {
  1276. uni.showToast({
  1277. title: error,
  1278. icon: "none"
  1279. })
  1280. })
  1281. }
  1282. }).catch(error => {
  1283. })
  1284. } else {
  1285. uni.navigateTo({
  1286. url: '/pages/login/login'
  1287. })
  1288. }
  1289. },
  1290. fastRecharge() {
  1291. if (this.userId) {
  1292. if(this.personInfo.userType==1){
  1293. uni.showToast({
  1294. title:"游客模式只支持“先付后退”"
  1295. })
  1296. }else{
  1297. uni.navigateTo({
  1298. url: '/pages/user/finance/recharge'
  1299. })
  1300. }
  1301. } else {
  1302. uni.navigateTo({
  1303. url: '/pages/login/login'
  1304. })
  1305. }
  1306. },
  1307. chargingRecord() {
  1308. if (this.userId) {
  1309. uni.navigateTo({
  1310. url: '/pages/record/index'
  1311. })
  1312. } else {
  1313. uni.navigateTo({
  1314. url: '/pages/login/login'
  1315. })
  1316. }
  1317. },
  1318. rechargeActivity(item) {
  1319. if (this.userId) {
  1320. var uurl = "&uid=" + this.userId;
  1321. var mod = item
  1322. if (mod.clickUrl == null) {
  1323. } else if (mod.clickUrl.indexOf('http') == 0) {
  1324. window.location = mod.clickUrl + uurl;
  1325. } else if (mod.clickUrl.indexOf('#/') == 0) {
  1326. if (mod.clickUrl.indexOf("?") == -1) {
  1327. mod.clickUrl += '?';
  1328. }
  1329. var url = mod.clickUrl.split("#")[1]
  1330. //window.location = mod.clickUrl;
  1331. uni.navigateTo({
  1332. url: url + uurl
  1333. })
  1334. } else if (mod.clickUrl == '#' || mod.clickUrl == '') {
  1335. } else {
  1336. uni.navigateTo({
  1337. url: mod.clickUrl + uurl
  1338. })
  1339. }
  1340. } else {
  1341. uni.navigateTo({
  1342. url: '/pages/login/login'
  1343. })
  1344. }
  1345. },
  1346. getActivityInfoList() {
  1347. uni.showLoading({
  1348. title: "加载中",
  1349. mask: true,
  1350. })
  1351. API.activityInfoList({
  1352. pageIndex: 1,
  1353. pageSize: 10
  1354. }).then((res) => {
  1355. uni.hideLoading()
  1356. var list = res.data.data;
  1357. for (let i = 0; i < list.length; i++) {
  1358. if (list[i].type == 2 && list[i].endTime != null) {
  1359. this.activityListShow = true;
  1360. var reg = new RegExp('-', 'gi');
  1361. this.activityDate = list[i].endTime.replace(reg, '/');
  1362. console.log(this.activityDate)
  1363. this.activityDateList = list[i];
  1364. list.splice(i, 1);
  1365. this.getDescriptionTime();
  1366. }
  1367. }
  1368. this.activityList = list;
  1369. }).catch(error => {
  1370. uni.showToast({
  1371. title: error,
  1372. icon: "none"
  1373. })
  1374. })
  1375. },
  1376. searchStationData(bl) {
  1377. if (bl) {
  1378. this.pageIndex2++;
  1379. }
  1380. var data = {
  1381. longitude: this.longitude,
  1382. latitude: this.latitude,
  1383. pageIndex: this.pageIndex2,
  1384. pageSize: 4
  1385. }
  1386. if (this.carhelp.getPersonInfo()) {
  1387. data.openId = this.carhelp.getOpenId()
  1388. }
  1389. this.loading = false
  1390. siteApi.searchStationData(data).then((response) => {
  1391. if (this.pageIndex2 == 1) {
  1392. this.stationList = response.data.data;
  1393. // this.listForm.totalPage = response.data.totalPage;
  1394. } else {
  1395. this.stationList = [
  1396. ...this.stationList,
  1397. ...response.data.data
  1398. ];
  1399. }
  1400. this.recordsTotal2 = response.data.recordsTotal;
  1401. this.loading = true
  1402. console.log(this.loading)
  1403. if (false&&response.data.data.length&&false) {
  1404. var stationDataList = response.data.data;
  1405. MapLoader().then(AMap1 => {
  1406. for (var i in stationDataList) {
  1407. var item = stationDataList[i]
  1408. var lnglat = new AMap.LngLat(this.longitude, this.latitude);
  1409. var myDistance = lnglat.distance([item.longitude, item.latitude]);
  1410. item.distance = myDistance / 1000;
  1411. console.log(item.distance)
  1412. }
  1413. })
  1414. //this.stationData = stationDataList;
  1415. }
  1416. }).catch(error => {
  1417. console.log(error,"123")
  1418. uni.showToast({
  1419. title: error,
  1420. icon: "none"
  1421. })
  1422. })
  1423. },
  1424. getPoint() {
  1425. if (this.stationList.length != 0) {
  1426. return
  1427. }
  1428. WxJsApi.getLocation().then((res) => {
  1429. this.latitude = parseFloat(res.latitude);
  1430. this.longitude = parseFloat(res.longitude);
  1431. this.message = res.errMsg;
  1432. if (res.errMsg != 'getLocation:ok') {
  1433. uni.showToast({
  1434. title: res
  1435. })
  1436. } else {
  1437. this.searchStationData()
  1438. }
  1439. }).catch(error => {
  1440. uni.showToast({
  1441. title: error,
  1442. icon: "none"
  1443. })
  1444. })
  1445. },
  1446. getNewsList(bl) {
  1447. uni.showLoading({
  1448. title: "加载中",
  1449. mask: true,
  1450. })
  1451. if (bl) {
  1452. this.newsList = [];
  1453. this.pageIndex = 1;
  1454. }
  1455. newsApi.newsInfoList({
  1456. pageIndex: this.pageIndex,
  1457. pageSize: 3,
  1458. }).then((res) => {
  1459. uni.hideLoading()
  1460. this.newsList = [
  1461. ...this.newsList,
  1462. ...res.data.data
  1463. ];
  1464. this.recordsTotal = res.data.recordsTotal
  1465. }).catch(error => {
  1466. uni.showToast({
  1467. title: error,
  1468. icon: "none"
  1469. })
  1470. })
  1471. },
  1472. myLoadmore() {
  1473. //this.pageIndex += 1;
  1474. //this.getNewsList()
  1475. },
  1476. }
  1477. }
  1478. </script>
  1479. <style lang="scss" scoped>
  1480. .swiper{
  1481. height: 700rpx;
  1482. .swiperitem{
  1483. height: 700rpx;
  1484. }
  1485. }
  1486. .couponmain {
  1487. .main {
  1488. margin: 100px auto 0;
  1489. position: relative;
  1490. .content {
  1491. padding: 24px;
  1492. padding-top: 50px;
  1493. background-color: #fff;
  1494. box-shadow: 0px 0px 0px 1px rgba(254, 229, 147, 100);
  1495. border: 2px solid rgba(253, 217, 141, 100);
  1496. border-radius: 8px;
  1497. .img {
  1498. width: 44vw;
  1499. height: 134px;
  1500. position: absolute;
  1501. top: -88px;
  1502. right: 0px;
  1503. img {
  1504. width: 100%;
  1505. height: 100%;
  1506. }
  1507. }
  1508. .title {
  1509. font-size: 16px;
  1510. color: rgba(84, 45, 45, 100);
  1511. margin-bottom: 13px;
  1512. }
  1513. .text {
  1514. line-height: 24px;
  1515. color: rgba(84, 45, 45, 100);
  1516. font-size: 16px;
  1517. text-align: justify;
  1518. text-decoration: underline;
  1519. text-decoration-color: #ECE3BA;
  1520. text-indent: 32px;
  1521. }
  1522. .sign {
  1523. text-align: right;
  1524. margin-top: 8px;
  1525. font-size: 16px;
  1526. }
  1527. }
  1528. // 专享优惠券
  1529. .exclusive {
  1530. background-color: #F5E4C8;
  1531. margin-top: 20px;
  1532. padding: 32rpx 32rpx 32rpx 32rpx;
  1533. box-shadow: 0px 0px 0px 1px rgba(254, 229, 147, 100);
  1534. border: 2px solid rgba(253, 217, 141, 100);
  1535. border-radius: 8px;
  1536. .exclusive1 {
  1537. font-size: 48rpx;
  1538. color: rgba(51, 51, 51, 1);
  1539. font-family: SourceHanSerif-bold;
  1540. }
  1541. .exclusive2 {
  1542. font-family: PingFangSC-regular;
  1543. color: rgba(51, 51, 51, 1);
  1544. font-size: 36rpx;
  1545. }
  1546. p {
  1547. width: 100%;
  1548. text-align: center;
  1549. //color: rgba(255, 73, 75, 100);
  1550. //font-size: 20px;
  1551. }
  1552. .img {
  1553. // width: 74.4vw;
  1554. // height: 84px;
  1555. margin-top: 16px;
  1556. position: relative;
  1557. img {
  1558. width: 100%;
  1559. height: 100%;
  1560. }
  1561. }
  1562. .num {
  1563. font-size: 54rpx;
  1564. color: rgba(252, 237, 179, 100);
  1565. position: absolute;
  1566. top: 10px;
  1567. left: 8vw;
  1568. font-weight: 600;
  1569. .unit {
  1570. font-size: 24rpx;
  1571. color: rgba(252, 237, 179, 100);
  1572. }
  1573. }
  1574. .unit2 {
  1575. font-size: 12px;
  1576. color: #FFF;
  1577. position: absolute;
  1578. top: 90rpx;
  1579. left: 24rpx;
  1580. }
  1581. .exclusive-text {
  1582. color: #333333;
  1583. font-size: 16rpx;
  1584. }
  1585. .exclusive-btn {
  1586. width: 80%;
  1587. margin-top: 48rpx;
  1588. border-radius: 50px;
  1589. background: linear-gradient(90.58deg, rgba(225, 208, 165, 1) 0.05%, rgba(228, 190, 132, 1) 98.67%);
  1590. color: rgba(51, 51, 51, 1);
  1591. font-size: 36rpx;
  1592. text-align: center;
  1593. box-shadow: 0px 8rpx 20rpx 0px rgba(184, 155, 103, 40);
  1594. font-family: -apple-system;
  1595. // width: 87.4%;
  1596. // margin-top: 20px;
  1597. // background-image: linear-gradient(#ffff00, #ff9600);
  1598. // color: #521e00;
  1599. // font-size: 20px;
  1600. // border-radius: 50px;
  1601. }
  1602. .ticket-info {
  1603. width: 40vw;
  1604. text-align: center;
  1605. position: absolute;
  1606. top: 18px;
  1607. right: 16rpx;
  1608. .ticket-name {
  1609. line-height: 40rpx;
  1610. color: rgba(16, 16, 16, 100);
  1611. font-size: 16rpx;
  1612. }
  1613. .condition {
  1614. line-height: 22px;
  1615. color: #8a6f6f;
  1616. font-size: 12px;
  1617. }
  1618. }
  1619. }
  1620. }
  1621. }
  1622. .oldTextClassF {
  1623. .text-2 {
  1624. font-size: 36rpx !important;
  1625. }
  1626. .text-3 {
  1627. font-size: 34rpx !important;
  1628. }
  1629. .station .price-free .price-1 .num {
  1630. font-size: 48rpx !important;
  1631. line-height: 40rpx;
  1632. font-weight: bold;
  1633. }
  1634. }
  1635. /deep/.u-image__loading {
  1636. background: #ff000000;
  1637. }
  1638. // 头部图片
  1639. img {
  1640. width: 100%;
  1641. // height: 100%;
  1642. }
  1643. .background {
  1644. background: linear-gradient(#D6EEDC, #FFFFFF);
  1645. padding-top: 16px;
  1646. }
  1647. .banner {
  1648. width: 91.4%;
  1649. margin: 0 auto;
  1650. border-radius: 12px;
  1651. height: 120px;
  1652. overflow: hidden;
  1653. }
  1654. // 选项列表
  1655. .option-list {
  1656. padding-top: 15px;
  1657. line-height: 20px;
  1658. border-radius: 8px;
  1659. text-align: center;
  1660. margin: auto;
  1661. display: flex;
  1662. justify-content: space-around;
  1663. .list-item {
  1664. // 图标
  1665. .icon {
  1666. width: 40px;
  1667. height: 40px;
  1668. border-radius: 99px;
  1669. line-height: 40px;
  1670. font-size: 24px;
  1671. text-align: center;
  1672. margin: auto;
  1673. color: #ffffff;
  1674. }
  1675. .text {
  1676. margin-top: 4px;
  1677. }
  1678. }
  1679. }
  1680. .flex {
  1681. display: flex;
  1682. }
  1683. // 站点
  1684. .pack-up {
  1685. float: right;
  1686. font-size: 16px;
  1687. color: rgba(119, 119, 119, 100);
  1688. }
  1689. .station,
  1690. .location,
  1691. .state1 {
  1692. box-shadow: 0px 4rpx 12rpx 0px #008c4a33;
  1693. }
  1694. // 附近站点改版
  1695. .station {
  1696. width: 91.4%;
  1697. border-radius: 8px;
  1698. padding: 12px 12px 12px 11px;
  1699. background-color: #fff;
  1700. margin: 8px auto 0;
  1701. .head {
  1702. display: flex;
  1703. justify-content: space-between;
  1704. align-items: center;
  1705. .title {
  1706. color: rgba(16, 16, 16, 100);
  1707. font-size: 32rpx;
  1708. font-weight: 550;
  1709. width: 440rpx;
  1710. text-overflow: ellipsis;
  1711. overflow: hidden;
  1712. white-space: nowrap;
  1713. }
  1714. .distance {
  1715. width: 180rpx;
  1716. color: rgba(102, 102, 102, 100);
  1717. font-size: 32rpx;
  1718. text-align: end;
  1719. .iconfont {
  1720. font-size: 24rpx;
  1721. margin-right: 4rpx;
  1722. }
  1723. }
  1724. }
  1725. .sign {
  1726. display: flex;
  1727. flex-wrap: wrap;
  1728. margin-top: 16rpx;
  1729. .sign-tag {
  1730. line-height: 40rpx;
  1731. border-radius: 8rpx;
  1732. //background-color: rgba(255, 255, 255, 100);
  1733. //color: rgba(255, 139, 0, 100);
  1734. font-size: 24rpx;
  1735. text-align: center;
  1736. //border: 1px solid rgba(255, 139, 0, 100);
  1737. padding: 0 8rpx;
  1738. margin-right: 16rpx;
  1739. margin-bottom: 8rpx;
  1740. }
  1741. .sign-0 {
  1742. background: linear-gradient(89.4deg, rgba(129,97,255,1) 2.8%,rgba(169,147,255,1) 98.02%);
  1743. color: rgba(255, 255, 255, 1);
  1744. padding: 0 10rpx;
  1745. //border: 1px solid rgba(255, 139, 0, 100);
  1746. }
  1747. .sign-5 {
  1748. background: linear-gradient(89.4deg, rgba(255,61,0,1) 2.8%,rgba(255,134,0,1) 98.02%);
  1749. color: rgba(255, 255, 255, 1);
  1750. padding: 0 10rpx;
  1751. }
  1752. .sign-1 {
  1753. line-height: 40rpx;
  1754. border-radius: 8rpx;
  1755. background-color: rgba(255, 255, 255, 100);
  1756. color: rgba(255, 139, 0, 100);
  1757. font-size: 24rpx;
  1758. text-align: center;
  1759. border: 1px solid rgba(255, 139, 0, 100);
  1760. padding: 0 8rpx;
  1761. margin-right: 16rpx;
  1762. margin-bottom: 8rpx;
  1763. }
  1764. .sign-2 {
  1765. line-height: 40rpx;
  1766. border-radius: 8rpx;
  1767. background-color: rgba(255, 255, 255, 100);
  1768. color: rgba(153, 153, 153, 100);
  1769. font-size: 24rpx;
  1770. text-align: center;
  1771. border: 1px solid rgba(204, 204, 204, 100);
  1772. padding: 0 8rpx;
  1773. margin-right: 16rpx;
  1774. margin-bottom: 8rpx;
  1775. }
  1776. .sign-3 {
  1777. line-height: 40rpx;
  1778. border-radius: 8rpx;
  1779. background-color: rgba(255, 255, 255, 100);
  1780. color: #8161FF;
  1781. font-size: 24rpx;
  1782. text-align: center;
  1783. border: 1px solid #8161FF;
  1784. padding: 0 8rpx;
  1785. margin-right: 16rpx;
  1786. margin-bottom: 8rpx;
  1787. }
  1788. .sign-4 {
  1789. line-height: 40rpx;
  1790. border-radius: 8rpx;
  1791. background-color: rgba(255, 255, 255, 100);
  1792. color: #00B962;
  1793. font-size: 24rpx;
  1794. text-align: center;
  1795. border: 1px solid #00B962;
  1796. padding: 0 8rpx;
  1797. margin-right: 16rpx;
  1798. margin-bottom: 8rpx;
  1799. }
  1800. }
  1801. .price-free {
  1802. display: flex;
  1803. justify-content: space-between;
  1804. margin-top: 8rpx;
  1805. .price {
  1806. display: flex;
  1807. align-items: baseline;
  1808. }
  1809. .price-1 {
  1810. .num {
  1811. color: rgba(255, 98, 0, 100);
  1812. font-size: 44rpx;
  1813. }
  1814. .unit {
  1815. font-size: 12px;
  1816. color: rgba(153, 153, 153, 100);
  1817. }
  1818. }
  1819. .price-2 {
  1820. font-size: 24rpx;
  1821. color: #fff;
  1822. margin-left: 8rpx;
  1823. text-decoration: line-through;
  1824. }
  1825. .price-3 {
  1826. font-size: 24rpx;
  1827. color: #fff;
  1828. margin-left: 8rpx;
  1829. padding-right: 9rpx;
  1830. background:#00B962 ;
  1831. border-radius: 8rpx;
  1832. .num1{
  1833. padding-left: 12rpx;
  1834. border-radius: 8rpx 0 8rpx 8rpx;
  1835. padding-right: 18rpx;
  1836. background: #121212;
  1837. -webkit-clip-path: polygon(0 0, 93% 0, 84% 100%, 0% 100%);
  1838. clip-path: polygon(0 0, 93% 0, 84% 100%, 0% 100%);
  1839. }
  1840. }
  1841. }
  1842. .free {
  1843. display: flex;
  1844. align-items: center;
  1845. .slow,
  1846. .fast {
  1847. display: flex;
  1848. .sp-font {
  1849. width: 40rpx;
  1850. height: 40rpx;
  1851. line-height: 40rpx;
  1852. border-radius: 4px;
  1853. background-color: #7a68f6;
  1854. color: #fff;
  1855. font-size: 28rpx;
  1856. text-align: center;
  1857. margin-right: 2rpx;
  1858. }
  1859. .fast-font {
  1860. width: 40rpx;
  1861. height: 40rpx;
  1862. line-height: 40rpx;
  1863. border-radius: 8rpx;
  1864. background-color: rgba(186, 240, 215, 100);
  1865. color: rgba(0, 130, 69, 100);
  1866. font-size: 28rpx;
  1867. text-align: center;
  1868. margin-right: 8rpx;
  1869. }
  1870. .slow-font {
  1871. width: 40rpx;
  1872. height: 40rpx;
  1873. line-height: 40rpx;
  1874. border-radius: 8rpx;
  1875. background-color: rgba(226, 226, 226, 100);
  1876. color: rgba(128, 128, 128, 100);
  1877. font-size: 28rpx;
  1878. text-align: center;
  1879. margin-right: 8rpx;
  1880. }
  1881. .num {
  1882. font-size: 32rpx;
  1883. color: rgba(0, 145, 67, 100);
  1884. line-height: 40rpx;
  1885. }
  1886. }
  1887. .slow {
  1888. margin-left: 24rpx;
  1889. }
  1890. }
  1891. }
  1892. //定位
  1893. .location {
  1894. width: 91.4%;
  1895. background-color: #ffffff;
  1896. height: 120px;
  1897. display: flex;
  1898. justify-content: space-between;
  1899. margin: 20px auto 0;
  1900. border-radius: 8px;
  1901. border: #F2F4F4 1px;
  1902. .location-text {
  1903. padding: 24px 0 0 28px;
  1904. .text-1 {
  1905. height: 16px;
  1906. line-height: 16px;
  1907. color: rgba(16, 16, 16, 100);
  1908. font-size: 16px;
  1909. text-align: left;
  1910. }
  1911. .text-2 {
  1912. height: 17px;
  1913. line-height: 17px;
  1914. color: rgba(102, 102, 102, 100);
  1915. font-size: 12px;
  1916. text-align: left;
  1917. margin-top: 4px;
  1918. white-space: nowrap; //强制不换行
  1919. text-overflow: ellipsis; //文本超出出现省略号
  1920. overflow: hidden;
  1921. }
  1922. .text-3 {
  1923. width: 80px;
  1924. height: 24px;
  1925. line-height: 22px;
  1926. border-radius: 50px;
  1927. color: rgba(0, 185, 98, 100);
  1928. font-size: 12px;
  1929. text-align: center;
  1930. border: 1px solid rgba(0, 185, 98, 100);
  1931. margin-top: 11px;
  1932. }
  1933. }
  1934. .img-box {
  1935. width: 120px;
  1936. height: 120px;
  1937. margin-right: 20px;
  1938. }
  1939. }
  1940. .img-box4 {
  1941. padding-top: 5px;
  1942. height: 260rpx;
  1943. img {
  1944. max-width: 100px;
  1945. }
  1946. .img-view {
  1947. color: #0293f0;
  1948. float: right;
  1949. font-size: 10px;
  1950. margin-top: 3px;
  1951. position: relative;
  1952. bottom: 30rpx;
  1953. left: -15px;
  1954. .iconfont {
  1955. font-size: 14px;
  1956. }
  1957. }
  1958. }
  1959. .state {
  1960. width: 91.4%;
  1961. background-color: #ffffff;
  1962. height: 260rpx;
  1963. min-height: 120px;
  1964. max-height: 130px;
  1965. display: flex;
  1966. margin: 20rpx auto 0;
  1967. border-radius: 8px;
  1968. border: #F2F4F4 1px;
  1969. .state-text {
  1970. min-width: 70%;
  1971. padding: 48rpx 0 0 24rpx;
  1972. Z-INDEX: 99;
  1973. .text-1 {
  1974. height: 16px;
  1975. line-height: 16px;
  1976. color: rgba(0, 185, 98, 1);
  1977. font-size: 16px;
  1978. text-align: left;
  1979. font-weight: bold;
  1980. span {
  1981. color: rgba(16, 16, 16, 1);
  1982. margin-right: 12rpx;
  1983. }
  1984. }
  1985. .text-2 {
  1986. width: 160%;
  1987. height: 17px;
  1988. line-height: 17px;
  1989. color: #101010;
  1990. text-align: left;
  1991. margin-top: 12px;
  1992. span {
  1993. font-weight: bold;
  1994. margin-right: 6rpx;
  1995. margin-left: 6rpx;
  1996. }
  1997. .text-21 {
  1998. color: rgba(0, 185, 98, 1);
  1999. }
  2000. .text-22 {
  2001. color: #ed7847;
  2002. }
  2003. }
  2004. .text-3 {
  2005. font-size: 14px;
  2006. line-height: 20px;
  2007. margin-top: 6px;
  2008. color: #999999;
  2009. }
  2010. }
  2011. .img-box {
  2012. width: 120px;
  2013. height: 120px;
  2014. margin-right: 20px;
  2015. }
  2016. }
  2017. //充值
  2018. .top-up {
  2019. width: 91.4%;
  2020. margin: 12px auto 0;
  2021. .top-up-title {
  2022. color: rgba(16, 16, 16, 100);
  2023. font-size: 16px;
  2024. }
  2025. .card-box {
  2026. display: flex;
  2027. justify-content: space-between;
  2028. padding: 0 0 16px 0;
  2029. .card {
  2030. width: 48.3%;
  2031. height: 65px;
  2032. img {
  2033. width: 100%;
  2034. height: 100%;
  2035. }
  2036. }
  2037. }
  2038. .img-box2 {
  2039. margin-top: 12px;
  2040. display: flex;
  2041. justify-content: space-between;
  2042. img {
  2043. width: 100%;
  2044. height: 100%;
  2045. }
  2046. .left-image {
  2047. width: 48.3%;
  2048. height: 166px;
  2049. padding: 8px 0 0 12px;
  2050. // background: url(@/assets/img/topup1.png);
  2051. background-repeat: no-repeat;
  2052. background-position: 30% 10%;
  2053. background-size: cover;
  2054. p {
  2055. color: rgba(56, 47, 33, 100);
  2056. font-size: 24px;
  2057. line-height: 28px;
  2058. font-weight: 600;
  2059. }
  2060. .time-activities {
  2061. color: rgba(56, 39, 14, 100);
  2062. font-size: 16px;
  2063. line-height: 22px;
  2064. margin-top: 4px;
  2065. .time {
  2066. margin-left: 4px;
  2067. color: #fa3534;
  2068. font-weight: bold;
  2069. }
  2070. }
  2071. }
  2072. .right-image {
  2073. width: 48.3%;
  2074. display: flex;
  2075. flex-direction: column;
  2076. justify-content: space-between;
  2077. .margin-top {
  2078. margin-top: 12px;
  2079. }
  2080. img {
  2081. height: 77px;
  2082. }
  2083. }
  2084. ;
  2085. }
  2086. }
  2087. .lineBox {
  2088. background-color: rgba(0, 145, 67, 100);
  2089. padding: 0px 3px;
  2090. background-color: rgba(0, 185, 98, 1);
  2091. color: rgba(255, 255, 255, 1);
  2092. margin-left: 6px;
  2093. border-radius: 3px;
  2094. }
  2095. // 小竖线
  2096. .line {
  2097. display: inline-block;
  2098. width: 3px;
  2099. height: 12px;
  2100. margin-right: 7px;
  2101. background-color: rgba(0, 145, 67, 100);
  2102. }
  2103. // 新闻公告
  2104. .news-title {
  2105. padding: 0 16px;
  2106. margin-top: 12px;
  2107. color: rgba(16, 16, 16, 100);
  2108. font-size: 16px;
  2109. display: flex;
  2110. justify-content: space-between;
  2111. background-color: #F2F4F4;
  2112. .news-title-left {
  2113. display: flex;
  2114. }
  2115. .more {
  2116. font-size: 14px;
  2117. color: #777777;
  2118. display: flex;
  2119. line-height: 20px;
  2120. .more-icon {
  2121. font-size: 24px
  2122. }
  2123. }
  2124. }
  2125. .news {
  2126. background-color: #fff;
  2127. width: 91.4%;
  2128. margin: 12px auto 0;
  2129. border-radius: 8px;
  2130. .news-content {
  2131. display: flex;
  2132. justify-content: space-between;
  2133. padding: 12px;
  2134. .content-text {
  2135. width: 56.2%;
  2136. height: 100%;
  2137. line-height: 21px;
  2138. color: #101010;
  2139. text-align: left;
  2140. font-size: 14px;
  2141. }
  2142. .content-title {
  2143. width: 100%;
  2144. overflow: hidden;
  2145. text-overflow: ellipsis;
  2146. display: -webkit-box;
  2147. -webkit-box-orient: vertical;
  2148. -webkit-line-clamp: 3;
  2149. }
  2150. .content-img {
  2151. width: 40.57%;
  2152. height: 100%;
  2153. border-radius: 4px;
  2154. overflow: hidden;
  2155. img {
  2156. width: 100%;
  2157. height: 80%;
  2158. }
  2159. }
  2160. .news-time {
  2161. margin-top: 5%;
  2162. color: #999999;
  2163. width: 80px;
  2164. height: 20px;
  2165. font-size: 14px;
  2166. }
  2167. }
  2168. }
  2169. .bottom {
  2170. width: 100%;
  2171. height: 60px;
  2172. .bot {
  2173. width: 100%;
  2174. margin: 0 auto;
  2175. padding: 0 17.3%;
  2176. justify-content: space-between;
  2177. display: flex;
  2178. .bot-line {
  2179. margin-top: 20px;
  2180. width: 21.3%;
  2181. height: 0px;
  2182. border: 1px solid rgba(207, 210, 213, 100);
  2183. }
  2184. .bot-text {
  2185. white-space: nowrap;
  2186. height: 17px;
  2187. margin-top: 13px;
  2188. margin-left: 12px;
  2189. margin-right: 12px;
  2190. font-size: 12px;
  2191. text-align: center;
  2192. color: rgba(182, 189, 195, 100);
  2193. }
  2194. }
  2195. }
  2196. // 导航栏
  2197. .navigation {
  2198. width: 100%;
  2199. // height: 40px;
  2200. padding: 10px 0;
  2201. background-color: #fff;
  2202. position: fixed;
  2203. bottom: 0;
  2204. left: 0;
  2205. display: flex;
  2206. justify-content: space-around;
  2207. text-align: center;
  2208. color: #999999;
  2209. .nav-icon {
  2210. width: 54px;
  2211. font-size: 24px
  2212. }
  2213. .nav-text {
  2214. font-size: 14px;
  2215. }
  2216. }
  2217. .shema {
  2218. width: 70%;
  2219. padding-bottom: 20px;
  2220. border-radius: 16px;
  2221. background-color: #fff;
  2222. position: fixed;
  2223. top: 100px;
  2224. left: 0;
  2225. right: 0;
  2226. margin: 0 auto;
  2227. z-index: 9999;
  2228. .title {
  2229. height: 33px;
  2230. color: rgba(16, 16, 16, 100);
  2231. font-size: 24px;
  2232. text-align: center;
  2233. padding: 16px 0;
  2234. }
  2235. .u-radio-group {
  2236. margin: 16px 5vw;
  2237. }
  2238. /deep/.u-radio {
  2239. width: 60vw !important;
  2240. padding: 24px 24px 40px;
  2241. line-height: 20px;
  2242. border-radius: 16px;
  2243. text-align: center;
  2244. border: #101010 1px solid;
  2245. margin-top: 12px;
  2246. }
  2247. /deep/ .u-radio__label {
  2248. text-align: left;
  2249. height: 24px;
  2250. // color: rgba(0, 185, 98, 100);
  2251. font-size: 24px;
  2252. }
  2253. p {
  2254. height: 22px;
  2255. color: rgba(102, 102, 102, 100);
  2256. font-size: 14px;
  2257. margin-top: 12px;
  2258. white-space: nowrap
  2259. }
  2260. .hint {
  2261. text-align: center;
  2262. }
  2263. .btn-box {
  2264. margin-top: 20px;
  2265. .choice-btn {
  2266. width: 80%;
  2267. }
  2268. }
  2269. }
  2270. .wrap {
  2271. display: flex;
  2272. align-items: center;
  2273. justify-content: center;
  2274. height: 100%;
  2275. }
  2276. // 登录提示
  2277. .login-prompt {
  2278. width: 91.4%;
  2279. height: 40px;
  2280. line-height: 40px;
  2281. border-radius: 50px;
  2282. text-align: left;
  2283. padding-left: 16px;
  2284. padding-right: 4px;
  2285. background-color: rgba(0, 0, 0, 0.6);
  2286. position: fixed;
  2287. bottom: 75px;
  2288. color: #ffffff;
  2289. .button {
  2290. width: 88px;
  2291. height: 32px;
  2292. line-height: 32px;
  2293. border-radius: 50px;
  2294. background-color: rgba(0, 185, 98, 100);
  2295. text-align: center;
  2296. float: right;
  2297. margin-top: 4px;
  2298. }
  2299. }
  2300. .showOss {
  2301. /deep/.u-model,
  2302. /deep/.u-mode-center-box {
  2303. background-color: transparent;
  2304. }
  2305. }
  2306. .carNone {
  2307. display: flex;
  2308. flex-direction: column;
  2309. justify-content: center;
  2310. align-items: center;
  2311. img {
  2312. width: 100%;
  2313. height: 100%;
  2314. }
  2315. p {
  2316. margin-top: -60px;
  2317. }
  2318. }
  2319. </style>