修改bug

This commit is contained in:
A1300399510
2023-08-02 11:40:14 +08:00
parent 378d6da880
commit 8d87f67b99
2 changed files with 7 additions and 6 deletions

View File

@@ -21,7 +21,7 @@
</div> </div>
<div class="flex1 list scrollbar" @scroll="handleScroll"> <div class="flex1 list scrollbar" @scroll="handleScroll">
<div class="empty-box" v-if="false"> <div class="empty-box" v-if="list.length == 0 && !state">
<empty-duck></empty-duck> <empty-duck></empty-duck>
</div> </div>
<template v-for="(item, index) in list" :key="index"> <template v-for="(item, index) in list" :key="index">
@@ -147,11 +147,11 @@ let show = ref(false) //是否展示
let qrcode = ref("") // 关注二维码 let qrcode = ref("") // 关注二维码
let issubscribe = ref(0) // 是否已经关注公众号 let issubscribe = ref(0) // 是否已经关注公众号
let list = ref([]) // 列表数据 let list = ref([]) // 列表数据
let state = false // 请求状态 let state = ref(false) // 请求状态
let page = 1 // 页数 let page = 1 // 页数
const init = () => { const init = () => {
if (page == 0 || state) return if (page == 0 || state.value) return
state = true state.value = true
proxy.$post("/tenement/pc/api/user/messageList", { proxy.$post("/tenement/pc/api/user/messageList", {
page page
}).then((res) => { }).then((res) => {
@@ -168,12 +168,12 @@ const init = () => {
}).catch((err) => { }).catch((err) => {
emit('close') emit('close')
}).finally(() => { }).finally(() => {
state = false state.value = false
}) })
} }
const handleScroll = (event) => { const handleScroll = (event) => {
if (page == 0 || state) return if (page == 0 || state.value) return
const scrollContainer = event.target; // 获取滚动容器元素 const scrollContainer = event.target; // 获取滚动容器元素
const scrollHeight = scrollContainer.scrollHeight; // 元素内容的总高度 const scrollHeight = scrollContainer.scrollHeight; // 元素内容的总高度
const scrollTop = scrollContainer.scrollTop; // 滚动条距离滚动容器顶部的距离 const scrollTop = scrollContainer.scrollTop; // 滚动条距离滚动容器顶部的距离

View File

@@ -301,6 +301,7 @@ const handleDelete = (index, status) => {
if (status == 0) stat.value['draft']-- if (status == 0) stat.value['draft']--
else if (status == 1) stat.value['listing']-- else if (status == 1) stat.value['listing']--
else stat.value['offshelf']-- else stat.value['offshelf']--
count.value['publish'] --
publishData.value['list'].splice(index, 1) publishData.value['list'].splice(index, 1)
nextTick(() => { nextTick(() => {
masonryInstancepublish.reloadItems(); masonryInstancepublish.reloadItems();