...
|
...
|
@@ -9,7 +9,7 @@ let CHOOSED_COUNTRY_ID = 'CHOOSED_COUNTRY_ID' |
|
|
let CHOOSED_COUNTRY_NAME = 'CHOOSED_COUNTRY_NAME'
|
|
|
let app = getApp();
|
|
|
const {extend,Toast} = require('../../vendors/zanui/index');
|
|
|
|
|
|
const event = global.event;
|
|
|
Page(extend({},Toast,{
|
|
|
/**
|
|
|
* 页面的初始数据
|
...
|
...
|
@@ -185,11 +185,12 @@ Page(extend({},Toast,{ |
|
|
//如果是从h5页面唤起,则重新用webview 打开h5链接;其他页面直接返回上一层
|
|
|
if (that.data.h5back){
|
|
|
wx.navigateBack({
|
|
|
delta: 1,
|
|
|
delta: 2,
|
|
|
})
|
|
|
wx.redirectTo({
|
|
|
url: '../webview/webview?url=' + that.data.h5back
|
|
|
})
|
|
|
event.emit('wechat-login-success');
|
|
|
}else{
|
|
|
if (result.is_register){
|
|
|
that.showZanToast({
|
...
|
...
|
@@ -200,8 +201,9 @@ Page(extend({},Toast,{ |
|
|
prePage[prePage.length - 2].bindPhoneNumComplete();
|
|
|
}
|
|
|
wx.navigateBack({
|
|
|
delta: 1,
|
|
|
delta: 2,
|
|
|
})
|
|
|
event.emit('wechat-login-success');
|
|
|
}
|
|
|
}, 1500);
|
|
|
} else {
|
...
|
...
|
@@ -210,6 +212,7 @@ Page(extend({},Toast,{ |
|
|
if (prePage.length > 1 && prePage[prePage.length - 2].bindPhoneNumComplete != undefined) {
|
|
|
prePage[prePage.length - 2].bindPhoneNumComplete();
|
|
|
}
|
|
|
event.emit('wechat-login-success');
|
|
|
wx.navigateBack({
|
|
|
delta: 1,
|
|
|
})
|
...
|
...
|
@@ -427,6 +430,7 @@ bindBtnAction:function (needBind, callBackFun) { |
|
|
} else {
|
|
|
that.redirectAction();
|
|
|
}
|
|
|
event.emit('wechat-login-success');
|
|
|
}
|
|
|
})
|
|
|
},
|
...
|
...
|
@@ -438,21 +442,21 @@ redirectAction: function() { |
|
|
let that = this;
|
|
|
if (that.data.h5back) {
|
|
|
wx.navigateBack({
|
|
|
delta: 1,
|
|
|
delta: 2,
|
|
|
})
|
|
|
wx.redirectTo({
|
|
|
url: '../webview/webview?url=' + that.data.h5back
|
|
|
})
|
|
|
} else {
|
|
|
let prePage = getCurrentPages();
|
|
|
that.newCustomerStorage();
|
|
|
if (prePage.length > 1 && prePage[prePage.length - 2].bindPhoneNumComplete != undefined) {
|
|
|
prePage[prePage.length - 2].bindPhoneNumComplete();
|
|
|
}
|
|
|
// let prePage = getCurrentPages();
|
|
|
// that.newCustomerStorage();
|
|
|
// if (prePage.length > 1 && prePage[prePage.length - 2].bindPhoneNumComplete != undefined) {
|
|
|
// prePage[prePage.length - 2].bindPhoneNumComplete();
|
|
|
// }
|
|
|
|
|
|
// console.log("currentPage:", getCurrentPages())
|
|
|
wx.navigateBack({
|
|
|
delta: 1,
|
|
|
delta: 2,
|
|
|
})
|
|
|
return
|
|
|
}
|
...
|
...
|
|