1
This commit is contained in:
@@ -145,7 +145,16 @@ export default {
|
||||
// 获取用户信息和生成路由后再跳转
|
||||
this.$store.dispatch('GetInfo').then(() => {
|
||||
this.$store.dispatch('GenerateRoutes').then(() => {
|
||||
this.$router.push({ path: this.redirect || "/sloworder/index" }).catch(()=>{})
|
||||
// 使用 nextTick 确保路由添加完成
|
||||
this.$nextTick(() => {
|
||||
// 检查是否有慢单权限
|
||||
if (this.$auth.hasPermi('jdorder:sloworder:list')) {
|
||||
this.$router.push({ path: this.redirect || "/sloworder/index" }).catch(()=>{})
|
||||
} else {
|
||||
// 如果没有慢单权限,跳转到用户个人中心
|
||||
this.$router.push({ path: this.redirect || "/user/profile" }).catch(()=>{})
|
||||
}
|
||||
})
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$router.push({ path: this.redirect || "/user/profile" }).catch(()=>{})
|
||||
|
||||
Reference in New Issue
Block a user