fix: 修改代客下单列表商品列表接口

This commit is contained in:
YeMingfei666 2025-03-27 10:56:36 +08:00
parent 776a416019
commit 0b5737116e
3 changed files with 9 additions and 3 deletions

View File

@ -11,6 +11,13 @@ const AuthAPI = {
params,
});
},
list(params: any) {
return request<any, Responseres>({
url: `${baseURL}/list`,
method: "get",
params,
});
},
// 新增
addunit(data: any) {
return request<any, Responseres>({

View File

@ -45,13 +45,13 @@ export const useCartsStore = defineStore("carts", () => {
//代客下单页面商品缓存
const goods = useStorage<any[]>("Instead_goods", []);
async function getGoods(query: any) {
const res = await productApi.getPage({
const res = await productApi.list({
page: 1,
size: 999,
status: "on_sale",
...query,
});
goods.value = res.records.filter((v: { type: string }) => v.type != 'coupon');
goods.value = res.filter((v: { type: string }) => v.type != 'coupon');
setGoodsMap(goods.value)
}

View File

@ -244,7 +244,6 @@ import GoodsItem from "./components/goods-item.vue";
import dialogGoodsSel from "./components/dialog-goods-sel.vue";
import cartsList from "./components/carts/list.vue";
import categoryApi from "@/api/product/productclassification";
import productApi from "@/api/product/index";
import tableApi from "@/api/account/table";
import $status from "@/views/tool/table/status.js";
import orderApi from "@/api/order/order";