index.vue 79 KB

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