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": { "dependencies": {
"@vue/composition-api": "^1.0.0-rc.5", "@vue/composition-api": "^1.0.0-rc.5",
"axios": "^0.21.1", "axios": "^0.21.1",
"cl-admin": "^1.5.1", "cl-admin": "^1.5.3",
"cl-admin-crud": "^1.6.4", "cl-admin-crud": "^1.6.4",
"cl-admin-theme": "^0.0.5", "cl-admin-theme": "^0.0.5",
"clipboard": "^2.0.7", "clipboard": "^2.0.7",

View File

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

View File

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

View File

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

View File

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

View File

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