未登录 点击收藏

master
zsk 2 years ago
parent afc57cffca
commit fd43cf75ea

@ -210,7 +210,8 @@ App({
return new Promise(function (resolve, reject) { return new Promise(function (resolve, reject) {
try { try {
that.globalData.userLoginTokenInfo.tel = tel; that.globalData.userLoginTokenInfo.tel = tel;
that.globalData.userLoginTokenInfo.token = token; that.globalData.userLoginTokenInfo.token = token;
debugger
wx.setStorageSync("loginUserTokenInfo", that.globalData.userLoginTokenInfo); wx.setStorageSync("loginUserTokenInfo", that.globalData.userLoginTokenInfo);
that.appLoginByTel(resolve, reject); that.appLoginByTel(resolve, reject);
} catch (e) { } catch (e) {
@ -271,8 +272,8 @@ App({
that.globalData.sessionId = res.data.data.sessionId; that.globalData.sessionId = res.data.data.sessionId;
that.globalData.headers.Cookie = "JSESSIONID=" + res.data.data.sessionId; that.globalData.headers.Cookie = "JSESSIONID=" + res.data.data.sessionId;
that.globalData.headers2.Cookie = "JSESSIONID=" + res.data.data.sessionId; that.globalData.headers2.Cookie = "JSESSIONID=" + res.data.data.sessionId;
// that.globalData.headers.Authorization = "Bearer " + res.data.data.token; that.globalData.headers.Authorization = "Bearer " + res.data.data.token;
// that.globalData.headers2.Authorization = "Bearer " + res.data.data.token; that.globalData.headers2.Authorization = "Bearer " + res.data.data.token;
that.globalData.isLogin = true; that.globalData.isLogin = true;
that.globalData.read = res.data.data.read; that.globalData.read = res.data.data.read;

@ -2091,36 +2091,22 @@ Page({
}, },
success: function (res) { success: function (res) {
console.log(res); console.log(res);
app.globalData.openId = res.data.data.pageBean.openId; app.globalData.openId = res.data.data.openId;
let promise = app.setLoginUserTokenInfo(res.data.data.pageBean.phoneNumber, null); let promise = app.setLoginUserTokenInfo(res.data.data.phoneNumber, null);
var collected = e.currentTarget.dataset.collected; var collected = e.currentTarget.dataset.collected;
if (collected) {
console.log(wx.getStorage("loginUserTokenInfo"))
console.log(collected)
promise.then((res) => { promise.then((res) => {
that.setData({ that.setData({
isLogin: app.globalData.isLogin, isLogin: app.globalData.isLogin,
}); });
that.doCollected(collected, e.currentTarget.dataset.jobid); // debugger
setTimeout(()=>{
that.doCollected(collected, e.currentTarget.dataset.jobid);
},1000)
// that.collectedStoreJobList(); // that.collectedStoreJobList();
}); });
} else {
if (that.data.recordBillType == "photo" || that.data.recordBillType == "record") {
promise.then((res) => {
if (that.data.recordBillType == "photo") {
that.chooseIdCard();
} else {
that.navigatorToRecord();
}
});
} else {
promise.then((res) => {
let argument;
argument = JSON.stringify(e.currentTarget.dataset.info).replace(/\=|\&/g, "3D");
wx.navigateTo({
url: `../newEnroll/enroll/index?applyType=1&info=${argument}`,
});
});
}
}
}, },
fail: function (res) { fail: function (res) {
console.log("获取用户手机号错误"); console.log("获取用户手机号错误");
@ -2367,7 +2353,7 @@ Page({
//取消收藏 //取消收藏
for (var i = 0; i != that.data.recordList.length; ++i) { for (var i = 0; i != that.data.recordList.length; ++i) {
if (that.data.recordList[i].id - storeJobId == 0) { if (that.data.recordList[i].id - storeJobId == 0) {
that.data.recordList[i].collected = 1; that.data.recordList[i].collected = 0;
break; break;
} }
} }

Loading…
Cancel
Save