yinbangzhong
2024-08-16 f434ce3b98b921e6437eb49eacf5567b4167c69b
角色
3个文件已修改
17 ■■■■ 已修改文件
.idea/hello-arco-pro.iml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
config/vite.config.dev.ts 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/modules/user/index.ts 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.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" />
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`), ''),
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