Commit d4f3036d by 前端

fixed

1 parent 458433fa
......@@ -49,7 +49,6 @@
src="https://img02.glsx.com.cn/weapp/resource/miniprogram/game/prize.png?v=1.0"
/>
<div class="prize-content">
{{ rewardDetail }}
<div class="prize-title">
{{ couponDetail.brandName }}{{ couponDetail.goodsName }}
</div>
......@@ -118,7 +117,6 @@ export default {
default: true,
},
},
inject: ["rewardDetail"],
watch: {
dataObject(data) {
Object.assign(this.answerData, data);
......@@ -150,7 +148,8 @@ export default {
}, 1000);
},
methods: {
taskRewards() {
async taskRewards() {
const { allow, rewardId } = this.$parent.$parent;
const { id, merchantId, merchantName } = this.$route.query;
const { phone, accountId, nickName } = util.getUserInfo();
const params = {
......@@ -161,12 +160,10 @@ export default {
nickName,
accountId,
};
GAME.taskRewards(params).then((res) => {
if (res.code == 0) {
const { id } = res.data;
this.getCouponDetail(id);
}
});
if (allow === true) {
await GAME.taskRewards(params);
}
this.getCouponDetail(rewardId);
},
getCouponDetail(couponId) {
GAME.couponDetail({ couponId }).then((res) => {
......
......@@ -25,7 +25,6 @@ export default {
memberList: [], //成员列表
isEnd: false, //是否结束
timer: null,
rewardDetail: {}, //奖品详情
answerData: {
body: {
size: null,
......
......@@ -21,6 +21,7 @@ export default {
data() {
return {
allow: "",
rewardId: "",
accountSecToken: "",
countdown: 3,
taskDetail: {},
......@@ -45,7 +46,6 @@ export default {
provide() {
return {
countdown: this.countdown, //倒计时时间
rewardDetail: this.rewardDetail,
};
},
computed: {
......@@ -188,7 +188,6 @@ export default {
},
// ws回调接收消息
cb(e) {
console.log(e, 1111111111111111111111);
this.dataObject = e;
},
//行为上报
......@@ -241,6 +240,7 @@ export default {
const { phone } = this.getUserInfo();
const { id, merchantId } = this.$route.query;
const taskCheck = await GAME.taskCheck({ id, merchantId, phone });
await this.getTaskDetail();
this.allow = taskCheck.data.allow;
if (!this.allow) {
this.$nextTick(() => {
......@@ -250,7 +250,6 @@ export default {
}
const gameToken = await GAME.gameToken({ phone });
this.accountSecToken = gameToken.data.accountSecToken;
await this.getTaskDetail();
this.joinGame();
setTimeout(() => {
this.handleLink();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!