Commit d88ca1cc by 曾经

no message

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