index.vue 82 KB

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