|
@@ -130,6 +130,13 @@
|
|
|
margin-bottom: 0.08rem;
|
|
|
font-family: PingFangSC-Regular, PingFang SC;
|
|
|
color: #272624;
|
|
|
+ width: 2.6rem;
|
|
|
+ display: block;
|
|
|
+ overflow: hidden;
|
|
|
+ word-break: keep-all;
|
|
|
+ white-space: nowrap;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
.list-nav .user .text p+p {
|
|
@@ -276,23 +283,23 @@
|
|
|
<div class="img-box">活动奖励</div>
|
|
|
</div>
|
|
|
<div class="outer-box" v-if='rewardList&&rewardList.length>0'>
|
|
|
- <van-list v-model="loading" :finished-text="finishedText"
|
|
|
- :finished="finished" :immediate-check=false @load="onLoad">
|
|
|
- <div class="list-nav" v-for="(item,index) in rewardList" :key="index">
|
|
|
- <div class="user">
|
|
|
- <img :src="standarImg(item.headImgUrl)" class="tou" :onerror="defaultImg" alt="">
|
|
|
- <div class="text">
|
|
|
- <p>{{item.surfaceName}}</p>
|
|
|
- <p>{{item.createTime}}</p>
|
|
|
+ <van-list v-model="loading" :finished-text="finishedText" :finished="finished"
|
|
|
+ :immediate-check=false @load="onLoad">
|
|
|
+ <div class="list-nav" v-for="(item,index) in rewardList" :key="index">
|
|
|
+ <div class="user">
|
|
|
+ <img :src="standarImg(item.headImgUrl)" class="tou" :onerror="defaultImg" alt="">
|
|
|
+ <div class="text">
|
|
|
+ <p>{{item.surfaceName}}</p>
|
|
|
+ <p>{{item.createTime}}</p>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="right-nav">
|
|
|
- <p>星动天卡</p>
|
|
|
- <p class="btn" @click='goGetReward' v-if='item.receiveStatus==0'>领取</p>
|
|
|
- <p class="btn isdisabled" v-if='item.receiveStatus==1'>已领取</p>
|
|
|
+ <div class="right-nav">
|
|
|
+ <p>星动天卡</p>
|
|
|
+ <p class="btn" @click='goGetReward(item.id)' v-if='item.receiveStatus==0'>领取</p>
|
|
|
+ <p class="btn isdisabled" v-if='item.receiveStatus==1'>已领取</p>
|
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
</van-list>
|
|
|
|
|
|
</div>
|
|
@@ -333,12 +340,12 @@
|
|
|
el: '#app',
|
|
|
data: {
|
|
|
isshow: false,
|
|
|
- id: GetRequest().id ? GetRequest().id : 404,
|
|
|
+ token: GetRequest().token ? GetRequest().token:'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyYW5kb20iOiI1MTc5OSIsImNsaWVudCI6IjAiLCJleHAiOjE2NDAyMzY0NjQsInVzZXJuYW1lIjoiYWRtaW4ifQ.M8qTMKfMQjKjQ1uAu1M-ty8HRRmWJgq7ED1Kbhu4p4Q',
|
|
|
topic: {},
|
|
|
rewardList: [],
|
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
|
- pageSize: 5
|
|
|
+ pageSize: 10
|
|
|
},
|
|
|
isDisable: false,
|
|
|
finished: false,
|
|
@@ -350,8 +357,7 @@
|
|
|
defaultImg: 'this.src="' + "../static/offImg/tou.png" + '"',
|
|
|
actStatus: 0, //0活动状态 1开始
|
|
|
marqueeList: [],
|
|
|
- token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyYW5kb20iOiIxNjc1OCIsImNsaWVudCI6IjAiLCJleHAiOjE2NDAyMTM3MDIsInVzZXJuYW1lIjoiYWRtaW4ifQ.3iGCT3FN0WByQHYebuiB4vSAnuuuU16znr8h0H-6jZE',
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
created() {
|
|
|
this.getAwardPage(); //获取奖励列表
|
|
@@ -377,7 +383,7 @@
|
|
|
if (isAndroid) {
|
|
|
window.native.share(title, content, gotoUrl, shareImg)
|
|
|
} else if (isIOS) {
|
|
|
-
|
|
|
+ window.webkit.messageHandlers.share.postMessage(type);
|
|
|
}
|
|
|
},
|
|
|
standarImg(id) {
|
|
@@ -390,13 +396,13 @@
|
|
|
forbidClick: true,
|
|
|
loadingType: 'spinner',
|
|
|
});
|
|
|
- getActDetail(this.token).then(res => {
|
|
|
- this.$toast.clear();
|
|
|
+ getActDetail().then(res => {
|
|
|
+ this.$toast.clear();
|
|
|
if (res.status === 0) {
|
|
|
this.actStatus = res.data.actStatus;
|
|
|
this.shareInfo = res.data;
|
|
|
} else {
|
|
|
- this.$toast(res.msg);
|
|
|
+ this.$toast(res.msg);
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -407,7 +413,8 @@
|
|
|
let infolist = res.data.list;
|
|
|
if (infolist) {
|
|
|
this.rewardList = this.rewardList.concat(infolist);
|
|
|
- if (infolist.length < this.queryParams.pageSize) { //判断接口返回数据量小于请求数据量,则表示此为最后一页
|
|
|
+ if (infolist.length < this.queryParams
|
|
|
+ .pageSize) { //判断接口返回数据量小于请求数据量,则表示此为最后一页
|
|
|
this.finished = true;
|
|
|
}
|
|
|
} else {
|
|
@@ -420,15 +427,15 @@
|
|
|
this.queryParams.pageNum -= 1
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
})
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
//滚动加载时触发,list组件定义的方法
|
|
|
onLoad() {
|
|
|
let times = setTimeout(() => {
|
|
|
this.queryParams.pageNum += 1 //每请求一次,页面数+1
|
|
|
- this.getAwardPage();
|
|
|
+ this.getAwardPage();
|
|
|
clearTimeout(times)
|
|
|
}, 500)
|
|
|
},
|
|
@@ -441,13 +448,25 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- goGetReward() {
|
|
|
- if (isAndroid) {
|
|
|
- window.native.activatePhone(1, 0)
|
|
|
- } else if (isIOS) {
|
|
|
+ goGetReward(id) {
|
|
|
+ getCheck(this.token).then(res => {
|
|
|
+ if (res.status === 0) {
|
|
|
+ if (isAndroid) {
|
|
|
+ window.native.activatePhone(1, id)
|
|
|
+ } else if (isIOS) {
|
|
|
+ window.webkit.messageHandlers.receive.postMessage({"awardId":id});
|
|
|
+ }
|
|
|
+ } else if (res.status == 1) {
|
|
|
+ return;
|
|
|
+ this.$toast(res.msg);
|
|
|
+ } else {
|
|
|
+ return
|
|
|
+ this.$toast(res.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
|
|
|
- }
|
|
|
},
|
|
|
+
|
|
|
download() {
|
|
|
|
|
|
},
|