subPackage/user/role/index.vue
@@ -66,6 +66,8 @@ }, async submit() { const that = this //保存当前激活的角色 store.commit("setActiveRoleId", this.selectRole.id) @@ -76,9 +78,23 @@ let data = res.data const appMenu = data.filter(e => e.name == 'app')[0] console.log("菜单:", appMenu) store.commit("SET_MENU", appMenu) this.$u.func.showToast("切换角色成功") uni.showToast({ title: "切换身份成功", icon: "success", duration: data.duration || 1500, success: () => { setTimeout(() => { this.$u.func.globalNavigator("/pages/home/index", "switchTab") }, data.duration || 1500) } }) } } }