测试商户身份切换

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

+2 -2
View File
@@ -50,7 +50,7 @@ const selectRole = (role: "user" | "merchant") => (userRole.value = role)
const confirmRole = async () => {
if (userRole.value === "user") {
uni.setStorageSync("userRole", userRole.value)
uni.redirectTo({ url: "/pages/tabbar/coopMerchant" })
uni.reLaunch({ url: "/pages/tabbar/coopMerchant" })
return
}
if (userRole.value === "merchant") {
@@ -59,7 +59,7 @@ const confirmRole = async () => {
if (res.code == 0) {
if (res.data) {
uni.setStorageSync("userRole", userRole.value)
uni.redirectTo({ url: "/pages/tabbar/individualOrder" })
uni.reLaunch({ url: "/pages/tabbar/individualOrder" })
return
} else {
uni.showToast({ title: "您不是商户", icon: "none" })