Commit d4f3036d by 前端

fixed

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