index.vue 70 KB

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