index.vue 66 KB

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