代码更新 #81
@ -5,8 +5,8 @@
|
||||
<!-- 统一显示logo和导航 -->
|
||||
<div class="logo">
|
||||
<!-- Logo图片,点击跳转首页 - 使用与goHome相同的逻辑 -->
|
||||
<img v-if="JSON.stringify(logoInfoNew) !== '{}'" @click="goHome" style="cursor:pointer;" class="logoImg"
|
||||
:src="logoInfoNew.home.logoImg || ''" alt="">
|
||||
<img v-if="JSON.stringify(logoInfoNew) !== '{}'" @click="goHome" style="cursor:pointer;"
|
||||
class="logoImg" :src="logoInfoNew.home.logoImg || ''" alt="">
|
||||
|
||||
<!-- 主导航菜单 -->
|
||||
<nav class="main-nav">
|
||||
@ -159,8 +159,12 @@
|
||||
</div>
|
||||
|
||||
<!-- 消息中心组件 -->
|
||||
<message-center ref="messageCenter" :visible.sync="messageCenterVisible" :userId="userId"
|
||||
@unread-count-update="handleUnreadCountUpdate" />
|
||||
<message-center
|
||||
ref="messageCenter"
|
||||
:visible.sync="messageCenterVisible"
|
||||
:userId="userId"
|
||||
@unread-count-update="handleUnreadCountUpdate"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -249,7 +253,7 @@ export default Vue.extend({
|
||||
},
|
||||
// 判断当前是否为ncmatch.cn域名
|
||||
isNcmatchDomain() {
|
||||
return window.location.hostname.includes('ncmatch') || window.Location.href.includes('ncmatch');
|
||||
return window.location.hostname.includes('ncmatch.cn');
|
||||
},
|
||||
// 首页激活状态计算
|
||||
isActiveHome() {
|
||||
@ -302,13 +306,13 @@ export default Vue.extend({
|
||||
this.$router.push('/product/productHome')
|
||||
} else if (sessionStorage.getItem('jueseNew').includes('运营')) {
|
||||
this.$router.push('/operation/supplierManagement')
|
||||
} else if (sessionStorage.getItem('jueseNew').includes('运维')) {
|
||||
}else if(sessionStorage.getItem('jueseNew').includes('运维')){
|
||||
this.$router.push('/operationAndMaintenance/workOrderProcessing')
|
||||
} else if (sessionStorage.getItem('jueseNew').includes('销售')) {
|
||||
}else if(sessionStorage.getItem('jueseNew').includes('销售')){
|
||||
this.$router.push('/sales/distributorManagement')
|
||||
} else if (sessionStorage.getItem('jueseNew').includes('财务')) {
|
||||
}else if(sessionStorage.getItem('jueseNew').includes('财务')){
|
||||
this.$router.push('/finance/supplierSettlementStatistics')
|
||||
} else if (sessionStorage.getItem('jueseNew').includes('admin')) {
|
||||
}else if(sessionStorage.getItem('jueseNew').includes('admin')){
|
||||
this.$router.push('/superAdministrator/addAdmin')
|
||||
}
|
||||
},
|
||||
@ -663,10 +667,12 @@ export default Vue.extend({
|
||||
|
||||
// 首页跳转方法 - 根据域名判断跳转到不同的首页
|
||||
goHome() {
|
||||
console.log('当前域名:', window.location.href);
|
||||
|
||||
if (this.isNcmatchDomain) {
|
||||
window.location.href = '/#/ncmatchHome/index'; // 根据路由模式调整(hash/history)
|
||||
this.$router.push('/ncmatchHome/index');
|
||||
} else {
|
||||
window.location.href = '/#/homePage/index';
|
||||
this.$router.push('/homePage/index');
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user