index.vue 25 KB

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