|
| xqd
@@ -34,7 +34,7 @@
|
|
|
</view>
|
|
|
|
|
|
|
|
|
- <view style="margin-bottom: 60rpx;margin-top: 24rpx;">
|
|
|
+ <view style="padding-bottom: 60rpx;margin-top: 24rpx; background-color: #fff; ">
|
|
|
<!-- 实物奖品 -->
|
|
|
<view class="prizeList" :style="{'--height':ListHeight+'rpx'}"
|
|
|
v-if="isActive == 0 && PhysicalPrizes.length > 0 ">
|
|
| xqd
@@ -44,7 +44,7 @@
|
|
|
<view class="alreadyBtn" v-if="item.status == 2">
|
|
|
<text>已兑换</text>
|
|
|
</view>
|
|
|
- <view class="instantBtn" v-if="item.status == 1" @click="goExchangePhy(item.id)">
|
|
|
+ <view class="instantBtn" v-if="item.status == 1" @click="goExchangePhy(item.id,item.product_id)">
|
|
|
<text>立即兑换</text>
|
|
|
</view>
|
|
|
<view class="alreadyBtn" v-if="item.status == 3">
|
|
| xqd
@@ -59,7 +59,7 @@
|
|
|
<view class="ListItem" v-for="(item,index) in VirtualPrizes" :key="index">
|
|
|
<view class="title"><text>{{item.name}}</text></view>
|
|
|
<view class='data'><text>{{item.exchange_start_time}}--{{item.exchange_end_time}}</text></view>
|
|
|
- <view class="instantBtn" v-if="item.status == 1" @click="goExchangeVir(item.id)">
|
|
|
+ <view class="instantBtn" v-if="item.status == 1" @click="goExchangeVir(item.id,item.product_id)">
|
|
|
<text>立即兑换</text>
|
|
|
</view>
|
|
|
<view class="alreadyBtn" v-if="item.status == 2">
|
|
| xqd
@@ -76,33 +76,35 @@
|
|
|
</view>
|
|
|
|
|
|
<!-- 中奖记录 -->
|
|
|
- <view class="prizeList" :style="{'--height':ListHeight+'rpx'}"
|
|
|
+ <view class="prizeList" :style="{'--height':ListHeight+'rpx'}" style="padding-bottom: 40rpx;"
|
|
|
v-if="isActive == 2 && prizeRecord.length > 0 ">
|
|
|
<view class="ListItem" v-for="(item,index) in prizeRecord" :key="index">
|
|
|
<view style="display: flex; justify-content: space-between;">
|
|
|
- <view class="title"><text>{{item.name}}</text> </view>
|
|
|
- <view class='data' style="flex:none;"><text>{{item.created_at}}</text></view>
|
|
|
+ <view class="title"><text>{{item.name || '积分奖品'}}</text> </view>
|
|
|
</view>
|
|
|
<view class="content"><text>{{item.remark||'无'}}</text></view>
|
|
|
+ <view class='data'>
|
|
|
+ <text>{{item.created_at}}</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
<!-- 已经到底啦 -->
|
|
|
- <view class="home-bottom" style="margin-top: 88rpx;padding-bottom: 60rpx;" v-if="isActive == 0 && PhysicalPrizes.length > 0 " >
|
|
|
- <uni-load-more :status="status" color="#CCCCCC"
|
|
|
- :content-text="contentText" />
|
|
|
+ <view class="home-bottom" style="margin-top: 88rpx;padding-bottom: 60rpx;"
|
|
|
+ v-if="isActive == 0 && PhysicalPrizes.length > 0 ">
|
|
|
+ <uni-load-more :status="status" color="#CCCCCC" :content-text="contentText" />
|
|
|
</view>
|
|
|
-
|
|
|
- <view class="home-bottom" style="margin-top: 88rpx;padding-bottom: 60rpx;" v-if="isActive == 1 && VirtualPrizes.length > 0 " >
|
|
|
- <uni-load-more :status="status" color="#CCCCCC"
|
|
|
- :content-text="contentText" />
|
|
|
+
|
|
|
+ <view class="home-bottom" style="margin-top: 88rpx;padding-bottom: 60rpx;"
|
|
|
+ v-if="isActive == 1 && VirtualPrizes.length > 0 ">
|
|
|
+ <uni-load-more :status="status" color="#CCCCCC" :content-text="contentText" />
|
|
|
</view>
|
|
|
- <view class="home-bottom" style="margin-top: 88rpx;padding-bottom: 60rpx;" v-if="isActive == 2 && prizeRecord.length > 0 " >
|
|
|
- <uni-load-more :status="status" color="#CCCCCC"
|
|
|
- :content-text="contentText" />
|
|
|
+ <view class="home-bottom" style="margin-top: 88rpx;padding-bottom: 60rpx;"
|
|
|
+ v-if="isActive == 2 && prizeRecord.length > 0 ">
|
|
|
+ <uni-load-more :status="status" color="#CCCCCC" :content-text="contentText" />
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
| xqd
@@ -154,11 +156,11 @@
|
|
|
this.getPrizeList(1)
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
onUnload() {
|
|
|
uni.$emit('refreshOrderNum')
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
onReachBottom() {
|
|
|
// 触底的时候请求数据,即为上拉加载更多
|
|
|
var allTotal = this.page * this.pagesize
|
|
| xqd
@@ -203,8 +205,8 @@
|
|
|
console.log('已加载全部数据')
|
|
|
this.status = "noMore"
|
|
|
}
|
|
|
- }else if(this.isActive ==0) {
|
|
|
- console.log(allTotal,'实物');
|
|
|
+ } else if (this.isActive == 0) {
|
|
|
+ console.log(allTotal, '实物');
|
|
|
if (allTotal < this.totalElementsPhy) {
|
|
|
//this.totalElements为请求数据的总条数。只要现有条数小于总条数就就执行一下代码
|
|
|
this.allListItem = false;
|
|
| xqd
@@ -224,7 +226,7 @@
|
|
|
console.log('已加载全部数据')
|
|
|
this.status = "noMore"
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
| xqd
@@ -243,7 +245,7 @@
|
|
|
this.VirtualPrizes = res.data.data
|
|
|
this.totalElementsVir = res.data.total
|
|
|
this.pagesize = res.data.per_page
|
|
|
- console.log(this.totalElementsVir,'虚拟');
|
|
|
+ console.log(this.totalElementsVir, '虚拟');
|
|
|
}
|
|
|
})
|
|
|
},
|
|
| xqd
@@ -265,7 +267,7 @@
|
|
|
if (index <= 1) {
|
|
|
this.page = 1
|
|
|
this.isActive = index
|
|
|
- console.log(this.isActive,'------->this.isActive');
|
|
|
+ console.log(this.isActive, '------->this.isActive');
|
|
|
this.getPrizeList(index)
|
|
|
} else {
|
|
|
this.page = 1
|
|
| xqd
@@ -274,15 +276,15 @@
|
|
|
}
|
|
|
},
|
|
|
// 实物立即兑换
|
|
|
- goExchangePhy(id) {
|
|
|
+ goExchangePhy(id, product_id) {
|
|
|
uni.navigateTo({
|
|
|
- url: `/pages/my/prize/exchangePrize?id=${id}&isPhy=1`
|
|
|
+ url: `/pages/my/prize/exchangePrize?id=${id}&isPhy=1&product_id=${product_id}`
|
|
|
})
|
|
|
},
|
|
|
// 虚拟立即兑换
|
|
|
- goExchangeVir(id) {
|
|
|
+ goExchangeVir(id, product_id) {
|
|
|
uni.navigateTo({
|
|
|
- url: `/pages/my/prize/exchangePrize?id=${id}&isPhy=2`
|
|
|
+ url: `/pages/my/prize/exchangePrize?id=${id}&isPhy=2&product_id=${product_id}`
|
|
|
})
|
|
|
},
|
|
|
},
|
|
| xqd
@@ -389,15 +391,15 @@
|
|
|
background: $bgColor;
|
|
|
box-shadow: 0px 4rpx 24rpx -10rpx rgba(101, 95, 90, 0.3);
|
|
|
border-radius: 12rpx;
|
|
|
- padding: 0rpx 28rpx 0 32rpx;
|
|
|
+ padding: 0rpx 30rpx 0rpx;
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
.ListItem {
|
|
|
width: 690rpx;
|
|
|
- height: 160rpx;
|
|
|
border-bottom: #F0F0F0 solid 0.5rpx;
|
|
|
position: relative;
|
|
|
padding-top: 35rpx;
|
|
|
+ padding-bottom: 35rpx;
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
.title {
|