|
@@ -458,13 +458,14 @@ function initMenu(data, userInfo) {
|
|
|
//获取科室列表
|
|
|
function getOwnDept() {
|
|
|
// if(hasData('FUNC000058')){
|
|
|
- setCookie("deptList", JSON.stringify([]))
|
|
|
+ setLocal("deptList", JSON.stringify([]))
|
|
|
+ //setCookie("deptList", JSON.stringify([]))
|
|
|
post(api.getDept, {}).then((res) => {
|
|
|
let data = res.data;
|
|
|
if (data.code == 0) {
|
|
|
let result = data.data
|
|
|
- setCookie("deptList", JSON.stringify(result))
|
|
|
- JSON.parse(localStorage.setItem('deptList', JSON.stringify(result)))
|
|
|
+ setLocal("deptList", JSON.stringify(result))
|
|
|
+ //setCookie("deptList", JSON.stringify(result))
|
|
|
}
|
|
|
})
|
|
|
// }
|
|
@@ -497,7 +498,7 @@ function getMenu() {
|
|
|
}
|
|
|
}
|
|
|
if (data.menuWrappers[i].code === 'YH-XXTZ') {
|
|
|
- data.menuWrappers[i].newsNumber = newsNumber
|
|
|
+ data.menuWrappers[i].newsNumber = JSON.stringify(newsNumber)
|
|
|
}
|
|
|
}
|
|
|
initMenu(data.menuWrappers, data.userLoginDTO);
|
|
@@ -512,6 +513,12 @@ function getMenu() {
|
|
|
|
|
|
}
|
|
|
}
|
|
|
+ if (newsNumber == 0) {
|
|
|
+ $(".menu .page", parent.document).children('.redNews').hide()
|
|
|
+ } else {
|
|
|
+ $(".menu .page", parent.document).children('.redNews').show()
|
|
|
+ $(".menu .page", parent.document).children('.redNews').html(newsNumber)
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
};
|