Commit fa33a7d5 authored by Edwise's avatar Edwise 🍷

邀请,结束发奖

parent eea9bccf
...@@ -13,40 +13,51 @@ const { ...@@ -13,40 +13,51 @@ const {
getSystemInfo getSystemInfo
} = tbcc.tb } = tbcc.tb
Component({ Component({
props: {}, props: {},
data: {resList: resList}, data: {
methods: { resList: resList
openInviteFailedModal(){
my._showIndexModal("invitefail");
}, },
openInviteSuccessModal(){ methods: {
my._showIndexModal("invitesuccess"); openInviteFailedModal() {
}, my._showIndexModal("invitefail");
onCloseModal(){ },
const {onCloseModal} = this.props; openInviteSuccessModal() {
onCloseModal&&onCloseModal(); my._showIndexModal("invitesuccess");
commonToast("助力失败") },
}, onCloseModal() {
/**助力 */ const {
async doHelp(){ onCloseModal
const {success,data,message} = await API.doHelp({inviteId:app.openId,inviteStep:app.step}); } = this.props;
console.log("hhahahha") onCloseModal && onCloseModal();
if(!success){ commonToast("助力失败")
if(data&&!data.isVip){ },
commonToast("3s入会,即可为好友助力",1500,()=>{ /**助力 */
app.isGoVip = true; async doHelp() {
navigateToOutside(data.url); const {
}) success,
}else if(data&&data.isVip){ data,
this.openInviteFailedModal(); message
}else{ } = await API.doHelp({
commonToast(message); inviteId: app.inviteId,
inviteStep: app.step
}).catch(r => {
if (r.data && !r.data.isVip) {
commonToast("3s入会,即可为好友助力", 1500, () => {
app.isGoVip = true;
navigateToOutside(r.data.url);
})
} else if (r.data && r.data.isVip) {
this.openInviteFailedModal();
} else {
commonToast(r&&r.message);
}
}) || {};
console.log("hhahahha")
if (success) {
this.openInviteSuccessModal();
} }
}else{
this.openInviteSuccessModal();
} }
} },
},
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
left: 82rpx; left: 82rpx;
top: 345rpx; top: 345rpx;
position: absolute; position: absolute;
transform-origin: 0rpx 0rpx 0rpx; transform-origin: 50% 50% 0rpx;
} }
.pkfailnoprizemodal .pkfailnoprizeclose { .pkfailnoprizemodal .pkfailnoprizeclose {
width: 72rpx; width: 72rpx;
...@@ -30,5 +30,5 @@ ...@@ -30,5 +30,5 @@
left: 227rpx; left: 227rpx;
top: 507rpx; top: 507rpx;
position: absolute; position: absolute;
transform-origin: 0rpx 0rpx 0rpx; transform-origin: 50% 50% 0rpx;
} }
<view class="pkfailnoprizemodal modal-animate-zoom-in"> <view class="pkfailnoprizemodal modal-animate-zoom-in">
<image class="pkfailnoprizebg " src={{resList['d968742a-852e-4f47-9657-a18b3ea15e04'].url}} /> <image class="pkfailnoprizebg " src={{resList['d968742a-852e-4f47-9657-a18b3ea15e04'].url}} />
<image class="pkfailnoprizebtn " onTap="redirectToIndex" src={{resList['9a1b9fb4-4087-4082-9160-e0085ba2b12d'].url}} /> <image class="pkfailnoprizebtn btn" onTap="redirectToIndex" src={{resList['9a1b9fb4-4087-4082-9160-e0085ba2b12d'].url}} />
<image class="pkfailnoprizeclose " onTap="redirectToIndex" src={{resList['78ed2fc7-6125-47e5-8120-15fd90f36c0d'].url}} /> <image class="pkfailnoprizeclose btn" onTap="redirectToIndex" src={{resList['78ed2fc7-6125-47e5-8120-15fd90f36c0d'].url}} />
</view> </view>
\ No newline at end of file
...@@ -33,7 +33,7 @@ Component({ ...@@ -33,7 +33,7 @@ Component({
methods: { methods: {
redirectToIndex(){ redirectToIndex(){
const {isWin,unLockStep} = this.props.gameOverData; const {isWin,unLockStep} = this.props.gameOverData;
if(isWin&&unLockStep&&unLockStep>1){ if(isWin&&unLockStep&&unLockStep>1&&unLockStep<4){
const {onLockStep} = this.props; const {onLockStep} = this.props;
onLockStep&&onLockStep(this.props.gameOverData) onLockStep&&onLockStep(this.props.gameOverData)
}else{ }else{
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
left: 82rpx; left: 82rpx;
top: 232rpx; top: 232rpx;
position: absolute; position: absolute;
transform-origin: 0rpx 0rpx 0rpx; transform-origin: 50% 50% 0rpx;
} }
.pksuccessnoprizemodal .pksuccessnoprizeclose { .pksuccessnoprizemodal .pksuccessnoprizeclose {
width: 72rpx; width: 72rpx;
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
left: 227rpx; left: 227rpx;
top: 398rpx; top: 398rpx;
position: absolute; position: absolute;
transform-origin: 0rpx 0rpx 0rpx; transform-origin: 50% 50% 0rpx;
} }
.pksuccessnoprizemodal .sevenPrize { .pksuccessnoprizemodal .sevenPrize {
width: 527rpx; width: 527rpx;
......
<view class="pksuccessnoprizemodal modal-animate-zoom-in"> <view class="pksuccessnoprizemodal modal-animate-zoom-in">
<image class="pksuccessnoprizebg " src={{resList['9db83ecb-f8c3-4392-9d92-7c5ce5572b8b'].url}} /> <image class="pksuccessnoprizebg " src={{resList['9db83ecb-f8c3-4392-9d92-7c5ce5572b8b'].url}} />
<label class="sevenPrize " a:if="{{unLockStep>3}}">恭喜您!7系赛段累计获胜7场,获得70点温暖值</label> <label class="sevenPrize " a:if="{{unLockStep>3}}">恭喜您!7系赛段累计获胜7场,获得70点温暖值</label>
<image class="pksuccessnoprizebtn " onTap="redirectToIndex" src={{resList['ede003f5-0f75-4175-8113-d8492f58fbd0'].url}} /> <image class="pksuccessnoprizebtn btn" onTap="redirectToIndex" src={{resList['ede003f5-0f75-4175-8113-d8492f58fbd0'].url}} />
<image class="pksuccessnoprizeclose " onTap="redirectToIndex" src={{resList['01587dc4-48e2-4a53-ba37-14a5c2026791'].url}} /> <image class="pksuccessnoprizeclose btn" onTap="redirectToIndex" src={{resList['01587dc4-48e2-4a53-ba37-14a5c2026791'].url}} />
</view> </view>
\ No newline at end of file
...@@ -13,7 +13,7 @@ Component({ ...@@ -13,7 +13,7 @@ Component({
redirectToIndex(){ redirectToIndex(){
const {isWin,unLockStep} = this.props.gameOverData; const {isWin,unLockStep} = this.props.gameOverData;
console.log("获胜没有奖品",this.props.gameOverData) console.log("获胜没有奖品",this.props.gameOverData)
if(isWin&&unLockStep&&unLockStep>1){ if(isWin&&unLockStep&&unLockStep>1&&unLockStep<4){
const {onLockStep} = this.props; const {onLockStep} = this.props;
onLockStep&&onLockStep(this.props.gameOverData) onLockStep&&onLockStep(this.props.gameOverData)
}else{ }else{
......
...@@ -31,7 +31,7 @@ Component({ ...@@ -31,7 +31,7 @@ Component({
didMount(){ didMount(){
const {unLockStep,warms}= this.props.gameOverData; const {unLockStep,warms}= this.props.gameOverData;
let str = unLockStep==2?'恭喜您解锁5系赛段':'恭喜您解锁7系赛段'; let str = unLockStep==2?'恭喜您解锁5系赛段':'恭喜您解锁7系赛段';
let str1 = unLockStep==3?'进入三人场':'进入四人场'; let str1 = unLockStep==2?'进入三人场':'进入四人场';
this.setData({ this.setData({
unLockStep:unLockStep, unLockStep:unLockStep,
title1:str, title1:str,
......
...@@ -417,7 +417,7 @@ Page({ ...@@ -417,7 +417,7 @@ Page({
}); });
let step = this.data.step; let step = this.data.step;
app.curGameWars = this.data.myidx; app.curGameWars = this.data.roomdata[this.data.myidx - 1].wd;
const overdata = await API.gameOver({ const overdata = await API.gameOver({
isWin: iswin, isWin: iswin,
step: step step: step
......
<view class="pageindex "> <scroll-view class="pageindex " scroll-y={{true}} disable-scroll={{false}}>
<image class="bg " src={{resList['3ee62d6c-3e44-470b-b2a5-fb805ec6a6c3'].url}} /> <image class="bg " src={{resList['3ee62d6c-3e44-470b-b2a5-fb805ec6a6c3'].url}} />
<image class="jbLogo " src={{resList['23b7797e-e924-48b1-8afa-7412722a0bc9'].url}} /> <image class="jbLogo " src={{resList['23b7797e-e924-48b1-8afa-7412722a0bc9'].url}} />
<view disable-scroll="true" class="page-game"> <view disable-scroll="true" class="page-game">
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<label class="indexPrizeNameLabel ">{{item.name}}</label> <label class="indexPrizeNameLabel ">{{item.name}}</label>
</view> </view>
</view> </view>
</view> </scroll-view>
......
...@@ -244,7 +244,7 @@ Page({ ...@@ -244,7 +244,7 @@ Page({
if (success) { if (success) {
// my.hideLoading(); // my.hideLoading();
app.openId = data.openId; app.openId = data.openId;
app.step = data.inviteStep; // app.step = data.inviteStep;
this.getActivityBaseInfoById(); this.getActivityBaseInfoById();
} }
}, },
...@@ -270,7 +270,8 @@ Page({ ...@@ -270,7 +270,8 @@ Page({
}, },
/**判断是否是助力 */ /**判断是否是助力 */
judgeDoHelp() { judgeDoHelp() {
if (app.inviteId) { console.log("啦啦啦",typeof(app.inviteId),app.inviteId,typeof(app.openId),app.openId)
if (app.inviteId&&app.inviteId!=app.openId) {
this.setData({ this.setData({
modalStatus: modalType['invite'] modalStatus: modalType['invite']
}) })
...@@ -380,7 +381,7 @@ Page({ ...@@ -380,7 +381,7 @@ Page({
} = SHARE_CONFIG; } = SHARE_CONFIG;
console.log('app.openId', app.openId); console.log('app.openId', app.openId);
if (app.openId) { if (app.openId) {
path = '/pages/pagepageindex/pagepageindex' + '?openId=' + app.openId + '&inviteStep=' + app.step; path = '/pages/pagepageindex/pagepageindex' + '?openId=' + app.openId + '&inviteStep=' + this.data.curGameStep;
} }
console.log('path', path) console.log('path', path)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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