给token区分环境

This commit is contained in:
kron
2025-09-12 17:49:26 +08:00
parent 24b776f327
commit 0a151de3c9
6 changed files with 36 additions and 15 deletions

View File

@@ -55,7 +55,9 @@ const toAboutUsPage = () => {
const showLogout = ref(false);
const logout = () => {
uni.removeStorageSync("token");
uni.removeStorageSync(
`${uni.getAccountInfoSync().miniProgram.envVersion}_token`
);
uni.navigateBack();
updateUser();
};