评论商品接口有问题

This commit is contained in:
bobobobo
2026-01-16 00:12:33 +08:00
parent d2ba0df2b5
commit 5cd2732562
164 changed files with 14318 additions and 197 deletions

View File

@@ -21,7 +21,10 @@
topNavOptions.value = res.data
}
const getListData = async (pageNum, pageSize) => {
const getListData = async (pageNum, pageSize, state) => {
if (state === 1) {
cardList.value = []
}
try {
const res = await getProductList({
pageNum,
@@ -38,7 +41,7 @@
const onTop = value => {
formData.type = value
formData.name = ''
getListData(1, formData.pageSize)
getListData(1, formData.pageSize, 1)
}
const onGo = item => {
@@ -47,7 +50,6 @@
onLoad(async () => {
await categoryList()
// await getListData(1, formData.pageSize)
})
</script>
@@ -67,7 +69,8 @@
<view class="top-box">
<cb-search
v-model="formData.name"
@search="getListData()"
placeholder="搜索热门商品"
@search="getListData(1, formData.pageSize, 1)"
></cb-search>
<view class="top-options">
<view
@@ -124,6 +127,7 @@
@import '@/styles/top-selector.scss';
.mall-list {
.top-box {
background: #ffffff;
padding: 24rpx;
}