Commit fa33a7d5 authored by Edwise's avatar Edwise 🍷

邀请,结束发奖

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