fix: 积分商品启用禁用改为使用编辑接口
This commit is contained in:
parent
a171d541a3
commit
74fdbd41c4
|
@ -173,9 +173,17 @@ export default {
|
||||||
this.$refs.productSelector.show(shopIdList);
|
this.$refs.productSelector.show(shopIdList);
|
||||||
},
|
},
|
||||||
handleEnableChange(row) {
|
handleEnableChange(row) {
|
||||||
// 调用启用状态切换接口
|
// 使用编辑接口进行启用状态切换
|
||||||
|
const updateData = {
|
||||||
|
id: row.id,
|
||||||
|
exchangeRequiredPoints: row.exchangeRequiredPoints,
|
||||||
|
increaseInventory: 0, // 默认为0
|
||||||
|
exchangeRequiredAmount: row.exchangeRequiredAmount || 0,
|
||||||
|
enable: row.enable // 使用当前的启用状态
|
||||||
|
};
|
||||||
|
|
||||||
this.$api.marketing
|
this.$api.marketing
|
||||||
.reverseEnableMemberUnitPointsProduct({ id: row.id })
|
.updateMembershipPointsProduct(updateData)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.$message.success("状态切换成功");
|
this.$message.success("状态切换成功");
|
||||||
this.$refs.oTable.reload();
|
this.$refs.oTable.reload();
|
||||||
|
|
Loading…
Reference in New Issue