index.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923
  1. <template>
  2. <view>
  3. <view class="header">
  4. <!-- 用户信息 -->
  5. <view class="userinfo">
  6. <view class="infos" @click="toData" >
  7. <view class="head-portrait" >
  8. <u-avatar :src="userId ? headImg : '../../assets/img/head.png'" size="96"></u-avatar>
  9. </view>
  10. <view class="username" v-if="personInfo&&personInfo.userType==1" >
  11. <view class="name" :style="elderStatus ? 'font-size: 28px;' : ''">
  12. {{userId ? nickName : '登录 / 注册'}}
  13. </view>
  14. <view class="change" :style="elderStatus ? 'font-size: 16px;' : ''">
  15. 点击注册51充电联盟会员
  16. </view>
  17. </view>
  18. <view class="username" v-else >
  19. <view class="name" :style="elderStatus ? 'font-size: 28px;' : ''">
  20. {{userId ? nickName : '登录 / 注册'}}
  21. </view>
  22. <view class="change" :style="elderStatus ? 'font-size: 16px;' : ''">
  23. {{userId ? '点击修改个人信息' : '登录后享受更多优惠及服务'}}
  24. </view>
  25. </view>
  26. </view>
  27. <view class="right">
  28. <!-- <i class="ri-notification-2-line">
  29. <text class="unread">20</text>
  30. </i> -->
  31. <i class="ri-settings-line" @click="setUp"></i>
  32. </view>
  33. </view>
  34. <!-- 卡片 -->
  35. <view v-for="(item,i) in businessVipList" :key="i"
  36. @click="gotoUrl('pages/user/company-vip?id='+item.platform)"
  37. class="card" >
  38. <view class="title">
  39. <text class="img">
  40. <img src="../../assets/img/riFill-building-fill@4x.png" alt="">
  41. </text>{{item.platformN}}
  42. </view>
  43. <view class="view">
  44. 查看<text class="iconfont">&#xe600;</text>
  45. </view>
  46. </view>
  47. <view class="openlogin" v-if="personInfo&&personInfo.userType==1" >
  48. <view class="title">
  49. <text class="img">
  50. <img src="../../assets/img/riFill-user-2-fill.svg" alt="">
  51. </text>51充电联盟会员
  52. <view>
  53. 注册立享充电服务费<span style="color: red;">8.5折</span>
  54. </view>
  55. </view>
  56. <view class="open-btn" @click="gotoUrl('pages/login/login')">
  57. 立即注册
  58. <text class="iconfont">&#xe632;</text>
  59. </view>
  60. </view>
  61. <!-- 立即开通 -->
  62. <view class="open" v-else-if="userId&&!userCardBool">
  63. <view class="title">
  64. <text class="img">
  65. <img src="../../assets/img/antFill-crown@3x.png" alt="">
  66. </text>充电服务费月卡
  67. </view>
  68. <view class="open-btn" @click="gotoUrl('pages/monthlyCardActivity/monthlyCardBuy')">
  69. 立即开通
  70. <text class="iconfont">&#xe632;</text>
  71. </view>
  72. </view>
  73. <!-- 开通后 -->
  74. <view class="opened" v-if="userId&&userCardBool" @click="gotoUrl('pages/monthlyCardActivity/monthlyCardBuy')">
  75. <view class="title">
  76. <text class="img">
  77. <img src="../../assets/img/antFill-crown@3x.png" alt="">
  78. </text>充电服务费月卡
  79. </view>
  80. <view class="date">
  81. {{userCard.endTime?userCard.endTime.slice(0,10):''}}到期
  82. <text class="iconfont">&#xe600;</text>
  83. </view>
  84. </view>
  85. <!-- 可用余额 -->
  86. <view class="balance" v-if="!(personInfo&&personInfo.userType==1)" >
  87. <view class="item" @click="toBalance">
  88. <view class="num oldTextjp" oldstyle="font-size: 28px;">
  89. {{personAccount.availableAmount != null ? personAccount.availableAmount.toFixed(2) : '0.00'}}<span style="font-size: 16px;">元</span>
  90. </view>
  91. <view class="name" :style="elderStatus ? 'font-size: 16px;' : ''">
  92. 可用余额{{" "}}
  93. <span class="userData-foot-look">查看</span>
  94. </view>
  95. </view>
  96. <view class="item" @click="toMyCoupon">
  97. <view class="num oldTextjp" oldstyle="font-size: 28px;">
  98. {{recordsTotal}}<span style="font-size: 16px;">张</span>
  99. <!-- <text class="new">新券</text> -->
  100. </view>
  101. <view class="name" :style="elderStatus ? 'font-size: 16px;' : ''">
  102. 优惠券{{" "}}
  103. <span class="userData-foot-look">查看</span>
  104. </view>
  105. </view>
  106. <!-- <view class="item">
  107. <view class="num oldTextjp" oldstyle="font-size: 28px;">
  108. 0
  109. </view>
  110. <view class="name" :style="elderStatus ? 'font-size: 16px;' : ''">
  111. 积分{{" "}}
  112. <span class="userData-foot-look">查看</span>
  113. </view>
  114. </view> -->
  115. </view>
  116. </view>
  117. <!-- 优惠 -->
  118. <view class="discounts">
  119. <u-swiper bg-color="#fff" :img-mode="'scaleToFill'" height="160" :list="bannerList" @click="clickBanner"
  120. :name="'picUrl'">
  121. </u-swiper>
  122. </view>
  123. <!-- 菜单 -->
  124. <view class="menu">
  125. <view class="item" @click="chargingRecord">
  126. <view class="item-icon">
  127. <i class="ri-todo-line"></i>
  128. </view>
  129. <view class="item-name oldTextjp" oldstyle="font-size: 16px;">
  130. 充电记录
  131. </view>
  132. </view>
  133. <view class="item" @click="myAppointment">
  134. <view class="item-icon">
  135. <i class="ri-map-pin-time-line"></i>
  136. </view>
  137. <view class="item-name oldTextjp" oldstyle="font-size: 16px;">
  138. 我的预约
  139. </view>
  140. </view>
  141. <view class="item" @click="toInvoice">
  142. <view class="item-icon">
  143. <i class="ri-ticket-line"></i>
  144. </view>
  145. <view class="item-name oldTextjp" oldstyle="font-size: 16px;">
  146. 我的发票
  147. </view>
  148. </view>
  149. <view class="item" @click="gotoUrl('pages/user/contactService')">
  150. <view class="item-icon">
  151. <i class="ri-customer-service-2-line"></i>
  152. </view>
  153. <view class="item-name oldTextjp" oldstyle="font-size: 16px;">
  154. 联系客服
  155. </view>
  156. </view>
  157. <view class="item" @click="feedback">
  158. <view class="item-icon">
  159. <i class="ri-feedback-line"></i>
  160. </view>
  161. <view class="item-name oldTextjp" oldstyle="font-size: 16px;">
  162. 意见反馈
  163. </view>
  164. </view>
  165. <view class="item" @click="gotoUrl('pages/user/help')">
  166. <view class="item-icon">
  167. <i class="ri-compass-3-line"></i>
  168. </view>
  169. <view class="item-name oldTextjp" oldstyle="font-size: 16px;">
  170. 操作指南
  171. </view>
  172. </view>
  173. <view class="item" @click="gotoUrl('pages/user/about')">
  174. <view class="item-icon">
  175. <i class="ri-account-pin-box-line"></i>
  176. </view>
  177. <view class="item-name oldTextjp" oldstyle="font-size: 16px;">
  178. 关于我们
  179. </view>
  180. </view>
  181. <!-- <view class="item">
  182. <view class="item-icon">
  183. <i class="ri-tools-line"></i>
  184. </view>
  185. <view class="item-name oldTextjp" oldstyle="font-size: 16px;">
  186. 我要报修
  187. </view>
  188. </view> -->
  189. <view class="item" @click="toFreeInstallation">
  190. <view class="item-icon">
  191. <i class="ri-file-add-line"></i>
  192. </view>
  193. <view class="item-name oldTextjp" oldstyle="font-size: 16px;">
  194. 免费安桩
  195. </view>
  196. </view>
  197. <view class="item" @click="toJoin">
  198. <view class="item-icon">
  199. <i class="ri-service-line"></i>
  200. </view>
  201. <view class="item-name oldTextjp" oldstyle="font-size: 16px;">
  202. 我要加盟
  203. </view>
  204. </view>
  205. <!-- <view class="item">
  206. <view class="item-icon">
  207. <i class="ri-shield-user-line"></i>
  208. </view>
  209. <view class="item-name oldTextjp" oldstyle="font-size: 16px;">
  210. 实名认证
  211. </view>
  212. </view> -->
  213. </view>
  214. <Tabbar :current="2" ref="tabbarMain" :elderStatus="elderStatus"></Tabbar>
  215. </view>
  216. </template>
  217. <script>
  218. import * as API from '@/apis/index.js'
  219. import * as userApi from '@/apis/user.js'
  220. import * as loginApi from '@/apis/login.js'
  221. import * as WxJsApi from '@/utils/wxJsApi.js'
  222. import Tabbar from '@/components/Tabbar.vue'
  223. import * as newsApi from '@/apis/news.js'
  224. import {
  225. newDate
  226. } from '@/utils'
  227. export default {
  228. components: {
  229. Tabbar
  230. },
  231. data() {
  232. return {
  233. userCard:null,
  234. recordsTotal: 0,
  235. myCouponList: [],
  236. elderStatus: false,
  237. personAccount: {},
  238. userId: '',
  239. headImg: '',
  240. nickName: '',
  241. userPhone: '',
  242. personInfo:{},
  243. show: false,
  244. title: '联系客服',
  245. content: '400-8899-619',
  246. confirmText: '拨打电话',
  247. bannerList:[],
  248. businessVipList:[],
  249. background:{
  250. background: 'none'
  251. },
  252. }
  253. },
  254. onShow() {
  255. this.personInfo=this.carhelp.getPersonInfo()
  256. if(this.carhelp.getPersonInfo()) {
  257. this.userId = this.carhelp.getPersonInfo().id;
  258. this.getCarPersonAccount();
  259. this.getUserInfo();
  260. this.getCouponList();
  261. }
  262. if(this.$refs.tabbarMain){
  263. this.$refs.tabbarMain.setcount(2);
  264. }
  265. if(this.carhelp.get("getElderModeClass") == "长辈模式") {
  266. this.elderStatus = true;
  267. } else {
  268. this.elderStatus = false;
  269. }
  270. },
  271. computed:{
  272. userCardBool(){
  273. if(this.userCard){
  274. var date=new Date().getTime()
  275. var reg=new RegExp('-','gi')
  276. var str=this.userCard.endTime;
  277. //console.log(str.replace(reg,'/'))
  278. var date2=newDate(str).getTime();
  279. if(date<date2){
  280. return true;
  281. }
  282. }
  283. return false
  284. }
  285. },
  286. onReady() {
  287. WxJsApi.getWxConfig(['getLocation', 'addEventListener', 'scanQRCode']).then((res) => {
  288. // //(res)
  289. }).catch(error => {
  290. //(error)
  291. })
  292. var consumerPhone=this.carhelp.getConfig().consumerPhone
  293. // img="https://yktwechat.xiaoxinda.com/config/xxd2021.jpg"
  294. if(consumerPhone){
  295. this.content=consumerPhone
  296. }
  297. this.getBannerInfo("userinfo")
  298. },
  299. methods: {
  300. clickBanner(index){
  301. var mod= this.bannerList[index]
  302. if(mod.linkUrl.indexOf('http')==0){
  303. window.location=mod.linkUrl;
  304. }
  305. else if(mod.linkUrl.indexOf('#/')==0){
  306. if(mod.linkUrl.indexOf("?")==-1){
  307. mod.linkUrl+='?';
  308. }
  309. //window.location=mod.linkUrl;
  310. var url=mod.linkUrl.split("#")[1]
  311. //window.location = mod.clickUrl;
  312. uni.navigateTo({
  313. url: url
  314. })
  315. }
  316. else if(mod.linkUrl=='#'||mod.linkUrl==''){
  317. }
  318. else{
  319. uni.navigateTo({
  320. url:mod.linkUrl
  321. })
  322. }
  323. },
  324. getBannerInfo(code){
  325. uni.showLoading({
  326. title: "加载中",
  327. mask: true,
  328. })
  329. newsApi.getBannerInfo(code).then((res) => {
  330. uni.hideLoading();
  331. this.bannerList =res.data;
  332. // document.getElementsByClassName("uni-swiper-wrapper")[0].parentNode.style="background-color: rgb(255, 255, 255); height: 300px;"
  333. }).catch(error => {
  334. uni.showToast({
  335. title: error,icon: "none"
  336. })
  337. })
  338. },
  339. getCouponList() {
  340. uni.showLoading({
  341. title: "加载中",
  342. mask: true,
  343. })
  344. userApi.couponList({
  345. status: '0'
  346. }).then((res) => {
  347. uni.hideLoading();
  348. this.myCouponList = res.data.data;
  349. this.recordsTotal = res.data.recordsTotal;
  350. }).catch(error => {
  351. uni.showToast({
  352. title: error,
  353. icon: "none"
  354. })
  355. })
  356. },
  357. //微信扫二维码
  358. getScanCode() {
  359. if (this.userId) {
  360. WxJsApi.scanQRCode(1).then(res => {
  361. if(res) {
  362. API.scanCode(res).then((response) => {
  363. }).catch(error => {
  364. uni.showToast({
  365. title: error,
  366. icon: "none"
  367. })
  368. })
  369. }
  370. }).catch(error => {
  371. })
  372. } else {
  373. uni.navigateTo({
  374. url: '/pages/login/login'
  375. })
  376. }
  377. },
  378. fastRecharge() {
  379. if (this.userId) {
  380. uni.navigateTo({
  381. url: '/pages/user/finance/recharge'
  382. })
  383. } else {
  384. uni.navigateTo({
  385. url: '/pages/login/login'
  386. })
  387. }
  388. },
  389. toInvoice(){
  390. if (this.userId) {
  391. uni.navigateTo({
  392. url: '/pages/MyInvoice/invoiceManagement'
  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. toSearchPile() {
  412. uni.navigateTo({
  413. url: '/pages/searchPile/searchPile'
  414. })
  415. },
  416. getUserInfo() {
  417. uni.showLoading({
  418. title: "加载中",
  419. mask: true,
  420. })
  421. loginApi.findByOpenId({
  422. openId: this.carhelp.getOpenId()
  423. }).then((res) => {
  424. uni.hideLoading();
  425. this.businessVipList=res.data.businessVipList
  426. this.headImg = res.data.regUser.headImg;
  427. this.nickName = res.data.regUser.nickName;
  428. this.userCard=res.data.userCard;
  429. var phone = res.data.regUser.phone;
  430. var phone1 = phone.slice(0,3);
  431. var phone2 = phone.slice(-4);
  432. this.userPhone = phone1 + '****' + phone2;
  433. if (res.code == 200&&res.result) {
  434. var token = res ? res.data.token : '';
  435. this.personInfo=res.data.regUser
  436. this.carhelp.setPersonInfo(res.data.regUser );
  437. this.carhelp.setToken(token);
  438. this.carhelp.setPersonInfoPlus(res.data);
  439. console.log("setPersonInfoPlus")
  440. }
  441. }).catch(error => {
  442. uni.showToast({
  443. title: error,
  444. icon: "none"
  445. })
  446. })
  447. },
  448. toData() {
  449. if(this.personInfo&&this.personInfo.userType==1){
  450. uni.navigateTo({
  451. url: '/pages/login/login'
  452. })
  453. }else if(this.userId) {
  454. uni.navigateTo({
  455. url: '/pages/user/dataSet'
  456. })
  457. } else {
  458. uni.navigateTo({
  459. url: '/pages/login/login'
  460. })
  461. }
  462. },
  463. toBalance() {
  464. if(this.userId) {
  465. uni.navigateTo({
  466. url: '/pages/user/finance/balance'
  467. })
  468. } else {
  469. uni.navigateTo({
  470. url: '/pages/login/login'
  471. })
  472. }
  473. },
  474. toMyCoupon() {
  475. if(this.userId) {
  476. uni.navigateTo({
  477. url: '/pages/user/coupon/myCoupon'
  478. })
  479. } else {
  480. uni.navigateTo({
  481. url: '/pages/login/login'
  482. })
  483. }
  484. },
  485. toRecharge() {
  486. if(this.userId) {
  487. uni.navigateTo({
  488. url: '/pages/user/finance/recharge'
  489. })
  490. } else {
  491. uni.navigateTo({
  492. url: '/pages/login/login'
  493. })
  494. }
  495. },
  496. carManage() {
  497. if(this.userId) {
  498. } else {
  499. uni.navigateTo({
  500. url: '/pages/login/login'
  501. })
  502. }
  503. },
  504. myAppointment() {
  505. if(this.userId) {
  506. uni.navigateTo({
  507. url: '/pages/user/myReservation/myReservation'
  508. })
  509. } else {
  510. uni.navigateTo({
  511. url: '/pages/login/login'
  512. })
  513. }
  514. },
  515. toFreeInstallation() {
  516. if(this.userId) {
  517. uni.navigateTo({
  518. url: '/pages/user/freeInstallment?isback=1'
  519. })
  520. } else {
  521. uni.navigateTo({
  522. url: '/pages/login/login'
  523. })
  524. }
  525. },
  526. toJoin() {
  527. if(this.userId) {
  528. uni.navigateTo({
  529. url: '/pages/user/toJoin?isback=1'
  530. })
  531. } else {
  532. uni.navigateTo({
  533. url: '/pages/login/login'
  534. })
  535. }
  536. },
  537. feedback() {
  538. if(this.userId) {
  539. uni.navigateTo({
  540. url: '/pages/user/message'
  541. })
  542. } else {
  543. uni.navigateTo({
  544. url: '/pages/login/login'
  545. })
  546. }
  547. },
  548. setUp() {
  549. if(this.userId) {
  550. uni.navigateTo({
  551. url: '/pages/user/setting'
  552. })
  553. } else {
  554. uni.navigateTo({
  555. url: '/pages/login/login'
  556. })
  557. }
  558. },
  559. openModal() {
  560. this.show = true;
  561. },
  562. confirmPhone(){
  563. this.show = false;
  564. uni.makePhoneCall({
  565. phoneNumber:this.content //仅为示例
  566. });
  567. },
  568. getCarPersonAccount() {
  569. uni.showLoading({
  570. title: "加载中",
  571. mask: true,
  572. })
  573. userApi.carPersonAccount().then((res) => {
  574. uni.hideLoading();
  575. this.personAccount = res.data;
  576. }).catch(error => {
  577. uni.showToast({
  578. title: error,
  579. icon: "none"
  580. })
  581. })
  582. }
  583. }
  584. }
  585. </script>
  586. <style>
  587. page{
  588. background-size: 100%;
  589. }
  590. </style>
  591. <style lang="scss" scoped>
  592. .header {
  593. background: linear-gradient(#D6EEDC, #F6F8F8);
  594. .userinfo {
  595. display: flex;
  596. justify-content: space-between;
  597. padding: 20px 16px;
  598. .infos {
  599. display: flex;
  600. }
  601. .head-portrait {
  602. width: 48px;
  603. height: 48px;
  604. img {
  605. width: 100%;
  606. height: 100%;
  607. }
  608. }
  609. .username {
  610. margin-left: 8px;
  611. .name {
  612. color: rgba(51, 51, 51, 100);
  613. font-size: 20px;
  614. line-height: 24px;
  615. }
  616. .change {
  617. color: rgba(166, 180, 173, 100);
  618. line-height: 14px;
  619. margin-top: 8px;
  620. }
  621. }
  622. .right {
  623. font-size: 24px;
  624. .ri-notification-2-line {
  625. position: relative;
  626. .unread {
  627. width: 20px;
  628. line-height: 14px;
  629. border-radius: 24px;
  630. background-color: rgba(255, 94, 0, 100);
  631. color: rgba(255, 255, 255, 100);
  632. font-size: 9px;
  633. text-align: center;
  634. position: absolute;
  635. bottom: 14px;
  636. left: 14px;
  637. }
  638. }
  639. .ri-settings-line {
  640. margin-left: 16px;
  641. }
  642. }
  643. }
  644. // 卡片
  645. .card {
  646. background: linear-gradient(#405473, #536D96);
  647. width: 91.4%;
  648. margin: 4px auto 0;
  649. padding: 15px 12px;
  650. display: flex;
  651. justify-content: space-between;
  652. border-radius: 8px;
  653. .title {
  654. line-height: 24px;
  655. color: rgba(255, 255, 255, 100);
  656. font-size: 16px;
  657. .img {
  658. display: inline-block;
  659. width: 24px;
  660. height: 24px;
  661. vertical-align: middle;
  662. margin-right: 8px;
  663. img {
  664. width: 20px;
  665. height: 20px;
  666. }
  667. }
  668. }
  669. .view {
  670. line-height: 24px;
  671. color: rgba(208, 214, 226, 100);
  672. font-size: 16px;
  673. }
  674. }
  675. // 立即开通
  676. .openlogin {
  677. border: 1px solid rgba(187, 226, 189, 1);
  678. background: #F4FFF3 ;
  679. width: 91.4%;
  680. padding: 30rpx 24rpx 24rpx 24rpx;
  681. margin: 8rpx auto 0;
  682. margin-bottom: 10px;
  683. display: flex;
  684. justify-content: space-between;
  685. border-radius: 8px;
  686. .title {
  687. line-height: 24px;
  688. color: #101010;
  689. font-size: 32rpx;
  690. .img {
  691. display: inline-block;
  692. width: 48rpx;
  693. height: 48rpx;
  694. vertical-align: middle;
  695. margin-right: 8px;
  696. img {
  697. width: 40rpx;
  698. height: 40rpx;
  699. }
  700. }
  701. }
  702. .open-btn {
  703. margin: auto;
  704. padding-left: 12px;
  705. padding-right: 4px;
  706. line-height: 28px;
  707. height: 32px;
  708. // text-align: center;
  709. color: #ffffff;
  710. border-radius: 10px;
  711. background: linear-gradient(to right,#34BC58 , #00A39A );
  712. .iconfont {
  713. margin-left: 0px;
  714. }
  715. }
  716. }
  717. // 立即开通
  718. .open,.opened {
  719. background: linear-gradient(#4A4C62, #2C3145);
  720. width: 91.4%;
  721. padding: 30rpx 24rpx 24rpx 24rpx;
  722. margin: 8rpx auto 0;
  723. display: flex;
  724. justify-content: space-between;
  725. border-radius: 8px;
  726. .title {
  727. line-height: 24px;
  728. color: #E1C082;
  729. font-size: 32rpx;
  730. .img {
  731. display: inline-block;
  732. width: 48rpx;
  733. height: 48rpx;
  734. vertical-align: middle;
  735. margin-right: 8px;
  736. img {
  737. width: 40rpx;
  738. height: 40rpx;
  739. }
  740. }
  741. }
  742. .open-btn {
  743. padding-left: 12px;
  744. padding-right: 4px;
  745. line-height: 28px;
  746. // text-align: center;
  747. border-radius: 50px;
  748. background: linear-gradient(to right,#F0E1C6, #ECC194);
  749. .iconfont {
  750. margin-left: 0px;
  751. }
  752. }
  753. .date{
  754. color: #d1b37a;
  755. line-height: 24px;
  756. font-size: 32rpx;
  757. .iconfont{
  758. color: #867668
  759. }
  760. }
  761. }
  762. // 余额
  763. .balance {
  764. background-color: #fff;
  765. width: 91.4%;
  766. margin: 12px auto;
  767. padding: 16px 29px;
  768. display: flex;
  769. // justify-content: space-between;
  770. justify-content: space-around;
  771. border-radius: 8px;
  772. .item {
  773. text-align: center;
  774. .num {
  775. line-height: 28px;
  776. color: rgba(51, 51, 51, 100);
  777. font-size: 24px;
  778. position: relative;
  779. .new {
  780. width: 40px;
  781. line-height: 20px;
  782. border-radius: 24px 24px 24px 0px;
  783. background-color: rgba(255, 94, 0, 100);
  784. color: rgba(255, 255, 255, 100);
  785. font-size: 12px;
  786. text-align: center;
  787. position: absolute;
  788. bottom: 20px;
  789. left: 36px;
  790. }
  791. }
  792. .name {
  793. height: 16px;
  794. color: rgba(134, 134, 134, 100);
  795. font-size: 14px;
  796. margin-top: 4px;
  797. .userData-foot-look {
  798. color: #00B962;
  799. }
  800. }
  801. }
  802. }
  803. }
  804. // 优惠
  805. .discounts {
  806. width: 91.4%;
  807. height: 80px;
  808. margin: 0 auto;
  809. border-radius: 8px;
  810. overflow: hidden;
  811. img {
  812. width: 100%;
  813. height: 80px;
  814. }
  815. }
  816. // 菜单
  817. .menu {
  818. background-color: #fff;
  819. width: 91.4%;
  820. margin: 12px auto 0;
  821. padding: 0 12px 9px 12px;
  822. border-radius: 8px;
  823. display: flex;
  824. flex-wrap: wrap;
  825. @media screen and (max-width: 375px) {
  826. .item {
  827. width: 33% !important;
  828. }
  829. }
  830. .item {
  831. width: 25%;
  832. margin-top: 20px;
  833. margin-bottom: 11px;
  834. display: flex;
  835. flex-direction: column;
  836. align-items: center;
  837. color: rgba(119, 119, 119, 100);
  838. i {
  839. font-size: 24px
  840. }
  841. .item-name {
  842. font-size: 14px;
  843. margin-top: 8px;
  844. }
  845. }
  846. }
  847. </style>