lemon橪 2021-12-27 16:16:27 +08:00
commit 0a0066fe5c
8 changed files with 32 additions and 35 deletions

View File

@ -183,7 +183,7 @@
>全选</Checkbox
>
</div>
<div class="width_100 handle-btn" @click="delGoods"></div>
<div class="width_100 handle-btn" @click="delGoods()"></div>
<!-- <div class="width_100 handle-btn" @click="collectGoods"></div> -->
<div class="width_100 handle-btn" @click="clearCart"></div>
</div>
@ -278,7 +278,9 @@ export default {
const list = this.cartList;
list.forEach((shop) => {
shop.skuList.forEach((goods) => {
idArr.push(goods.goodsSku.id);
if(goods.checked) {
idArr.push(goods.goodsSku.id);
}
});
});
} else {

View File

@ -437,6 +437,10 @@ export const setHotWords = (params) => {
return postRequest(`/hotwords`, params);
};
// 删除热搜词
export const deleteHotWords = (words) => {
return deleteRequest(`/hotwords/${words}`);
};
// 获取热搜词
export const getHotWords = () => {

View File

@ -215,7 +215,7 @@ export const getFullDiscountById = id => {
};
// 开启、关闭满额活动
export const updateFullDiscount = (id, promotionStatus) => {
return putRequest(`/promotion/fullDiscount/status/${id}/${promotionStatus}`)
return putRequest(`/promotion/fullDiscount/status/${id}`)
}
// 积分商品列表
export const getPointsGoodsList = params => {

View File

@ -120,7 +120,7 @@ export default {
//
pageNumber: 1, //
pageSize: 10, //
sort: "startTime", //
sort: "create_time", //
order: "desc", //
getType: "", //
},

View File

@ -79,14 +79,6 @@
@click="openOrClose(row)"
>关闭</Button
>
<Button
type="success"
v-if="row.promotionStatus === 'CLOSE' || row.promotionStatus === 'NEW'"
style="margin-left: 5px"
size="small"
@click="openOrClose(row)"
>开启</Button
>
</div>
</template>
</Table>
@ -177,27 +169,25 @@ export default {
//
openOrClose(row) {
let name = "开启";
let status = "START";
if (row.promotionStatus === "START") {
name = "关闭";
status = "CLOSE";
this.$Modal.confirm({
title: "提示",
//
content: `确认${name}此活动吗?需要一定时间才能生效,请耐心等待`,
loading: true,
onOk: () => {
//
updateFullDiscount(row.id).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success(`${name}成功`);
this.getDataList();
}
});
},
});
}
this.$Modal.confirm({
title: "提示",
//
content: `确认${name}此活动吗?需要一定时间才能生效,请耐心等待`,
loading: true,
onOk: () => {
//
updateFullDiscount(row.id, status).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success(`${name}成功`);
this.getDataList();
}
});
},
});
},
changePage(v) {
//

View File

@ -341,10 +341,10 @@ export default {
onOk: () => {
let ids = [];
this.selectedGoods.forEach(function (e) {
ids.push(e.id);
ids.push(e.skuId);
});
this.promotionGoodsList = this.promotionGoodsList.filter((item) => {
return !ids.includes(item.id);
return !ids.includes(item.skuId);
});
},
});

View File

@ -121,7 +121,7 @@
>关闭</Button
>
<Button
v-if="row.promotionStatus === 'CLOSE'"
v-if="row.promotionStatus === 'CLOSE' || row.promotionStatus === 'END'"
type="error"
size="small"
@click="close(row.id)"
@ -168,6 +168,7 @@ export default {
//
pageNumber: 1, //
pageSize: 10, //
sort: "create_time",
order: "desc", //
},
statusList: [

View File

@ -290,10 +290,10 @@ export default {
onOk: () => {
let ids = [];
this.selectList.forEach(function (e) {
ids.push(e.id);
ids.push(e.skuId);
});
this.goodsData = this.goodsData.filter((item) => {
return !ids.includes(item.id);
return !ids.includes(item.skuId);
});
},
});