Commit 26daf2ef55b0e9ae5ff0942c74fc39929cf97d42
Merge branch 'dev' of http://bj.gitlab.cnlive.com/cnlive_project/cnlive-community-web-vue into dev
Showing
2 changed files
with
9 additions
and
8 deletions
src/api/request.ts
| @@ -8,6 +8,7 @@ let url: any = import.meta.env | @@ -8,6 +8,7 @@ let url: any = import.meta.env | ||
| 8 | let instance = axios.create({ | 8 | let instance = axios.create({ |
| 9 | baseURL: url.VITE_BASE_URL, | 9 | baseURL: url.VITE_BASE_URL, |
| 10 | withCredentials: true, | 10 | withCredentials: true, |
| 11 | + // timeout: 10 | ||
| 11 | timeout: 10000 | 12 | timeout: 10000 |
| 12 | }) | 13 | }) |
| 13 | 14 |
src/layout/menu.vue
| @@ -6,20 +6,20 @@ | @@ -6,20 +6,20 @@ | ||
| 6 | import { ref, computed, onMounted, reactive } from "vue"; | 6 | import { ref, computed, onMounted, reactive } from "vue"; |
| 7 | import * as store from "@/pinia/index"; | 7 | import * as store from "@/pinia/index"; |
| 8 | import styles from "@/style/global.module.scss"; | 8 | import styles from "@/style/global.module.scss"; |
| 9 | -import MenuIcon from './icon.vue' | 9 | +import MenuIcon from "./icon.vue"; |
| 10 | // TIP 获取scss样式变量 | 10 | // TIP 获取scss样式变量 |
| 11 | let styleData = computed(() => { | 11 | let styleData = computed(() => { |
| 12 | return styles; | 12 | return styles; |
| 13 | }); | 13 | }); |
| 14 | let asyncData = reactive({ | 14 | let asyncData = reactive({ |
| 15 | menuData: [], | 15 | menuData: [], |
| 16 | - isCollapse: null | ||
| 17 | -}) | 16 | + isCollapse: null, |
| 17 | +}); | ||
| 18 | onMounted(() => { | 18 | onMounted(() => { |
| 19 | - asyncData.menuData = store.family.loginStore().menuList | 19 | + asyncData.menuData = store.family.loginStore().menuList; |
| 20 | asyncData.isCollapse = computed(() => { | 20 | asyncData.isCollapse = computed(() => { |
| 21 | - return store.family.appStore().isCollapse | ||
| 22 | - }) | 21 | + return store.family.appStore().isCollapse; |
| 22 | + }); | ||
| 23 | }); | 23 | }); |
| 24 | </script> | 24 | </script> |
| 25 | 25 | ||
| @@ -34,10 +34,10 @@ onMounted(() => { | @@ -34,10 +34,10 @@ onMounted(() => { | ||
| 34 | :router="true" | 34 | :router="true" |
| 35 | :collapse-transition="false" | 35 | :collapse-transition="false" |
| 36 | :collapse="asyncData.isCollapse" | 36 | :collapse="asyncData.isCollapse" |
| 37 | - > | 37 | + > |
| 38 | <el-menu-item index="/"> | 38 | <el-menu-item index="/"> |
| 39 | + <MenuIcon :keyId="-1"></MenuIcon> | ||
| 39 | <template #title> | 40 | <template #title> |
| 40 | - <MenuIcon :keyId="-1"></MenuIcon> | ||
| 41 | <span>首页</span> | 41 | <span>首页</span> |
| 42 | </template> | 42 | </template> |
| 43 | </el-menu-item> | 43 | </el-menu-item> |