index.vue 68 KB

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