index.vue 67 KB

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