| xqd
@@ -10,14 +10,14 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
<view class="msg-null" v-if="isActive == 0 && PhysicalPrizes.length == 0 ">
|
|
|
<image src="https://t9.9026.com/imgs/dataNull.png" style="width: 394rpx;height: 396rpx;" mode=""></image>
|
|
|
<view class="msg-null-text">
|
|
|
<text>暂无数据</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
<view class="msg-null" v-if="isActive == 1 && VirtualPrizes.length == 0 ">
|
|
|
<image src="https://t9.9026.com/imgs/dataNull.png" style="width: 394rpx;height: 396rpx;" mode=""></image>
|
|
|
<view class="msg-null-text">
|
| xqd
@@ -30,11 +30,12 @@
|
|
|
<text>暂无数据</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
|
|
|
- <view style="margin-bottom: 60rpx;" >
|
|
|
+
|
|
|
+ <view style="margin-bottom: 60rpx;">
|
|
|
<!-- 实物奖品 -->
|
|
|
- <view class="prizeList" :style="{'--height':ListHeight+'rpx'}" v-if="isActive == 0 && PhysicalPrizes.length > 0 ">
|
|
|
+ <view class="prizeList" :style="{'--height':ListHeight+'rpx'}"
|
|
|
+ v-if="isActive == 0 && PhysicalPrizes.length > 0 ">
|
|
|
<view class="ListItem" v-for="(item,index) in PhysicalPrizes" :key="index">
|
|
|
<view class="title"><text>{{item.name}}</text></view>
|
|
|
<view class='data'><text>{{item.exchange_start_time}}--{{item.exchange_end_time}}</text></view>
|
| xqd
@@ -44,14 +45,15 @@
|
|
|
<view class="instantBtn" v-if="item.status == 1" @click="goExchangePhy(item.id)">
|
|
|
<text>立即兑换</text>
|
|
|
</view>
|
|
|
- <view class="alreadyBtn" v-if="item.status == 3" >
|
|
|
+ <view class="alreadyBtn" v-if="item.status == 3">
|
|
|
<text>已过期</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
<!-- 线下奖品 -->
|
|
|
- <view class="prizeList" :style="{'--height':ListHeight+'rpx'}" v-if="isActive == 1 && VirtualPrizes.length > 0 ">
|
|
|
+ <view class="prizeList" :style="{'--height':ListHeight+'rpx'}"
|
|
|
+ v-if="isActive == 1 && VirtualPrizes.length > 0 ">
|
|
|
<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>
|
| xqd
@@ -61,19 +63,20 @@
|
|
|
<view class="alreadyBtn" v-if="item.status == 2">
|
|
|
<text>已兑换</text>
|
|
|
</view>
|
|
|
- <view class="alreadyBtn" v-if="item.status == 3" >
|
|
|
+ <view class="alreadyBtn" v-if="item.status == 3">
|
|
|
<text>已过期</text>
|
|
|
</view>
|
|
|
- <view class="alreadyBtn" v-if="item.status == 4" >
|
|
|
+ <view class="alreadyBtn" v-if="item.status == 4">
|
|
|
<text>未开始</text>
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
<!-- 中奖记录 -->
|
|
|
- <view class="prizeList" :style="{'--height':ListHeight+'rpx'}" v-if="isActive == 2 && prizeRecord.length > 0 ">
|
|
|
- <view class="ListItem" v-for="(item,index) in prizeRecord" :key="index">
|
|
|
+ <view class="prizeList" :style="{'--height':ListHeight+'rpx'}"
|
|
|
+ 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'><text>{{item.created_at}}</text></view>
|
| xqd
@@ -82,11 +85,14 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
<!-- 已经到底啦 -->
|
|
|
- <uni-load-more v-if="isActive == 0 && PhysicalPrizes.length > 0 " :status="status" color="#CCCCCC" :content-text="contentText" />
|
|
|
- <uni-load-more v-if="isActive == 1 && VirtualPrizes.length > 0 " :status="status" color="#CCCCCC" :content-text="contentText" />
|
|
|
- <uni-load-more v-if="isActive == 2 && prizeRecord.length > 0 " :status="status" color="#CCCCCC" :content-text="contentText" />
|
|
|
+ <uni-load-more v-if="isActive == 0 && PhysicalPrizes.length > 0 " :status="status" color="#CCCCCC"
|
|
|
+ :content-text="contentText" />
|
|
|
+ <uni-load-more v-if="isActive == 1 && VirtualPrizes.length > 0 " :status="status" color="#CCCCCC"
|
|
|
+ :content-text="contentText" />
|
|
|
+ <uni-load-more v-if="isActive == 2 && prizeRecord.length > 0 " :status="status" color="#CCCCCC"
|
|
|
+ :content-text="contentText" />
|
|
|
|
|
|
</view>
|
|
|
</template>
|
| xqd
@@ -108,44 +114,67 @@
|
|
|
contentnomore: '—— 已经到底啦 ——'
|
|
|
},
|
|
|
// 实物奖品列表
|
|
|
- PhysicalPrizes:[],
|
|
|
+ PhysicalPrizes: [],
|
|
|
// 虚拟奖品列表
|
|
|
- VirtualPrizes:[],
|
|
|
+ VirtualPrizes: [],
|
|
|
// 中奖记录
|
|
|
- prizeRecord:[]
|
|
|
+ prizeRecord: []
|
|
|
}
|
|
|
},
|
|
|
- onLoad() {
|
|
|
- // 中奖记录
|
|
|
- this.getPrizeRecord()
|
|
|
- //实物奖品
|
|
|
- this.getPrizeList(0)
|
|
|
- //虚拟奖品
|
|
|
- this.getPrizeList(1)
|
|
|
+ onLoad(o) {
|
|
|
+ if (o.product_type == 2) {
|
|
|
+ //分段器标题切换
|
|
|
+ this.checked(o.product_type - 1)
|
|
|
+ // 中奖记录
|
|
|
+ this.getPrizeRecord()
|
|
|
+ //实物奖品
|
|
|
+ this.getPrizeList(0)
|
|
|
+ //虚拟奖品
|
|
|
+ this.getPrizeList(1)
|
|
|
+ } else {
|
|
|
+ // 中奖记录
|
|
|
+ this.getPrizeRecord()
|
|
|
+ //实物奖品
|
|
|
+ this.getPrizeList(0)
|
|
|
+ //虚拟奖品
|
|
|
+ this.getPrizeList(1)
|
|
|
+ }
|
|
|
+
|
|
|
+ uni.$on('refreshPrizeData',()=>{
|
|
|
+ // 中奖记录
|
|
|
+ this.getPrizeRecord()
|
|
|
+ //实物奖品
|
|
|
+ this.getPrizeList(0)
|
|
|
+ //虚拟奖品
|
|
|
+ this.getPrizeList(1)
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
// 获取奖品列表
|
|
|
- getPrizeList(type){
|
|
|
+ getPrizeList(type) {
|
|
|
this.$api.lottery.getDrawRecord({
|
|
|
- is_virtual:type,
|
|
|
- page:0
|
|
|
- }).then(res=>{
|
|
|
+ is_virtual: type,
|
|
|
+ page: 0
|
|
|
+ }).then(res => {
|
|
|
//实物奖品
|
|
|
- if(type == 0){
|
|
|
+ if (type == 0) {
|
|
|
this.PhysicalPrizes = res.data.data
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
this.VirtualPrizes = res.data.data
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
// 获取中奖记录
|
|
|
- getPrizeRecord(){
|
|
|
+ getPrizeRecord() {
|
|
|
this.$api.lottery.getDrawRecord({
|
|
|
- page:0
|
|
|
- }).then(res=>{
|
|
|
- console.log(res,"中奖记录")
|
|
|
- if(res.code==0){
|
|
|
- this.prizeRecord=res.data.data
|
|
|
+ page: 0
|
|
|
+ }).then(res => {
|
|
|
+ console.log(res, "中奖记录")
|
|
|
+ if (res.code == 0) {
|
|
|
+ this.prizeRecord = res.data.data
|
|
|
}
|
|
|
})
|
|
|
},
|
| xqd
@@ -184,14 +213,15 @@
|
|
|
height: 100%;
|
|
|
background: $pageColor;
|
|
|
}
|
|
|
-
|
|
|
- .msg-null{
|
|
|
+
|
|
|
+ .msg-null {
|
|
|
padding-top: 60rpx;
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
- .msg-null-text{
|
|
|
+
|
|
|
+ .msg-null-text {
|
|
|
margin-top: 40rpx;
|
|
|
font-size: 28rpx;
|
|
|
color: #333;
|
| xqd
@@ -205,8 +235,9 @@
|
|
|
box-shadow: 0px 4rpx 8rpx 0rpx rgba(0, 0, 0, 0.04);
|
|
|
border-radius: 0rpx 0rpx 16rpx 16rpx;
|
|
|
margin-bottom: 24rpx;
|
|
|
- padding:0rpx 30rpx;
|
|
|
+ padding: 0rpx 30rpx;
|
|
|
box-sizing: border-box;
|
|
|
+
|
|
|
//菜单切换
|
|
|
.tab_nav {
|
|
|
width: 690rpx;
|
| xqd
@@ -215,6 +246,7 @@
|
|
|
align-items: center;
|
|
|
font-family: PingFang-SC-Heavy, PingFang-SC;
|
|
|
}
|
|
|
+
|
|
|
.tab_nav .navTitle {
|
|
|
margin-top: 20rpx;
|
|
|
width: 128rpx;
|
| xqd
@@ -224,6 +256,7 @@
|
|
|
color: #666;
|
|
|
position: relative;
|
|
|
}
|
|
|
+
|
|
|
.active {
|
|
|
color: #D9A94D;
|
|
|
font-weight: bold;
|