提交 eea3cdac 编写于 作者: Yuanzhao.dai's avatar Yuanzhao.dai

云鹊豆瓜分状态接口字段变更

上级 2632e0c7
...@@ -43,10 +43,10 @@ ...@@ -43,10 +43,10 @@
</div> </div>
<div class="defeat-content carve-container" v-if="!isFirstCarve && !hasQualification" > <div class="defeat-content carve-container" v-if="!isFirstCarve && !hasQualification" >
<div class="defeat-bg"> <div class="defeat-bg">
<div class="content content2" v-show="unableReason == 3 || unableReason == 4"> <div class="content content2" v-show="unableReason1 == 4 || unableReason2 == 3">
<p class="title">您未参加本次活动</p> <p class="title">您未参加本次活动</p>
</div> </div>
<div class="content content1" v-show="unableReason == 1 || unableReason == 2"> <div class="content content1" v-show="unableReason1 == 3 || unableReason2 == 2">
<p class="title">很遗憾</p> <p class="title">很遗憾</p>
<p class="text">您的勤奋分小于100不能瓜分云鹊豆</p> <p class="text">您的勤奋分小于100不能瓜分云鹊豆</p>
</div> </div>
...@@ -92,12 +92,18 @@ ...@@ -92,12 +92,18 @@
return 0 return 0
} }
}, },
unableReason: { //不可瓜分原因1或2是资格不够,3或4是未参加 unableReason1: { //判断红包状态接口返回的结果,3分数不够,4未参加
type: Number, type: Number,
default() { default() {
return 0 return 0
} }
} },
unableReason2: { //第一次拆红包后返回的结果,2分数不够,3未参加
type: Number,
default() {
return 0
}
},
}, },
data() { data() {
return { return {
......
...@@ -170,7 +170,8 @@ export default { ...@@ -170,7 +170,8 @@ export default {
isFirstCarve: true, //红包是否是未拆状态 isFirstCarve: true, //红包是否是未拆状态
hasQualification: true, //是否有资格瓜分 hasQualification: true, //是否有资格瓜分
beanCarveCount: 0, //可瓜分云鹊豆数量 beanCarveCount: 0, //可瓜分云鹊豆数量
unableReason: 0, //不可瓜分的原因,1或2是资格不够,3或4是未参加 unableReason1: 0, //判断红包状态接口返回的结果,不可瓜分的原因,3分数不够,4未参加
unableReason2: 0, //第一次拆红包后返回的结果, 不可瓜分的原因,2分数不够,3未参加
} }
}, },
async asyncData({ $axios }) { async asyncData({ $axios }) {
...@@ -208,7 +209,7 @@ export default { ...@@ -208,7 +209,7 @@ export default {
this.taskTimeFlag = false; this.taskTimeFlag = false;
} }
//判断是否到瓜分云鹊豆的时间 //判断是否到瓜分云鹊豆的时间
let carveTime = (new Date("2020/04/07 17:00:00")).getTime();//"2020/04/07 17:00:00" let carveTime = (new Date("2020/03/07 17:00:00")).getTime();//"2020/04/07 17:00:00"
if (carveTime <= nowTime) { if (carveTime <= nowTime) {
this.getRedPacketsLog(); this.getRedPacketsLog();
} }
...@@ -412,7 +413,7 @@ export default { ...@@ -412,7 +413,7 @@ export default {
this.beanCarveCount = res.data.totalBonus; this.beanCarveCount = res.data.totalBonus;
} else { //2分数不够,3未参加 } else { //2分数不够,3未参加
this.hasQualification = false; this.hasQualification = false;
this.unableReason = res.data.status; this.unableReason2 = res.data.status;
} }
}) })
}, },
...@@ -420,16 +421,16 @@ export default { ...@@ -420,16 +421,16 @@ export default {
getRedPacketsLog({ getRedPacketsLog({
activityId: this.activityId activityId: this.activityId
}).then(res => { }).then(res => {
if(res.data.status == 2) { //红包未拆 if(res.data.status == 1) { //红包未拆
this.isFirstCarve = true; this.isFirstCarve = true;
} else { } else {
this.isFirstCarve = false; this.isFirstCarve = false;
if(res.data.status == 3) { if(res.data.status == 2) {
this.hasQualification = true; this.hasQualification = true;
this.beanCarveCount = res.data.totalBonus; this.beanCarveCount = res.data.totalBonus;
} else { //1分数不够,4未参加 } else { //3分数不够,4未参加
this.hasQualification = false; this.hasQualification = false;
this.unableReason = res.data.status; this.unableReason1 = res.data.status;
} }
} }
this.showCarveUp = true;//展示瓜分组件 this.showCarveUp = true;//展示瓜分组件
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册