|
|
|
|
@ -101,19 +101,16 @@
|
|
|
|
|
<i class="iconfont icon-youjiantou"></i>
|
|
|
|
|
</div>
|
|
|
|
|
</router-link>
|
|
|
|
|
<router-link to="/merchantBack" v-if="loginValue.agencyName == '郑州一才工作' && (loginValue.agencyRole == 2 || loginValue.agencyRole == 1 )">
|
|
|
|
|
<router-link to="/merchantBack" v-if="loginValue.agencyName == '郑州一才工作' && (loginValue.agencyRole == 2 || loginValue.agencyRole == 1 )">
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
|
|
<span>
|
|
|
|
|
<i class="iconfont icon-shangjiahoutai"></i>商家后台and1.0
|
|
|
|
|
</span>
|
|
|
|
|
<i class="iconfont icon-youjiantou"></i>
|
|
|
|
|
</div>
|
|
|
|
|
</router-link>
|
|
|
|
|
</router-link>
|
|
|
|
|
<router-link to="###" v-if="loginValue.agencyName == '郑州一才工作' && (loginValue.agencyRole == 2 || loginValue.agencyRole == 1 )">
|
|
|
|
|
<div
|
|
|
|
|
@click="goAdmin"
|
|
|
|
|
>
|
|
|
|
|
<div @click="goAdmin">
|
|
|
|
|
<span>
|
|
|
|
|
<i class="iconfont icon-shangjiahoutai"></i>商家后台and4.0
|
|
|
|
|
</span>
|
|
|
|
|
@ -339,33 +336,34 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
userbaseInfo: JSON.parse(localStorage.getItem('LOGIN_DATA')),
|
|
|
|
|
loginPage: false,
|
|
|
|
|
routertitleindex: 0,
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 计算属性
|
|
|
|
|
computed: {
|
|
|
|
|
routertitleindex: {
|
|
|
|
|
set() {},
|
|
|
|
|
get() {
|
|
|
|
|
const path = this.$route.fullPath
|
|
|
|
|
if (path.indexOf('serviceoutlets') > -1) {
|
|
|
|
|
return 2
|
|
|
|
|
} else if (path.indexOf('list') > -1 || path.indexOf('detail') > -1) {
|
|
|
|
|
return 1
|
|
|
|
|
} else if (path.indexOf('aboutus') > -1) {
|
|
|
|
|
return 3
|
|
|
|
|
} else if (path.indexOf('main') > -1) {
|
|
|
|
|
return 0
|
|
|
|
|
} else if (path.indexOf('mytownsman') > -1) {
|
|
|
|
|
return 4
|
|
|
|
|
} else if (path.indexOf('mybill') > -1) {
|
|
|
|
|
return 5
|
|
|
|
|
} else if (path.indexOf('dataStatistics') > -1) {
|
|
|
|
|
return 6
|
|
|
|
|
} else {
|
|
|
|
|
return 7
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
// routertitleindex: {
|
|
|
|
|
// set() {},
|
|
|
|
|
// get() {
|
|
|
|
|
// const path = this.$route.fullPath
|
|
|
|
|
// if (path.indexOf('serviceoutlets') > -1) {
|
|
|
|
|
// return 2
|
|
|
|
|
// } else if (path.indexOf('list') > -1 || path.indexOf('detail') > -1) {
|
|
|
|
|
// return 1
|
|
|
|
|
// } else if (path.indexOf('aboutus') > -1) {
|
|
|
|
|
// return 3
|
|
|
|
|
// } else if (path.indexOf('main') > -1) {
|
|
|
|
|
// return 0
|
|
|
|
|
// } else if (path.indexOf('mytownsman') > -1) {
|
|
|
|
|
// return 4
|
|
|
|
|
// } else if (path.indexOf('mybill') > -1) {
|
|
|
|
|
// return 5
|
|
|
|
|
// } else if (path.indexOf('dataStatistics') > -1) {
|
|
|
|
|
// return 6
|
|
|
|
|
// } else {
|
|
|
|
|
// return 7
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
// isLogin() {
|
|
|
|
|
// return localStorage.getItem("LOGIN_DATA") !== null ? true : false;
|
|
|
|
|
// },
|
|
|
|
|
@ -379,16 +377,16 @@ export default {
|
|
|
|
|
// 侦听器
|
|
|
|
|
watch: {
|
|
|
|
|
routertitleindex() {
|
|
|
|
|
const path = this.$route.fullPath
|
|
|
|
|
if (path.indexOf('serviceoutlets') > -1) {
|
|
|
|
|
this.laoxiangshow = true
|
|
|
|
|
} else if (path.indexOf('list') > -1 || path.indexOf('detail') > -1) {
|
|
|
|
|
this.laoxiangshow = true
|
|
|
|
|
} else if (path.indexOf('aboutus') > -1) {
|
|
|
|
|
this.laoxiangshow = false
|
|
|
|
|
} else {
|
|
|
|
|
this.laoxiangshow = true
|
|
|
|
|
}
|
|
|
|
|
// const path = this.$route.fullPath
|
|
|
|
|
// if (path.indexOf('serviceoutlets') > -1) {
|
|
|
|
|
// this.laoxiangshow = true
|
|
|
|
|
// } else if (path.indexOf('list') > -1 || path.indexOf('detail') > -1) {
|
|
|
|
|
// this.laoxiangshow = true
|
|
|
|
|
// } else if (path.indexOf('aboutus') > -1) {
|
|
|
|
|
// this.laoxiangshow = false
|
|
|
|
|
// } else {
|
|
|
|
|
// this.laoxiangshow = true
|
|
|
|
|
// }
|
|
|
|
|
this.showfooter()
|
|
|
|
|
},
|
|
|
|
|
$route: {
|
|
|
|
|
@ -400,8 +398,26 @@ export default {
|
|
|
|
|
// console.dir(this.navigationBarLocation);
|
|
|
|
|
window.addEventListener('scroll', this.navigationBarLocation)
|
|
|
|
|
window.addEventListener('scroll', this.windowScroll) //监听页面滚动
|
|
|
|
|
if (to.fullPath.indexOf('serviceoutlets') > -1) {
|
|
|
|
|
this.routertitleindex = 2
|
|
|
|
|
} else if (to.fullPath.indexOf('list') > -1 || to.fullPath.indexOf('detail') > -1) {
|
|
|
|
|
this.routertitleindex = 1
|
|
|
|
|
} else if (to.fullPath.indexOf('aboutus') > -1) {
|
|
|
|
|
this.routertitleindex = 3
|
|
|
|
|
} else if (to.fullPath.indexOf('main') > -1) {
|
|
|
|
|
this.routertitleindex = 0
|
|
|
|
|
} else if (to.fullPath.indexOf('mytownsman') > -1) {
|
|
|
|
|
this.routertitleindex = 4
|
|
|
|
|
} else if (to.fullPath.indexOf('mybill') > -1) {
|
|
|
|
|
this.routertitleindex = 5
|
|
|
|
|
} else if (to.fullPath.indexOf('dataStatistics') > -1) {
|
|
|
|
|
this.routertitleindex = 6
|
|
|
|
|
} else {
|
|
|
|
|
this.routertitleindex = 7
|
|
|
|
|
}
|
|
|
|
|
if (to.fullPath == '/login') {
|
|
|
|
|
this.loginPage = true
|
|
|
|
|
this.isLogin = false
|
|
|
|
|
} else {
|
|
|
|
|
this.loginPage = false
|
|
|
|
|
}
|
|
|
|
|
@ -647,20 +663,20 @@ export default {
|
|
|
|
|
// window.location.reload();
|
|
|
|
|
this.reload()
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
goAdmin(){
|
|
|
|
|
let obj = JSON.parse(localStorage.getItem("LOGIN_DATA"));
|
|
|
|
|
if(window.location.hostname == 'localhost'){
|
|
|
|
|
// 测试环境,通过URL获取token
|
|
|
|
|
window.location.href = 'http://localhost:3000/merchantManagement/homePage?token=' + obj.token + '&username=' + obj.user.userName + '&avatar=' + obj.imgSrc
|
|
|
|
|
}else{
|
|
|
|
|
// 正式环境,通过缓存获取
|
|
|
|
|
localStorage.setItem('daotian_to_admin_token',obj.token)
|
|
|
|
|
localStorage.setItem('daotian_to_admin_avatar',obj.imgSrc)
|
|
|
|
|
localStorage.setItem('daotian_to_admin_username',obj.user.userName)
|
|
|
|
|
window.location.href = 'http://idaotian.com/dist2.0.0/#/merchantManagement/homePage';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
goAdmin() {
|
|
|
|
|
let obj = JSON.parse(localStorage.getItem('LOGIN_DATA'))
|
|
|
|
|
if (window.location.hostname == 'localhost') {
|
|
|
|
|
// 测试环境,通过URL获取token
|
|
|
|
|
window.location.href = 'http://localhost:3000/merchantManagement/homePage?token=' + obj.token + '&username=' + obj.user.userName + '&avatar=' + obj.imgSrc
|
|
|
|
|
} else {
|
|
|
|
|
// 正式环境,通过缓存获取
|
|
|
|
|
localStorage.setItem('daotian_to_admin_token', obj.token)
|
|
|
|
|
localStorage.setItem('daotian_to_admin_avatar', obj.imgSrc)
|
|
|
|
|
localStorage.setItem('daotian_to_admin_username', obj.user.userName)
|
|
|
|
|
window.location.href = 'http://idaotian.com/dist2.0.0/#/merchantManagement/homePage'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|