|
|
|
|
@ -14,7 +14,7 @@ Page({
|
|
|
|
|
reg_type:'a',
|
|
|
|
|
wxCode: '',
|
|
|
|
|
btnColor:false,
|
|
|
|
|
switch1Checked: true,
|
|
|
|
|
switch1Checked: false,
|
|
|
|
|
},
|
|
|
|
|
switch1Change: function (e) {
|
|
|
|
|
console.log("radio发生change事件,携带value值为:", e.detail.value);
|
|
|
|
|
@ -178,10 +178,13 @@ Page({
|
|
|
|
|
code: that.data.wxCode,
|
|
|
|
|
iv: iv,
|
|
|
|
|
encryptedData: encryptedData,
|
|
|
|
|
type: "yishoudan",
|
|
|
|
|
appId:'wxd7aba642f7fd77fd'
|
|
|
|
|
},
|
|
|
|
|
success: function (res) {
|
|
|
|
|
console.log(res);
|
|
|
|
|
app.globalData.openId = res.data.data.openId;
|
|
|
|
|
app.globalData.unionid = res.data.data.unionid;
|
|
|
|
|
let promise = app.setLoginUserTokenInfo(res.data.data.phoneNumber, null);
|
|
|
|
|
promise.then(res => {
|
|
|
|
|
wx.reLaunch({
|
|
|
|
|
@ -209,6 +212,8 @@ Page({
|
|
|
|
|
code: res.code,
|
|
|
|
|
iv: iv,
|
|
|
|
|
encryptedData: encryptedData,
|
|
|
|
|
type: "dtdl",
|
|
|
|
|
appId:'wxd7aba642f7fd77fd'
|
|
|
|
|
},
|
|
|
|
|
success: function (res) {
|
|
|
|
|
console.log(res);
|
|
|
|
|
@ -288,7 +293,7 @@ Page({
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
wx.request({
|
|
|
|
|
url: app.globalData.ip + '/appLoginByTel',
|
|
|
|
|
url: app.globalData.ip + '/appLoginByTelYiShouDan',
|
|
|
|
|
data: {
|
|
|
|
|
tel: that.data.tel,
|
|
|
|
|
code: that.data.msgCode,
|
|
|
|
|
@ -297,6 +302,8 @@ Page({
|
|
|
|
|
autoLoginTag: 0,
|
|
|
|
|
loginType: 'login',
|
|
|
|
|
isScanQRCodes: app.globalData.isScanQRCodes,
|
|
|
|
|
wxCode: that.data.wxCode,
|
|
|
|
|
appId:'wxd7aba642f7fd77fd'
|
|
|
|
|
},
|
|
|
|
|
header: {
|
|
|
|
|
'content-type': 'application/json'
|
|
|
|
|
@ -307,71 +314,83 @@ Page({
|
|
|
|
|
console.log(res.data);
|
|
|
|
|
|
|
|
|
|
if (res.data.status == 200) {
|
|
|
|
|
that.setLoginData(res);
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
wx.showToast({
|
|
|
|
|
icon: "none",
|
|
|
|
|
title: res.data.msg,
|
|
|
|
|
duration: 2000
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
//console.log('form发生了submit事件,携带数据为:', e.detail.value)
|
|
|
|
|
},
|
|
|
|
|
setLoginData(res) {
|
|
|
|
|
app.globalData.user = res.data.data.user;
|
|
|
|
|
app.globalData.sessionId = res.data.data.sessionId;
|
|
|
|
|
app.globalData.headers.Cookie = 'JSESSIONID=' + res.data.data.sessionId;
|
|
|
|
|
app.globalData.headers2.Cookie = 'JSESSIONID=' + res.data.data.sessionId;
|
|
|
|
|
app.globalData.headers.Cookie = "JSESSIONID=" + res.data.data.sessionId;
|
|
|
|
|
app.globalData.headers2.Cookie = "JSESSIONID=" + res.data.data.sessionId;
|
|
|
|
|
app.globalData.isLogin = true;
|
|
|
|
|
app.globalData.agencyStatus = res.data.data.agencyStatus;
|
|
|
|
|
app.globalData.loginUserInfo = res.data.data;
|
|
|
|
|
//登录设置缓存
|
|
|
|
|
app.globalData.userLoginTokenInfo.tel = res.data.data.tel;
|
|
|
|
|
app.globalData.userLoginTokenInfo.token = null;
|
|
|
|
|
wx.setStorageSync('loginUserTokenInfo', app.globalData.userLoginTokenInfo);
|
|
|
|
|
wx.setStorageSync("loginUserTokenInfo", app.globalData.userLoginTokenInfo);
|
|
|
|
|
|
|
|
|
|
console.log(111);
|
|
|
|
|
try {
|
|
|
|
|
var comeFrom = wx.getStorageSync('comeFromPage');
|
|
|
|
|
var comeFrom = wx.getStorageSync("comeFromPage");
|
|
|
|
|
// var comeFromPageParam = wx.getStorageSync('comeFromPageParam');
|
|
|
|
|
|
|
|
|
|
if(comeFrom == 'me') {
|
|
|
|
|
console.log(comeFrom);
|
|
|
|
|
if (comeFrom == "me") {
|
|
|
|
|
wx.reLaunch({
|
|
|
|
|
url: '/pages/me/index'
|
|
|
|
|
})
|
|
|
|
|
} else if (comeFrom == 'index') {
|
|
|
|
|
url: "/pages/me/index",
|
|
|
|
|
});
|
|
|
|
|
} else if (comeFrom == "index") {
|
|
|
|
|
wx.reLaunch({
|
|
|
|
|
url: '/pages/tgIndex/index'
|
|
|
|
|
})
|
|
|
|
|
} else if (comeFrom == 'detail') {
|
|
|
|
|
url: "/pages/index/index",
|
|
|
|
|
});
|
|
|
|
|
} else if (comeFrom == "detail") {
|
|
|
|
|
wx.navigateBack({
|
|
|
|
|
delta: 1
|
|
|
|
|
})
|
|
|
|
|
delta: 1,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// wx.reLaunch({
|
|
|
|
|
// url: "/pages/detail/index?storeJobId=" + comeFromPageParam.storeJobId
|
|
|
|
|
// })
|
|
|
|
|
} else if (comeFrom == "collect") {
|
|
|
|
|
wx.reLaunch({
|
|
|
|
|
url: "/pages/collect/index",
|
|
|
|
|
});
|
|
|
|
|
} else if (comeFrom == "BillInfo") {
|
|
|
|
|
// console.log(wx.getStorageSync('QRBillInfo'));
|
|
|
|
|
// console.log(JSON.stringify(wx.getStorageSync('QRBillInfo')));
|
|
|
|
|
wx.reLaunch({
|
|
|
|
|
url: "/pages/wodeBillDetail/index?info=" + JSON.stringify(wx.getStorageSync("QRBillInfo")),
|
|
|
|
|
});
|
|
|
|
|
wx.removeStorageSync("QRBillInfo");
|
|
|
|
|
} else {
|
|
|
|
|
wx.setStorage({
|
|
|
|
|
key: "comeFrom",
|
|
|
|
|
data: "login"
|
|
|
|
|
})
|
|
|
|
|
data: "login",
|
|
|
|
|
});
|
|
|
|
|
wx.reLaunch({
|
|
|
|
|
url: "../me/index"
|
|
|
|
|
})
|
|
|
|
|
url: "/pages/index/index",
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
|
|
wx.setStorage({
|
|
|
|
|
key: "comeFrom",
|
|
|
|
|
data: "login"
|
|
|
|
|
})
|
|
|
|
|
data: "login",
|
|
|
|
|
});
|
|
|
|
|
wx.reLaunch({
|
|
|
|
|
url: "/pages/me/index"
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
console.log(222);
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
wx.showToast({
|
|
|
|
|
icon: "none",
|
|
|
|
|
title: res.data.msg,
|
|
|
|
|
duration: 2000
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
url: "/pages/index/index",
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
//console.log('form发生了submit事件,携带数据为:', e.detail.value)
|
|
|
|
|
},
|
|
|
|
|
ohShitfadeOut() {
|
|
|
|
|
var fadeOutTimeout = setTimeout(() => {
|
|
|
|
|
|