This commit is contained in:
icssoa 2021-03-25 18:09:13 +08:00
parent 3fecc4f64b
commit 8fbe09c133
6 changed files with 17 additions and 14 deletions

View File

@ -11,7 +11,7 @@
"dependencies": {
"@vue/composition-api": "^1.0.0-rc.5",
"axios": "^0.21.1",
"cl-admin": "^1.5.1",
"cl-admin": "^1.5.3",
"cl-admin-crud": "^1.6.4",
"cl-admin-theme": "^0.0.5",
"clipboard": "^2.0.7",

View File

@ -15,8 +15,8 @@
</template>
<script>
import { mapMutations, mapGetters } from "vuex";
import { firstMenu } from "@/cool/modules/base/utils";
import { mapMutations } from "vuex";
import { firstMenu } from "../../utils";
export default {
name: "cl-menu-topbar",
@ -28,10 +28,8 @@ export default {
},
computed: {
...mapGetters(["menuGroup"]),
list() {
return this.menuGroup.filter(e => e.isShow);
return this.$store.getters.menuGroup.filter(e => e.isShow);
}
},
@ -56,7 +54,7 @@ export default {
}
};
this.menuGroup.forEach((e, i) => {
this.list.forEach((e, i) => {
deep(e, i);
});
},
@ -67,7 +65,8 @@ export default {
onSelect(index) {
this.SET_MENU_LIST(index);
const url = firstMenu(this.menuGroup[index].children);
//
const url = firstMenu(this.list[index].children);
this.$router.push(url);
}
}

View File

@ -137,7 +137,7 @@ export default {
//
onMessage(msg) {
//
this.$emit("message", this.visible);
this.$emit("message", msg);
//
this.notification(msg);

View File

@ -134,7 +134,6 @@ export default {
size: 20,
total: 0
},
player: {},
voice: {
url: "",
timer: null

View File

@ -98,7 +98,8 @@
title="图片预览"
:visible.sync="preview.visible"
:props="{
width: previewWidth
width: previewWidth,
'append-to-body': true
}"
>
<img width="100%" :src="preview.url" alt="" />

View File

@ -1,4 +1,5 @@
import axios from "axios";
import { Message } from "element-ui";
import store from "@/store";
import { isDev } from "@/config/env";
import { href, storage } from "cl-admin/utils";
@ -120,8 +121,11 @@ axios.interceptors.response.use(
break;
case 403:
console.error(`${config.url} 无权限访问!!`);
href("/403");
if (isDev) {
Message.error(`${config.url} 无权限访问!!`);
} else {
href("/403");
}
break;
case 404:
@ -135,7 +139,7 @@ axios.interceptors.response.use(
case 502:
if (isDev) {
return Promise.reject("服务异常!!");
Message.error(`${config.url} 服务异常!!`);
} else {
href("/502");
}