瀏覽代碼

幸运星抓手逻辑修改

guessPrice
sui 5 年之前
父節點
當前提交
51b139aade
共有 1 個文件被更改,包括 9 次插入10 次删除
  1. +9
    -10
      496_dongfengqichen/pages/luckyStar/luckyStar.js

+ 9
- 10
496_dongfengqichen/pages/luckyStar/luckyStar.js 查看文件

@@ -24,7 +24,7 @@ Page({
gameSign: null, //游戏结束时需要
gameState:false,//游戏状态
endGameData:null,//中奖数据
isRegister:false,//是否已注册
isAddress:false,//是否有地址
},

/**
@@ -33,10 +33,9 @@ Page({
onLoad: function (options) {
app.globalData.nowPage = 3;
if (app.globalData.openid) {
this.getOrderInfo();
this.endGame();
this.getAddress();
} else {
app.globalData.openidSuccessFuc = this.getOrderInfo;
app.globalData.openidSuccessFuc = this.getAddress;
}
},

@@ -220,7 +219,7 @@ Page({
pizeTip: 1
})
} else {
if (this.data.isRegister) {
if (this.data.isAddress) {
this.setData({
pizeTip: 2
})
@@ -270,14 +269,14 @@ Page({
})
}
},
getOrderInfo: function () {//查询是否已注册
app.wxRequest(app.globalData.urlRoot +"userInfo/getOrderInfo",{},res=>{
if(res.code==200){
getAddress: function () {//获取地址
app.wxRequest(app.globalData.urlRoot + "userInfo/getOrderInfo", {}, res => {
if (res.code == 200) {
if (res.data) {
this.data.isRegister = true;
this.data.isAddress = true;
}
}
},this)
}, this)
},
receive:function(){//立即领取
wx.redirectTo({

Loading…
取消
儲存