Commit d88ca1cc by 曾经

no message

parent a1694510
......@@ -91,7 +91,7 @@
v-if="game.adsFlag"
/>
<div class="share-box" @click.stop="clickShareBtn">
<div class="share-box" @click.stop="clickShareBtn" v-if="rule.shareFlag">
<div class="icon">
<div class="iconfont icon-yaoqing"></div>
</div>
......@@ -236,6 +236,7 @@ export default {
isAttest: 0,
currentIntegral: "--",
rule: {},
playNumberObj: {},
};
},
created() {
......@@ -319,6 +320,7 @@ export default {
enterpriseId: this.enterpriseId,
memberId: this.memberId || "",
});
console.log("playNumberObj-------->",playNumberObj);
this.playNumberObj = playNumberObj;
},
async getGamePlayBarrage() {
......@@ -389,6 +391,7 @@ export default {
},
async sharePyq() {
let options = this.shareConditionObj;
let result = await getGameShareQrCodeUrl({
gameId: this.gameId,
enterpriseId: this.enterpriseId,
......@@ -405,7 +408,7 @@ export default {
},
clickAdImg() {
window.wx.miniProgram.navigateTo({
url: '/' + this.rule.dumpPath,
url: '/' + this.game.gameExt.adsLinkUrl,
})
},
async open() {
......
......@@ -26,7 +26,7 @@
</div>
<div class="friend-name">你的好友 {{ helpDetail.shareMemberName }}</div>
<div class="tip-text">正在请求您的助力</div>
<div class="handle-btn red" @click="support" v-if="helpDetail.helpStatus == 0">为好友助力</div>
<div class="handle-btn red" @click="support">为好友助力</div>
<div class="handle-btn blue" @click="toPlayGame">我要参加游戏</div>
</div>
......
......@@ -91,7 +91,7 @@
v-if="game.adsFlag"
/>
<div class="share-box" @click.stop="clickShareBtn">
<div class="share-box" @click.stop="clickShareBtn" v-if="rule.shareFlag">
<div class="icon">
<div class="iconfont icon-yaoqing"></div>
</div>
......@@ -236,6 +236,7 @@ export default {
isAttest: 0,
currentIntegral: "--",
rule: {},
playNumberObj:{},
};
},
created() {
......@@ -404,7 +405,7 @@ export default {
},
clickAdImg() {
window.wx.miniProgram.navigateTo({
url: '/' + this.rule.dumpPath,
url: '/' + this.game.gameExt.adsLinkUrl,
})
},
async open() {
......
......@@ -26,7 +26,7 @@
</div>
<div class="friend-name">你的好友 {{ helpDetail.shareMemberName }}</div>
<div class="tip-text">正在请求您的助力</div>
<div class="handle-btn red" @click="support" v-if="helpDetail.helpStatus == 0">为好友助力</div>
<div class="handle-btn red" @click="support">为好友助力</div>
<div class="handle-btn blue" @click="toPlayGame">我要参加游戏</div>
</div>
......
......@@ -91,7 +91,7 @@
v-if="game.adsFlag"
/>
<div class="share-box" @click.stop="clickShareBtn">
<div class="share-box" @click.stop="clickShareBtn" v-if="rule.shareFlag">
<div class="icon">
<div class="iconfont icon-yaoqing"></div>
</div>
......@@ -236,6 +236,7 @@ export default {
isAttest: 0,
currentIntegral: "--",
rule: {},
playNumberObj: {},
};
},
created() {
......@@ -404,7 +405,7 @@ export default {
},
clickAdImg() {
window.wx.miniProgram.navigateTo({
url: '/' + this.rule.dumpPath,
url: '/' + this.game.gameExt.adsLinkUrl,
})
},
async open() {
......
......@@ -26,7 +26,7 @@
</div>
<div class="friend-name">你的好友 {{ helpDetail.shareMemberName }}</div>
<div class="tip-text">正在请求您的助力</div>
<div class="handle-btn red" @click="support" v-if="helpDetail.helpStatus == 0">为好友助力</div>
<div class="handle-btn red" @click="support">为好友助力</div>
<div class="handle-btn blue" @click="toPlayGame">我要参加游戏</div>
</div>
......
import { gameRequestApi } from "@/api/common.js";
const {
getPlayCount,
// getPlayCount,
validGame,
getGameRule,
gamePlay,
......@@ -107,40 +107,40 @@ export function Manager(component) {
});
}
const checkCount = () => {
return new Promise((resolve, reject) => {
let query = _component.$route.query;
getPlayCount(query).then((res) => {
let rule = _component.rule;
if (rule.playTimes > res) {
resolve();
} else {
reject();
showAlert({
show: true,
content: rule.giveawayType == '21' ? "今日免费次数已用完,明早继续" : '免费游戏次数已用完,去其他地方看看吧~',
buttonList: [
{
text: "前往会员中心",
click: () => {
hiddenAlert();
// TODO
toMemberCenter();
},
},
],
cancel: () => {
hiddenAlert();
},
});
}
}).catch(() => {
resolve();
})
});
}
// const checkCount = () => {
// return new Promise((resolve, reject) => {
// let query = _component.$route.query;
// getPlayCount(query).then((res) => {
// let rule = _component.rule;
// if (rule.playTimes > res) {
// resolve();
// } else {
// reject();
// showAlert({
// show: true,
// content: rule.giveawayType == '21' ? "今日免费次数已用完,明早继续" : '免费游戏次数已用完,去其他地方看看吧~',
// buttonList: [
// {
// text: "前往会员中心",
// click: () => {
// hiddenAlert();
// // TODO
// toMemberCenter();
// },
// },
// ],
// cancel: () => {
// hiddenAlert();
// },
// });
// }
// }).catch(() => {
// resolve();
// })
// });
// }
const checkLimit = () => {
return new Promise((resolve) => {
......@@ -233,7 +233,9 @@ export function Manager(component) {
text: "立即获取积分",
click: () => {
hiddenAlert();
window.wx.miniProgram.navigateTo({
url: '/' + _component.rule.dumpPath,
})
},
}];
break;
......@@ -266,9 +268,9 @@ export function Manager(component) {
}
this.play = () => {
// .then(checkCount)
return checkTime()
.then(checkAttest)
.then(checkCount)
.then(checkLimit)
.then(() => {
return play();
......@@ -314,6 +316,28 @@ export function Manager(component) {
this.support = async () => {
let query = _component.$route.query;
if(_component.helpDetail.helpStatus == 2){
showAlert({
show: true,
content: "您已助力",
buttonList: [
{
text: "参与游戏赢好礼",
click: () => {
hiddenAlert();
// window.wx.miniProgram
// TODO
_component.toPlayGame();
},
},
],
cancel: () => {
hiddenAlert();
},
});
return;
}
if(query.memberId == query.shareMemberId){
showAlert({
show: true,
......@@ -373,8 +397,26 @@ export function Manager(component) {
},
});
} else {
// 未认证
openCard();
showAlert({
show: true,
content: "仅差一步,您当前还不是会员,无法助力,立即认证成为会员,助力赢取好礼",
buttonList: [
{
text: "参与游戏赢好礼",
click: () => {
hiddenAlert();
// window.wx.miniProgram
// TODO
// 未认证
openCard();
},
},
],
cancel: () => {
hiddenAlert();
},
});
}
} else if (conditionObj.type == 12) {
// 关注服务号
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment