index.vue 48 KB

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