user.vue 22 KB

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