|
@@ -21,7 +21,7 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view style="position: absolute;right: 40rpx;">
|
|
|
|
|
|
+ <view class="uradio">
|
|
<u-radio :customStyle="{ marginBottom: '8px' }" :name="item.id" activeColor="#E96737" size="24" @change="exclusive(index)">
|
|
<u-radio :customStyle="{ marginBottom: '8px' }" :name="item.id" activeColor="#E96737" size="24" @change="exclusive(index)">
|
|
</u-radio>
|
|
</u-radio>
|
|
</view>
|
|
</view>
|
|
@@ -31,7 +31,11 @@
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<view class="flex empty" v-if="!list.length">
|
|
<view class="flex empty" v-if="!list.length">
|
|
- <u-empty text="数据为空" mode="order" />
|
|
|
|
|
|
+ <view class="center">
|
|
|
|
+ <image class="center-img" src="https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/nodata_1.png" mode=""></image>
|
|
|
|
+ <view class="center-font">暂无优惠券</view>
|
|
|
|
+ </view>
|
|
|
|
+ <!-- <u-empty text="数据为空" mode="order" /> -->
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<view class="footer-fixed">
|
|
<view class="footer-fixed">
|
|
@@ -87,10 +91,11 @@
|
|
},
|
|
},
|
|
|
|
|
|
getList() {
|
|
getList() {
|
|
|
|
+ let _this = this
|
|
uni.showLoading({
|
|
uni.showLoading({
|
|
title: '加载中'
|
|
title: '加载中'
|
|
});
|
|
});
|
|
- $http.post('/api/v1/mp/user/ticket/order/coupon/list', {}).then(
|
|
|
|
|
|
+ $http.post(`/api/v1/mp/user/ticket/order/coupon/list?pageNum=${_this.pageNum}&pageSize=20`, {}).then(
|
|
res => {
|
|
res => {
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|
|
if (res.code == 0) {
|
|
if (res.code == 0) {
|
|
@@ -99,10 +104,11 @@
|
|
let useAreaDesc = JSON.parse(item.useArea)
|
|
let useAreaDesc = JSON.parse(item.useArea)
|
|
item.useAreaDesc = useAreaDesc.desc
|
|
item.useAreaDesc = useAreaDesc.desc
|
|
})
|
|
})
|
|
- this.list = res.data
|
|
|
|
- for (var i = 0; i < this.list.length; i++) {
|
|
|
|
- if(this.list[i].id == this.couponId){
|
|
|
|
- this.isActive = i
|
|
|
|
|
|
+ _this.list = res.data
|
|
|
|
+ _this.total = res.total
|
|
|
|
+ for (var i = 0; i < _this.list.length; i++) {
|
|
|
|
+ if(_this.list[i].id == _this.couponId){
|
|
|
|
+ _this.isActive = i
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -159,14 +165,27 @@
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ onReachBottom() {
|
|
|
|
+ // 判断是否有数据
|
|
|
|
+ if (this.total > this.pageNum * 20) {
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ ++this.pageNum
|
|
|
|
+ this.getList()
|
|
|
|
+ }, 500)
|
|
|
|
+ } else {
|
|
|
|
+ uni.$u.toast('已经到底了')
|
|
|
|
+ }
|
|
|
|
+ },
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
.coupon {
|
|
.coupon {
|
|
|
|
+
|
|
&-title {
|
|
&-title {
|
|
position: fixed;
|
|
position: fixed;
|
|
|
|
+ z-index: 10;
|
|
width: 100%;
|
|
width: 100%;
|
|
padding: 24rpx 32rpx;
|
|
padding: 24rpx 32rpx;
|
|
background-color: #FFFFFF;
|
|
background-color: #FFFFFF;
|
|
@@ -221,6 +240,7 @@
|
|
.price {
|
|
.price {
|
|
position: absolute;
|
|
position: absolute;
|
|
color: #fff;
|
|
color: #fff;
|
|
|
|
+ z-index: 0;
|
|
|
|
|
|
text:first-child {
|
|
text:first-child {
|
|
line-height: 150rpx;
|
|
line-height: 150rpx;
|
|
@@ -235,6 +255,9 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ .uradio {
|
|
|
|
+ position: absolute;right: 40rpx;
|
|
|
|
+ }
|
|
.circle {
|
|
.circle {
|
|
width: 40rpx;
|
|
width: 40rpx;
|
|
height: 40rpx;
|
|
height: 40rpx;
|
|
@@ -254,6 +277,22 @@
|
|
|
|
|
|
.empty {
|
|
.empty {
|
|
height: 60vh;
|
|
height: 60vh;
|
|
|
|
+
|
|
|
|
+ .center {
|
|
|
|
+ text-align: center;
|
|
|
|
+
|
|
|
|
+ &-img {
|
|
|
|
+ width: 228rpx;
|
|
|
|
+ height: 320rpx;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ &-font {
|
|
|
|
+ font-size: 30rpx;
|
|
|
|
+ font-weight: 400;
|
|
|
|
+ color: #999999;
|
|
|
|
+ margin-bottom: 250rpx;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
.footer-fixed {
|
|
.footer-fixed {
|
|
@@ -272,14 +311,14 @@
|
|
padding: 20rpx 0;
|
|
padding: 20rpx 0;
|
|
|
|
|
|
/deep/ button {
|
|
/deep/ button {
|
|
- width: 640rpx;
|
|
|
|
- height: 90rpx;
|
|
|
|
- line-height: 90rpx;
|
|
|
|
|
|
+ width: 441rpx;
|
|
|
|
+ height: 88rpx;
|
|
|
|
+ line-height: 88rpx;
|
|
font-size: 36rpx;
|
|
font-size: 36rpx;
|
|
color: #fff;
|
|
color: #fff;
|
|
- background-color: $uni-bg-color;
|
|
|
|
|
|
+ background-color: #F9822C;
|
|
border: none;
|
|
border: none;
|
|
- border-radius: 20rpx;
|
|
|
|
|
|
+ border-radius: 44rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|