@@ -83,10 +83,10 @@ App({ | |||
}) | |||
}, | |||
globalData: { | |||
// urlRoot: "https://dongfengqichen.jiyou-tech.com/",//测试接口根目录 | |||
urlRoot: "https://xing.venucia.com/api/",//接口根目录 | |||
// urlStatic: "https://www.jiyou-tech.com/2020/496_qichen/static",//测试静态资源根目录 | |||
urlStatic: "https://xingb.venucia.com/resource",//静态资源根目录 | |||
urlRoot: "https://dongfengqichen.jiyou-tech.com/",//测试接口根目录 | |||
// urlRoot: "https://xing.venucia.com/api/",//接口根目录 | |||
urlStatic: "https://www.jiyou-tech.com/2020/496_qichen/static",//测试静态资源根目录 | |||
// urlStatic: "https://xingb.venucia.com/resource",//静态资源根目录 | |||
openid: "",//OPENID | |||
parentOpenid:"",//推荐人的openid | |||
session_key: "",//session_key |
@@ -524,19 +524,49 @@ Page({ | |||
}) | |||
}, | |||
placingControl:function(){ | |||
if(this.data.buyState && !this.data.drawNum){ | |||
this.maskNewControl(); | |||
return; | |||
console.log("是否已支付"+app.globalData.getBuyState.success); | |||
console.log("抽奖机会次数"+app.globalData.luckyTokenList.length); | |||
if(app.globalData.getBuyState.success && app.globalData.luckyTokenList.length){ | |||
wx.navigateTo({ | |||
url: '/pages/rotaryDraw/rotaryDraw', | |||
}) | |||
}else{ | |||
if(app.globalData.getBuyState.success && !app.globalData.luckyTokenList.length && !this.data.placing){ | |||
this.maskNewControl(); | |||
}else{ | |||
this.setData({ | |||
placing: !this.data.placing | |||
}) | |||
} | |||
} | |||
return | |||
if(app.globalData.getBuyState){ | |||
if(!app.globalData.getBuyState.success){ | |||
this.setData({ | |||
placing: !this.data.placing | |||
}) | |||
} | |||
} | |||
if (this.data.buyState && !this.data.placing){ | |||
wx.navigateTo({ | |||
url: '/pages/rotaryDraw/rotaryDraw', | |||
}) | |||
}else{ | |||
this.setData({ | |||
placing: !this.data.placing | |||
}) | |||
if(this.data.buyState && !this.data.drawNum){ | |||
this.maskNewControl(); | |||
return; | |||
}else{ | |||
this.setData({ | |||
placing: !this.data.placing | |||
}) | |||
} | |||
} | |||
console.log("是否打开了支付页面"+this.data.placing); | |||
console.log("是否已支付"+this.data.buyState); | |||
console.log("抽奖机会次数"+this.data.drawNum); | |||
}, | |||
swiperChange:function(e){ | |||
var num = e.currentTarget.dataset.num; |
@@ -298,10 +298,10 @@ Component({ | |||
paySuccess: function (e) {//支付成功 | |||
// app.wxRequest(app.globalData.urlRoot + "wxPay/buyStateTime", { source:2,trade_id:e},res=>{ | |||
// if(res.code==200){ | |||
// wx.showToast({ | |||
// title: '下订成功', | |||
// mask:true | |||
// }) | |||
wx.showToast({ | |||
title: '下订成功', | |||
mask:true | |||
}) | |||
app.globalData.getBuyState = {}; | |||
app.globalData.getBuyState.success = true; | |||
// app.globalData.getBuyState.cdate = "2020-06-05"; |
@@ -260,7 +260,7 @@ Page({ | |||
if (res.code == 200) { | |||
if (res.data) { | |||
res.data.cdate = res.data.cdate ? res.data.cdate : ""; | |||
app.globalData.getBuyState = res.data.success; | |||
app.globalData.getBuyState = res.data; | |||
if (res.data.luckyTokenList) { | |||
app.globalData.luckyTokenList = res.data.luckyTokenList; | |||
} |
@@ -4,7 +4,7 @@ | |||
"ignore": [] | |||
}, | |||
"setting": { | |||
"urlCheck": true, | |||
"urlCheck": false, | |||
"es6": true, | |||
"postcss": true, | |||
"minified": true, |