fix: 商品管理使用getAllProducts接口显示所有商品(包括下架)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -33,12 +33,19 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取商品列表
|
* 获取商品列表(只显示上架)
|
||||||
*/
|
*/
|
||||||
getProducts(params) {
|
getProducts(params) {
|
||||||
return api.request('/products', 'GET', params)
|
return api.request('/products', 'GET', params)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取所有商品(包括下架,用于管理)
|
||||||
|
*/
|
||||||
|
getAllProducts(params) {
|
||||||
|
return api.request('/products/all', 'GET', params)
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取商品详情
|
* 获取商品详情
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ export default {
|
|||||||
},
|
},
|
||||||
async loadProducts() {
|
async loadProducts() {
|
||||||
try {
|
try {
|
||||||
const res = await productApi.getProducts({
|
const res = await productApi.getAllProducts({
|
||||||
keyword: this.keyword,
|
keyword: this.keyword,
|
||||||
categoryId: this.categoryId,
|
categoryId: this.categoryId,
|
||||||
page: 1,
|
page: 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user