Commit 68406db2 by 程默

fix

parent c1751751
...@@ -158,10 +158,22 @@ export default { ...@@ -158,10 +158,22 @@ export default {
.then(res => { .then(res => {
console.log("promise", res); console.log("promise", res);
//存入openid //存入openid
wx.setStorage({ try {
wx.setStorageSync('openid', res.data.data.openid)
} catch (e) {
console.log('存入openid失败',e)
}
wx.getStorage({
key: "openid", key: "openid",
data: res.data.data.openid success (res) {
}); console.log("promise_openid1",res)
},
fail(err){
console.log("promise_openid2",err)
}
})
//
if (res.data.data.isHaveUnion == "true") { if (res.data.data.isHaveUnion == "true") {
//有账号 //有账号
this.backParams += `&sessionid=${ this.backParams += `&sessionid=${
......
...@@ -26,7 +26,7 @@ export default { ...@@ -26,7 +26,7 @@ export default {
title: "加载中" title: "加载中"
}); });
Object.assign(this.$data, this.$options.data()); //mpvue 的混合周期 使用小程序生命周期数据未初始化 Object.assign(this.$data, this.$options.data()); //mpvue 的混合周期 使用小程序生命周期数据未初始化
console.log("onload//"); console.log("onload//",options);
this.options = JSON.parse(options.ordercode); this.options = JSON.parse(options.ordercode);
this.options_orderType = options.orderType; this.options_orderType = options.orderType;
this.options_isCard= options.isCard; this.options_isCard= options.isCard;
...@@ -41,6 +41,9 @@ export default { ...@@ -41,6 +41,9 @@ export default {
that.options.tradeType = "Mini"; that.options.tradeType = "Mini";
console.log("支付开始", that.options); console.log("支付开始", that.options);
that.toPay(); that.toPay();
},
fail(err){
console.log('获取err',err)
} }
}); });
}, },
......
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