feat: 积分商品接口对接调整

This commit is contained in:
lzhizhao 2025-08-17 09:57:34 +08:00
parent 74fdbd41c4
commit 5c200241a8
3 changed files with 24 additions and 10 deletions

View File

@ -231,5 +231,14 @@ export const marketing = {
method: "post",
data
});
},
// 积分商品启用/禁用状态切换
changeEnableMembershipPointsProduct: data => {
return $http.request({
url: `/merchant-api/membershipPointsProduct/changeEnable`,
method: "post",
data
});
}
};

View File

@ -173,17 +173,14 @@ export default {
this.$refs.productSelector.show(shopIdList);
},
handleEnableChange(row) {
// 使
const updateData = {
// 使/
const changeData = {
id: row.id,
exchangeRequiredPoints: row.exchangeRequiredPoints,
increaseInventory: 0, // 0
exchangeRequiredAmount: row.exchangeRequiredAmount || 0,
enable: row.enable // 使
enable: row.enable
};
this.$api.marketing
.updateMembershipPointsProduct(updateData)
.changeEnableMembershipPointsProduct(changeData)
.then(() => {
this.$message.success("状态切换成功");
this.$refs.oTable.reload();
@ -314,6 +311,7 @@ export default {
// 使
const editData = {
...row,
id: row.id,
shopId: row.shopId,
productId: row.productId,

View File

@ -258,13 +258,20 @@ export default {
exchangeRequiredPoints: this.configForm.exchangeRequiredPoints,
increaseInventory: this.configForm.exchangeInventory, //
exchangeRequiredAmount:
this.configForm.exchangeRequiredAmount || 0,
enable: true //
this.configForm.exchangePointsType === 2
? this.configForm.exchangeRequiredAmount || 0
: 0.01, // 0.01
enable: false //
};
} else {
// 使
submitData = {
...this.configForm
...this.configForm,
enable: false, //
exchangeRequiredAmount:
this.configForm.exchangePointsType === 2
? this.configForm.exchangeRequiredAmount || 0
: 0.01 // 0.01
};
}
console.log(submitData);