index.vue 66 KB

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