index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790
  1. <template>
  2. <view v-if="!isLoading" class="container">
  3. <!-- 页面头部 -->
  4. <view class="main-header">
  5. <!-- 用户信息 -->
  6. <view class="user-info">
  7. <!--头像-->
  8. <view class="user-avatar" @click="onUserInfo">
  9. <image class="image" :src="userInfo.avatar ? userInfo.avatar : '/static/default-avatar.png'"></image>
  10. </view>
  11. <view class="user-content" @click="onUserInfo">
  12. <!-- 会员昵称 -->
  13. <view class="nick-name">{{ userInfo.name ? userInfo.name : '未登录'}}</view>
  14. <view class="login-tips" v-if="!isLogin">(点击头像登录)</view>
  15. <!-- 会员等级 -->
  16. <view v-if="userInfo.gradeId > 0 && gradeInfo" class="user-grade">
  17. <view class="user-grade_icon">
  18. <image class="image" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAA0lBMVEUAAAD/tjL/tzH/uDP/uC7/tjH/tzH/tzL/tTH+tTL+tjP/tDD/tTD+tzD/tjL/szD/uDH/tjL/tjL+tjD/tjT/szb/tzL/tTL+uTH+tjL/tjL/tjL/tTT/tjL/tjL+tjH/uTL/vDD/tjL/tjH/tzL9uS//tTL/nBr/sS7/tjH/ujL/szD/uTv+rzf/tzL+tzH+vDP+uzL+tjP+ry7+tDL9ki/7szf/sEX/tTL/tjL+tjL/tTH/tTT/tzH/tzL/tjP/sTX/uTP/wzX+rTn/vDX9vC8m8ckhAAAAOXRSTlMAlnAMB/vjxKWGMh0S6drMiVxPRkEY9PLy0ru0sKagmo5+dGtgVCMgBP716eXWyMGxqJGRe2o5KSmFNjaYAAABP0lEQVQ4y8XS13KDMBAF0AWDDe4t7r3ETu9lVxJgJ/n/X8rKAzHG5TE+Twz3zki7I/g/KXdghIbGJewrU4yzn08Ebgl6TuZzzuOC6W5es3HX6qsSz3NFShRU0MpucytDmOSpu3yULx3CA9RD1HjVedc0jSjqm6ZzhUjDsFDQhSp/OKj5GQvg0+ZCOixsbtDLAeTTOm/yGi8GyIphIVsgH737FEDV44LJa88IRKK/SetrwT9G/GUIr6vXjoy4GXn7+RboVXnghuSjaoGecwQxL2su3CwAKlO+QFoqxI4FMctHQhQd2OhxTu184jWUlI+rMTBTn1/IQcJHQ6GQdZ7pWiDaNdhTt330efISeiqYwQEzQpTlsURJLhzkEmpCPsERfeIUVyXr6MNuIyp5uziW6xURtt7hhGwzmMNJExfO4Bd9X0ZPqAxdNwAAAABJRU5ErkJggg=="></image>
  19. </view>
  20. <view class="user-grade_name">
  21. <text>{{ gradeInfo.name }}</text>
  22. </view>
  23. </view>
  24. <!-- 会员无等级时显示手机号 -->
  25. <view v-else class="mobile">{{ userInfo.mobile }}</view>
  26. <view class="active-time" v-if="gradeEndTime">{{ gradeEndTime }}</view>
  27. </view>
  28. <view class="pay-qr" @click="toMemberCode(userInfo.id ? userInfo.id : 0)">
  29. <view class="qrcode iconfont icon-qr-extract"></view>
  30. </view>
  31. <view class="amount-info" @click="toMemberWallet(userInfo.id ? userInfo.id : 0)">
  32. <view class="amount-tip">余额(元)</view>
  33. <view class="amount-num" v-if="isLogin">{{ userInfo.balance.toFixed(2) }}</view>
  34. <view class="amount-num" v-if="!isLogin">0.00</view>
  35. <view class="point-amount" @click="onTargetPoints">积分 {{ userInfo.point ? userInfo.point : 0 }}</view>
  36. </view>
  37. </view>
  38. <view class="user-no">
  39. <view class="no" v-if="userInfo.userNo">会员号:{{ userInfo.userNo ? userInfo.userNo : '-'}}</view>
  40. <view class="recharge" @click="toRecharge(userInfo.id ? userInfo.id : 0)">储值有礼</view>
  41. </view>
  42. </view>
  43. <!--会员升级 start-->
  44. <view class="member-update" v-if="memberGrade.length > 0">
  45. <view class="update-title">
  46. <text>会员升级</text>
  47. </view>
  48. <scroll-view scroll-x>
  49. <view class="recharge">
  50. <view class="recharge-item" :class="current == index ? 'recharge-item-active': ''" v-for="(item, index) in memberGrade" :key="index" :style="{marginLeft: !index ? '30rpx': ''}" @click="onShowPopup(index)">
  51. <view class="recharge-tag">
  52. <text class="recharge-tag-text" v-if="parseInt(item.validDay) > 0">{{ item.validDay }}天有效期</text>
  53. <text class="recharge-tag-text" v-else>永久有效期</text>
  54. </view>
  55. <text class="recharge-item-duration">{{ item.name }}</text>
  56. <view class="recharge-item-price">
  57. <text class="rmb">¥</text>
  58. <text class="recharge-item-price-text">{{ item.catchValue }}</text>
  59. </view>
  60. <text class="recharge-item-des" v-if="item.discount > 0">买单{{ item.discount }}折</text>
  61. <text class="recharge-item-des" v-if="item.speedPoint > 0">积分翻{{ item.speedPoint }}倍</text>
  62. </view>
  63. </view>
  64. </scroll-view>
  65. </view>
  66. <!-- 弹窗 -->
  67. <Popup v-if="!isLoading" v-model="showPopup" @onPaySuccess="getPageData" :memberGrade="curGrade"/>
  68. <!--会员升级 end-->
  69. <!-- 订单操作 -->
  70. <view class="order-navbar">
  71. <view class="order-navbar-item" v-for="(item, index) in orderNavbar" :key="index" @click="onTargetOrder(item)">
  72. <view class="item-icon">
  73. <text class="iconfont" :class="[`icon-${item.icon}`]"></text>
  74. </view>
  75. <view class="item-name">{{ item.name }}</view>
  76. <text class="order-badge" v-if="item.count && item.count > 0">{{ item.count }}</text>
  77. </view>
  78. </view>
  79. <!-- 我的资产 -->
  80. <view class="my-asset">
  81. <view class="asset-left flex-box dis-flex flex-x-center">
  82. <view class="asset-left-item" @click="onTargetMyCoupon('C')">
  83. <view class="item-value dis-flex flex-x-center">
  84. <text>{{ isLogin ? assets.coupon : '0' }}</text>
  85. </view>
  86. <view class="item-name dis-flex flex-x-center">
  87. <text>优惠券</text>
  88. </view>
  89. </view>
  90. <view class="asset-left-item" @click="onTargetMyCoupon('P')">
  91. <view class="item-value dis-flex flex-x-center">
  92. <text>{{ isLogin ? assets.prestore : '0' }}</text>
  93. </view>
  94. <view class="item-name dis-flex flex-x-center">
  95. <text>储值卡</text>
  96. </view>
  97. </view>
  98. <view class="asset-left-item" @click="onTargetMyCoupon('T')">
  99. <view class="item-value dis-flex flex-x-center">
  100. <text>{{ isLogin ? assets.timer : '0' }}</text>
  101. </view>
  102. <view class="item-name dis-flex flex-x-center">
  103. <text>计次卡</text>
  104. </view>
  105. </view>
  106. </view>
  107. </view>
  108. <!-- 我的服务 -->
  109. <view class="my-service">
  110. <view class="service-title">我的服务</view>
  111. <view class="service-content clearfix">
  112. <block v-for="(item, index) in service" :key="index">
  113. <view v-if="item.type == 'link'" class="service-item" @click="handleService(item)">
  114. <view class="item-icon">
  115. <text class="iconfont" :class="[`icon-${item.icon}`]"></text>
  116. </view>
  117. <view class="item-name">{{ item.name }}</view>
  118. </view>
  119. <view v-if="item.type == 'button' && $platform == 'MP-WEIXIN'" class="service-item">
  120. <button class="btn-normal" :open-type="item.openType">
  121. <view class="item-icon">
  122. <text class="iconfont" :class="[`icon-${item.icon}`]"></text>
  123. </view>
  124. <view class="item-name">{{ item.name }}</view>
  125. </button>
  126. </view>
  127. </block>
  128. <block>
  129. <view v-if="isMerchant == true" class="service-item" @click="handleService({'url': 'pages/merchant/index'})">
  130. <view class="item-icon">
  131. <text class="iconfont icon-dianpu"></text>
  132. </view>
  133. <view class="item-name">商户管理</view>
  134. </view>
  135. </block>
  136. </view>
  137. </view>
  138. <view class="my-recommend"></view>
  139. </view>
  140. </template>
  141. <script>
  142. import SettingKeyEnum from '@/common/enum/setting/Key'
  143. import SettingModel from '@/common/model/Setting'
  144. import * as UserApi from '@/api/user'
  145. import * as OrderApi from '@/api/order'
  146. import * as MessageApi from '@/api/message'
  147. import { checkLogin, showMessage } from '@/utils/app'
  148. import Popup from './components/Popup'
  149. // 订单操作
  150. const orderNavbar = [
  151. { id: 'all', name: '全部订单', icon: 'qpdingdan' },
  152. { id: 'toPay', name: '待支付', icon: 'daifukuan', count: 0 },
  153. { id: 'paid', name: '已支付', icon: 'daishouhuo', count: 0 }
  154. ]
  155. /**
  156. * 我的服务
  157. * id: 标识; name: 标题名称; icon: 图标; type 类型(link和button); url: 跳转的链接
  158. */
  159. const service = [
  160. { id: 'myCoupon', name: '卡券兑换', icon: 'youhuiquan', type: 'link', url: 'pages/coupon/receive' },
  161. { id: 'coupon', name: '转赠记录', icon: 'lingquan', type: 'link', url: 'pages/give/index' },
  162. { id: 'points', name: '我的积分', icon: 'jifen', type: 'link', url: 'pages/points/detail' },
  163. { id: 'book', name: '我的预约', icon: 'tuxingyanzhengma', type: 'link', url: 'pages/book/my' },
  164. { id: 'help', name: '我的帮助', icon: 'bangzhu', type: 'link', url: 'pages/help/index' },
  165. { id: 'contact', name: '在线客服', icon: 'kefu', type: 'button', openType: 'contact' },
  166. { id: 'address', name: '收货地址', icon: 'shouhuodizhi', type: 'link', url: 'pages/address/index' },
  167. { id: 'refund', name: '售后服务', icon: 'shouhou', type: 'link', url: 'pages/refund/index' },
  168. { id: 'setting', name: '个人信息', icon: 'shezhi1', type: 'link', url: 'pages/user/setting' },
  169. { id: 'book', name: '立即预约', icon: 'naozhong', type: 'link', url: 'pages/book/index' },
  170. { id: 'share', name: '邀请有礼', icon: 'fenxiang-post', type: 'link', url: 'pages/share/index' },
  171. ]
  172. export default {
  173. components: {
  174. Popup
  175. },
  176. data() {
  177. return {
  178. // 枚举类
  179. SettingKeyEnum,
  180. // 当前运行的终端 (此处并不冗余,因为微信小程序端view层无法直接读取$platform)
  181. $platform: this.$platform,
  182. // 正在加载
  183. isLoading: true,
  184. // 是否已登录
  185. isLogin: false,
  186. // 系统设置
  187. setting: {},
  188. // 当前用户信息
  189. userInfo: { id: 0, name: '', avatar: '', gradeId: 0, mobile: '', balance: 0 },
  190. gradeInfo: {},
  191. isMerchant: false,
  192. gradeEndTime: '',
  193. // 账户资产
  194. assets: { prestore: '0', timer: '0', coupon: '0' },
  195. // 我的服务
  196. service,
  197. // 订单操作
  198. orderNavbar,
  199. // 当前用户待处理的订单数量
  200. todoCounts: { payment: 0 },
  201. current: 0,
  202. // 显示、隐藏弹窗
  203. showPopup: false,
  204. memberGrade: [],
  205. curGrade: {}
  206. }
  207. },
  208. /**
  209. * 生命周期函数--监听页面显示
  210. */
  211. onShow(options) {
  212. // 获取页面数据
  213. this.getPageData()
  214. // 判断是否已登录
  215. this.isLogin = checkLogin()
  216. // 消息显示
  217. showMessage();
  218. },
  219. methods: {
  220. // 获取页面数据
  221. getPageData(callback) {
  222. const app = this
  223. app.isLoading = true
  224. Promise.all([app.getSetting(), app.getUserInfo(), app.getUserAssets(), app.getTodoCounts()])
  225. .then(result => {
  226. app.isLoading = false
  227. // 初始化我的服务数据
  228. app.initService()
  229. // 初始化订单操作数据
  230. app.initOrderTabbar()
  231. // 执行回调函数
  232. callback && callback()
  233. })
  234. .catch(err => {
  235. console.log('catch', err)
  236. })
  237. },
  238. // 初始化我的服务数据
  239. initService() {
  240. const app = this
  241. const newService = []
  242. service.forEach(item => {
  243. if (item.id === 'points') {
  244. item.name = '我的积分'
  245. }
  246. newService.push(item)
  247. })
  248. app.service = newService
  249. },
  250. // 初始化订单操作数据
  251. initOrderTabbar() {
  252. const app = this
  253. const newOrderNavbar = []
  254. orderNavbar.forEach(item => {
  255. if (item.hasOwnProperty('count')) {
  256. item.count = app.isLogin ? app.todoCounts[item.id] : 0
  257. }
  258. newOrderNavbar.push(item)
  259. })
  260. app.orderNavbar = newOrderNavbar
  261. },
  262. // 获取设置
  263. getSetting() {
  264. const app = this
  265. app.setting = {}
  266. },
  267. // 获取当前用户信息
  268. getUserInfo() {
  269. const app = this
  270. app.showPopup = false;
  271. return new Promise((resolve, reject) => {
  272. UserApi.info()
  273. .then(result => {
  274. if (result.data.userInfo) {
  275. app.userInfo = result.data.userInfo
  276. app.isLogin = true
  277. } else {
  278. app.isLogin = false
  279. app.userInfo = { id: 0, name: '', avatar: '', gradeId: 0, mobile: '', balance: 0 }
  280. }
  281. // 强制领取会员卡
  282. if (result.data.openWxCard && app.userInfo) {
  283. this.$navTo('pages/user/card?userId='+app.userInfo.id);
  284. return false;
  285. }
  286. app.gradeInfo = result.data.gradeInfo;
  287. app.memberGrade = result.data.memberGrade;
  288. app.gradeEndTime = result.data.gradeEndTime;
  289. app.isMerchant = result.data.isMerchant;
  290. resolve(app.userInfo);
  291. resolve(app.gradeInfo);
  292. resolve(isMerchant);
  293. })
  294. .catch(err => {
  295. if (err.result && err.result.status == 1001) {
  296. app.isLogin = false
  297. resolve(null)
  298. } else {
  299. reject(err)
  300. }
  301. })
  302. })
  303. },
  304. // 获取账户资产
  305. getUserAssets() {
  306. const app = this
  307. return new Promise((resolve, reject) => {
  308. UserApi.assets()
  309. .then(result => {
  310. app.assets = result.data.asset
  311. resolve(app.assets)
  312. })
  313. .catch(err => {
  314. if (err.result && err.result.status == 1001) {
  315. app.isLogin = false
  316. resolve(null)
  317. } else {
  318. reject(err)
  319. }
  320. })
  321. })
  322. },
  323. // 获取当前用户待处理的事项数量
  324. getTodoCounts() {
  325. const app = this
  326. return new Promise((resolve, reject) => {
  327. !app.isLogin ? resolve(null) : OrderApi.todoCounts()
  328. .then(result => {
  329. app.todoCounts = result.data
  330. resolve(app.todoCounts)
  331. })
  332. })
  333. },
  334. // 会员等级
  335. onShowPopup(index) {
  336. this.showPopup = !this.showPopup
  337. this.current = index
  338. this.curGrade = this.memberGrade[index]
  339. },
  340. // 跳转到会员码
  341. toMemberCode(userId) {
  342. !this.isLogin && this.$navTo('pages/login/index')
  343. this.$navTo('pages/user/code', { userId: userId})
  344. },
  345. // 跳转我的余额
  346. toMemberWallet(userId) {
  347. !this.isLogin && this.$navTo('pages/login/index')
  348. this.$navTo('pages/wallet/index', { userId: userId})
  349. },
  350. // 跳转充值
  351. toRecharge(userId) {
  352. !this.isLogin && this.$navTo('pages/login/index')
  353. this.$navTo('pages/wallet/recharge/index', { userId: userId})
  354. },
  355. // 跳转到订单页
  356. onTargetOrder(item) {
  357. console.log('我的订单..')
  358. !this.isLogin && this.$navTo('pages/login/index')
  359. this.$navTo('pages/order/index', { dataType: item.id })
  360. },
  361. // 跳转到我的积分页面
  362. onTargetPoints() {
  363. !this.isLogin && this.$navTo('pages/login/index')
  364. this.$navTo('pages/points/detail')
  365. },
  366. // 跳转到我的卡券列表页
  367. onTargetMyCoupon(type) {
  368. const app = this
  369. if (app.isLogin) {
  370. // #ifdef MP-WEIXIN
  371. MessageApi.getSubTemplate({keys: "couponExpire,couponArrival"}).then(result => {
  372. const templateIds = result.data
  373. wx.requestSubscribeMessage({tmplIds: templateIds,
  374. success(res) {
  375. console.log("调用成功!")
  376. }, fail(res) {
  377. console.log("调用失败:", res)
  378. }, complete() {
  379. app.$navTo('pages/my-coupon/index?type='+type)
  380. }})
  381. })
  382. // #endif
  383. // #ifndef MP-WEIXIN
  384. app.$navTo('pages/my-coupon/index?type='+type)
  385. // #endif
  386. } else {
  387. app.$navTo('pages/login/index')
  388. }
  389. },
  390. // 跳转会员设置页面
  391. onUserInfo() {
  392. if (!this.isLogin) {
  393. this.$navTo('pages/login/index')
  394. } else {
  395. this.$navTo('pages/user/setting')
  396. }
  397. },
  398. // 跳转到服务页面
  399. handleService({ url }) {
  400. this.$navTo(url)
  401. }
  402. },
  403. /**
  404. * 下拉刷新
  405. */
  406. onPullDownRefresh() {
  407. // 获取首页数据
  408. this.getPageData(() => {
  409. uni.stopPullDownRefresh()
  410. })
  411. }
  412. }
  413. </script>
  414. <style lang="scss" scoped>
  415. // 页面头部
  416. .main-header {
  417. background: url('~@/static/background/user-header.png') no-repeat;
  418. height: 380rpx;
  419. background-size: cover;
  420. overflow: hidden;
  421. display: block;
  422. align-items: center;
  423. margin: 10rpx 25rpx 10rpx 25rpx;
  424. border-radius: 10rpx;
  425. .user-info {
  426. display: block;
  427. height: 200rpx;
  428. margin: 20rpx;
  429. margin-left: 20rpx;
  430. .user-avatar {
  431. padding-top: 10rpx;
  432. width: 50rpx;
  433. margin-top: 70rpx;
  434. float: left;
  435. .image {
  436. display: block;
  437. width: 100rpx;
  438. height: 100rpx;
  439. border-radius: 999rpx;
  440. }
  441. }
  442. .user-content {
  443. display: block;
  444. justify-content: center;
  445. margin-top: 80rpx;
  446. margin-left: 60rpx;
  447. float: left;
  448. color: #ffffff;
  449. max-width: 300rpx;
  450. .nick-name {
  451. font-size: 32rpx;
  452. font-weight: bold;
  453. max-width: 270rpx;
  454. white-space: nowrap;
  455. overflow: hidden;
  456. text-overflow: ellipsis;
  457. }
  458. .mobile {
  459. margin-top: 15rpx;
  460. font-size: 26rpx;
  461. }
  462. .user-grade {
  463. display: block;
  464. align-items: center;
  465. background: #3c3c3c;
  466. margin-top: 8rpx;
  467. border-radius: 10rpx;
  468. padding: 5rpx 12rpx;
  469. width: 80%;
  470. min-width: 160rpx;
  471. height: 40rpx;
  472. .user-grade_icon .image {
  473. display: block;
  474. width: 32rpx;
  475. height: 32rpx;
  476. float: left;
  477. }
  478. .user-grade_name {
  479. margin-left: 5rpx;
  480. font-size: 24rpx;
  481. color: #EEE0C3;
  482. float: left;
  483. }
  484. }
  485. .active-time {
  486. margin-top: 3rpx;
  487. }
  488. .login-tips {
  489. margin-top: 9rpx;
  490. font-size: 25rpx;
  491. }
  492. }
  493. .amount-info {
  494. margin-top: 80rpx;
  495. margin-left: 70rpx;
  496. color: #fff;
  497. display: block;
  498. float: left;
  499. max-width: 120rpx;
  500. .amount-tip {
  501. font-size: 24rpx;
  502. }
  503. .amount-num {
  504. margin-top: 10rpx;
  505. font-weight: bold;
  506. font-size: 48rpx;
  507. }
  508. .point-amount {
  509. display: block;
  510. margin-top: 2px;
  511. width: 100px;
  512. }
  513. }
  514. .pay-qr {
  515. color:#ffffff;
  516. margin-top: 10rpx;
  517. margin-left: 50rpx;
  518. text-align: center;
  519. width: 50rpx;
  520. float: right;
  521. .qrcode {
  522. display: block;
  523. font-size: 40rpx;
  524. }
  525. }
  526. }
  527. .user-no {
  528. display: block;
  529. font-size: 25rpx;
  530. margin: 110rpx 0rpx 0rpx 20rpx;
  531. color: #ffffff;
  532. .no {
  533. float: left;
  534. }
  535. .recharge {
  536. float: right;
  537. margin-right: 20rpx;
  538. }
  539. }
  540. }
  541. // 我的资产
  542. .my-asset {
  543. display: flex;
  544. background: #fff;
  545. margin: 10rpx 20rpx 10rpx 20rpx;
  546. padding: 40rpx 0;
  547. border: 2rpx #f5f5f5 solid;
  548. .asset-right {
  549. width: 200rpx;
  550. border-left: 1rpx solid #eee;
  551. }
  552. .asset-left-item {
  553. text-align: center;
  554. color: #666;
  555. padding: 0 72rpx;
  556. width: 33%;
  557. .item-value {
  558. font-size: 35rpx;
  559. color: #f03c3c;
  560. font-weight: bold;
  561. }
  562. .item-name {
  563. font-size: 25rpx;
  564. margin-top: 6rpx;
  565. }
  566. }
  567. }
  568. // 订单操作
  569. .order-navbar {
  570. display: flex;
  571. margin: 12rpx auto 10rpx auto;
  572. padding: 20rpx 0;
  573. width: 94%;
  574. box-shadow: 0 1rpx 5rpx 0px rgba(0, 0, 0, 0.05);
  575. font-size: 30rpx;
  576. border-radius: 5rpx;
  577. background: #fff;
  578. border: 2rpx #f5f5f5 solid;
  579. &-item {
  580. position: relative;
  581. width: 33%;
  582. .item-icon {
  583. text-align: center;
  584. margin: 0 auto;
  585. padding: 10rpx 0;
  586. color: #545454;
  587. font-size: 48rpx;
  588. font-weight: bold;
  589. }
  590. .item-name {
  591. font-size: 24rpx;
  592. color: #545454;
  593. text-align: center;
  594. margin-right: 10rpx;
  595. }
  596. .order-badge {
  597. position: absolute;
  598. top: 0;
  599. right: 58rpx;
  600. font-size: 20rpx;
  601. background: #fa5151;
  602. text-align: center;
  603. line-height: 30rpx;
  604. color: #fff;
  605. border-radius: 50%;
  606. min-width: 36rpx;
  607. padding: 6rpx 13rpx 6rpx 13rpx;
  608. }
  609. }
  610. }
  611. // 我的服务
  612. .my-service {
  613. margin: 0rpx auto 20rpx auto;
  614. border: 2rpx #f5f5f5 solid;
  615. background: #FFF;
  616. padding: 10rpx 0rpx;
  617. width: 94%;
  618. box-shadow: 0 1rpx 5rpx 0px rgba(0, 0, 0, 0.05);
  619. border-radius: 5rpx;
  620. display: block;
  621. .service-title {
  622. padding-left: 20rpx;
  623. margin-bottom: 30rpx;
  624. font-size: 28rpx;
  625. }
  626. .service-content {
  627. .service-item {
  628. width: 25%;
  629. float: left;
  630. margin-bottom: 25rpx;
  631. .item-icon {
  632. text-align: center;
  633. margin: 0 auto;
  634. padding: 10rpx 0;
  635. color: #ff3800;
  636. font-size: 40rpx;
  637. }
  638. .item-name {
  639. font-size: 24rpx;
  640. color: #545454;
  641. text-align: center;
  642. margin-right: 10rpx;
  643. }
  644. }
  645. }
  646. }
  647. // 推荐信息
  648. .my-recommend {
  649. height: 20rpx;
  650. }
  651. // 会员升级
  652. .member-update {
  653. margin: 22rpx auto 0rpx auto;
  654. padding: 20rpx 0;
  655. border-radius: 5rpx;
  656. box-shadow: 0 1rpx 5rpx 0px rgba(0, 0, 0, 0.05);
  657. background: #fff;
  658. width: 94%;
  659. text-align: center;
  660. .update-title {
  661. padding-left: 20rpx;
  662. margin-bottom: 30rpx;
  663. font-size: 28rpx;
  664. text-align: left;
  665. }
  666. .recharge {
  667. position: relative;
  668. margin-bottom: 35rpx;
  669. display: flex;
  670. flex-direction: row;
  671. align-items: center;
  672. &-tag {
  673. position: absolute;
  674. top: -2rpx;
  675. left: -2rpx;
  676. width: 170rpx;
  677. height: 36rpx;
  678. display: flex;
  679. flex-direction: row;
  680. align-items: center;
  681. justify-content: center;
  682. background-image: url('~@/static/user/tag.png');
  683. background-size: 100%;
  684. &-text {
  685. font-size: 20rpx;
  686. color: #FFFFFF;
  687. text-align: center;
  688. }
  689. }
  690. &-item {
  691. position: relative;
  692. padding: 40rpx 0;
  693. margin-left: 15rpx;
  694. width: 29.33%;
  695. height: 270rpx;
  696. flex-shrink: 0;
  697. display: flex;
  698. flex-direction: column;
  699. align-items: center;
  700. border: solid 1rpx #CBCCCE;
  701. border-radius: 12rpx;
  702. &-active {
  703. border: solid 2rpx #EDD2A9;
  704. background-color: #FBF1E5;
  705. }
  706. &-duration {
  707. margin-bottom: 30rpx;
  708. font-size: 26rpx;
  709. color: #1C1C1C;
  710. }
  711. &-price {
  712. margin-bottom: 20rpx;
  713. display: flex;
  714. flex-direction: row;
  715. align-items: baseline;
  716. &-text {
  717. font-size: 48rpx;
  718. color: #E3BE83;
  719. }
  720. }
  721. &-des {
  722. font-size: 22rpx;
  723. color: #A5A3A2;
  724. }
  725. }
  726. }
  727. }
  728. </style>