index.vue 25 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249
  1. <template>
  2. <view>
  3. <!-- 头部图片 -->
  4. <view class="banner">
  5. <u-swiper bg-color="#fff"
  6. :img-mode="'scaleToFill'" height="400"
  7. :list="bannerList" @click="clickBanner" :name="'picUrl'" >
  8. </u-swiper>
  9. <!-- <img :src="indexLogo?indexLogo:'static/img/banner1.jpg'" alt="">
  10. -->
  11. </view>
  12. <!-- 选项列表 -->
  13. <view class="option-list">
  14. <view class="list-item" @click="getScanCode">
  15. <view class="icon iconfont" style="background-color:#59d96e;">
  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-color:#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-color: #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-color: #9D9FFF;">
  40. &#xe622;
  41. </view>
  42. <view class="text oldTextjp2" oldstyle="font-size: 18px;">
  43. 附近站点
  44. </view>
  45. </view>
  46. </view>
  47. <!-- 模式选择 -->
  48. <u-mask :show="show">
  49. <view class="wrap">
  50. <view class="shema" @tap.stop>
  51. <view class="title">
  52. 设置浏览模式
  53. </view>
  54. <view class="">
  55. <u-radio-group v-model="value">
  56. <u-radio v-for="(item, index) in list" :key="index" :name="item.name" :disabled="item.disabled" active-color="red">
  57. {{item.name}}
  58. <p v-if="item.name == '长辈模式'">字体更大 看的清楚</p>
  59. <p v-if="item.name == '标准模式'">信息丰富 功能全面</p>
  60. </u-radio>
  61. </u-radio-group>
  62. </view>
  63. <view class="hint">可在 {{""}}我的-设置 {{""}}页面中切换</view>
  64. <view class="btn-box">
  65. <u-button class="choice-btn" type="success" shape="circle" @click="elderClick">我选好了</u-button>
  66. </view>
  67. </view>
  68. </view>
  69. </u-mask>
  70. <view style="height:50px"></view>
  71. <!-- 站点 -->
  72. <view class="station" v-if="stationList.length != 0 && chargeList.length == 0"
  73. @click="gotoUrl('pages/searchPile/stationAndPile/stationDetails?id=' + stationData.id)">
  74. <view class="img-box">
  75. <img src="static/img/Frame 198 (1).png" alt="">
  76. </view>
  77. <view class="text">
  78. <view class="station-title">
  79. <text class="title-left oldTextjp2" oldstyle="font-size: 14px;background-color: #9D9FFF;" v-if="stationData.type == '1'" style="background-color: #9D9FFF;">快充</text>
  80. <text class="title-left oldTextjp2" oldstyle="font-size: 14px;background-color: #00B962;" v-if="stationData.type == '2'" style="background-color: #00B962;">慢充</text>
  81. <text class="title-left oldTextjp2" oldstyle="font-size: 14px;background-color: #00BAC8;" v-if="stationData.type == '1,2'" style="background-color: #00BAC8;">快/慢</text>
  82. <text class="title-right oldTextjp" oldstyle="font-size: 20px;">{{stationData.name}}</text>
  83. </view>
  84. <view class="station-price">
  85. <view class="price-left">{{stationData.costPrice}}</view>
  86. <view class="price-right">
  87. 元/度 起
  88. </view>
  89. </view>
  90. <view class="park">
  91. <text class="park-p">p</text>
  92. <text class="park-text oldTextjp2" oldstyle="font-size: 14px;">2小时停车免费</text>
  93. </view>
  94. <view class="count">
  95. <view class="count-left">
  96. <span class="oldTextjp2" oldstyle="font-size: 16px;">空闲{{stationData.availableNum}}/</span>
  97. <span class="oldTextjp" oldstyle="font-size: 16px;">总数{{stationData.totalNum}}</span>
  98. </view>
  99. <view class="count-right oldTextjp" oldstyle="font-size: 16px;" v-if="distance > 0.1">
  100. <text class="iconfont">&#xe615;</text>{{distance.toFixed(1)}}公里</view>
  101. <view class="count-right oldTextjp" oldstyle="font-size: 16px;" v-else>
  102. <text class="iconfont">&#xe615;</text>小于100米</view>
  103. </view>
  104. </view>
  105. </view>
  106. <!-- 定位 -->
  107. <view class="location-box" v-if="stationList.length == 0 && chargeList.length == 0">
  108. <view class="location">
  109. <view class="location-text">
  110. <view class="text-1 oldTextjp" oldstyle="font-size: 20px;">
  111. 定位中...
  112. </view>
  113. <view class="text-2 oldTextjp2" oldstyle="font-size: 16px;">
  114. 授权定位后可查询附近充电站
  115. </view>
  116. <view class="text-3 oldTextjp2" oldstyle="font-size: 16px;" @click="getPoint()">
  117. 重新定位
  118. </view>
  119. </view>
  120. <view class="img-box">
  121. <img src="static/img/暂无网络信号-缺省页 1.png">
  122. </view>
  123. </view>
  124. </view>
  125. <!-- 充电状态 -->
  126. <view class="state1 state" v-if="chargeList.length > 0" v-for="(item,index) in chargeList" :key="item.id"
  127. @click="gotoUrl('pages/searchPile/chargeProcess/dcCharging?id=' + item.id)">
  128. <view class="state-text">
  129. <view class="text-1 oldTextjp" oldstyle="font-size: 20px;">
  130. {{item.statusText}}
  131. </view>
  132. <view v-if="item.status == '0'" class="text-2 oldTextjp2" oldstyle="font-size: 16px;">
  133. 启动中
  134. </view>
  135. <view v-if="item.status == '1'" class="text-2 oldTextjp2" oldstyle="font-size: 16px;">
  136. 已充{{item.dueFee != null ? item.dueFee : '0.00'}}元
  137. </view>
  138. <!-- <view v-if="item.status == '2'" class="text-2" style="color: red;">
  139. 超出时间将收取占位费
  140. </view> -->
  141. <view v-if="item.status == '4'" class="text-2 oldTextjp2" oldstyle="font-size: 16px;">
  142. 前方等待{{item.waitNum}}位
  143. </view>
  144. <view class="text-3 oldTextjp2" oldstyle="font-size: 16px;">
  145. {{item.deviceName}}/<br />{{item.deviceNo}}
  146. </view>
  147. </view>
  148. <view class="img-box">
  149. <img v-if="item.status == '0'" src="static/img/等待中-缺省页.png">
  150. <img v-if="item.status == '1'" src="static/img/充电中-缺省页.png">
  151. <img v-if="item.status == '2'" src="static/img/已充满-缺省页.png">
  152. <img v-if="item.status == '4'" src="static/img/等待中-缺省页.png">
  153. </view>
  154. </view>
  155. <!-- 充值活动 -->
  156. <view class=" top-up" v-if="activityList.length > 0">
  157. <view class="top-up-title oldTextjp" oldstyle="font-size:20px;"><text class="line"></text>最新活动</view>
  158. <view class="img-box">
  159. <view class="img-1" v-for="(item,index) in activityList" :key="item.id"
  160. @click="rechargeActivity(index)">
  161. <img :src="item.picUrl" alt="">
  162. </view>
  163. </view>
  164. </view>
  165. <!-- 新闻 -->
  166. <view class="news-title" v-if="newsList.length > 0">
  167. <view class="news-title-left oldTextjp" oldstyle="font-size:20px;">
  168. <view class="line" style="margin-top:4px;"></view>新闻公告
  169. </view>
  170. <view class="more oldTextjp2" oldstyle="font-size:16px;" @click="toNewsNotice">更多<view class="more-icon iconfont"> &#xe600;</view>
  171. </view>
  172. </view>
  173. <view class="news">
  174. <view class="news-content" v-for="(item,index) in newsList" :key="item.id"
  175. @click="gotoUrl('pages/article/articleDetails?id=' + item.id)">
  176. <view class="content-text">
  177. <view class="content-title oldTextjp2" oldstyle="font-size: 18px;">{{item.title}}</view>
  178. <view class="news-time">{{item.createTime?item.createTime.slice(5,10):''}}</view>
  179. </view>
  180. <view class="content-img">
  181. <img :src="item.pic ? item.pic : 'static/img/image_default.png'" alt="">
  182. </view>
  183. </view>
  184. </view>
  185. <view class="bottom" v-if="newsList.length == recordsTotal && newsList.length != 0">
  186. <view class="bot">
  187. <view class="bot-line"></view>
  188. <view class="bot-text oldTextjp2" oldstyle="font-size: 14px;">已经到底了</view>
  189. <view class="bot-line"></view>
  190. </view>
  191. </view>
  192. <!-- 导航栏 -->
  193. <view class="navigation">
  194. <view class="login-prompt" v-if="!userId">
  195. 登录显示更多会员服务
  196. <text class="button" @click="toLogin">登录/注册</text>
  197. </view>
  198. </view>
  199. <Tabbar :current="0" ref="tabbarMain" :elderStatus="elderStatus"></Tabbar>
  200. </view>
  201. </template>
  202. <script>
  203. import * as API from '@/apis/index.js'
  204. import * as newsApi from '@/apis/news.js'
  205. import * as WxJsApi from '@/utils/wxJsApi.js'
  206. import * as siteApi from '@/apis/site.js';
  207. import MapLoader from '@/utils/AMap'
  208. import Tabbar from '@/components/Tabbar.vue'
  209. import {
  210. secondsDistance,
  211. hourDistanceArr
  212. } from '@/utils'
  213. export default {
  214. components: {
  215. Tabbar
  216. },
  217. data() {
  218. return {
  219. stationList: [],
  220. bannerList:[],
  221. distance: 0,
  222. timeOut: false,
  223. pointTimeOut: true,
  224. stationData: {},
  225. chargeList: [],
  226. activityList: [],
  227. userId: '',
  228. newsList: [],
  229. pageIndex: 1,
  230. recordsTotal: 0,
  231. longitude: '',
  232. latitude: '',
  233. message: '',
  234. indexLogo: '',
  235. show: false,
  236. list: [{
  237. name: '长辈模式',
  238. disabled: false
  239. },
  240. {
  241. name: '标准模式',
  242. disabled: false
  243. },
  244. ],
  245. // u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
  246. value: '长辈模式',
  247. elderStatus: false,
  248. }
  249. },
  250. onLoad(op) {
  251. if (op.jpcode) {
  252. var k = API.codeOperation(op.jpcode)
  253. if (k) {
  254. uni.navigateTo({
  255. url: k
  256. })
  257. }
  258. }
  259. this.getBannerInfo("homepage")
  260. },
  261. onUnload() {
  262. this.timeOut = false;
  263. this.pointTimeOut = false;
  264. },
  265. onHide() {
  266. this.timeOut = false;
  267. this.pointTimeOut = false;
  268. },
  269. onReachBottom() {
  270. if (this.newsList.length < this.recordsTotal) {
  271. this.myLoadmore();
  272. }
  273. },
  274. onShow() {
  275. if(this.$refs.tabbarMain){
  276. this.$refs.tabbarMain.setcount(0);
  277. }
  278. },
  279. onReady() {
  280. if (this.carhelp.getPersonInfo()) {
  281. this.userId = this.carhelp.getPersonInfo().id;
  282. this.getFindChargeData();
  283. if (this.carhelp.get("getElderModeClass")) {
  284. this.show = false;
  285. if(this.carhelp.get("getElderModeClass") == "长辈模式") {
  286. this.elderStatus = true;
  287. } else {
  288. this.elderStatus = false;
  289. }
  290. } else {
  291. this.show = true;
  292. }
  293. }else{
  294. this.carhelp.set("getElderModeClass", "长辈模式");
  295. this.elderStatus = true;
  296. var obj=this.carhelp.get("friends_invitation")
  297. // this.carhelp.set("friends_invitation",{
  298. // op:op,
  299. // date:new Date().getTime()
  300. // })
  301. if(obj){
  302. if(obj.date+1000*60*60*24 > new Date().getTime() ){
  303. this.friendsInvitation(obj)
  304. }
  305. }
  306. }
  307. WxJsApi.getWxConfig(['getLocation', 'addEventListener', 'scanQRCode']).then((res) => {
  308. // console.log(res)
  309. }).catch(error => {
  310. console.log(res)
  311. })
  312. this.getPointTimeOut();
  313. this.getNewsList();
  314. this.getActivityInfoList();
  315. },
  316. methods: {
  317. friendsInvitation(obj){
  318. uni.showLoading({
  319. title: "加载中",
  320. mask: true,
  321. })
  322. API.findActivity({
  323. id:obj.op.id,
  324. code:obj.op.icode
  325. }).then((res) => {
  326. uni.hideLoading()
  327. obj.activityInfo=res.data.activityInfo;
  328. var name=res.data.activityInfo.name;
  329. var title="参与活动"
  330. var okbtn="前往注册"
  331. var endTime=res.data.activityInfo.endTime;
  332. if(endTime&&secondsDistance(endTime)>0){
  333. name="活动已结束"
  334. okbtn="继续注册"
  335. title="提示"
  336. obj=null
  337. }
  338. this.carhelp.set("friends_invitation",obj)
  339. uni.showModal({
  340. title:title,
  341. content:name,
  342. confirmText:okbtn,
  343. success: res1 => {
  344. if (res1.confirm) {
  345. uni.navigateTo({
  346. url: '/pages/login/login'
  347. })
  348. } else if (res1.cancel) {
  349. console.log('用户点击取消');
  350. }
  351. }
  352. })
  353. }).catch(error => {
  354. uni.showToast({
  355. title: error,icon: "none"
  356. })
  357. })
  358. },
  359. clickBanner(index){
  360. },
  361. getBannerInfo(code){
  362. uni.showLoading({
  363. title: "加载中",
  364. mask: true,
  365. })
  366. newsApi.getBannerInfo(code).then((res) => {
  367. this.bannerList =res.data;
  368. uni.hideLoading()
  369. document.getElementsByClassName("uni-swiper-wrapper")[0].parentNode.style="background-color: rgb(255, 255, 255); height: 200px;"
  370. }).catch(error => {
  371. uni.showToast({
  372. title: error,icon: "none"
  373. })
  374. })
  375. },
  376. elderClick() {
  377. if(this.value == "长辈模式") {
  378. this.elderStatus = true;
  379. this.carhelp.set("getElderModeClass", "长辈模式");
  380. } else {
  381. this.elderStatus = false;
  382. this.carhelp.set("getElderModeClass", "标准模式");
  383. }
  384. this.show = false;
  385. },
  386. getPointTimeOut() {
  387. setTimeout(() => {
  388. if (this.pointTimeOut) {
  389. this.getPoint();
  390. }
  391. }, 1000)
  392. },
  393. getFindChargeData() {
  394. API.findChargeData().then((res) => {
  395. this.chargeList = res.data.chargingRecordList;
  396. var list = res.data.chargingRecordList;
  397. for (var i = 0; i < list.length; i++) {
  398. if (list[i].status == '1' || list[i].status == '4') {
  399. this.timeOut = true;
  400. }
  401. }
  402. if (this.timeOut) {
  403. setTimeout(() => {
  404. this.getFindChargeData();
  405. }, 5000)
  406. }
  407. }).catch(error => {
  408. uni.showToast({
  409. title: error,
  410. icon: "none"
  411. })
  412. })
  413. },
  414. toSearchPile() {
  415. uni.navigateTo({
  416. url: '/pages/searchPile/searchPile'
  417. })
  418. },
  419. toLogin() {
  420. uni.navigateTo({
  421. url: '/pages/login/login'
  422. })
  423. },
  424. toNewsNotice() {
  425. uni.navigateTo({
  426. url: '/pages/article/newsNotice'
  427. })
  428. },
  429. //微信扫二维码
  430. getScanCode() {
  431. if (this.userId) {
  432. WxJsApi.scanQRCode(1).then(res => {
  433. console.log("scanQRCode------" + res)
  434. if (res) {
  435. API.scanCode(res).then((response) => {
  436. }).catch(error => {
  437. uni.showToast({
  438. title: error,
  439. icon: "none"
  440. })
  441. })
  442. }
  443. }).catch(error => {
  444. })
  445. } else {
  446. uni.navigateTo({
  447. url: '/pages/login/login'
  448. })
  449. }
  450. },
  451. fastRecharge() {
  452. if (this.userId) {
  453. uni.navigateTo({
  454. url: '/pages/user/finance/recharge'
  455. })
  456. } else {
  457. uni.navigateTo({
  458. url: '/pages/login/login'
  459. })
  460. }
  461. },
  462. chargingRecord() {
  463. if (this.userId) {
  464. uni.navigateTo({
  465. url: '/pages/record/index'
  466. })
  467. } else {
  468. uni.navigateTo({
  469. url: '/pages/login/login'
  470. })
  471. }
  472. },
  473. rechargeActivity(index) {
  474. if (this.userId) {
  475. var uurl="&uid="+this.userId;
  476. var mod = this.activityList[index]
  477. if (mod.clickUrl == null) {
  478. } else if (mod.clickUrl.indexOf('http') == 0) {
  479. window.location = mod.clickUrl+uurl;
  480. } else if (mod.clickUrl.indexOf('#/') == 0) {
  481. if (mod.clickUrl.indexOf("?") == -1) {
  482. mod.clickUrl += '?';
  483. }
  484. var url=mod.clickUrl.split("#")[1]
  485. //window.location = mod.clickUrl;
  486. uni.navigateTo({
  487. url: url+uurl
  488. })
  489. } else if (mod.clickUrl == '#' || mod.clickUrl == '') {
  490. } else {
  491. uni.navigateTo({
  492. url: mod.clickUrl+uurl
  493. })
  494. }
  495. } else {
  496. uni.navigateTo({
  497. url: '/pages/login/login'
  498. })
  499. }
  500. },
  501. getActivityInfoList() {
  502. uni.showLoading({
  503. title: "加载中",
  504. mask: true,
  505. })
  506. API.activityInfoList({
  507. pageIndex: 1,
  508. pageSize: 10
  509. }).then((res) => {
  510. uni.hideLoading()
  511. this.activityList = res.data.data;
  512. }).catch(error => {
  513. uni.showToast({
  514. title: error,
  515. icon: "none"
  516. })
  517. })
  518. },
  519. getPoint() {
  520. WxJsApi.getLocation().then((res) => {
  521. this.latitude = parseFloat(res.latitude);
  522. this.longitude = parseFloat(res.longitude);
  523. this.message = res.errMsg;
  524. if (res.errMsg != 'getLocation:ok') {
  525. uni.showToast({
  526. title: res
  527. })
  528. } else {
  529. siteApi.searchStationData({
  530. longitude: this.longitude,
  531. latitude: this.latitude
  532. }).then((response) => {
  533. this.stationData = response.data.data[0];
  534. var lnglat = new AMap.LngLat(this.longitude,this.latitude);
  535. var myDistance = lnglat.distance([this.stationData.longitude,this.stationData.latitude]);
  536. this.distance = myDistance/1000;
  537. this.stationList = response.data.data;
  538. }).catch(error => {
  539. uni.showToast({
  540. title: error,
  541. icon: "none"
  542. })
  543. })
  544. }
  545. }).catch(error => {
  546. uni.showToast({
  547. title: error,
  548. icon: "none"
  549. })
  550. })
  551. },
  552. getNewsList(bl) {
  553. uni.showLoading({
  554. title: "加载中",
  555. mask: true,
  556. })
  557. if (bl) {
  558. this.newsList = [];
  559. this.pageIndex = 1;
  560. }
  561. newsApi.newsInfoList({
  562. pageIndex: 1,
  563. pageSize: 10
  564. }).then((res) => {
  565. uni.hideLoading()
  566. this.newsList = [
  567. ...this.newsList,
  568. ...res.data.data
  569. ];
  570. this.recordsTotal = res.data.recordsTotal
  571. }).catch(error => {
  572. uni.showToast({
  573. title: error,
  574. icon: "none"
  575. })
  576. })
  577. },
  578. myLoadmore() {
  579. this.pageIndex += 1;
  580. this.getNewsList()
  581. },
  582. }
  583. }
  584. </script>
  585. <style lang="scss" scoped>
  586. // 头部图片
  587. img {
  588. width: 100%;
  589. height: 100%;
  590. }
  591. .banner {
  592. width: 100%;
  593. height: 200px;
  594. }
  595. // 选项列表
  596. .option-list {
  597. width: 91.4%;
  598. padding-top: 18px;
  599. height: 100px;
  600. line-height: 20px;
  601. border-radius: 8px;
  602. text-align: center;
  603. background-color: #fff;
  604. position: absolute;
  605. top: 160px;
  606. left: 0;
  607. right: 0;
  608. margin: auto;
  609. display: flex;
  610. justify-content: space-around;
  611. .list-item {
  612. // 图标
  613. .icon {
  614. width: 40px;
  615. height: 40px;
  616. border-radius: 99px;
  617. line-height: 40px;
  618. font-size: 24px;
  619. text-align: center;
  620. margin: auto;
  621. color: #ffffff;
  622. }
  623. }
  624. }
  625. // 站点
  626. .station {
  627. width: 91.4%;
  628. height: 120px;
  629. margin: 20px auto 0;
  630. position: relative;
  631. .img-box {
  632. width: 100%;
  633. height: 100%;
  634. border-radius: 8px;
  635. overflow: hidden;
  636. }
  637. img {
  638. width: 100%;
  639. height: 100%;
  640. }
  641. .text {
  642. width: 91.4%;
  643. position: absolute;
  644. top: 0;
  645. left: 20px;
  646. // 头部
  647. .station-title {
  648. display: flex;
  649. margin-top: 12px;
  650. .title-left {
  651. display: inline-block;
  652. height: 20px;
  653. width: 44px;
  654. // margin-left: 12px;
  655. line-height: 20px;
  656. border-radius: 50px;
  657. background-color: rgba(133, 140, 255, 100);
  658. color: rgba(255, 255, 255, 100);
  659. font-size: 12px;
  660. text-align: center;
  661. font-family: Arial;
  662. }
  663. .title-right {
  664. display: inline-block;
  665. margin-left: 4px;
  666. margin-top: 2px;
  667. width: 271px;
  668. height: 16px;
  669. line-height: 16px;
  670. color: rgba(16, 16, 16, 100);
  671. font-size: 16px;
  672. text-align: left;
  673. font-family: AlibabaPuHui-regular;
  674. }
  675. }
  676. // 价格
  677. .station-price {
  678. margin-top: 4px;
  679. display: flex;
  680. .price-left {
  681. width: 40px;
  682. height: 20px;
  683. line-height: 20px;
  684. color: rgba(255, 98, 0, 100);
  685. font-size: 20px;
  686. text-align: left;
  687. font-family: Roboto-medium;
  688. }
  689. .price-right {
  690. height: 20px;
  691. line-height: 14px;
  692. margin-left: 2px;
  693. margin-top: 3px;
  694. color: rgba(102, 102, 102, 100);
  695. font-size: 14px;
  696. text-align: left;
  697. font-family: AlibabaPuHui-regular;
  698. }
  699. }
  700. // park
  701. .park {
  702. margin-top: 4px;
  703. display: flex;
  704. .park-p {
  705. display: inline-block;
  706. width: 20px;
  707. height: 18px;
  708. line-height: 12px;
  709. text-align: center;
  710. background-color: rgba(125, 177, 255, 100);
  711. color: #fff;
  712. }
  713. .park-text {
  714. display: inline-block;
  715. width: 300px;
  716. height: 17px;
  717. color: rgba(102, 102, 102, 100);
  718. font-size: 12px;
  719. text-align: left;
  720. margin-left: 2px;
  721. margin-top: 2px;
  722. }
  723. }
  724. // 数量
  725. .count {
  726. margin-top: 14px !important;
  727. width: 91.4%;
  728. display: flex;
  729. justify-content: space-between;
  730. white-space: nowrap;
  731. overflow: hidden;
  732. }
  733. }
  734. }
  735. //定位
  736. .location {
  737. width: 91.4%;
  738. background-color: #ffffff;
  739. height: 120px;
  740. display: flex;
  741. justify-content: space-between;
  742. margin: 20px auto 0;
  743. border-radius: 8px;
  744. border: #F2F4F4 1px;
  745. .location-text {
  746. padding: 24px 0 0 28px;
  747. .text-1 {
  748. height: 16px;
  749. line-height: 16px;
  750. color: rgba(16, 16, 16, 100);
  751. font-size: 16px;
  752. text-align: left;
  753. }
  754. .text-2 {
  755. height: 17px;
  756. line-height: 17px;
  757. color: rgba(102, 102, 102, 100);
  758. font-size: 12px;
  759. text-align: left;
  760. margin-top: 4px;
  761. white-space: nowrap; //强制不换行
  762. text-overflow: ellipsis; //文本超出出现省略号
  763. overflow: hidden;
  764. }
  765. .text-3 {
  766. width: 80px;
  767. height: 24px;
  768. line-height: 22px;
  769. border-radius: 50px;
  770. color: rgba(0, 185, 98, 100);
  771. font-size: 12px;
  772. text-align: center;
  773. border: 1px solid rgba(0, 185, 98, 100);
  774. margin-top: 11px;
  775. }
  776. }
  777. .img-box {
  778. width: 120px;
  779. height: 120px;
  780. margin-right: 20px;
  781. }
  782. }
  783. .state {
  784. width: 91.4%;
  785. background-color: #ffffff;
  786. height: 120px;
  787. display: flex;
  788. margin: 20px auto 0;
  789. border-radius: 8px;
  790. border: #F2F4F4 1px;
  791. .state-text {
  792. width: 61.8%;
  793. padding: 24px 0 0 28px;
  794. .text-1 {
  795. height: 16px;
  796. line-height: 16px;
  797. color: blueviolet;
  798. font-size: 16px;
  799. text-align: left;
  800. }
  801. .text-2 {
  802. height: 17px;
  803. line-height: 17px;
  804. color: #101010;
  805. text-align: left;
  806. margin-top: 12px;
  807. }
  808. .text-3 {
  809. font-size: 12px;
  810. line-height: 20px;
  811. margin-top: 6px;
  812. color: #999999;
  813. }
  814. }
  815. .img-box {
  816. width: 120px;
  817. height: 120px;
  818. margin-right: 20px;
  819. }
  820. }
  821. //充值
  822. .top-up {
  823. margin-left: 16px;
  824. margin-top: 17px;
  825. .top-up-title {
  826. color: rgba(16, 16, 16, 100);
  827. font-size: 16px;
  828. }
  829. .img-box {
  830. margin-top: 12px;
  831. width: 95%;
  832. height: 146px;
  833. display: flex;
  834. justify-content: space-between;
  835. .img-1 {
  836. width: 166px;
  837. height: 146px;
  838. position: relative;
  839. .img-text {
  840. position: absolute;
  841. top: 12px;
  842. left: 12px;
  843. height: 33px;
  844. color: #ff4444;
  845. font-size: 24px;
  846. text-align: left;
  847. margin-left: 12px;
  848. .img-text2 {
  849. font-size: 14px
  850. }
  851. }
  852. }
  853. img {
  854. width: 100%;
  855. height: 100%;
  856. }
  857. }
  858. }
  859. // 小竖线
  860. .line {
  861. display: inline-block;
  862. width: 3px;
  863. height: 12px;
  864. margin-right: 7px;
  865. background-color: rgba(0, 145, 67, 100);
  866. }
  867. // 新闻公告
  868. .news-title {
  869. padding: 0 16px;
  870. margin-top: 12px;
  871. color: rgba(16, 16, 16, 100);
  872. font-size: 16px;
  873. display: flex;
  874. justify-content: space-between;
  875. background-color: #F2F4F4;
  876. .news-title-left {
  877. display: flex;
  878. }
  879. .more {
  880. font-size: 14px;
  881. color: #777777;
  882. display: flex;
  883. line-height: 20px;
  884. .more-icon {
  885. font-size: 24px
  886. }
  887. }
  888. }
  889. .news {
  890. background-color: #fff;
  891. width: 91.4%;
  892. margin: 12px auto 0;
  893. border-radius: 8px;
  894. .news-content {
  895. display: flex;
  896. justify-content: space-between;
  897. padding: 12px;
  898. .content-text {
  899. width: 56.2%;
  900. height: 100%;
  901. line-height: 21px;
  902. color: #101010;
  903. text-align: left;
  904. font-size: 14px;
  905. }
  906. .content-title {
  907. width: 100%;
  908. overflow: hidden;
  909. text-overflow: ellipsis;
  910. display: -webkit-box;
  911. -webkit-box-orient: vertical;
  912. -webkit-line-clamp: 3;
  913. }
  914. .content-img {
  915. width: 40.57%;
  916. height: 100%;
  917. border-radius: 4px;
  918. overflow: hidden;
  919. img {
  920. width: 100%;
  921. height: 80%;
  922. }
  923. }
  924. .news-time {
  925. margin-top: 5%;
  926. color: #999999;
  927. width: 80px;
  928. height: 20px;
  929. font-size: 14px;
  930. }
  931. }
  932. }
  933. .bottom {
  934. width: 100%;
  935. height: 100px;
  936. .bot {
  937. width: 100%;
  938. margin: 0 auto;
  939. padding: 0 17.3%;
  940. justify-content: space-between;
  941. display: flex;
  942. .bot-line {
  943. margin-top: 20px;
  944. width: 21.3%;
  945. height: 0px;
  946. border: 1px solid rgba(207, 210, 213, 100);
  947. }
  948. .bot-text {
  949. white-space: nowrap;
  950. height: 17px;
  951. margin-top: 13px;
  952. margin-left: 12px;
  953. margin-right: 12px;
  954. font-size: 12px;
  955. text-align: center;
  956. color: rgba(182, 189, 195, 100);
  957. }
  958. }
  959. }
  960. // 导航栏
  961. .navigation {
  962. width: 100%;
  963. // height: 40px;
  964. padding: 10px 0;
  965. background-color: #fff;
  966. position: fixed;
  967. bottom: 0;
  968. left: 0;
  969. display: flex;
  970. justify-content: space-around;
  971. text-align: center;
  972. color: #999999;
  973. .nav-icon {
  974. width: 54px;
  975. font-size: 24px
  976. }
  977. .nav-text {
  978. font-size: 14px;
  979. }
  980. }
  981. .shema {
  982. width: 70%;
  983. padding-bottom: 20px;
  984. border-radius: 16px;
  985. background-color: #fff;
  986. position: fixed;
  987. top: 100px;
  988. left: 0;
  989. right: 0;
  990. margin: 0 auto;
  991. z-index: 9999;
  992. .title {
  993. height: 33px;
  994. color: rgba(16, 16, 16, 100);
  995. font-size: 24px;
  996. text-align: center;
  997. padding: 16px 0;
  998. }
  999. .u-radio-group {
  1000. margin: 16px 5vw;
  1001. }
  1002. /deep/.u-radio {
  1003. width: 60vw !important;
  1004. padding: 24px 24px 40px;
  1005. line-height: 20px;
  1006. border-radius: 16px;
  1007. text-align: center;
  1008. border: #101010 1px solid;
  1009. margin-top: 12px;
  1010. }
  1011. /deep/ .u-radio__label {
  1012. text-align: left;
  1013. height: 24px;
  1014. // color: rgba(0, 185, 98, 100);
  1015. font-size: 24px;
  1016. }
  1017. p {
  1018. height: 22px;
  1019. color: rgba(102, 102, 102, 100);
  1020. font-size: 14px;
  1021. margin-top: 12px;
  1022. white-space: nowrap
  1023. }
  1024. .hint {
  1025. text-align: center;
  1026. }
  1027. .btn-box {
  1028. margin-top: 20px;
  1029. .choice-btn {
  1030. width: 80%;
  1031. }
  1032. }
  1033. }
  1034. .wrap {
  1035. display: flex;
  1036. align-items: center;
  1037. justify-content: center;
  1038. height: 100%;
  1039. }
  1040. // 登录提示
  1041. .login-prompt {
  1042. width: 91.4%;
  1043. height: 40px;
  1044. line-height: 40px;
  1045. border-radius: 50px;
  1046. text-align: left;
  1047. padding-left: 16px;
  1048. padding-right: 4px;
  1049. background-color: rgba(0, 0, 0, 0.6);
  1050. position: fixed;
  1051. bottom: 75px;
  1052. color: #ffffff;
  1053. .button {
  1054. width: 88px;
  1055. height: 32px;
  1056. line-height: 32px;
  1057. border-radius: 50px;
  1058. background-color: rgba(0, 185, 98, 100);
  1059. text-align: center;
  1060. float: right;
  1061. margin-top: 4px;
  1062. }
  1063. }
  1064. </style>