no message
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user