mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2025-12-16 23:45:53 +08:00
延时展示提示信息,防止被删除
This commit is contained in:
@@ -367,15 +367,17 @@
|
|||||||
storage.setUserInfo(user.data.result);
|
storage.setUserInfo(user.data.result);
|
||||||
storage.setHasLogin(true);
|
storage.setHasLogin(true);
|
||||||
}else {
|
}else {
|
||||||
uni.showToast({
|
setTimeout(() => {
|
||||||
title: user.data.message,
|
uni.showToast({
|
||||||
icon: "none",
|
title: user.data.message,
|
||||||
});
|
icon: "none",
|
||||||
storage.setAccessToken('');
|
});
|
||||||
storage.setRefreshToken('');
|
storage.setAccessToken('');
|
||||||
uni.switchTab({
|
storage.setRefreshToken('');
|
||||||
url: "/pages/tabbar/user/my",
|
uni.switchTab({
|
||||||
});
|
url: "/pages/tabbar/user/my",
|
||||||
|
});
|
||||||
|
}, 500);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
getCurrentPages().length > 1 ?
|
getCurrentPages().length > 1 ?
|
||||||
@@ -515,15 +517,17 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
setTimeout(() => {
|
||||||
title: user.data.message,
|
uni.showToast({
|
||||||
icon: "none",
|
title: user.data.message,
|
||||||
});
|
icon: "none",
|
||||||
storage.setAccessToken('');
|
});
|
||||||
storage.setRefreshToken('');
|
storage.setAccessToken('');
|
||||||
uni.switchTab({
|
storage.setRefreshToken('');
|
||||||
url: "/pages/tabbar/user/my",
|
uni.switchTab({
|
||||||
});
|
url: "/pages/tabbar/user/my",
|
||||||
|
});
|
||||||
|
}, 500);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -591,22 +595,26 @@
|
|||||||
storage.setAutoCp(0)
|
storage.setAutoCp(0)
|
||||||
// 登录成功
|
// 登录成功
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "登录成功!",
|
title:"提示",
|
||||||
|
content: "登录成功!",
|
||||||
icon: "none",
|
icon: "none",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
whetherNavigate();
|
whetherNavigate();
|
||||||
}else{
|
}else{
|
||||||
uni.showToast({
|
setTimeout(() => {
|
||||||
|
uni.showToast({
|
||||||
title: user.data.message,
|
title: user.data.message,
|
||||||
icon: "none",
|
icon: "none",
|
||||||
});
|
});
|
||||||
storage.setAccessToken('');
|
storage.setAccessToken('');
|
||||||
storage.setRefreshToken('');
|
storage.setRefreshToken('');
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: "/pages/tabbar/user/my",
|
url: "/pages/tabbar/user/my",
|
||||||
});
|
});
|
||||||
|
}, 500);
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user