qj-common 4.1.29 → 4.1.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -10,6 +10,14 @@
|
|
|
10
10
|
<p @click="toLogin()">登录</p>
|
|
11
11
|
</div>
|
|
12
12
|
<div class="topRight">
|
|
13
|
+
<el-badge
|
|
14
|
+
class="msg-icon"
|
|
15
|
+
v-if="proappEnvLayout && proappEnvLayout.tenantCode == '2021122100000001'"
|
|
16
|
+
is-dot
|
|
17
|
+
:hidden='unreadMessageNumPC==0'
|
|
18
|
+
>
|
|
19
|
+
<i class="el-icon-bell" @click="jumpToPage"></i>
|
|
20
|
+
</el-badge>
|
|
13
21
|
<block>
|
|
14
22
|
<img v-if="$route.path === `/order`" alt=""
|
|
15
23
|
class="seleIcon"
|
|
@@ -34,6 +42,8 @@ import {loginOut} from '#/api/login.js'
|
|
|
34
42
|
export default {
|
|
35
43
|
data() {
|
|
36
44
|
return {
|
|
45
|
+
unreadMessageNumPC:0,
|
|
46
|
+
proappEnvLayout:null,
|
|
37
47
|
userPhone: '',
|
|
38
48
|
userInfo: {},
|
|
39
49
|
hrefurl: process.env.API_ROOT,
|
|
@@ -43,8 +53,29 @@ export default {
|
|
|
43
53
|
if (window.sessionStorage.getItem('personalInfo')) {
|
|
44
54
|
this.userInfo = JSON.parse(window.sessionStorage.getItem('personalInfo'))
|
|
45
55
|
}
|
|
56
|
+
this.proappEnvLayout = window.sessionStorage.getItem('proappEnvLayout') ? JSON.parse(window.sessionStorage.getItem('proappEnvLayout')) : '';
|
|
57
|
+
|
|
58
|
+
if(this.proappEnvLayout && this.proappEnvLayout.tenantCode == '2021122100000001') this.watchLocalStorage()
|
|
46
59
|
},
|
|
47
60
|
methods: {
|
|
61
|
+
/**
|
|
62
|
+
* 监听保存到本地的未读消息数量用来显示角标
|
|
63
|
+
*/
|
|
64
|
+
watchLocalStorage(){
|
|
65
|
+
// 监听localStorage的变化
|
|
66
|
+
window.addEventListener('storage', event=>{
|
|
67
|
+
if (event.key === 'unreadMessageNumPC') {
|
|
68
|
+
// 处理数据变化的逻辑
|
|
69
|
+
this.unreadMessageNumPC = Number(event.newValue)
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
},
|
|
73
|
+
/**
|
|
74
|
+
* 跳转到消息列表页面
|
|
75
|
+
*/
|
|
76
|
+
jumpToPage(){
|
|
77
|
+
location.href = '/paas/b2b-cli-pc-ayd/index.html#/msgListPC'
|
|
78
|
+
},
|
|
48
79
|
toLogin() {
|
|
49
80
|
location.href = '/paas/b2b-cli-pc-ayd/index.html#/loginPc'
|
|
50
81
|
},
|
|
@@ -127,4 +158,13 @@ export default {
|
|
|
127
158
|
}
|
|
128
159
|
}
|
|
129
160
|
}
|
|
161
|
+
/deep/ .msg-icon{
|
|
162
|
+
display:inline;
|
|
163
|
+
cursor: pointer;
|
|
164
|
+
margin-right:10px;
|
|
165
|
+
.el-badge__content.is-fixed{
|
|
166
|
+
top:4px;
|
|
167
|
+
right: 8px;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
130
170
|
</style>
|