index.vue 23 KB

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