index.vue 25 KB

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