|
|
@@ -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({ |