1.修复供应商列表分页 2.修复代客下单新版积分设置

This commit is contained in:
gyq
2025-12-23 13:49:39 +08:00
parent 455c7cea28
commit 15dbd79c7d
3 changed files with 23 additions and 7 deletions

View File

@@ -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<any>({
// url: `${baseURL}/memberPoints/calcUsablePoints`,
// method: "get",
// params
// });
// },
calcOrderUsablePoints(params: any) {
return request<any>({
url: `${baseURL}/memberPoints/calcUsablePoints`,
url: `${Market_BaseUrl}/admin/points/userPoints`,
method: "get",
params
});

View File

@@ -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" }],
},
],
};

View File

@@ -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,