|
@@ -16,10 +16,10 @@
|
|
|
<div
|
|
|
class="flex-1 flex-box-ce"
|
|
|
style="padding: 0 20px"
|
|
|
- v-if="course_account_info.name"
|
|
|
+ v-if="courseName"
|
|
|
>
|
|
|
<div class="left-menu">
|
|
|
- <p>{{ course_account_info.name }}</p>
|
|
|
+ <p>{{ courseName }}</p>
|
|
|
</div>
|
|
|
<div class="flex-1"></div>
|
|
|
<div class="right-menu">
|
|
@@ -93,6 +93,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ courseName:'首页',
|
|
|
loading: false,
|
|
|
isLog: false,
|
|
|
menuIndex: 2,
|
|
@@ -140,12 +141,12 @@ export default {
|
|
|
watch: {
|
|
|
//监视路由变化,有变化就缓存导航状态
|
|
|
$route(to, from) {
|
|
|
- console.log(to.path)
|
|
|
var str = to.path;
|
|
|
this.menuArr.some((item, index) => {
|
|
|
if (item.path == str) {
|
|
|
this.menuIndex = item.index;
|
|
|
this.$setCache("course_path", item.index);
|
|
|
+ this.setTit()
|
|
|
return true;
|
|
|
}
|
|
|
});
|
|
@@ -157,9 +158,13 @@ export default {
|
|
|
if (this.$route.path != "/course") {
|
|
|
this.menuIndex =
|
|
|
this.$getCache("course_path") != 1 ? this.$getCache("course_path") : 1;
|
|
|
+ this.setTit()
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ setTit(){
|
|
|
+ this.courseName = this.$getCache("course_path")==1?'首页':this.$getCache("course_path")==2?'课程管理':this.$getCache("course_path")==3?'经销商管理':this.$getCache("course_path")==4?'统计':this.$getCache("course_path")==5?'设置':'管理员'
|
|
|
+ },
|
|
|
judegLogin() {
|
|
|
if (!this.$getCourseId()) {
|
|
|
if (!localStorage.getItem("Course-Id")) {
|