|
|
|
@ -8,14 +8,24 @@ list.forEach((item) => {
|
|
|
|
invoke(e) {
|
|
|
|
invoke(e) {
|
|
|
|
const phonePattern = /^1[3456789]\d{9}$/;
|
|
|
|
const phonePattern = /^1[3456789]\d{9}$/;
|
|
|
|
let token;
|
|
|
|
let token;
|
|
|
|
if (phonePattern.test(common_vendor.index.getStorageSync("phoneNumber"))) {
|
|
|
|
if (!phonePattern.test(common_vendor.index.getStorageSync("phoneNumber"))) {
|
|
|
|
token = common_vendor.index.getStorageSync("phoneNumber");
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
common_vendor.index.showToast({
|
|
|
|
common_vendor.index.showToast({
|
|
|
|
icon: "none",
|
|
|
|
icon: "none",
|
|
|
|
title: "登录失败,请重新登录",
|
|
|
|
title: "登录不存在,请重新登录",
|
|
|
|
duration: 1e3
|
|
|
|
duration: 1e3,
|
|
|
|
|
|
|
|
success: () => {
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
|
|
common_vendor.index.showToast({
|
|
|
|
|
|
|
|
icon: "none",
|
|
|
|
|
|
|
|
title: "登录不存在,请重新登录",
|
|
|
|
|
|
|
|
duration: 800
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
}, 1e3);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (phonePattern.test(common_vendor.index.getStorageSync("phoneNumber"))) {
|
|
|
|
|
|
|
|
token = common_vendor.index.getStorageSync("phoneNumber");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const url = e.url.split("?")[0];
|
|
|
|
const url = e.url.split("?")[0];
|
|
|
|
if (!needLogin.includes(url) && !token) {
|
|
|
|
if (!needLogin.includes(url) && !token) {
|
|
|
|
|