加创建人 加types

This commit is contained in:
jiangzewen committed 2025-05-13 21:09:12 +08:00
1 parent 5b24a8abb6
commit d97d37930a
3 files changed
+6 -4

No files matched your search

+2 -2
View File
@@ -71,8 +71,8 @@ export const getSpuPage = (params: PageParam) => {
}
// 获得 Spu 列表 tabsCount
export const getTabsCount = () => {
return request.get({ url: '/product/spu/get-count' })
export const getTabsCount = (types?: number) => {
return request.get({ url: `/product/spu/get-count?types=${types}` })
}
// 创建商品 Spu
@@ -128,6 +128,7 @@
</el-form>
</template>
</el-table-column>
<el-table-column label="创建人" min-width="140" prop="creator" />
<el-table-column label="商品编号" min-width="140" prop="id" />
<el-table-column label="商品信息" min-width="300">
<template #default="{ row }">
@@ -312,7 +313,7 @@ const handleTabClick = (tab: TabsPaneContext) => {
/** 获得每个 Tab 的数量 */
const getTabsCount = async () => {
const res = await ProductSpuApi.getTabsCount()
const res = await ProductSpuApi.getTabsCount(1);
for (let objName in res) {
tabsData.value[Number(objName)].count = res[objName]
}
+2 -1
View File
@@ -128,6 +128,7 @@
</el-form>
</template>
</el-table-column>
<el-table-column label="创建人" min-width="140" prop="creator" />
<el-table-column label="商品编号" min-width="140" prop="id" />
<el-table-column label="商品信息" min-width="300">
<template #default="{ row }">
@@ -312,7 +313,7 @@ const handleTabClick = (tab: TabsPaneContext) => {
/** 获得每个 Tab 的数量 */
const getTabsCount = async () => {
const res = await ProductSpuApi.getTabsCount()
const res = await ProductSpuApi.getTabsCount(0)
for (let objName in res) {
tabsData.value[Number(objName)].count = res[objName]
}