From 15dbd79c7d4ea9d34b6b705763f7a9ae54f9dae6 Mon Sep 17 00:00:00 2001 From: gyq <875626088@qq.com> Date: Tue, 23 Dec 2025 13:49:39 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E5=A4=8D=E4=BE=9B=E5=BA=94=E5=95=86?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=88=86=E9=A1=B5=202.=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E4=BB=A3=E5=AE=A2=E4=B8=8B=E5=8D=95=E6=96=B0=E7=89=88=E7=A7=AF?= =?UTF-8?q?=E5=88=86=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/account/points.ts | 12 +++++++++--- src/views/inventory/supplier/config/content.ts | 6 ++++-- src/views/tool/Instead/components/order.vue | 12 ++++++++++-- 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/src/api/account/points.ts b/src/api/account/points.ts index f7c5cac..29a5ae1 100644 --- a/src/api/account/points.ts +++ b/src/api/account/points.ts @@ -1,12 +1,18 @@ import request from "@/utils/request"; -import { Account_BaseUrl } from "@/api/config"; +import { Account_BaseUrl, Market_BaseUrl } from "@/api/config"; const baseURL = Account_BaseUrl + "/admin/points"; const Api = { // 002-获取订单可用积分及抵扣金额(支付页面使用) - + // calcOrderUsablePoints(params: any) { + // return request({ + // url: `${baseURL}/memberPoints/calcUsablePoints`, + // method: "get", + // params + // }); + // }, calcOrderUsablePoints(params: any) { return request({ - url: `${baseURL}/memberPoints/calcUsablePoints`, + url: `${Market_BaseUrl}/admin/points/userPoints`, method: "get", params }); diff --git a/src/views/inventory/supplier/config/content.ts b/src/views/inventory/supplier/config/content.ts index f2c3d1d..a866a44 100644 --- a/src/views/inventory/supplier/config/content.ts +++ b/src/views/inventory/supplier/config/content.ts @@ -14,7 +14,9 @@ const contentConfig: IContentConfig = { pageSizes: [10, 20, 30, 50], }, indexAction: function (params) { - return Api.getList({}); + return Api.getList({ + ...params, + }); }, deleteAction: function (id) { return Api.delete(id); @@ -79,7 +81,7 @@ const contentConfig: IContentConfig = { fixed: "right", width: 280, templet: "tool", - operat: [{ text: "编辑", icon: 'edit', name: "edit"}, { text: "删除", icon: 'delete', type: 'danger', name: "delete"}], + operat: [{ text: "编辑", icon: 'edit', name: "edit" }, { text: "删除", icon: 'delete', type: 'danger', name: "delete" }], }, ], }; diff --git a/src/views/tool/Instead/components/order.vue b/src/views/tool/Instead/components/order.vue index c786a31..5b03107 100644 --- a/src/views/tool/Instead/components/order.vue +++ b/src/views/tool/Instead/components/order.vue @@ -421,10 +421,14 @@ async function pointsInit() { if (!carts.vipUser.id) { return; } - const res = await PointsApi.calcOrderUsablePoints({ + const { pointsConfig, pointsUser } = await PointsApi.calcOrderUsablePoints({ shopUserId: carts.vipUser.id, - orderAmount: scoreMaxMoney.value, + // orderAmount: scoreMaxMoney.value, }); + + const res = pointsConfig + carts.vipUser.accountPoints = pointsUser.id ? pointsUser.pointBalance : 0; + pointsRes.value = res; carts.pointDeductionRule.pointsPerYuan = res.equivalentPoints; if (score.sel == -1) { @@ -693,6 +697,10 @@ watch( onMounted(() => { carts.payParamsInit(); getPaytype(); + + if (carts.vipUser.id) { + pointsInit(); + } }); defineExpose({ nowPayClick,