yinbangzhong 2 年之前
父节点
当前提交
f434ce3b98
共有 3 个文件被更改,包括 9 次插入8 次删除
  1. 1 0
      .idea/hello-arco-pro.iml
  2. 6 6
      config/vite.config.dev.ts
  3. 2 2
      src/store/modules/user/index.ts

+ 1 - 0
.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" />

+ 6 - 6
config/vite.config.dev.ts

@@ -14,8 +14,8 @@ export default mergeConfig(
       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 @@ export default mergeConfig(
         },
         '/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`), ''),

+ 2 - 2
src/store/modules/user/index.ts

@@ -78,8 +78,8 @@ const useUserStore = defineStore('user', {
         };
         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