小程序加记住密码(3天)
This commit is contained in:
@@ -119,7 +119,7 @@
|
|||||||
if (username && token) {
|
if (username && token) {
|
||||||
// 自动登录
|
// 自动登录
|
||||||
console.log("自动登录用户:" + username);
|
console.log("自动登录用户:" + username);
|
||||||
window.location.href = "district/weXinList?type=gb";
|
window.location.href = "../district/weXinList?type=gb&cityName=上海";
|
||||||
// 可以在这里用 token 验证用户身份,或者直接跳转到主页面
|
// 可以在这里用 token 验证用户身份,或者直接跳转到主页面
|
||||||
// 比如:window.location.href = 'dashboard.html';
|
// 比如:window.location.href = 'dashboard.html';
|
||||||
} else {
|
} else {
|
||||||
@@ -148,6 +148,7 @@
|
|||||||
if(re.result == "fail"){
|
if(re.result == "fail"){
|
||||||
$.toast(re.msg);
|
$.toast(re.msg);
|
||||||
} else {
|
} else {
|
||||||
|
setLoginCookie(username, re.token);
|
||||||
window.location.href = "reqCityChoicePage?type=gb";
|
window.location.href = "reqCityChoicePage?type=gb";
|
||||||
}
|
}
|
||||||
},error:function (data, status) {
|
},error:function (data, status) {
|
||||||
|
|||||||
Reference in New Issue
Block a user