From 9cd090ecb315dcd7cc64434e3fb0fb2e9dc5332c Mon Sep 17 00:00:00 2001 From: dengbw Date: Fri, 11 Nov 2022 14:56:59 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=8A=A0=E5=95=86=E5=93=81?= =?UTF-8?q?=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/sylive/goods/index.js | 2 +- .../sylive/order/components/order-search.vue | 32 +++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/src/api/sylive/goods/index.js b/src/api/sylive/goods/index.js index 08d8b94..b1da670 100644 --- a/src/api/sylive/goods/index.js +++ b/src/api/sylive/goods/index.js @@ -19,7 +19,7 @@ export async function pageGoods(params) { * @param params 查询条件 */ export async function listGoods(params) { - const res = await request.get('/sylive/goods', { + const res = await request.get('/sylive/goods/items', { params }); if (res.data.code === 0 && res.data.data) { diff --git a/src/views/sylive/order/components/order-search.vue b/src/views/sylive/order/components/order-search.vue index b8ae875..55f6c14 100644 --- a/src/views/sylive/order/components/order-search.vue +++ b/src/views/sylive/order/components/order-search.vue @@ -56,6 +56,23 @@ + + + + + + + import { listOrganizations } from '@/api/sylive/organization'; import { listTeams } from '@/api/sylive/team'; + import { listGoods } from '@/api/sylive/goods'; export default { data() { @@ -130,6 +148,8 @@ organizationList: [], // 团队数据 teamList: [], + // 商品数据 + goodsList: [], // 表单数据 where: { ...defaultWhere } }; @@ -143,6 +163,7 @@ created() { this.organizationQuery(); this.teamQuery(); + this.goodsQuery(); }, methods: { /* 搜索 */ @@ -181,6 +202,17 @@ .catch((e) => { this.$message.error(e.message); }); + }, + /* 查询商品 */ + goodsQuery() { + const activityId = this.$route.query.id; + listGoods({ activityId: activityId }) + .then((list) => { + this.goodsList = list; + }) + .catch((e) => { + this.$message.error(e.message); + }); } } };