1111111
This commit is contained in:
@@ -95,50 +95,50 @@
|
||||
})
|
||||
},
|
||||
onLoad(options) {
|
||||
let _this = this;
|
||||
wx.login({
|
||||
success: function(res) {
|
||||
uni.request({
|
||||
// 组装请求地址
|
||||
url: getApp().globalData.wxSilentLoginURL + "?wxCode=" + res.code,
|
||||
method: "GET",
|
||||
header: {
|
||||
'content-type': "application/x-www-form-urlencoded"
|
||||
},
|
||||
data: {
|
||||
"wxCode": res.code
|
||||
},
|
||||
success: res => {
|
||||
if (res.statusCode == 200) {
|
||||
if (!res.data.success) {
|
||||
if (res.data.code == "110") {
|
||||
// 需要绑定手机号
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/BindPhone?openid=' +
|
||||
res.data.data.wxMpOpenid
|
||||
})
|
||||
} else {
|
||||
// _this.status = 'more'
|
||||
}
|
||||
} else {
|
||||
// 成功后跳转主页
|
||||
getApp().globalData.sid = res.data.data.sid
|
||||
_this.page.customerSid = getApp().globalData.sid
|
||||
console.log("用户sid", getApp().globalData.sid)
|
||||
}
|
||||
} else {
|
||||
// _this.status = 'more'
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
// _this.status = 'more'
|
||||
}
|
||||
});
|
||||
},
|
||||
fail: function(res) {
|
||||
// _this.status = 'more'
|
||||
}
|
||||
});
|
||||
// let _this = this;
|
||||
// wx.login({
|
||||
// success: function(res) {
|
||||
// uni.request({
|
||||
// // 组装请求地址
|
||||
// url: getApp().globalData.wxSilentLoginURL + "?wxCode=" + res.code,
|
||||
// method: "GET",
|
||||
// header: {
|
||||
// 'content-type': "application/x-www-form-urlencoded"
|
||||
// },
|
||||
// data: {
|
||||
// "wxCode": res.code
|
||||
// },
|
||||
// success: res => {
|
||||
// if (res.statusCode == 200) {
|
||||
// if (!res.data.success) {
|
||||
// if (res.data.code == "110") {
|
||||
// // 需要绑定手机号
|
||||
// uni.reLaunch({
|
||||
// url: '/pages/index/BindPhone?openid=' +
|
||||
// res.data.data.wxMpOpenid
|
||||
// })
|
||||
// } else {
|
||||
// // _this.status = 'more'
|
||||
// }
|
||||
// } else {
|
||||
// // 成功后跳转主页
|
||||
// getApp().globalData.sid = res.data.data.sid
|
||||
// _this.page.customerSid = getApp().globalData.sid
|
||||
// console.log("用户sid", getApp().globalData.sid)
|
||||
// }
|
||||
// } else {
|
||||
// // _this.status = 'more'
|
||||
// }
|
||||
// },
|
||||
// fail: (err) => {
|
||||
// // _this.status = 'more'
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// fail: function(res) {
|
||||
// // _this.status = 'more'
|
||||
// }
|
||||
// });
|
||||
|
||||
if (options) {
|
||||
console.log("options", options)
|
||||
@@ -174,6 +174,9 @@
|
||||
});
|
||||
},
|
||||
save() {
|
||||
|
||||
this.page.customerSid = getApp().globalData.sid
|
||||
|
||||
if (this.stringIsEmpty(this.page.code) || this.page.code.length != 20) {
|
||||
this.shortToast('请输入20位提货编码')
|
||||
return
|
||||
@@ -183,13 +186,13 @@
|
||||
return
|
||||
}
|
||||
let _this = this
|
||||
|
||||
console.log("+++++++++++",this.page);
|
||||
|
||||
|
||||
console.log("+++++++++++", this.page);
|
||||
|
||||
_this.$api.bindAllCard(this.page).then((resp) => {
|
||||
// bus.$emit('order', "监听回调");
|
||||
uni.switchTab({
|
||||
url: '/pages/home/myCellar'
|
||||
url: '/pages/home/myCellar'
|
||||
})
|
||||
|
||||
}).catch(e => {
|
||||
|
||||
Reference in New Issue
Block a user