index.vue 82 KB

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