index.vue 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133
  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"
  8. :img-mode="'scaleToFill'" height="120"
  9. :list="bannerList" @click="clickBanner" :name="'picUrl'" >
  10. </ujp-swiper>
  11. </view>
  12. <!-- 选项列表 -->
  13. <view class="option-list">
  14. <view class="list-item" @click="getScanCode">
  15. <view class="icon iconfont" style="background: linear-gradient(45deg,#00B962,#5FE4A6);">
  16. &#xe61a;
  17. </view>
  18. <view class="text oldTextjp2" oldstyle="font-size: 18px;">
  19. 扫码充电
  20. </view>
  21. </view>
  22. <view class="list-item" @click="fastRecharge">
  23. <view class="icon iconfont" style="background: linear-gradient(45deg,#23AD9B,#4BD2C0);">
  24. &#xe629;
  25. </view>
  26. <view class="text oldTextjp2" oldstyle="font-size: 18px;">
  27. 快速充值
  28. </view>
  29. </view>
  30. <view class="list-item" @click="chargingRecord">
  31. <view class="icon iconfont" style="background: linear-gradient(45deg,#407DE4,#6FA5FF );">
  32. &#xe625;
  33. </view>
  34. <view class="text oldTextjp2" oldstyle="font-size: 18px;">
  35. 充电记录
  36. </view>
  37. </view>
  38. <view class="list-item" @click="toSearchPile">
  39. <view class="icon iconfont" style="background: linear-gradient(45deg,#6366FF,#9D9FFF);">
  40. &#xe622;
  41. </view>
  42. <view class="text oldTextjp2" oldstyle="font-size: 18px;">
  43. 附近站点
  44. </view>
  45. </view>
  46. </view>
  47. <!-- 充值活动 -->
  48. <view class=" top-up" v-if="activityList.length > 0 && !activityListShow">
  49. <view class="card-box">
  50. <view class="card" v-for="(item,index) in activityList" :key="item.id"
  51. @click="rechargeActivity(item)">
  52. <img :src="item.picUrl" alt="">
  53. </view>
  54. </view>
  55. </view>
  56. <u-modal v-model="showNt" class="showOss"
  57. :show-title="false" :show-confirm-button="false" >
  58. <view class="slot-content">
  59. <u-image width="600" style="margin: auto;min-height: 250px;"
  60. mode="widthFix"
  61. v-show="showNtStep==0"
  62. src="@/assets/img/nt/news-activity-2.png">
  63. <view slot="loading" style="height: 200px;" >
  64. <u-loading mode="flower" size="186" >
  65. </u-loading>
  66. </view>
  67. </u-image>
  68. <view
  69. style="color: #ecc07d;
  70. font-size: 64rpx;
  71. position: relative;
  72. top: -220rpx;
  73. right: -100rpx; width: 400rpx;"
  74. @click="showNtStepClick"
  75. v-show="showNtStep==0" >
  76. <span >.</span>
  77. </view>
  78. <u-image width="600" style="margin: auto;min-height: 250px;"
  79. mode="widthFix" @click="showNtStepClick"
  80. v-show="showNtStep==1"
  81. src="@/assets/img/nt/news-activity-1.png">
  82. </u-image>
  83. <view
  84. style="color: #FFFFFF;
  85. font-size: 64rpx;
  86. position: relative;
  87. top: -600rpx;
  88. right: -80rpx;"
  89. :style="{
  90. right:showNtValue>99?'-80rpx':(showNtValue>9?'-95rpx':'-110rpx')
  91. }"
  92. v-show="showNtStep==1" ><b>{{showNtValue}}</b>
  93. <span style="font-size: 28rpx;">元</span>
  94. </view>
  95. </view>
  96. </u-modal>
  97. <u-modal v-model="showOss" class="showOss"
  98. :show-title="false" :show-confirm-button="false" >
  99. <view class="slot-content">
  100. <u-image width="250px" style="margin: auto;min-height: 250px;"
  101. mode="widthFix" @click="clickBanner(showOssIndex,true)"
  102. :src="showOssImg">
  103. <view slot="loading" style="height: 200px;" >
  104. <u-loading mode="flower" size="186" >
  105. </u-loading>
  106. </view>
  107. </u-image>
  108. <u-image width="36px" style="margin: auto;"
  109. mode="widthFix" @click="showOss=false"
  110. src="../../assets/img/if-close-line-circled.png"></u-image>
  111. </view>
  112. </u-modal>
  113. <u-modal v-model="showTop" class="showOss"
  114. :show-title="false" :show-confirm-button="false" >
  115. <view class="slot-content" v-if="bannerListTop.length" >
  116. <view class="couponmain" v-if="bannerListTop[showTopIndex].topmodel=='coupon'">
  117. <view class="main" >
  118. <!-- 专享优惠券 -->
  119. <view class="exclusive">
  120. <p class="exclusive1">恭喜你</p>
  121. <p class="exclusive2">获得{{bannerListTop[showTopIndex].value}}元月卡卷</p>
  122. <view class="img" >
  123. <img src="../../assets/img/Frame915.png" alt="">
  124. <view class="num">
  125. {{bannerListTop[showTopIndex].value}}<span class="unit">元</span>
  126. </view>
  127. <view class="unit2">月卡优惠券</view>
  128. <view class="ticket-info">
  129. <view class="ticket-name" >
  130. {{bannerListTop[showTopIndex].text}}
  131. </view>
  132. </view>
  133. </view>
  134. <view class="exclusive-text"> 持月卡在指定站点充电,充电服务费全免</view>
  135. <button class="exclusive-btn"
  136. @click="clickBannerTop()"
  137. shape="circle">立即开通</button>
  138. </view>
  139. </view>
  140. </view>
  141. <u-image width="250px;" v-else
  142. bgColor="#ff000000"
  143. style="margin: auto;min-height: 250px;"
  144. mode="widthFix" @click="clickBannerTop()"
  145. :src="showTopImg"
  146. >
  147. <view slot="loading" style="height: 200px;" >
  148. <u-loading mode="flower" size="186" >
  149. </u-loading>
  150. </view>
  151. </u-image>
  152. <view
  153. @click="showTopIndex++"
  154. v-show="showTopIndex!=bannerListTop.length-1"
  155. >
  156. <u-button class="choice-btn"
  157. @click="nextTop(showTopIndex)"
  158. style="width: 80%;margin-top: 10px;" shape="circle">下一条({{showTopIndex+1}}/{{bannerListTop.length}})</u-button>
  159. </view>
  160. <u-image width="36px"
  161. v-show="showTopIndex==bannerListTop.length-1"
  162. style="margin: auto; margin-top: 10px;"
  163. mode="widthFix" @click="showTop=false"
  164. src="../../assets/img/if-close-line-circled.png"></u-image>
  165. </view>
  166. </u-modal>
  167. <!-- 模式选择 -->
  168. <u-mask :show="show">
  169. <view class="wrap">
  170. <view class="shema" @tap.stop>
  171. <view class="title">
  172. 设置浏览模式
  173. </view>
  174. <view class="">
  175. <u-radio-group v-model="value">
  176. <u-radio v-for="(item, index) in list" :key="index" :name="item.name" :disabled="item.disabled" active-color="#00B962">
  177. {{item.name}}
  178. <p v-if="item.name == '长辈模式'">字体更大 看的清楚</p>
  179. <p v-if="item.name == '标准模式'">信息丰富 功能全面</p>
  180. </u-radio>
  181. </u-radio-group>
  182. </view>
  183. <view class="hint">可在 {{""}}我的-设置 {{""}}页面中切换</view>
  184. <view class="btn-box">
  185. <u-button class="choice-btn" type="success" shape="circle" @click="elderClick">我选好了</u-button>
  186. </view>
  187. </view>
  188. </view>
  189. </u-mask>
  190. <!-- <view class="top-up-title oldTextjp" oldstyle="font-size:20px;"><text class="line"></text>最新活动</view>
  191. <view class="img-box">
  192. <view class="img-1" v-for="(item,index) in activityList" :key="item.id"
  193. @click="rechargeActivity(item)">
  194. <img :src="item.picUrl" alt="">
  195. </view>
  196. </view> -->
  197. </view>
  198. <!-- 最新活动 -->
  199. <view class=" top-up" v-if="activityList.length > 0 && activityListShow">
  200. <view class="top-up-title oldTextjp" oldstyle="font-size:20px;"><text class="line"></text>最新活动</view>
  201. <view class="img-box2">
  202. <view class="left-image" :style="{backgroundImage: 'url(' + activityDateList.picUrl + ')'}" @click="rechargeActivity(activityDateList)">
  203. <p>{{activityDateList.name}}</p>
  204. <view class="time-activities">
  205. 距活动结束仅剩 <text class="time">{{description}}</text>
  206. </view>
  207. </view>
  208. <view class="right-image">
  209. <img class="margin-bottom" v-for="(item,index) in activityList" :key="item.id"
  210. @click="rechargeActivity(item)" :src="item.narrowUrl" alt="">
  211. <!-- <img class="margin-bottom" src="../../assets/img/topup2.png" alt="" @click="rechargeActivity(0)">
  212. <img class="margin-bottom" src="../../assets/img/topup3.png" alt="" @click="rechargeActivity(1)"> -->
  213. </view>
  214. </view>
  215. </view>
  216. <template v-if="message == 'getLocation:ok' && stationList.length != 0 && chargeList.length == 0">
  217. <view class=" top-up" >
  218. <view class="top-up-title oldTextjp" oldstyle="font-size:20px;"><text class="line"></text>附近站点
  219. <view class="pack-up" v-show="!listShow" @click="listShow=true" >
  220. 收起<text class="iconfont">&#xe607;</text>
  221. </view>
  222. <view class="pack-up" v-if="listShow" @click="listShow=false" >
  223. 展开<text class="iconfont">&#xe62c;</text>
  224. </view>
  225. </view>
  226. </view>
  227. <!-- 附近站点 -->
  228. <view class="station" v-for="(stationData,i) in stationList" :key="i"
  229. v-show="!listShow||i==0"
  230. @click="gotoUrl('pages/searchPile/stationAndPile/stationDetails?id=' + stationData.id)">
  231. <view class="head">
  232. <view class="title oldTextjp" oldstyle="font-size: 20px;">
  233. {{stationData.name}}
  234. </view>
  235. <view class="distance " >
  236. <text class="iconfont" style="color:#666666">&#xe615;</text>{{stationData.distance!=null&&stationData.distance>0.1 ? stationData.distance.toFixed(1)+'公里':'小于100米'}}
  237. </view>
  238. </view>
  239. <view class="sign" v-if="stationData.stationType==50">
  240. {{stationData.address}}
  241. </view>
  242. <view class="sign" v-else>
  243. <template v-if="personInfo&&personInfo.userType!=1">
  244. <view class="sign-1" v-if="stationData.giveDiscount&&stationData.discountRatio">会员服务费{{stationData.discountRatio/10}}折</view>
  245. <view class="sign-2" v-if="stationData.tagList.length != 0" v-for="(tagName,tagIndex) in stationData.tagList" :key="tagIndex">{{tagName}}</view>
  246. </template>
  247. </view>
  248. <view class="price-free oldTextClass">
  249. <view class="price">
  250. <view class="price-1">
  251. <text class="num">
  252. {{!stationData.giveDiscount ? (stationData.electricityPrice+stationData.servicePrice).toFixed(2)
  253. : (stationData.electricityPrice+stationData.discountServicePrice).toFixed(2)}}</text>
  254. <text class="unit " oldstyle="font-size: 48rpx;">元/度 起</text>
  255. </view>
  256. <view class="price-2 " oldstyle="font-size: 48rpx;" v-if="stationData.giveDiscount">
  257. <text class="num">{{(stationData.electricityPrice+stationData.servicePrice).toFixed(2)}}</text>
  258. <text class="unit ">元/度 起</text>
  259. </view>
  260. </view>
  261. <view class="free" v-if="stationData.category=='超充'" >
  262. <view class="fast" >
  263. <view class="sp-font">
  264. </view>
  265. <view class="num">
  266. {{stationData.fastAvailableNum}}/{{stationData.fastNum}}
  267. </view>
  268. </view>
  269. </view>
  270. <view class="free" v-else>
  271. <view class="fast" v-if="stationData.type == '1' || stationData.type == '1,2'">
  272. <view class="fast-font">
  273. </view>
  274. <view class="num">
  275. {{stationData.fastAvailableNum}}/{{stationData.fastNum}}
  276. </view>
  277. </view>
  278. <view class="slow oldTextjp2"
  279. oldstyle="margin-left: 1px;"
  280. v-if="stationData.type == '2' || stationData.type == '1,2'">
  281. <view class="slow-font">
  282. </view>
  283. <view class="num">
  284. {{stationData.slowAvailableNum}}/{{stationData.slowNum}}
  285. </view>
  286. </view>
  287. </view>
  288. </view>
  289. </view>
  290. <view class="bottom" @click="goSearch()" >
  291. <view class="bot">
  292. <view class="bot-line"></view>
  293. <view class="bot-text " style="color: #00B962;" >点击查看更多站点</view>
  294. <view class="bot-line"></view>
  295. </view>
  296. </view>
  297. </template>
  298. <!-- 定位 -->
  299. <view class="location-box" v-if="message != 'getLocation:ok' && stationList.length == 0 && chargeList.length == 0">
  300. <view class="location">
  301. <view class="location-text">
  302. <view class="text-1 oldTextjp" oldstyle="font-size: 20px;">
  303. 定位中...
  304. </view>
  305. <view class="text-2 oldTextjp2" oldstyle="font-size: 16px;">
  306. 授权定位后可查询附近充电站
  307. </view>
  308. <view class="text-3 oldTextjp2" oldstyle="font-size: 16px;" @click="getPoint()">
  309. 重新定位
  310. </view>
  311. </view>
  312. <view class="img-box">
  313. <img src="static/img/暂无网络信号-缺省页 1.png">
  314. </view>
  315. </view>
  316. </view>
  317. <!-- 充电状态 -->
  318. <view class="state1 state" v-if="chargeList.length > 0" v-for="(item,index) in chargeList" :key="item.id"
  319. @click="gotoUrl('pages/searchPile/chargeProcess/dcCharging?id=' + item.id)">
  320. <view class="state-text">
  321. <view class="text-1 oldTextjp" oldstyle="font-size: 20px;">
  322. {{item.statusText}}
  323. </view>
  324. <view v-if="item.status == '0'" class="text-2 oldTextjp2" oldstyle="font-size: 16px;">
  325. 启动中
  326. </view>
  327. <view v-if="item.status == '1'" class="text-2 oldTextjp2" oldstyle="font-size: 16px;">
  328. 已充{{item.dueFee != null ? item.dueFee.toFixed(2) : '0.00'}}元
  329. </view>
  330. <!-- <view v-if="item.status == '2'" class="text-2" style="color: red;">
  331. 超出时间将收取占位费
  332. </view> -->
  333. <view v-if="item.status == '4'" class="text-2 oldTextjp2" oldstyle="font-size: 16px;">
  334. <span v-if="item.waitNum==1">请耐心等待</span>
  335. <span v-else >前方等待{{item.waitNum-1}}位</span>
  336. </view>
  337. <view class="text-3 oldTextjp2" oldstyle="font-size: 16px;">
  338. <p style=" width: 160%;"> {{item.stationName}}/{{item.deviceName}}&nbsp;&nbsp;当前电价{{item.chargingCostPrice.toFixed(2)}}元/度</p>
  339. </view>
  340. </view>
  341. <view class="img-box" style="height: 110px;">
  342. <img v-if="item.status == '0'" src="static/img/等待中-缺省页.png">
  343. <img v-if="item.status == '1'" src="static/img/充电中-缺省页.png">
  344. <img v-if="item.status == '2'" src="static/img/已充满-缺省页.png">
  345. <img v-if="item.status == '4'" src="static/img/等待中-缺省页.png">
  346. </view>
  347. </view>
  348. <!-- 新闻 -->
  349. <view class="news-title" v-if="newsList.length > 0">
  350. <view class="news-title-left oldTextjp" oldstyle="font-size:20px;">
  351. <view class="line" style="margin-top:4px;"></view>新闻公告
  352. </view>
  353. <view class="more oldTextjp2" oldstyle="font-size:16px;" @click="toNewsNotice">更多<view class="more-icon iconfont"> &#xe600;</view>
  354. </view>
  355. </view>
  356. <view class="news">
  357. <view class="news-content" v-for="(item,index) in newsList" :key="index"
  358. @click="gotoUrl('pages/article/articleDetails?id=' + item.id)">
  359. <view class="content-text">
  360. <view class="content-title oldTextjp2" oldstyle="font-size: 18px;">{{item.title}}</view>
  361. <view class="news-time">{{item.createTime?item.createTime.slice(5,10):''}}</view>
  362. </view>
  363. <view class="content-img">
  364. <img :src="item.pic ? item.pic : 'static/img/image_default.png'" alt="">
  365. </view>
  366. </view>
  367. </view>
  368. <view class="bottom" >
  369. <view class="bot">
  370. <view class="bot-line"></view>
  371. <view class="bot-text oldTextjp2" oldstyle="font-size: 14px;">已经到底了</view>
  372. <view class="bot-line"></view>
  373. </view>
  374. </view>
  375. <!-- 导航栏 -->
  376. <view class="navigation">
  377. <view class="login-prompt" v-if="!userId">
  378. 登录显示更多会员服务
  379. <text class="button" @click="toLogin">登录/注册</text>
  380. </view>
  381. </view>
  382. <Tabbar :current="0" ref="tabbarMain" :elderStatus="elderStatus"></Tabbar>
  383. </view>
  384. </template>
  385. <script>
  386. import * as API from '@/apis/index.js'
  387. import * as newsApi from '@/apis/news.js'
  388. import * as WxJsApi from '@/utils/wxJsApi.js'
  389. import * as siteApi from '@/apis/site.js'
  390. import * as loginApi from '@/apis/login.js'
  391. import * as userApi from '@/apis/user.js'
  392. import MapLoader from '@/utils/AMap'
  393. import Tabbar from '@/components/Tabbar.vue'
  394. import {
  395. newDate,
  396. currentTimeStamp,
  397. parseUnixTime,
  398. secondsDistance,
  399. hourDistanceArr
  400. } from '@/utils'
  401. export default {
  402. components: {
  403. Tabbar
  404. },
  405. data() {
  406. return {
  407. listShow:false,
  408. stationList: [],
  409. bannerList:[],
  410. bannerListTop:[],
  411. timeOut: false,
  412. pointTimeOut: true,
  413. chargeList: [],
  414. activityList: [],
  415. userId: '',
  416. newsList: [],
  417. pageIndex: 1,
  418. recordsTotal: 0,
  419. longitude: '',
  420. latitude: '',
  421. message: '',
  422. indexLogo: '',
  423. showOss:false,
  424. showOssImg:'',
  425. showOssIndex:'',
  426. showTop:false,
  427. showTopImg:'',
  428. showTopIndex:0,
  429. show: false,
  430. list: [{
  431. name: '长辈模式',
  432. disabled: false
  433. },
  434. {
  435. name: '标准模式',
  436. disabled: false
  437. },
  438. ],
  439. // u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
  440. value: '长辈模式',
  441. elderStatus: false,
  442. fontMode: '',
  443. description: '00:00:00',
  444. activityDate: '',
  445. activityDateList: {},
  446. activityListShow: false,
  447. personInfo:{},
  448. showNt:false,
  449. showNtStep:0,
  450. showNtValue:30,
  451. }
  452. },
  453. onLoad(op) {
  454. if (op.jpcode) {
  455. var k = API.codeOperation(op.jpcode)
  456. if (k) {
  457. uni.navigateTo({
  458. url: k
  459. })
  460. }
  461. }
  462. },
  463. onUnload() {
  464. this.timeOut = false;
  465. this.pointTimeOut = false;
  466. },
  467. onHide() {
  468. this.timeOut = false;
  469. this.pointTimeOut = false;
  470. },
  471. onReachBottom() {
  472. // if (this.newsList.length < this.recordsTotal) {
  473. // this.myLoadmore();
  474. // }
  475. },
  476. onShow() {
  477. if(this.$refs.tabbarMain){
  478. this.$refs.tabbarMain.setcount(0);
  479. }
  480. if( !this.pointTimeOut ){
  481. this.pointTimeOut=true
  482. this.getPointTimeOut();
  483. }
  484. this.getUserInfo();
  485. },
  486. onReady() {
  487. // if (this.carhelp.get("getElderModeClass")) {
  488. // if(this.carhelp.get("getElderModeClass") == "长辈模式") {
  489. // this.fontMode = '1';
  490. // } else {
  491. // this.fontMode = '0';
  492. // }
  493. // API.changeFont({fontMode: this.fontMode}).then((res) => {
  494. // }).catch(error => {
  495. // uni.showToast({
  496. // title: error,
  497. // icon: "none"
  498. // })
  499. // })
  500. // }
  501. //this.getUserInfo();
  502. WxJsApi.getWxConfig(['getLocation', 'addEventListener', 'scanQRCode']).then((res) => {
  503. // //(res)
  504. }).catch(error => {
  505. //(res)
  506. })
  507. this.getBannerInfo("homepage");
  508. var obj=this.carhelp.get("newyear_activity2023")
  509. if(obj==null||obj==""||(obj&&obj.status==0)){
  510. var userInfo= this.carhelp.getPersonInfo();
  511. if(userInfo&&userInfo.id){
  512. this.getNewYear()
  513. }else{
  514. this.getBannerInfoTop("home-top");
  515. }
  516. //this.showNtStep=2
  517. }else{
  518. this.getBannerInfoTop("home-top");
  519. }
  520. this.getPointTimeOut();
  521. this.getNewsList();
  522. this.getActivityInfoList();
  523. },
  524. methods: {
  525. getNewYear(){
  526. var obj=this.carhelp.get("newyear_activity2023")
  527. if(obj&&obj.status==0){
  528. this.exchangeDetail(obj.nt);
  529. }else{
  530. var sz=["1615623336912621569","1615623336912621568"];
  531. var code=parseInt(Math.random()*2)
  532. this.carhelp.set("newyear_activity2023",{
  533. nt:sz[code],
  534. code:code,
  535. status:0
  536. })
  537. //先查询另一个领取过没
  538. userApi.exchangeDetail({
  539. key: sz[code==0?1:0]
  540. }).then((res) => {
  541. if(!res.data.enabled){
  542. if(res.data.code==2){
  543. //未开始
  544. }else{
  545. //已经结束
  546. }
  547. }else if(res.data.status==1){
  548. //已经兑换,或者不能兑换
  549. } else if(res.data.status==2){
  550. // this.showNtValue=res.data.totalDiscount
  551. this.exchangeDetail(sz[code]);
  552. }else{
  553. //res.data.status==0
  554. //this.showNtValue=res.data.totalDiscount
  555. this.exchangeDetail(sz[code]);
  556. }
  557. }).catch(error => {
  558. this.showNt=false;
  559. uni.showToast({
  560. title: error,
  561. icon: "none"
  562. })
  563. })
  564. }
  565. },
  566. exchangeDetail(exchangeCode) {
  567. uni.showLoading({
  568. title: "加载中",
  569. mask: true,
  570. })
  571. userApi.exchangeDetail({
  572. key: exchangeCode
  573. }).then((res) => {
  574. uni.hideLoading();
  575. //
  576. if(!res.data.enabled){
  577. if(res.data.code==2){
  578. //未开始
  579. }else{
  580. //已经结束
  581. }
  582. }else if(res.data.status==1||res.data.status==2){
  583. //已经兑换,或者不能兑换
  584. }else{
  585. this.showNt=true
  586. this.showNtStep=0;
  587. this.showNtValue=res.data.totalDiscount
  588. }
  589. }).catch(error => {
  590. this.showNt=false;
  591. uni.showToast({
  592. title: error,
  593. icon: "none"
  594. })
  595. })
  596. },
  597. redeemNow(exchangeCode) {
  598. uni.showLoading({
  599. title: "加载中",
  600. mask: true,
  601. })
  602. userApi.exchange({
  603. key: exchangeCode
  604. }).then((res) => {
  605. uni.hideLoading();
  606. this.showNtStep=1
  607. this.carhelp.set("newyear_activity2023",{
  608. nt:exchangeCode,
  609. status:1
  610. })
  611. }).catch(error => {
  612. this.showNt=false;
  613. uni.showToast({
  614. title: error,
  615. icon: "none"
  616. })
  617. })
  618. },
  619. showNtStepClick(){
  620. if(this.showNtStep==0){
  621. var obj=this.carhelp.get("newyear_activity2023")
  622. if(this.personInfo.userType!=1){
  623. this.redeemNow(obj.nt)
  624. }else{
  625. this.showNt=false;
  626. uni.showModal({
  627. title:"提示",
  628. content:"游客无法兑换,请先注册为会员后再兑换",
  629. confirmText:"前往注册",
  630. success: res1 => {
  631. if (res1.confirm) {
  632. uni.navigateTo({
  633. url: '/pages/login/login'
  634. })
  635. } else if (res1.cancel) {
  636. //('用户点击取消');
  637. }
  638. }
  639. })
  640. }
  641. }else if(this.showNtStep==1||this.showNtStep==2||this.showNtStep==3||this.showNtStep==4){
  642. this.showNt=false;
  643. uni.navigateTo({
  644. url:"/pages/user/coupon/myCoupon"
  645. })
  646. }
  647. },
  648. test(){
  649. if(process.env.NODE_ENV === "development"){
  650. }
  651. },
  652. goSearch() {
  653. this.$refs.tabbarMain.beforeSwitch(1)
  654. },
  655. nextTop(index){
  656. this.showTopImg=this.bannerListTop[index+1].picUrl;
  657. this.showTopIndex=index+1;
  658. },
  659. getDescriptionTime() {
  660. var date = this.activityDate;
  661. var dateMonth1 = new Date().getMonth()+1;
  662. var dateDay1 = new Date().getDate();
  663. var dateMonth2 = parseInt(date.slice(5,7));
  664. var dateDay2 = parseInt(date.slice(8,10));
  665. if(dateMonth1 < dateMonth2) {
  666. var days = new Date(new Date().getFullYear(), dateMonth1, 0).getDate();
  667. dateDay2 = dateDay2 + days;
  668. console.log(dateDay2)
  669. }
  670. if(dateDay1 < dateDay2-2) {
  671. this.description = dateDay2 - dateDay1 + '天'
  672. } else {
  673. var dateTime2=new Date(date).getTime()
  674. var c=hourDistanceArr(new Date(),new Date(dateTime2))
  675. if(c[0] < 10) {
  676. c[0] = '0'+c[0];
  677. }
  678. if(c[1] < 10) {
  679. c[1] = '0'+c[1];
  680. }
  681. if(c[2] < 10) {
  682. c[2] = '0'+c[2];
  683. }
  684. this.description = c[0]+':'+c[1]+':'+c[2];
  685. if(this.description == '00:00:00') {
  686. this.activityListShow = false;
  687. }
  688. setTimeout(()=>{
  689. this.getDescriptionTime();
  690. },1000)
  691. }
  692. },
  693. getUserInfo() {
  694. uni.showLoading({
  695. title: "加载中",
  696. mask: true,
  697. })
  698. loginApi.findByOpenId({
  699. openId: this.carhelp.getOpenId(),
  700. noerror:true,
  701. }).then((res) => {
  702. uni.hideLoading();
  703. if (res.code == 200&&res.result) {
  704. this.personInfo=res.data.regUser;
  705. var token = res ? res.data.token : '';
  706. this.carhelp.setPersonInfo(res.data.regUser );
  707. this.carhelp.setToken(token);
  708. this.carhelp.setPersonInfoPlus(res.data);
  709. }
  710. console.log("--------------")
  711. if (res.data&&res.data.regUser) {
  712. if(res.data.regUser.fontMode == null) {
  713. this.show = true;
  714. } else {
  715. this.show = false;
  716. this.fontMode = res.data.regUser.fontMode;
  717. if(this.fontMode == '1') {
  718. this.carhelp.set("getElderModeClass", "长辈模式");
  719. } else {
  720. this.carhelp.set("getElderModeClass", "标准模式");
  721. }
  722. }
  723. this.userId = res.data.regUser.id;
  724. this.getFindChargeData();
  725. if (this.carhelp.get("getElderModeClass")) {
  726. if(this.carhelp.get("getElderModeClass") == "长辈模式") {
  727. this.elderStatus = true;
  728. } else {
  729. this.elderStatus = false;
  730. }
  731. }
  732. }else{
  733. this.carhelp.set("getElderModeClass", "长辈模式");
  734. this.elderStatus = true;
  735. var obj=this.carhelp.get("friends_invitation")
  736. // this.carhelp.set("friends_invitation",{
  737. // op:op,
  738. // date:new Date().getTime()
  739. // })
  740. if(obj&&false){
  741. if(obj.date+1000*60*60*24 > new Date().getTime() ){
  742. this.friendsInvitation(obj)
  743. }
  744. }
  745. }
  746. }).catch(error => {
  747. uni.showToast({
  748. title: error,
  749. icon: "none"
  750. })
  751. })
  752. },
  753. friendsInvitation(obj){
  754. uni.showLoading({
  755. title: "加载中",
  756. mask: true,
  757. })
  758. API.findActivity({
  759. id:obj.op.id,
  760. code:obj.op.icode
  761. }).then((res) => {
  762. uni.hideLoading()
  763. obj.activityInfo=res.data.activityInfo;
  764. var name=res.data.activityInfo.name;
  765. var title="参与活动"
  766. var okbtn="前往注册"
  767. var endTime=res.data.activityInfo.endTime;
  768. if(endTime&&secondsDistance(newDate(endTime))>0){
  769. name="活动已结束"
  770. okbtn="继续注册"
  771. title="提示"
  772. obj=null
  773. }
  774. this.carhelp.set("friends_invitation",obj)
  775. uni.showModal({
  776. title:title,
  777. content:name,
  778. confirmText:okbtn,
  779. success: res1 => {
  780. if (res1.confirm) {
  781. uni.navigateTo({
  782. url: '/pages/login/login'
  783. })
  784. } else if (res1.cancel) {
  785. //('用户点击取消');
  786. }
  787. }
  788. })
  789. }).catch(error => {
  790. uni.showToast({
  791. title: error,icon: "none"
  792. })
  793. })
  794. },
  795. clickBannerTop(){
  796. var mod = this.bannerListTop[this.showTopIndex];
  797. this.showTop=false;
  798. this.clickBanner(0,true,mod)
  799. },
  800. clickBanner(index,bl,modout){
  801. var uurl="";
  802. var mod = this.bannerList[index]
  803. if(modout){
  804. mod=modout;
  805. }
  806. mod.clickUrl=mod.linkUrl
  807. if (mod.linkPicUrl&&!bl) {
  808. this.showOss=true;
  809. this.showOssImg=mod.linkPicUrl;
  810. this.showOssIndex=index;
  811. }else if (mod.clickUrl == null) {
  812. } else if (mod.clickUrl.indexOf('http') == 0) {
  813. window.location = mod.clickUrl+uurl;
  814. }
  815. else if (mod.clickUrl.slice(-5) == 'login' && this.userId) {
  816. } else if (mod.clickUrl.indexOf('#/') == 0) {
  817. if (mod.clickUrl.indexOf("?") == -1) {
  818. mod.clickUrl += '?';
  819. }
  820. var url=mod.clickUrl.split("#")[1]
  821. //window.location = mod.clickUrl;
  822. uni.navigateTo({
  823. url: url+uurl
  824. })
  825. } else if (mod.clickUrl == '#' || mod.clickUrl == '') {
  826. } else {
  827. uni.navigateTo({
  828. url: mod.clickUrl+uurl
  829. })
  830. }
  831. },
  832. getBannerInfoTop(code){
  833. uni.showLoading({
  834. title: "加载中",
  835. mask: true,
  836. })
  837. var nowtime = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d}')
  838. newsApi.getBannerInfo(code).then((res) => {
  839. this.bannerListTop =res.data;
  840. var time=this.carhelp.get("bannerListTop");
  841. if(this.bannerListTop.length&&!(time&&nowtime==time)){
  842. this.showTop=true;
  843. this.showTopImg=this.bannerListTop[0].picUrl;
  844. this.showTopIndex=0;
  845. this.carhelp.set("bannerListTop",nowtime);
  846. }
  847. //this.test()
  848. if (this.userId) {
  849. API.readCoupon().then((res2) => {
  850. var mod=res2.data.userCoupon;
  851. console.log(mod)
  852. if(mod){
  853. var obj={
  854. topmodel:"coupon",
  855. value:mod.value,
  856. text:mod.describe,
  857. linkUrl:"#/pages/user/coupon/myCoupon",
  858. }
  859. this.bannerListTop =[
  860. obj,...res.data
  861. ]
  862. if(!(time&&nowtime==time)){
  863. this.showTop=true;
  864. this.showTopImg=this.bannerListTop[0].picUrl;
  865. this.showTopIndex=0;
  866. this.carhelp.set("bannerListTop",nowtime);
  867. }
  868. }
  869. }).catch(error2 => {
  870. uni.showToast({
  871. title: error2,icon: "none"
  872. })
  873. })
  874. }
  875. uni.hideLoading()
  876. //document.getElementsByClassName("uni-swiper-wrapper")[0].parentNode.style="background-color: rgb(255, 255, 255); height: 120px;"
  877. }).catch(error => {
  878. uni.showToast({
  879. title: error,icon: "none"
  880. })
  881. })
  882. },
  883. getBannerInfo(code){
  884. uni.showLoading({
  885. title: "加载中",
  886. mask: true,
  887. })
  888. newsApi.getBannerInfo(code).then((res) => {
  889. this.bannerList =res.data;
  890. uni.hideLoading()
  891. //document.getElementsByClassName("uni-swiper-wrapper")[0].parentNode.style="background-color: rgb(255, 255, 255); height: 120px;"
  892. }).catch(error => {
  893. uni.showToast({
  894. title: error,icon: "none"
  895. })
  896. })
  897. },
  898. elderClick() {
  899. if(this.value == "长辈模式") {
  900. this.elderStatus = true;
  901. this.carhelp.set("getElderModeClass", "长辈模式");
  902. this.fontMode = '1';
  903. } else {
  904. this.elderStatus = false;
  905. this.carhelp.set("getElderModeClass", "标准模式");
  906. this.fontMode = '0';
  907. }
  908. API.changeFont({fontMode: this.fontMode}).then((res) => {
  909. this.show = false;
  910. }).catch(error => {
  911. uni.showToast({
  912. title: error,
  913. icon: "none"
  914. })
  915. })
  916. },
  917. getPointTimeOut() {
  918. setTimeout(() => {
  919. if (this.pointTimeOut) {
  920. this.getPoint();
  921. }
  922. }, 1000)
  923. },
  924. getFindChargeData() {
  925. API.findChargeData().then((res) => {
  926. this.chargeList = res.data.chargingRecordList;
  927. var list = res.data.chargingRecordList;
  928. for (var i = 0; i < list.length; i++) {
  929. if (list[i].status == '1' || list[i].status == '4') {
  930. this.timeOut = true;
  931. }
  932. }
  933. if (this.timeOut&&this.pointTimeOut) {
  934. setTimeout(() => {
  935. this.getFindChargeData();
  936. }, 5000)
  937. }
  938. }).catch(error => {
  939. uni.showToast({
  940. title: error,
  941. icon: "none"
  942. })
  943. })
  944. },
  945. toSearchPile() {
  946. uni.navigateTo({
  947. url: '/pages/searchPile/searchPile'
  948. })
  949. },
  950. toLogin() {
  951. uni.navigateTo({
  952. url: '/pages/login/login'
  953. })
  954. },
  955. toNewsNotice() {
  956. uni.navigateTo({
  957. url: '/pages/article/newsNotice'
  958. })
  959. },
  960. //微信扫二维码
  961. getScanCode() {
  962. if (this.userId) {
  963. WxJsApi.scanQRCode(1).then(res => {
  964. //("scanQRCode------" + res)
  965. if (res) {
  966. API.scanCode(res).then((response) => {
  967. }).catch(error => {
  968. uni.showToast({
  969. title: error,
  970. icon: "none"
  971. })
  972. })
  973. }
  974. }).catch(error => {
  975. })
  976. } else {
  977. uni.navigateTo({
  978. url: '/pages/login/login'
  979. })
  980. }
  981. },
  982. fastRecharge() {
  983. if (this.userId) {
  984. uni.navigateTo({
  985. url: '/pages/user/finance/recharge'
  986. })
  987. } else {
  988. uni.navigateTo({
  989. url: '/pages/login/login'
  990. })
  991. }
  992. },
  993. chargingRecord() {
  994. if (this.userId) {
  995. uni.navigateTo({
  996. url: '/pages/record/index'
  997. })
  998. } else {
  999. uni.navigateTo({
  1000. url: '/pages/login/login'
  1001. })
  1002. }
  1003. },
  1004. rechargeActivity(item) {
  1005. if (this.userId) {
  1006. var uurl="&uid="+this.userId;
  1007. var mod = item
  1008. if (mod.clickUrl == null) {
  1009. } else if (mod.clickUrl.indexOf('http') == 0) {
  1010. window.location = mod.clickUrl+uurl;
  1011. } else if (mod.clickUrl.indexOf('#/') == 0) {
  1012. if (mod.clickUrl.indexOf("?") == -1) {
  1013. mod.clickUrl += '?';
  1014. }
  1015. var url=mod.clickUrl.split("#")[1]
  1016. //window.location = mod.clickUrl;
  1017. uni.navigateTo({
  1018. url: url+uurl
  1019. })
  1020. } else if (mod.clickUrl == '#' || mod.clickUrl == '') {
  1021. } else {
  1022. uni.navigateTo({
  1023. url: mod.clickUrl+uurl
  1024. })
  1025. }
  1026. } else {
  1027. uni.navigateTo({
  1028. url: '/pages/login/login'
  1029. })
  1030. }
  1031. },
  1032. getActivityInfoList() {
  1033. uni.showLoading({
  1034. title: "加载中",
  1035. mask: true,
  1036. })
  1037. API.activityInfoList({
  1038. pageIndex: 1,
  1039. pageSize: 10
  1040. }).then((res) => {
  1041. uni.hideLoading()
  1042. var list = res.data.data;
  1043. for (let i = 0; i < list.length; i++) {
  1044. if(list[i].type==2&&list[i].endTime != null) {
  1045. this.activityListShow = true;
  1046. var reg=new RegExp('-','gi');
  1047. this.activityDate = list[i].endTime.replace(reg,'/');
  1048. console.log(this.activityDate)
  1049. this.activityDateList = list[i];
  1050. list.splice(i, 1);
  1051. this.getDescriptionTime();
  1052. }
  1053. }
  1054. this.activityList = list;
  1055. }).catch(error => {
  1056. uni.showToast({
  1057. title: error,
  1058. icon: "none"
  1059. })
  1060. })
  1061. },
  1062. searchStationData(){
  1063. var data={
  1064. longitude: this.longitude,
  1065. latitude: this.latitude,
  1066. pageSize:6
  1067. }
  1068. if (this.carhelp.getPersonInfo()) {
  1069. data.openId=this.carhelp.getOpenId()
  1070. }
  1071. siteApi.searchStationData(data).then((response) => {
  1072. this.stationList = response.data.data;
  1073. if(response.data.data.length){
  1074. var stationDataList = response.data.data;
  1075. MapLoader().then(AMap1 => {
  1076. for(var i in stationDataList){
  1077. var item=stationDataList[i]
  1078. var lnglat = new AMap.LngLat(this.longitude,this.latitude);
  1079. var myDistance = lnglat.distance([item.longitude,item.latitude]);
  1080. item.distance = myDistance/1000;
  1081. console.log(item.distance)
  1082. }
  1083. })
  1084. //this.stationData = stationDataList;
  1085. }
  1086. }).catch(error => {
  1087. uni.showToast({
  1088. title: error,
  1089. icon: "none"
  1090. })
  1091. })
  1092. },
  1093. getPoint() {
  1094. WxJsApi.getLocation().then((res) => {
  1095. this.latitude = parseFloat(res.latitude);
  1096. this.longitude = parseFloat(res.longitude);
  1097. this.message = res.errMsg;
  1098. if (res.errMsg != 'getLocation:ok') {
  1099. uni.showToast({
  1100. title: res
  1101. })
  1102. } else {
  1103. this.searchStationData()
  1104. }
  1105. }).catch(error => {
  1106. uni.showToast({
  1107. title: error,
  1108. icon: "none"
  1109. })
  1110. })
  1111. },
  1112. getNewsList(bl) {
  1113. uni.showLoading({
  1114. title: "加载中",
  1115. mask: true,
  1116. })
  1117. if (bl) {
  1118. this.newsList = [];
  1119. this.pageIndex = 1;
  1120. }
  1121. newsApi.newsInfoList({
  1122. pageIndex: this.pageIndex,
  1123. pageSize:3,
  1124. }).then((res) => {
  1125. uni.hideLoading()
  1126. this.newsList = [
  1127. ...this.newsList,
  1128. ...res.data.data
  1129. ];
  1130. this.recordsTotal = res.data.recordsTotal
  1131. }).catch(error => {
  1132. uni.showToast({
  1133. title: error,
  1134. icon: "none"
  1135. })
  1136. })
  1137. },
  1138. myLoadmore() {
  1139. //this.pageIndex += 1;
  1140. //this.getNewsList()
  1141. },
  1142. }
  1143. }
  1144. </script>
  1145. <style lang="scss" scoped>
  1146. .couponmain{
  1147. .main{
  1148. margin: 100px auto 0;
  1149. position: relative;
  1150. .content{
  1151. padding: 24px;
  1152. padding-top: 50px;
  1153. background-color: #fff;
  1154. box-shadow: 0px 0px 0px 1px rgba(254, 229, 147, 100);
  1155. border: 2px solid rgba(253, 217, 141, 100);
  1156. border-radius: 8px;
  1157. .img{
  1158. width: 44vw;
  1159. height: 134px;
  1160. position: absolute;
  1161. top: -88px;
  1162. right: 0px;
  1163. img{
  1164. width: 100%;
  1165. height: 100%;
  1166. }
  1167. }
  1168. .title{
  1169. font-size: 16px;
  1170. color: rgba(84, 45, 45, 100);
  1171. margin-bottom: 13px;
  1172. }
  1173. .text{
  1174. line-height: 24px;
  1175. color: rgba(84, 45, 45, 100);
  1176. font-size: 16px;
  1177. text-align: justify;
  1178. text-decoration:underline;
  1179. text-decoration-color:#ECE3BA;
  1180. text-indent: 32px;
  1181. }
  1182. .sign{
  1183. text-align: right;
  1184. margin-top: 8px;
  1185. font-size: 16px;
  1186. }
  1187. }
  1188. // 专享优惠券
  1189. .exclusive{
  1190. background-color: #F5E4C8;
  1191. margin-top: 20px;
  1192. padding: 32rpx 32rpx 32rpx 32rpx ;
  1193. box-shadow: 0px 0px 0px 1px rgba(254, 229, 147, 100);
  1194. border: 2px solid rgba(253, 217, 141, 100);
  1195. border-radius: 8px;
  1196. .exclusive1{
  1197. font-size: 48rpx;
  1198. color: rgba(51, 51, 51, 1);
  1199. font-family: SourceHanSerif-bold;
  1200. }
  1201. .exclusive2{
  1202. font-family: PingFangSC-regular;
  1203. color: rgba(51, 51, 51, 1);
  1204. font-size: 36rpx;
  1205. }
  1206. p{
  1207. width: 100%;
  1208. text-align: center;
  1209. //color: rgba(255, 73, 75, 100);
  1210. //font-size: 20px;
  1211. }
  1212. .img{
  1213. // width: 74.4vw;
  1214. // height: 84px;
  1215. margin-top: 16px;
  1216. position: relative;
  1217. img{
  1218. width: 100%;
  1219. height: 100%;
  1220. }
  1221. }
  1222. .num{
  1223. font-size:54rpx;
  1224. color: rgba(252, 237, 179, 100);
  1225. position: absolute;
  1226. top:10px;
  1227. left: 8vw;
  1228. font-weight: 600;
  1229. .unit{
  1230. font-size: 24rpx;
  1231. color: rgba(252, 237, 179, 100);
  1232. }
  1233. }
  1234. .unit2{
  1235. font-size: 12px;
  1236. color: #FFF;
  1237. position: absolute;
  1238. top: 90rpx;
  1239. left: 24rpx;
  1240. }
  1241. .exclusive-text{
  1242. color: #333333;
  1243. font-size: 16rpx;
  1244. }
  1245. .exclusive-btn{
  1246. width: 80%;
  1247. margin-top: 48rpx;
  1248. border-radius: 50px;
  1249. background: linear-gradient(90.58deg, rgba(225,208,165,1) 0.05%,rgba(228,190,132,1) 98.67%);
  1250. color: rgba(51, 51, 51, 1);
  1251. font-size: 36rpx;
  1252. text-align: center;
  1253. box-shadow: 0px 8rpx 20rpx 0px rgba(184, 155, 103, 40);
  1254. font-family: -apple-system;
  1255. // width: 87.4%;
  1256. // margin-top: 20px;
  1257. // background-image: linear-gradient(#ffff00, #ff9600);
  1258. // color: #521e00;
  1259. // font-size: 20px;
  1260. // border-radius: 50px;
  1261. }
  1262. .ticket-info{
  1263. width: 40vw;
  1264. text-align: center;
  1265. position: absolute;
  1266. top: 18px;
  1267. right: 16rpx;
  1268. .ticket-name{
  1269. line-height: 40rpx;
  1270. color: rgba(16, 16, 16, 100);
  1271. font-size: 16rpx;
  1272. }
  1273. .condition{
  1274. line-height: 22px;
  1275. color: #8a6f6f;
  1276. font-size: 12px;
  1277. }
  1278. }
  1279. }
  1280. }
  1281. }
  1282. .oldTextClassF{
  1283. .station .price-free .price-1 .num{
  1284. font-size: 48rpx !important;
  1285. line-height: 40rpx;
  1286. font-weight: bold;
  1287. }
  1288. }
  1289. /deep/.u-image__loading{
  1290. background:#ff000000;
  1291. }
  1292. // 头部图片
  1293. img {
  1294. width: 100%;
  1295. height: 100%;
  1296. }
  1297. .background{
  1298. background: linear-gradient(#D6EEDC,#FFFFFF );
  1299. padding-top: 16px;
  1300. }
  1301. .banner {
  1302. width: 91.4%;
  1303. margin: 0 auto ;
  1304. border-radius: 12px;
  1305. height: 120px;
  1306. overflow: hidden;
  1307. }
  1308. // 选项列表
  1309. .option-list {
  1310. padding-top: 15px;
  1311. line-height: 20px;
  1312. border-radius: 8px;
  1313. text-align: center;
  1314. margin: auto;
  1315. display: flex;
  1316. justify-content: space-around;
  1317. .list-item {
  1318. // 图标
  1319. .icon {
  1320. width: 40px;
  1321. height: 40px;
  1322. border-radius: 99px;
  1323. line-height: 40px;
  1324. font-size: 24px;
  1325. text-align: center;
  1326. margin: auto;
  1327. color: #ffffff;
  1328. }
  1329. .text{
  1330. margin-top: 4px;
  1331. }
  1332. }
  1333. }
  1334. .flex{
  1335. display: flex;
  1336. }
  1337. // 站点
  1338. .pack-up{
  1339. float: right;
  1340. font-size: 16px;
  1341. color: rgba(119, 119, 119, 100);
  1342. }
  1343. // 附近站点改版
  1344. .station{
  1345. width: 91.4%;
  1346. border-radius: 8px;
  1347. padding: 12px 12px 12px 11px;
  1348. background-color: #fff;
  1349. margin: 8px auto 0;
  1350. .head{
  1351. display: flex;
  1352. justify-content: space-between;
  1353. align-items: center;
  1354. .title{
  1355. color: rgba(16, 16, 16, 100);
  1356. font-size: 32rpx;
  1357. font-weight: 550;
  1358. width: 440rpx;
  1359. text-overflow:ellipsis;
  1360. overflow:hidden;
  1361. white-space:nowrap;
  1362. }
  1363. .distance{
  1364. width: 180rpx;
  1365. color: rgba(102, 102, 102, 100);
  1366. font-size: 32rpx;
  1367. text-align: end;
  1368. .iconfont{
  1369. font-size: 24rpx;
  1370. margin-right: 4rpx;
  1371. }
  1372. }
  1373. }
  1374. .sign{
  1375. display: flex;
  1376. flex-wrap: wrap;
  1377. margin-top: 16rpx;
  1378. .sign-1{
  1379. line-height: 40rpx;
  1380. border-radius: 8rpx;
  1381. background-color: rgba(255, 255, 255, 100);
  1382. color: rgba(255, 139, 0, 100);
  1383. font-size: 24rpx;
  1384. text-align: center;
  1385. border: 1px solid rgba(255, 139, 0, 100);
  1386. padding: 0 8rpx;
  1387. margin-right:16rpx;
  1388. margin-bottom: 8rpx;
  1389. }
  1390. .sign-2{
  1391. line-height: 40rpx;
  1392. border-radius: 8rpx;
  1393. background-color: rgba(255, 255, 255, 100);
  1394. color: rgba(153, 153, 153, 100);
  1395. font-size: 24rpx;
  1396. text-align: center;
  1397. border: 1px solid rgba(204, 204, 204, 100);
  1398. padding: 0 8rpx;
  1399. margin-right: 16rpx;
  1400. margin-bottom: 8rpx;
  1401. }
  1402. }
  1403. .price-free{
  1404. display: flex;
  1405. justify-content: space-between;
  1406. margin-top: 8rpx;
  1407. .price{
  1408. display: flex;
  1409. align-items: baseline;
  1410. }
  1411. .price-1{
  1412. .num{
  1413. color: rgba(255, 98, 0, 100);
  1414. font-size: 44rpx;
  1415. }
  1416. .unit{
  1417. font-size: 12px;
  1418. color: rgba(153, 153, 153, 100);
  1419. }
  1420. }
  1421. .price-2{
  1422. font-size: 24rpx;
  1423. color: rgba(153, 153, 153, 100);
  1424. margin-left: 8rpx;
  1425. text-decoration: line-through;
  1426. }
  1427. }
  1428. .free{
  1429. display: flex;
  1430. align-items: center;
  1431. .slow,.fast{
  1432. display: flex;
  1433. .sp-font{
  1434. width: 40rpx;
  1435. height: 40rpx;
  1436. line-height: 40rpx;
  1437. border-radius: 4px;
  1438. background-color: #7a68f6;
  1439. color: #fff;
  1440. font-size: 28rpx;
  1441. text-align: center;
  1442. margin-right: 2rpx;
  1443. }
  1444. .fast-font{
  1445. width: 40rpx;
  1446. height: 40rpx;
  1447. line-height: 40rpx;
  1448. border-radius: 8rpx;
  1449. background-color: rgba(186, 240, 215, 100);
  1450. color: rgba(0, 130, 69, 100);
  1451. font-size: 28rpx;
  1452. text-align: center;
  1453. margin-right: 8rpx;
  1454. }
  1455. .slow-font{
  1456. width: 40rpx;
  1457. height: 40rpx;
  1458. line-height: 40rpx;
  1459. border-radius: 8rpx;
  1460. background-color: rgba(226, 226, 226, 100);
  1461. color: rgba(128, 128, 128, 100);
  1462. font-size: 28rpx;
  1463. text-align: center;
  1464. margin-right: 8rpx;
  1465. }
  1466. .num{
  1467. font-size: 32rpx;color: rgba(0, 145, 67, 100);
  1468. line-height: 40rpx;
  1469. }
  1470. }
  1471. .slow{
  1472. margin-left: 24rpx;
  1473. }
  1474. }
  1475. }
  1476. //定位
  1477. .location {
  1478. width: 91.4%;
  1479. background-color: #ffffff;
  1480. height: 120px;
  1481. display: flex;
  1482. justify-content: space-between;
  1483. margin: 20px auto 0;
  1484. border-radius: 8px;
  1485. border: #F2F4F4 1px;
  1486. .location-text {
  1487. padding: 24px 0 0 28px;
  1488. .text-1 {
  1489. height: 16px;
  1490. line-height: 16px;
  1491. color: rgba(16, 16, 16, 100);
  1492. font-size: 16px;
  1493. text-align: left;
  1494. }
  1495. .text-2 {
  1496. height: 17px;
  1497. line-height: 17px;
  1498. color: rgba(102, 102, 102, 100);
  1499. font-size: 12px;
  1500. text-align: left;
  1501. margin-top: 4px;
  1502. white-space: nowrap; //强制不换行
  1503. text-overflow: ellipsis; //文本超出出现省略号
  1504. overflow: hidden;
  1505. }
  1506. .text-3 {
  1507. width: 80px;
  1508. height: 24px;
  1509. line-height: 22px;
  1510. border-radius: 50px;
  1511. color: rgba(0, 185, 98, 100);
  1512. font-size: 12px;
  1513. text-align: center;
  1514. border: 1px solid rgba(0, 185, 98, 100);
  1515. margin-top: 11px;
  1516. }
  1517. }
  1518. .img-box {
  1519. width: 120px;
  1520. height: 120px;
  1521. margin-right: 20px;
  1522. }
  1523. }
  1524. .state {
  1525. width: 91.4%;
  1526. background-color: #ffffff;
  1527. height: 120px;
  1528. display: flex;
  1529. margin: 20px auto 0;
  1530. border-radius: 8px;
  1531. border: #F2F4F4 1px;
  1532. .state-text {
  1533. width: 61.8%;
  1534. padding: 24px 0 0 28px;
  1535. .text-1 {
  1536. height: 16px;
  1537. line-height: 16px;
  1538. color: blueviolet;
  1539. font-size: 16px;
  1540. text-align: left;
  1541. }
  1542. .text-2 {
  1543. height: 17px;
  1544. line-height: 17px;
  1545. color: #101010;
  1546. text-align: left;
  1547. margin-top: 12px;
  1548. }
  1549. .text-3 {
  1550. font-size: 12px;
  1551. line-height: 20px;
  1552. margin-top: 6px;
  1553. color: #999999;
  1554. }
  1555. }
  1556. .img-box {
  1557. width: 120px;
  1558. height: 120px;
  1559. margin-right: 20px;
  1560. }
  1561. }
  1562. //充值
  1563. .top-up {
  1564. width: 91.4%;
  1565. margin: 12px auto 0 ;
  1566. .top-up-title {
  1567. color: rgba(16, 16, 16, 100);
  1568. font-size: 16px;
  1569. }
  1570. .card-box{
  1571. display: flex;
  1572. justify-content: space-between;
  1573. padding: 0 0 16px 0;
  1574. .card{
  1575. width: 48.3%;
  1576. height: 65px;
  1577. img{
  1578. width: 100%;
  1579. height: 100%;
  1580. }
  1581. }
  1582. }
  1583. .img-box2{
  1584. margin-top: 12px;
  1585. display: flex;
  1586. justify-content: space-between;
  1587. img{
  1588. width: 100%;
  1589. height: 100%;
  1590. }
  1591. .left-image{
  1592. width: 48.3%;
  1593. height: 166px;
  1594. padding: 8px 0 0 12px;
  1595. // background: url(@/assets/img/topup1.png);
  1596. background-repeat: no-repeat;
  1597. background-position: 30% 10%;
  1598. background-size: cover;
  1599. p{
  1600. color: rgba(56, 47, 33, 100);
  1601. font-size: 24px;
  1602. line-height: 28px;
  1603. font-weight: 600;
  1604. }
  1605. .time-activities{
  1606. color: rgba(56, 39, 14, 100);
  1607. font-size: 16px;
  1608. line-height: 22px;
  1609. margin-top: 4px;
  1610. .time{
  1611. margin-left: 4px;
  1612. color: #fa3534;
  1613. font-weight: bold;
  1614. }
  1615. }
  1616. }
  1617. .right-image{
  1618. width: 48.3%;
  1619. display: flex;
  1620. flex-direction: column;
  1621. justify-content: space-between;
  1622. .margin-top{
  1623. margin-top: 12px;
  1624. }
  1625. img{
  1626. height: 77px;
  1627. }
  1628. };
  1629. }
  1630. }
  1631. // 小竖线
  1632. .line {
  1633. display: inline-block;
  1634. width: 3px;
  1635. height: 12px;
  1636. margin-right: 7px;
  1637. background-color: rgba(0, 145, 67, 100);
  1638. }
  1639. // 新闻公告
  1640. .news-title {
  1641. padding: 0 16px;
  1642. margin-top: 12px;
  1643. color: rgba(16, 16, 16, 100);
  1644. font-size: 16px;
  1645. display: flex;
  1646. justify-content: space-between;
  1647. background-color: #F2F4F4;
  1648. .news-title-left {
  1649. display: flex;
  1650. }
  1651. .more {
  1652. font-size: 14px;
  1653. color: #777777;
  1654. display: flex;
  1655. line-height: 20px;
  1656. .more-icon {
  1657. font-size: 24px
  1658. }
  1659. }
  1660. }
  1661. .news {
  1662. background-color: #fff;
  1663. width: 91.4%;
  1664. margin: 12px auto 0;
  1665. border-radius: 8px;
  1666. .news-content {
  1667. display: flex;
  1668. justify-content: space-between;
  1669. padding: 12px;
  1670. .content-text {
  1671. width: 56.2%;
  1672. height: 100%;
  1673. line-height: 21px;
  1674. color: #101010;
  1675. text-align: left;
  1676. font-size: 14px;
  1677. }
  1678. .content-title {
  1679. width: 100%;
  1680. overflow: hidden;
  1681. text-overflow: ellipsis;
  1682. display: -webkit-box;
  1683. -webkit-box-orient: vertical;
  1684. -webkit-line-clamp: 3;
  1685. }
  1686. .content-img {
  1687. width: 40.57%;
  1688. height: 100%;
  1689. border-radius: 4px;
  1690. overflow: hidden;
  1691. img {
  1692. width: 100%;
  1693. height: 80%;
  1694. }
  1695. }
  1696. .news-time {
  1697. margin-top: 5%;
  1698. color: #999999;
  1699. width: 80px;
  1700. height: 20px;
  1701. font-size: 14px;
  1702. }
  1703. }
  1704. }
  1705. .bottom {
  1706. width: 100%;
  1707. height: 60px;
  1708. .bot {
  1709. width: 100%;
  1710. margin: 0 auto;
  1711. padding: 0 17.3%;
  1712. justify-content: space-between;
  1713. display: flex;
  1714. .bot-line {
  1715. margin-top: 20px;
  1716. width: 21.3%;
  1717. height: 0px;
  1718. border: 1px solid rgba(207, 210, 213, 100);
  1719. }
  1720. .bot-text {
  1721. white-space: nowrap;
  1722. height: 17px;
  1723. margin-top: 13px;
  1724. margin-left: 12px;
  1725. margin-right: 12px;
  1726. font-size: 12px;
  1727. text-align: center;
  1728. color: rgba(182, 189, 195, 100);
  1729. }
  1730. }
  1731. }
  1732. // 导航栏
  1733. .navigation {
  1734. width: 100%;
  1735. // height: 40px;
  1736. padding: 10px 0;
  1737. background-color: #fff;
  1738. position: fixed;
  1739. bottom: 0;
  1740. left: 0;
  1741. display: flex;
  1742. justify-content: space-around;
  1743. text-align: center;
  1744. color: #999999;
  1745. .nav-icon {
  1746. width: 54px;
  1747. font-size: 24px
  1748. }
  1749. .nav-text {
  1750. font-size: 14px;
  1751. }
  1752. }
  1753. .shema {
  1754. width: 70%;
  1755. padding-bottom: 20px;
  1756. border-radius: 16px;
  1757. background-color: #fff;
  1758. position: fixed;
  1759. top: 100px;
  1760. left: 0;
  1761. right: 0;
  1762. margin: 0 auto;
  1763. z-index: 9999;
  1764. .title {
  1765. height: 33px;
  1766. color: rgba(16, 16, 16, 100);
  1767. font-size: 24px;
  1768. text-align: center;
  1769. padding: 16px 0;
  1770. }
  1771. .u-radio-group {
  1772. margin: 16px 5vw;
  1773. }
  1774. /deep/.u-radio {
  1775. width: 60vw !important;
  1776. padding: 24px 24px 40px;
  1777. line-height: 20px;
  1778. border-radius: 16px;
  1779. text-align: center;
  1780. border: #101010 1px solid;
  1781. margin-top: 12px;
  1782. }
  1783. /deep/ .u-radio__label {
  1784. text-align: left;
  1785. height: 24px;
  1786. // color: rgba(0, 185, 98, 100);
  1787. font-size: 24px;
  1788. }
  1789. p {
  1790. height: 22px;
  1791. color: rgba(102, 102, 102, 100);
  1792. font-size: 14px;
  1793. margin-top: 12px;
  1794. white-space: nowrap
  1795. }
  1796. .hint {
  1797. text-align: center;
  1798. }
  1799. .btn-box {
  1800. margin-top: 20px;
  1801. .choice-btn {
  1802. width: 80%;
  1803. }
  1804. }
  1805. }
  1806. .wrap {
  1807. display: flex;
  1808. align-items: center;
  1809. justify-content: center;
  1810. height: 100%;
  1811. }
  1812. // 登录提示
  1813. .login-prompt {
  1814. width: 91.4%;
  1815. height: 40px;
  1816. line-height: 40px;
  1817. border-radius: 50px;
  1818. text-align: left;
  1819. padding-left: 16px;
  1820. padding-right: 4px;
  1821. background-color: rgba(0, 0, 0, 0.6);
  1822. position: fixed;
  1823. bottom: 75px;
  1824. color: #ffffff;
  1825. .button {
  1826. width: 88px;
  1827. height: 32px;
  1828. line-height: 32px;
  1829. border-radius: 50px;
  1830. background-color: rgba(0, 185, 98, 100);
  1831. text-align: center;
  1832. float: right;
  1833. margin-top: 4px;
  1834. }
  1835. }
  1836. .showOss{
  1837. /deep/.u-model,/deep/.u-mode-center-box{
  1838. background-color: transparent;
  1839. }
  1840. }
  1841. </style>