消息系统

This commit is contained in:
wxd
2024-10-02 12:27:58 +08:00
parent 0a273a24dc
commit dc004824b5
7 changed files with 36 additions and 21 deletions

View File

@@ -256,7 +256,7 @@ export default defineComponent({
let getUnreadCount = ()=>{
Https.axiosGet(Https.httpUrls.getUnreadCount).then((rv)=>{
if(rv){
store.commit('setMessageSystem',rv)
store.commit('setMessageSystem',[rv])
}
})
}
@@ -275,7 +275,7 @@ export default defineComponent({
});
if(isObj)store.commit('setUserInfo',obj)
store.commit('setMessageSystem',...data)
store.commit('setMessageSystem',data)
}
MyEvent.add('getMessage',getWsMessage)
// setTimeout(() => {

View File

@@ -388,6 +388,7 @@ export default defineComponent({
props:{
getLangIsShowMark:{
type:Boolean,
default:true,
}
},
@@ -414,7 +415,7 @@ export default defineComponent({
value:''
})
let sex:any = ref('')
const sexList:any = ref([])
const sexList:any = computed(()=>store.state.UserHabit.sex.value)
const printType = computed(() => {
return store.state.UserHabit.printType;
});
@@ -520,15 +521,7 @@ export default defineComponent({
})
let generateLevel2:any = {}
let isSloganHint:any = ref('')
watch(
() => props.getLangIsShowMark, // 这里使用了一个 getter 函数
(newValue, oldValue) => {
if(!newValue){
getLibraryList('')
getClass()
getSex()
}
})
let getSex = () =>{
sex.value = store.state.UserHabit.sex.value[0].value
sexList.value = store.state.UserHabit.sex.value
@@ -606,6 +599,17 @@ export default defineComponent({
).catch((res)=>{
});
}
watch(
() => props.getLangIsShowMark, // 这里使用了一个 getter 函数
(newValue, oldValue) => {
if(!newValue){
getLibraryList('')
getClass()
getSex()
}
},
{immediate: true,}
)
return {
menuList,
selectImgList,