user.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739
  1. <template>
  2. <view>
  3. <view v-if="storage">
  4. <view class="bg-user-gradual-green"
  5. style=" background-image: url(https://kxmalls.oss-cn-hangzhou.aliyuncs.com/bg/bg.png);">
  6. <view :style="'height:'+statusBarHeight+'px;'" style="width: 750rpx;display: flex; position: relative;"></view>
  7. <view class="flex align-center justify-center"
  8. style="height: 88rpx;font-size: 36rpx;"
  9. >
  10. 个人中心
  11. </view>
  12. <view class="padding-top-lg flex justify-between align-end padding-lr" style="padding-top: 30rpx;">
  13. <view class="">
  14. <view @click="toLogin" style="margin-top: 16rpx;font-size: 40rpx;height: 56rpx;">
  15. HI,{{ hasLogin ? (userInfo.nickname || '未设置昵称') : '请注册/登录' }}
  16. <!-- 添加VIP标识 -->
  17. <view v-if="hasLogin && userInfo.level > 0"
  18. style="display: inline-flex; align-items: center; margin-left: 10rpx;">
  19. <text v-if="hasLogin && userInfo.level > 0"
  20. :style="{color: getVipColor(userInfo.level)}"
  21. style="font-size: 24rpx;margin-left: 10rpx;">
  22. {{ getVipName(userInfo.level) }}
  23. </text>
  24. </view>
  25. </view>
  26. </view>
  27. <view @click="navTo('/pages/user/profile')" style="position: relative;padding-right: 8rpx;">
  28. <image :src="hasLogin && userInfo.avatar ? userInfo.avatar :'../../static/user/touxiang-@2x.png'"
  29. class="round" mode="aspectFill"
  30. style="width: 144rpx;height: 144rpx;"></image>
  31. <view v-if="hasLogin" class="flex align-center justify-center"
  32. style="position: absolute;bottom: 0rpx;left: 29rpx; background-color: #8AD62A;border-radius: 200rpx;width: 86rpx;height: 38rpx;color: #FFFFFF;font-size: 22rpx;"
  33. >编辑
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. <view class="margin-lr bg-white shadow"
  39. style="border-radius: 16rpx 16rpx 16rpx 16rpx;width: 690rpx;height: 140rpx;margin-top: -146rpx;margin-bottom: 20rpx">
  40. <view class="flex justify-around align-center padding-top-sm">
  41. <view class="flex align-center justify-center flex-direction" style="width: 108rpx;">
  42. {{ hasLogin ? (nowMoney || 0) : '-' }}
  43. <view @click="navTo('/pages/user/money')" style="padding-top: 20rpx;font-size: 24rpx;color: #272B54;">余额
  44. </view>
  45. </view>
  46. <view @click="navTo('/pages/user/coupons?type=user')" class="flex align-center justify-center flex-direction"
  47. style="width: 108rpx;">
  48. {{ hasLogin ? (couponListSize || 0) : '-' }}
  49. <view style="padding-top: 20rpx;font-size: 24rpx;color: #272B54;">优惠券</view>
  50. </view>
  51. <view @click="navTo('/pages/user/integral')" class="flex align-center justify-center flex-direction"
  52. style="width: 108rpx;">
  53. {{ hasLogin ? (integral || 0) : '-' }}
  54. <view style="padding-top: 20rpx;font-size: 24rpx;color: #272B54;">积分</view>
  55. </view>
  56. </view>
  57. </view>
  58. <view class="margin-lr bg-white shadow"
  59. style="border-radius: 16rpx 16rpx 16rpx 16rpx;width: 690rpx;height: 140rpx;">
  60. <view class="flex justify-around align-center padding-top-sm">
  61. <view @click="navTo('/pages/order/list?state=0')" class="flex align-center justify-center flex-direction"
  62. style="width: 108rpx;">
  63. <image src="../../static/user/all_order.png" mode="aspectFit" style="width: 46rpx;height: 50rpx;"></image>
  64. <view style="padding-top: 20rpx;font-size: 24rpx;color: #272B54;">全部订单</view>
  65. </view>
  66. <view @click="navTo('/pages/order/list?state=1')" class="flex align-center justify-center flex-direction"
  67. style="width: 108rpx;">
  68. <image src="../../static/user/waitpay.png" mode="aspectFit" style="width: 46rpx;height: 50rpx;"></image>
  69. <view style="padding-top: 20rpx;font-size: 24rpx;color: #272B54;">待付款</view>
  70. </view>
  71. <view @click="navTo('/pages/order/list?state=2')" class="flex align-center justify-center flex-direction"
  72. style="width: 108rpx;">
  73. <image src="../../static/user/daishouhuo@3x.png" mode="aspectFit"
  74. style="width: 46rpx;height: 50rpx;"></image>
  75. <view style="padding-top: 20rpx;font-size: 24rpx;color: #272B54;">待收货</view>
  76. </view>
  77. <view @click="navTo('/pages/order/list?state=3')" class="flex align-center justify-center flex-direction"
  78. style="width: 108rpx;">
  79. <image src="../../static/user/shouhou@3x.png" mode="aspectFit" style="width: 46rpx;height: 50rpx;"></image>
  80. <view style="padding-top: 20rpx;font-size: 24rpx;color: #272B54;">待评价</view>
  81. </view>
  82. <view @click="navTo('/pages/refund/index?state=0')" class="flex align-center justify-center flex-direction"
  83. style="width: 108rpx;">
  84. <image src="../../static/user/shouhou@3x.png" mode="aspectFit" style="width: 46rpx;height: 50rpx;"></image>
  85. <view style="padding-top: 20rpx;font-size: 24rpx;color: #272B54;">售后</view>
  86. </view>
  87. </view>
  88. </view>
  89. <view class="padding-lr padding-tb-sm">
  90. <image src="https://nontax.oss-cn-beijing.aliyuncs.com/kxmall/G2usUI.png" mode="aspectFit"
  91. style="width: 690rpx;height: 184rpx;"></image>
  92. </view>
  93. <view class="margin-lr margin-bottom-sm shadow bg-white" style="border-radius: 10rpx;">
  94. <view @click="navTo('/pages/address/list')" class="flex align-center padding">
  95. <image src="../../static/user/location@3x.png" mode="aspectFit"
  96. style="width: 32rpx;height: 36rpx;"></image>
  97. <view class="padding-left-sm lem-text-black" style="font-size: 28rpx;">地址管理</view>
  98. </view>
  99. <view @click="navTo('/pages/user/userVip')" class="flex align-center padding">
  100. <image src="../../static/user/vip.png" mode="aspectFit"
  101. style="width: 32rpx;height: 36rpx;"></image>
  102. <view class="padding-left-sm lem-text-black" style="font-size: 28rpx;">会员中心</view>
  103. </view>
  104. <view @click="navTo('/pages/user/coupons?type=user')" class="flex align-center padding">
  105. <image src="../../static/user/notice@3x.png" mode="aspectFit"
  106. style="width: 32rpx;height: 36rpx;"></image>
  107. <view class="padding-left-sm lem-text-black" style="font-size: 28rpx;">我的优惠券</view>
  108. </view>
  109. <button open-type="contact" class="flex align-center padding contact-btn">
  110. <image src="../../static/user/secretary@3x.png" mode="aspectFit"
  111. style="width: 32rpx;height: 36rpx;"></image>
  112. <view class="padding-left-sm lem-text-black" style="font-size: 28rpx;">在线客服</view>
  113. </button>
  114. </view>
  115. <view class="margin-lr margin-bottom-sm shadow bg-white" style="border-radius: 10rpx;">
  116. <view @click="navTo('/pages/product/favorite')" class="flex align-center padding">
  117. <image src="../../static/user/collect@3x.png" mode="aspectFit"
  118. style="width: 32rpx;height: 36rpx;"></image>
  119. <view class="padding-left-sm lem-text-black" style="font-size: 28rpx;">我的收藏</view>
  120. </view>
  121. <view @click="navTo('/pages/product/footprint')" class="flex align-center padding">
  122. <image src="../../static/user/zuji.png" mode="aspectFit"
  123. style="width: 32rpx;height: 36rpx;"></image>
  124. <view class="padding-left-sm lem-text-black" style="font-size: 28rpx;">我的足迹</view>
  125. </view>
  126. <view @click="navTo('/pages/user/promotion')" class="flex align-center padding">
  127. <image src="../../static/user/promoter.png" mode="aspectFit"
  128. style="width: 32rpx;height: 36rpx;"></image>
  129. <view class="padding-left-sm lem-text-black" style="font-size: 28rpx;">我的推广</view>
  130. </view>
  131. <view @click="navTo('/pages/user/about')" class="flex align-center padding">
  132. <image src="../../static/user/tip_round@3x.png" mode="aspectFit"
  133. style="width: 32rpx;height: 36rpx;"></image>
  134. <view class="padding-left-sm lem-text-black" style="font-size: 28rpx;">关于</view>
  135. </view>
  136. <view @click="navTo('/pages/set/set')" class="flex align-center padding">
  137. <image src="../../static/user/setting@3x.png" mode="aspectFit"
  138. style="width: 32rpx;height: 36rpx;"></image>
  139. <view class="padding-left-sm lem-text-black" style="font-size: 28rpx;">设置</view>
  140. </view>
  141. <view @click="navTo('/pages/notice/notice')" class="flex align-center padding">
  142. <image src="../../static/user/notice@3x.png" mode="aspectFit"
  143. style="width: 32rpx;height: 36rpx;"></image>
  144. <view class="padding-left-sm lem-text-black" style="font-size: 28rpx;">通知</view>
  145. </view>
  146. </view>
  147. </view>
  148. <view v-else style="padding-top: 180rpx;padding-bottom: 180rpx;">
  149. <missing :buttonName="'换个地址试试吧~'" :handlerName="'buttonClick'"
  150. @buttonClick="chooseLocation"
  151. :imgUrl="'http://qiniuoss.nauzone.cn/%E7%BB%84%204%20%E6%8B%B7%E8%B4%9D@3x.png'"
  152. :desc="'当前地区不在配送范围哦'"></missing>
  153. </view>
  154. <!-- 猜您喜欢 -->
  155. <view style="padding: 20rpx 12rpx 20rpx 30rpx;background-color: #f1f1f1;">
  156. <view class="flex justify-between align-center" style="padding: 20rpx 0;">
  157. <view style="font-size: 32rpx;font-weight: bold;color: #333;">猜您喜欢</view>
  158. <view @click="refreshRecommend" style="font-size: 24rpx;color: #999;margin-right: 10px;">换一批</view>
  159. </view>
  160. <view v-if="recommendList.length > 0 && storage" class="flex flex-wrap">
  161. <view v-for="(item,index) in recommendList" :key="index"
  162. class="margin-bottom-sm bg-white flex align-center justify-center flex-direction"
  163. style="width: 335rpx;height: 520rpx;padding: 10rpx;margin-right: 18rpx;border-radius: 8rpx;"
  164. @click="navToDetailPage(item.id)">
  165. <image style="width: 280rpx;height: 280rpx;margin: 10rpx;" :src="JSON.parse(item.image)[0].url"
  166. mode="aspectFit"></image>
  167. <view style="padding-top: 28rpx;">
  168. <view class="text-cut"
  169. style="width: 294rpx;height: 40rpx;font-size: 28rpx;font-weight: Medium; color: #2D4454;">
  170. {{ item.storeName }}
  171. </view>
  172. <view class="text-cut margin-tb-xs" style="width: 294rpx;height: 40rpx;font-size: 28rpx;color: #999999;">
  173. {{ item.storeInfo }}
  174. </view>
  175. <view style="padding-top: 6rpx;" class="flex align-center justify-between">
  176. <view style="width: 114rpx;height: 42rpx;line-height: 42rpx;font-size: 24rpx;color:#F62929;">
  177. ¥{{ item.kxStockVo.price }}
  178. </view>
  179. <view style="color: #B0B0B0;font-size: 24rpx;">{{ item.unitName }}/份</view>
  180. <image @click.stop="addCart(item)" style="width: 48rpx;height: 48rpx;"
  181. src="../../static/index/cart.png" mode="aspectFit" class="round"></image>
  182. </view>
  183. </view>
  184. </view>
  185. </view>
  186. <view v-else class="flex align-center justify-center" style="height: 200rpx;color: #999;">
  187. 暂无推荐商品
  188. </view>
  189. </view>
  190. </view>
  191. </template>
  192. <script>
  193. import listCell from '@/components/mix-list-cell';
  194. import missing from "@/components/missing.vue"
  195. import {
  196. mapState
  197. } from 'vuex';
  198. let startY = 0, moveY = 0, pageAtTop = true;
  199. export default {
  200. components: {
  201. listCell, missing
  202. },
  203. data() {
  204. return {
  205. recommendList: [], // 推荐商品列表
  206. currentPage: 1, // 当前页码
  207. pageSize: 4, // 每页显示数量
  208. nowMoney: 0,
  209. integral: 0,
  210. couponListSize: 0,
  211. coverTransform: 'translateY(0px)',
  212. coverTransition: '0s',
  213. moving: false,
  214. footprintList: [],
  215. isVip: false,
  216. statusBarHeight: 88,
  217. storage: true,
  218. banner: {
  219. imgUrl: ''
  220. }
  221. }
  222. },
  223. onShow() {
  224. this.isVip = this.$api.isVip()
  225. //this.loadFootprint()
  226. this.$store.state.storageId ? this.storage = true : this.storage = false
  227. //如果用户已登录,获取购物车数量
  228. if (this.$store.state.userInfo.accessToken) {
  229. this.$api.request('get', 'cart/app/countCart', {
  230. storageId: this.$store.state.storageId
  231. }).then(res => {
  232. if (res.data > 0) {
  233. uni.setTabBarBadge({
  234. index: 2,
  235. text: res.data + ''
  236. })
  237. }
  238. this.$store.commit('addCart', res.data)
  239. this.$api.request('get', 'coupon/app/getUserCoupons').then(res => {
  240. this.couponListSize = res.data.length
  241. })
  242. this.$api.request('get', 'user/app/getUser').then(res => {
  243. this.nowMoney = res.data.nowMoney
  244. this.integral = res.data.integral
  245. })
  246. }).catch(err => {
  247. // this.$api.msg('请求失败,请稍后再试')
  248. })
  249. } else {
  250. // 用户未登录时,清空数据
  251. this.nowMoney = 0
  252. this.integral = 0
  253. this.couponListSize = 0
  254. }
  255. // 获取推荐商品
  256. if (this.$store.state.storageId) {
  257. this.getRecommendList()
  258. }
  259. },
  260. onLoad() {
  261. try {
  262. const res = uni.getSystemInfoSync();
  263. console.log(res.statusBarHeight);
  264. this.statusBarHeight = res.statusBarHeight
  265. } catch (e) {
  266. // error
  267. }
  268. this.$api.request('get', 'carousel/app/getCarouselActive', {
  269. adType: 8
  270. }).then(res => {
  271. this.banner = res.data[0]
  272. })
  273. },
  274. // #ifndef MP
  275. onNavigationBarButtonTap(e) {
  276. const index = e.index;
  277. if (index === 0) {
  278. this.navTo('/pages/set/set');
  279. } else if (index === 1) {
  280. // #ifdef APP-PLUS
  281. const pages = getCurrentPages();
  282. const page = pages[pages.length - 1];
  283. const currentWebview = page.$getAppWebview();
  284. currentWebview.hideTitleNViewButtonRedDot({
  285. index
  286. });
  287. // #endif
  288. uni.navigateTo({
  289. url: '/pages/notice/notice'
  290. })
  291. }
  292. },
  293. // #endif
  294. computed: {
  295. ...mapState(['hasLogin', 'userInfo'])
  296. },
  297. methods: {
  298. // async loadFootprint() {
  299. // const that = this
  300. // that.$api.request('get', 'getAllFootprint').then(res => {
  301. // that.footprintList = res.data
  302. // })
  303. // },
  304. // 获取VIP等级名称
  305. getVipName(level) {
  306. const levels = {
  307. 0: '非会员',
  308. 1: '普通会员',
  309. 2: '青铜会员',
  310. 3: '白银会员',
  311. 4: '黄金会员',
  312. 5: '铂金会员',
  313. 6: '钻石会员'
  314. };
  315. return levels[level] || '未知等级';
  316. },
  317. // 获取VIP等级对应颜色
  318. getVipColor(level) {
  319. const colors = {
  320. 0: '#999',
  321. 1: '#2a2fd6', // 普通会员绿色
  322. 2: '#CD7F32', // 青铜色
  323. 3: '#C0C0C0', // 银色
  324. 4: '#FFD700', // 金色
  325. 5: '#E5E4E2', // 铂金色
  326. 6: '#B9F2FF' // 钻石蓝
  327. };
  328. return colors[level] || '#2a2fd6';
  329. },
  330. //详情页
  331. navToDetailPage(id) {
  332. uni.navigateTo({
  333. url: `/pages/product/detail?id=${id}`
  334. })
  335. },
  336. addCart(item) {
  337. const that = this
  338. that.$api.request('get', 'cart/app/addCartItem', {
  339. productId: item.id,
  340. num: 1
  341. }).then(res => {
  342. that.$api.msg('添加购物车成功')
  343. var cartNum = this.$store.state.cartNum + 1
  344. that.$store.commit('addCart', cartNum)
  345. uni.setTabBarBadge({
  346. index: 2,
  347. text: cartNum + ''
  348. })
  349. })
  350. },
  351. // 刷新推荐
  352. refreshRecommend() {
  353. this.currentPage++
  354. this.getRecommendList()
  355. },
  356. // 获取推荐商品
  357. getRecommendList() {
  358. this.$api.request('get', 'product/app/recommend', {
  359. page: this.currentPage,
  360. size: this.pageSize,
  361. storageId: this.$store.state.storageId
  362. }).then(res => {
  363. this.recommendList = res.rows || []
  364. }).catch(err => {
  365. console.log('获取推荐商品失败', err)
  366. })
  367. },
  368. deleteFootprint(item) {
  369. const that = this
  370. uni.showModal({
  371. title: '删除?',
  372. content: '您确定要删除此足迹吗?',
  373. success: (e) => {
  374. if (e.confirm) {
  375. that.$api.request('get', '/deleteFootprint', {
  376. footprintId: item.id
  377. }).then(res => {
  378. that.loadFootprint()
  379. })
  380. }
  381. }
  382. })
  383. },
  384. toLogin() {
  385. if (!this.hasLogin) {
  386. uni.navigateTo({
  387. url: '/pages/public/login'
  388. })
  389. }
  390. },
  391. logout() {
  392. const that = this
  393. uni.showModal({
  394. title: '询问',
  395. content: '您确定要退出吗?',
  396. cancelText: '取消',
  397. confirmText: '确定',
  398. success: (e) => {
  399. if (e.confirm) {
  400. // 清空用户数据
  401. that.nowMoney = 0
  402. that.integral = 0
  403. that.couponListSize = 0
  404. // 退出登录
  405. that.$store.commit('logout')
  406. that.$api.logout()
  407. // 清除本地存储
  408. uni.removeStorageSync("addresses")
  409. uni.removeStorageSync("userInfo")
  410. }
  411. }
  412. })
  413. },
  414. /**
  415. * 统一跳转接口,拦截未登录路由
  416. * navigator标签现在默认没有转场动画,所以用view
  417. */
  418. navTo(url) {
  419. if (!this.hasLogin) {
  420. url = '/pages/public/login';
  421. }
  422. uni.navigateTo({
  423. url
  424. })
  425. },
  426. /**
  427. * 会员卡下拉和回弹
  428. * 1.关闭bounce避免ios端下拉冲突
  429. * 2.由于touchmove事件的缺陷(以前做小程序就遇到,比如20跳到40,h5反而好很多),下拉的时候会有掉帧的感觉
  430. * transition设置0.1秒延迟,让css来过渡这段空窗期
  431. * 3.回弹效果可修改曲线值来调整效果,推荐一个好用的bezier生成工具 http://cubic-bezier.com/
  432. */
  433. coverTouchstart(e) {
  434. if (pageAtTop === false) {
  435. return;
  436. }
  437. this.coverTransition = 'transform .1s linear';
  438. startY = e.touches[0].clientY;
  439. },
  440. coverTouchmove(e) {
  441. moveY = e.touches[0].clientY;
  442. let moveDistance = moveY - startY;
  443. if (moveDistance < 0) {
  444. this.moving = false;
  445. return;
  446. }
  447. this.moving = true;
  448. if (moveDistance >= 80 && moveDistance < 100) {
  449. moveDistance = 80;
  450. }
  451. if (moveDistance > 0 && moveDistance <= 80) {
  452. this.coverTransform = `translateY(${moveDistance}px)`;
  453. }
  454. },
  455. coverTouchend() {
  456. if (this.moving === false) {
  457. return;
  458. }
  459. this.moving = false;
  460. this.coverTransition = 'transform 0.3s cubic-bezier(.21,1.93,.53,.64)';
  461. this.coverTransform = 'translateY(0px)';
  462. },
  463. //配送外区域选择区域
  464. chooseLocation() {
  465. uni.chooseLocation({
  466. success: (res1) => {
  467. console.log(res1)
  468. this.district = res1.name
  469. uni.showLoading({
  470. title: "加载中..."
  471. })
  472. this.$api.request('get', 'storage/position/getRecentlyStorage', {
  473. lng: res1.longitude,
  474. lat: res1.latitude
  475. }, failres => {
  476. uni.hideLoading()
  477. this.logining = false
  478. this.$api.msg(failres.msg)
  479. this.storage ? this.storage = false : this.storage = true
  480. }).then(res => {
  481. uni.hideLoading()
  482. console.log(res)
  483. this.$store.commit('setStorage', res.data.id)
  484. this.newTop = []
  485. this.cheapRecommend = []
  486. this.salesTop = []
  487. this.loadData(res.data.id)
  488. if (!res.data.id) {
  489. this.storage = false
  490. } else {
  491. this.storage ? this.storage = false : this.storage = true
  492. // this.loadRecommand('refresh')
  493. }
  494. })
  495. }
  496. });
  497. }
  498. }
  499. }
  500. </script>
  501. <style lang='scss'>
  502. page {
  503. background-color: #f1f1f1;;
  504. }
  505. .contact-btn {
  506. border: none;
  507. background-color: #FFFFFF;
  508. }
  509. .contact-btn::after {
  510. border: none;
  511. }
  512. .bg-user-gradual-green {
  513. background-repeat: no-repeat;
  514. background-size: 100%;
  515. color: #fff;
  516. height: 260*2rpx;
  517. width: 750rpx;
  518. }
  519. .shadow {
  520. box-shadow: 0 1rpx 6rpx rgba(0, 0, 0, 0.1);
  521. }
  522. %flex-center {
  523. display: flex;
  524. flex-direction: column;
  525. justify-content: center;
  526. align-items: center;
  527. }
  528. %section {
  529. display: flex;
  530. justify-content: space-around;
  531. align-content: center;
  532. background: #fff;
  533. border-radius: 10upx;
  534. }
  535. .user-section {
  536. height: 520upx;
  537. padding: 100upx 30upx 0;
  538. position: relative;
  539. .bg {
  540. position: absolute;
  541. left: 0;
  542. top: 0;
  543. width: 100%;
  544. height: 100%;
  545. filter: blur(1px);
  546. opacity: .7;
  547. }
  548. }
  549. .user-info-box {
  550. height: 180upx;
  551. display: flex;
  552. align-items: center;
  553. position: relative;
  554. z-index: 1;
  555. .portrait {
  556. width: 130upx;
  557. height: 130upx;
  558. border: 5upx solid #fff;
  559. border-radius: 50%;
  560. }
  561. .username {
  562. font-size: $font-lg + 6upx;
  563. color: $font-color-dark;
  564. margin-left: 20upx;
  565. }
  566. }
  567. .vip-card-box {
  568. display: flex;
  569. flex-direction: column;
  570. color: #f7d680;
  571. height: 240upx;
  572. background: linear-gradient(left, rgba(0, 0, 0, .7), rgba(0, 0, 0, .8));
  573. border-radius: 16upx 16upx 0 0;
  574. overflow: hidden;
  575. position: relative;
  576. padding: 20upx 24upx;
  577. .card-bg {
  578. position: absolute;
  579. top: 20upx;
  580. right: 0;
  581. width: 380upx;
  582. height: 260upx;
  583. }
  584. .b-btn {
  585. position: absolute;
  586. right: 20upx;
  587. top: 16upx;
  588. width: 132upx;
  589. height: 40upx;
  590. text-align: center;
  591. line-height: 40upx;
  592. font-size: 22upx;
  593. color: #36343c;
  594. border-radius: 20px;
  595. background: linear-gradient(left, #f9e6af, #ffd465);
  596. z-index: 1;
  597. }
  598. .tit {
  599. font-size: $font-base+2upx;
  600. color: #f7d680;
  601. margin-bottom: 28upx;
  602. .yticon {
  603. color: #f6e5a3;
  604. margin-right: 16upx;
  605. }
  606. }
  607. .e-b {
  608. font-size: $font-sm;
  609. color: #d8cba9;
  610. margin-top: 10upx;
  611. }
  612. }
  613. .cover-container {
  614. background: $page-color-base;
  615. margin-top: -150upx;
  616. padding: 0 30upx;
  617. position: relative;
  618. background: #f5f5f5;
  619. padding-bottom: 20upx;
  620. .arc {
  621. position: absolute;
  622. left: 0;
  623. top: -34upx;
  624. width: 100%;
  625. height: 36upx;
  626. }
  627. }
  628. .tj-sction {
  629. @extend %section;
  630. .tj-item {
  631. @extend %flex-center;
  632. flex-direction: column;
  633. height: 140upx;
  634. font-size: $font-sm;
  635. color: #75787d;
  636. }
  637. .num {
  638. font-size: $font-lg;
  639. color: $font-color-dark;
  640. margin-bottom: 8upx;
  641. }
  642. }
  643. .order-section {
  644. @extend %section;
  645. padding: 28upx 0;
  646. margin-top: 20upx;
  647. .order-item {
  648. @extend %flex-center;
  649. width: 120upx;
  650. height: 120upx;
  651. border-radius: 10upx;
  652. font-size: $font-sm;
  653. color: $base-color;
  654. }
  655. .yticon {
  656. font-size: 48upx;
  657. margin-bottom: 18upx;
  658. color: $base-color;
  659. }
  660. .icon-shouhoutuikuan {
  661. font-size: 44upx;
  662. }
  663. }
  664. .history-section {
  665. padding: 30upx 0 0;
  666. margin-top: 20upx;
  667. background: #fff;
  668. border-radius: 10upx;
  669. .sec-header {
  670. display: flex;
  671. align-items: center;
  672. font-size: $font-base;
  673. color: $font-color-dark;
  674. line-height: 40upx;
  675. margin-left: 30upx;
  676. .yticon {
  677. font-size: 44upx;
  678. color: #5eba8f;
  679. margin-right: 16upx;
  680. line-height: 40upx;
  681. }
  682. }
  683. .h-list {
  684. white-space: nowrap;
  685. padding: 30upx 30upx 0;
  686. image {
  687. display: inline-block;
  688. width: 160upx;
  689. height: 160upx;
  690. margin-right: 20upx;
  691. border-radius: 10upx;
  692. }
  693. }
  694. }
  695. </style>