Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui
commit
0a0066fe5c
|
@ -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 {
|
||||
|
|
|
@ -437,6 +437,10 @@ export const setHotWords = (params) => {
|
|||
return postRequest(`/hotwords`, params);
|
||||
};
|
||||
|
||||
// 删除热搜词
|
||||
export const deleteHotWords = (words) => {
|
||||
return deleteRequest(`/hotwords/${words}`);
|
||||
};
|
||||
|
||||
// 获取热搜词
|
||||
export const getHotWords = () => {
|
||||
|
|
|
@ -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 => {
|
||||
|
|
|
@ -120,7 +120,7 @@ export default {
|
|||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "startTime", // 默认排序字段
|
||||
sort: "create_time", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
getType: "", // 默认排序方式
|
||||
},
|
||||
|
|
|
@ -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) {
|
||||
// 改变页数
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
},
|
||||
});
|
||||
|
|
|
@ -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: [
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue