Commit 05eede9b by 前端

Merge branch 'SAAS+V4.50' of http://192.168.3.233:8090/glsx/gl_tape into SAAS+V4.50

2 parents 5cb4aac9 10abb83d
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
<view class="coupon-list"> <view class="coupon-list">
<template v-for="item in list"> <template v-for="item in list">
<view :class="['coupon-bg', `${TYPE_LIST[item.couponState]}-bg`]"> <view :class="['coupon-bg', `${TYPE_LIST[item.couponState]}-bg`]">
<img v-if="item.couponState == 2" class="claimed-left" src="../../../../assets/images/point/claimed-left.png" alt="">
<view class="coupon-img"> <view class="coupon-img">
<img class="img" :src="item.couUrl" alt=""> <img class="img" :src="item.couUrl" alt="">
</view> </view>
...@@ -260,7 +261,10 @@ export default { ...@@ -260,7 +261,10 @@ export default {
1: 'unclaimed', // 未领取 1: 'unclaimed', // 未领取
2: 'claimed', // 已领取 2: 'claimed', // 已领取
3: 'expired' // 已过期 3: 'expired' // 已过期
} },
total: 0,
pageNum: 1,
pageSize: 8
} }
}, },
props: { props: {
...@@ -278,7 +282,6 @@ export default { ...@@ -278,7 +282,6 @@ export default {
init() { init() {
console.log('init'); console.log('init');
this.getGrantRecord() this.getGrantRecord()
this.statisticsCount()
}, },
/** 接口调用 uni.$api.pointApi*/ /** 接口调用 uni.$api.pointApi*/
// 优惠券个数 // 优惠券个数
...@@ -295,17 +298,25 @@ export default { ...@@ -295,17 +298,25 @@ export default {
}, },
getGrantRecord(couponState) { getGrantRecord(couponState) {
console.log('查询优惠券列表'); console.log('查询优惠券列表');
const { pageNum, pageSize } = this
const params = { const params = {
staffPhone: uni.$storage.get('userInfo').phone staffPhone: uni.$storage.get('userInfo').phone,
pageNum,
pageSize
} }
if (couponState) params.couponState = couponState if (couponState) params.couponState = couponState
console.log(params, 'chaxun'); console.log(params, 'chaxun');
uni.$api.pointApi.getGrantRecord(params).then(res => { uni.$api.pointApi.getGrantRecord(params).then(res => {
console.log(res, '========================'); console.log(res, '========================', pageNum);
if(pageNum == 1) {
this.list = res.list this.list = res.list
} else {
this.list = this.list.concat(res.list)
}
this.total = res.total
this.nothing = res.length ? true : false this.nothing = res.length ? true : false
}) })
this.statisticsCount()
}, },
changeType(index, name) { changeType(index, name) {
console.log(index, name); console.log(index, name);
...@@ -313,6 +324,7 @@ export default { ...@@ -313,6 +324,7 @@ export default {
this.direction = '' this.direction = ''
this.nothing = false this.nothing = false
this.scrollTop = 1 this.scrollTop = 1
this.pageNum = 1
setTimeout(() => { setTimeout(() => {
this.scrollTop = 0 this.scrollTop = 0
}, 100); }, 100);
...@@ -374,8 +386,10 @@ export default { ...@@ -374,8 +386,10 @@ export default {
console.log(res); console.log(res);
this.couponDetailInfo = res this.couponDetailInfo = res
this.show = false this.show = false
this.showCouponPon = true
this.pageNum = 1
this.getGrantRecord(this.firstIndex)
}) })
// this.showCouponPon = true
}, },
// 复制 // 复制
copyText() { copyText() {
...@@ -463,7 +477,7 @@ export default { ...@@ -463,7 +477,7 @@ export default {
border-radius: toRpx(48); border-radius: toRpx(48);
margin-top: toRpx(48); margin-top: toRpx(48);
height: 72.39vh; height: 72.39vh;
margin-right: toRpx(66); // margin-right: toRpx(66);
box-shadow: inset 0 0 toRpx(16) 0 #ffffff; box-shadow: inset 0 0 toRpx(16) 0 #ffffff;
border: toRpx(2) solid #fff; border: toRpx(2) solid #fff;
box-sizing: border-box; box-sizing: border-box;
...@@ -549,7 +563,7 @@ export default { ...@@ -549,7 +563,7 @@ export default {
.coupon-list { .coupon-list {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: toRpx(48) toRpx(60); gap: toRpx(48) toRpx(80);
padding-left: toRpx(80); padding-left: toRpx(80);
} }
...@@ -566,10 +580,17 @@ export default { ...@@ -566,10 +580,17 @@ export default {
} }
.coupon-bg { .coupon-bg {
position: relative;
width: toRpx(452); width: toRpx(452);
height: toRpx(536); height: toRpx(536);
background-size: 100%; background-size: 100%;
.claimed-left {
width: toRpx(126);
height: toRpx(40);
position: absolute;
left: 0;
top: 0;
}
.coupon-img { .coupon-img {
display: flex; display: flex;
...@@ -1076,7 +1097,8 @@ export default { ...@@ -1076,7 +1097,8 @@ export default {
display: flex; display: flex;
margin: toRpx(80) 0; margin: toRpx(80) 0;
justify-content: space-evenly; justify-content: space-evenly;
padding: 0 toRpx(60); // padding: 0 toRpx(60);
padding-left: toRpx(168);
align-items: center; align-items: center;
.qr-img { .qr-img {
width: toRpx(320); width: toRpx(320);
...@@ -1088,10 +1110,13 @@ export default { ...@@ -1088,10 +1110,13 @@ export default {
height: toRpx(288); height: toRpx(288);
border-right: toRpx(6) dashed #E4E7EB; border-right: toRpx(6) dashed #E4E7EB;
box-sizing: border-box; box-sizing: border-box;
margin-left: toRpx(60);
margin-right: toRpx(-50);
} }
.qr-2-img { .qr-2-img {
width: toRpx(96); height: toRpx(96);
height: toRpx(320); width: toRpx(320);
rotate: 90deg;
} }
} }
.redeem-code { .redeem-code {
......
...@@ -45,11 +45,11 @@ ...@@ -45,11 +45,11 @@
<view class="sprite-icon icon-certificate"></view> <view class="sprite-icon icon-certificate"></view>
<view class="card-title">我的兑换券</view> <view class="card-title">我的兑换券</view>
<!-- <view class="card-wait">敬请期待</view> --> <!-- <view class="card-wait">敬请期待</view> -->
<view class="card-number">{{ couponCount }}</view> <view class="card-number">{{ couponCount || 0 }}</view>
<view class="sprite-icon icon-coupon-arrow card-arrow"></view> <view class="sprite-icon icon-coupon-arrow card-arrow"></view>
</view> </view>
<view class="card-content"> <view class="card-content">
<template v-if="couponCount != 0"> <template v-if="couponCount">
<view class="coupon-card"> <view class="coupon-card">
<view v-for="item in couponList" :key="item.id" class="card-bg" :class="item.isclaimed ? 'claimed-bg' : 'unclaimed-bg'"> <view v-for="item in couponList" :key="item.id" class="card-bg" :class="item.isclaimed ? 'claimed-bg' : 'unclaimed-bg'">
<view class="coupon-img"></view> <view class="coupon-img"></view>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!