1.修复供应商列表分页 2.修复代客下单新版积分设置
This commit is contained in:
@@ -1,12 +1,18 @@
|
|||||||
import request from "@/utils/request";
|
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 baseURL = Account_BaseUrl + "/admin/points";
|
||||||
const Api = {
|
const Api = {
|
||||||
// 002-获取订单可用积分及抵扣金额(支付页面使用)
|
// 002-获取订单可用积分及抵扣金额(支付页面使用)
|
||||||
|
// calcOrderUsablePoints(params: any) {
|
||||||
|
// return request<any>({
|
||||||
|
// url: `${baseURL}/memberPoints/calcUsablePoints`,
|
||||||
|
// method: "get",
|
||||||
|
// params
|
||||||
|
// });
|
||||||
|
// },
|
||||||
calcOrderUsablePoints(params: any) {
|
calcOrderUsablePoints(params: any) {
|
||||||
return request<any>({
|
return request<any>({
|
||||||
url: `${baseURL}/memberPoints/calcUsablePoints`,
|
url: `${Market_BaseUrl}/admin/points/userPoints`,
|
||||||
method: "get",
|
method: "get",
|
||||||
params
|
params
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -14,7 +14,9 @@ const contentConfig: IContentConfig = {
|
|||||||
pageSizes: [10, 20, 30, 50],
|
pageSizes: [10, 20, 30, 50],
|
||||||
},
|
},
|
||||||
indexAction: function (params) {
|
indexAction: function (params) {
|
||||||
return Api.getList({});
|
return Api.getList({
|
||||||
|
...params,
|
||||||
|
});
|
||||||
},
|
},
|
||||||
deleteAction: function (id) {
|
deleteAction: function (id) {
|
||||||
return Api.delete(id);
|
return Api.delete(id);
|
||||||
@@ -79,7 +81,7 @@ const contentConfig: IContentConfig = {
|
|||||||
fixed: "right",
|
fixed: "right",
|
||||||
width: 280,
|
width: 280,
|
||||||
templet: "tool",
|
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" }],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -421,10 +421,14 @@ async function pointsInit() {
|
|||||||
if (!carts.vipUser.id) {
|
if (!carts.vipUser.id) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const res = await PointsApi.calcOrderUsablePoints({
|
const { pointsConfig, pointsUser } = await PointsApi.calcOrderUsablePoints({
|
||||||
shopUserId: carts.vipUser.id,
|
shopUserId: carts.vipUser.id,
|
||||||
orderAmount: scoreMaxMoney.value,
|
// orderAmount: scoreMaxMoney.value,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const res = pointsConfig
|
||||||
|
carts.vipUser.accountPoints = pointsUser.id ? pointsUser.pointBalance : 0;
|
||||||
|
|
||||||
pointsRes.value = res;
|
pointsRes.value = res;
|
||||||
carts.pointDeductionRule.pointsPerYuan = res.equivalentPoints;
|
carts.pointDeductionRule.pointsPerYuan = res.equivalentPoints;
|
||||||
if (score.sel == -1) {
|
if (score.sel == -1) {
|
||||||
@@ -693,6 +697,10 @@ watch(
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
carts.payParamsInit();
|
carts.payParamsInit();
|
||||||
getPaytype();
|
getPaytype();
|
||||||
|
|
||||||
|
if (carts.vipUser.id) {
|
||||||
|
pointsInit();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
defineExpose({
|
defineExpose({
|
||||||
nowPayClick,
|
nowPayClick,
|
||||||
|
|||||||
Reference in New Issue
Block a user