|
|
@@ -1,4 +1,5 @@
|
|
|
import { mapState } from "vuex";
|
|
|
+import pathMixin from "@/mixins/path";
|
|
|
import "./index.scss";
|
|
|
|
|
|
export default {
|
|
|
@@ -15,14 +16,12 @@ export default {
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState({
|
|
|
- course: state => state.course.currentCourse,
|
|
|
- profile: state => state.user.profile
|
|
|
+ course: state => state.course.currentCourse
|
|
|
})
|
|
|
},
|
|
|
+ mixins: [pathMixin],
|
|
|
render() {
|
|
|
- const { profile, course = {}, routes = [], tabList = [] } = this;
|
|
|
- const { role = "" } = profile;
|
|
|
- const prefix = `/course-${role.toLowerCase()}/${course.id}`;
|
|
|
+ const { prefix, course, routes = [], tabList = [] } = this;
|
|
|
const { logo, title, action, content, extraContent } = this.$slots;
|
|
|
const showTabs = tabList && tabList.length > 0;
|
|
|
console.log(prefix);
|