测试商户身份切换

This commit is contained in:
weiwei committed 2025-04-08 20:06:29 +08:00
1 parent 3daf1e1f20
commit 6c656b6f03
2 files changed
+8 -14

No files matched your search

+6 -12
View File
@@ -83,7 +83,6 @@ const state = reactive<{
const STORAGE_KEYS = {
TOKEN: constant.storageConstant.TOKEN,
USER_INFO: constant.storageConstant.USERINFO,
USER_ROLE: constant.storageConstant.USERROLE,
}
const storage = {
@@ -116,11 +115,6 @@ const storage = {
uni.removeStorageSync(STORAGE_KEYS.USER_INFO)
state.userInfo = {}
},
// 清除用户角色存储
clearUserRole: () => {
uni.removeStorageSync(STORAGE_KEYS.USER_ROLE)
},
}
const login = {
@@ -239,7 +233,6 @@ const login = {
// 切换角色
changeRole: () => {
storage.clearUserRole()
router.jump("/pages/user/userRole")
},
}
@@ -253,13 +246,14 @@ const scanCode = {
if (decodedString) {
scanCode.processScanResult(decodedString)
} else {
uni.showToast({ title: "无效的二维码", icon: "none" })
}
// else {
// uni.showToast({ title: "无效的二维码", icon: "none" })
// }
} catch (error: any) {
if (error) {
uni.showToast({ title: error, icon: "none" })
}
// if (error) {
// uni.showToast({ title: error, icon: "none" })
// }
}
},