index.vue 81 KB

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