fix: load my comments on page show
This commit is contained in:
@@ -40,11 +40,16 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, shallowRef } from 'vue'
|
import { ref, shallowRef } from 'vue'
|
||||||
|
import { onShow } from '@dcloudio/uni-app'
|
||||||
import { deleteComment, getMyCommentLists } from '@/api/community'
|
import { deleteComment, getMyCommentLists } from '@/api/community'
|
||||||
|
|
||||||
const paging = shallowRef()
|
const paging = shallowRef()
|
||||||
const commentList = ref<any[]>([])
|
const commentList = ref<any[]>([])
|
||||||
|
|
||||||
|
onShow(() => {
|
||||||
|
paging.value?.reload()
|
||||||
|
})
|
||||||
|
|
||||||
const queryList = async (pageNo: number, pageSize: number) => {
|
const queryList = async (pageNo: number, pageSize: number) => {
|
||||||
try {
|
try {
|
||||||
const { lists = [] } = await getMyCommentLists({ page_no: pageNo, page_size: pageSize })
|
const { lists = [] } = await getMyCommentLists({ page_no: pageNo, page_size: pageSize })
|
||||||
|
|||||||
Reference in New Issue
Block a user