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