index.vue 42 KB

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