From f434ce3b98b921e6437eb49eacf5567b4167c69b Mon Sep 17 00:00:00 2001 From: yinbangzhong <zhongbangyin@126.com> Date: 星期五, 16 八月 2024 18:28:11 +0800 Subject: [PATCH] 角色 --- src/store/modules/user/index.ts | 4 ++-- .idea/hello-arco-pro.iml | 1 + config/vite.config.dev.ts | 12 ++++++------ 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.idea/hello-arco-pro.iml b/.idea/hello-arco-pro.iml index 24643cc..cf2da3e 100644 --- a/.idea/hello-arco-pro.iml +++ b/.idea/hello-arco-pro.iml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <module type="WEB_MODULE" version="4"> + <component name="Go" enabled="true" /> <component name="NewModuleRootManager"> <content url="file://$MODULE_DIR$"> <excludeFolder url="file://$MODULE_DIR$/.tmp" /> diff --git a/config/vite.config.dev.ts b/config/vite.config.dev.ts index 3bb9577..05d14d4 100644 --- a/config/vite.config.dev.ts +++ b/config/vite.config.dev.ts @@ -14,8 +14,8 @@ proxy: { '/base': { // target: 'http://aiotlink.com:8189', - target: 'http://192.168.20.116:8089', - // target: 'http://192.168.20.158:8089', + //target: 'http://192.168.20.116:8089', + target: 'http://192.168.20.158:8089', changeOrigin: true, ws: true, // rewrite: (path) => path.replace(new RegExp(`^/basic-api`), ''), @@ -24,16 +24,16 @@ }, '/api': { // target: 'http://aiotlink.com:8189', - target: 'http://192.168.20.116:8089', - // target: 'http://192.168.20.158:8089', + //target: 'http://192.168.20.116:8089', + target: 'http://192.168.20.158:8089', changeOrigin: true, ws: true, // rewrite: (path) => path.replace(new RegExp(`^/basic-api`), ''), }, '/api/v1': { // target: 'http://aiotlink.com:8189', - target: 'http://192.168.20.116:8089', - // target: 'http://192.168.20.158:8089', + //target: 'http://192.168.20.116:8089', + target: 'http://192.168.20.158:8089', changeOrigin: true, ws: true, // rewrite: (path) => path.replace(new RegExp(`^/basic-api`), ''), diff --git a/src/store/modules/user/index.ts b/src/store/modules/user/index.ts index 1ee0211..e7ae4eb 100644 --- a/src/store/modules/user/index.ts +++ b/src/store/modules/user/index.ts @@ -78,8 +78,8 @@ }; if(res.data.roles && res.data.roles.length>0) this.resources=res.data.roles[0].resources; - setUserInfo(JSON.stringify(userInfo)); - setUserResources(JSON.stringify(this.resources)) + setUserInfo(JSON.stringify(userInfo)); + setUserResources(JSON.stringify(this.resources)) for (const r of this.resources) { if (r.menuType == 0) { return r.component -- Gitblit v1.8.0