no message

This commit is contained in:
A1300399510
2024-01-03 19:11:30 +08:00
parent 3778105266
commit 2ddfc65699
941 changed files with 140454 additions and 26 deletions

View File

@@ -46,10 +46,13 @@ onMounted(() => {
let count = ref({})
const getUser = () => {
MyUserInfoHttp().then(res => {
if (res.code != 200) return
let data = res.data
count.value = data["count"]
return new Promise((resolve, reject) => {
MyUserInfoHttp().then(res => {
if (res.code != 200) return
let data = res.data
count.value = data["count"]
resolve(data)
})
})
}
@@ -120,15 +123,22 @@ let historicalSearchList = ref([]) // 历史记录数据
let MyPopupRef = ref(null)
// 点击我的获取消息
const handleUser = key => {
const handleUser = async key => {
if (isNeedLogin.value) {
goLogin()
return
}
if (Object.keys(count.value).length === 0) getUser()
console.log(Object.keys(count.value).length, "length")
if (Object.keys(count.value).length === 0) await getUser()
MyPopupRef.value.cutMy(key)
}
defineExpose({
count,
})
</script>
<style scoped lang="less">