index.vue 66 KB

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