Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui
This commit is contained in:
		
						commit
						0a0066fe5c
					
				@ -183,7 +183,7 @@
 | 
				
			|||||||
                >全选</Checkbox
 | 
					                >全选</Checkbox
 | 
				
			||||||
              >
 | 
					              >
 | 
				
			||||||
            </div>
 | 
					            </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="collectGoods">移到我的收藏</div> -->
 | 
				
			||||||
            <div class="width_100 handle-btn" @click="clearCart">清空购物车</div>
 | 
					            <div class="width_100 handle-btn" @click="clearCart">清空购物车</div>
 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
@ -278,7 +278,9 @@ export default {
 | 
				
			|||||||
        const list = this.cartList;
 | 
					        const list = this.cartList;
 | 
				
			||||||
        list.forEach((shop) => {
 | 
					        list.forEach((shop) => {
 | 
				
			||||||
          shop.skuList.forEach((goods) => {
 | 
					          shop.skuList.forEach((goods) => {
 | 
				
			||||||
 | 
					            if(goods.checked) {
 | 
				
			||||||
              idArr.push(goods.goodsSku.id);
 | 
					              idArr.push(goods.goodsSku.id);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
          });
 | 
					          });
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
      } else {
 | 
					      } else {
 | 
				
			||||||
 | 
				
			|||||||
@ -437,6 +437,10 @@ export const setHotWords = (params) => {
 | 
				
			|||||||
  return postRequest(`/hotwords`, params);
 | 
					  return postRequest(`/hotwords`, params);
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 删除热搜词
 | 
				
			||||||
 | 
					export const deleteHotWords = (words) => {
 | 
				
			||||||
 | 
					  return deleteRequest(`/hotwords/${words}`);
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// 获取热搜词
 | 
					// 获取热搜词
 | 
				
			||||||
export const getHotWords = () => {
 | 
					export const getHotWords = () => {
 | 
				
			||||||
 | 
				
			|||||||
@ -215,7 +215,7 @@ export const getFullDiscountById = id => {
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
// 开启、关闭满额活动
 | 
					// 开启、关闭满额活动
 | 
				
			||||||
export const updateFullDiscount = (id, promotionStatus) => {
 | 
					export const updateFullDiscount = (id, promotionStatus) => {
 | 
				
			||||||
  return putRequest(`/promotion/fullDiscount/status/${id}/${promotionStatus}`)
 | 
					  return putRequest(`/promotion/fullDiscount/status/${id}`)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
// 积分商品列表
 | 
					// 积分商品列表
 | 
				
			||||||
export const getPointsGoodsList = params => {
 | 
					export const getPointsGoodsList = params => {
 | 
				
			||||||
 | 
				
			|||||||
@ -120,7 +120,7 @@ export default {
 | 
				
			|||||||
        // 搜索框初始化对象
 | 
					        // 搜索框初始化对象
 | 
				
			||||||
        pageNumber: 1, // 当前页数
 | 
					        pageNumber: 1, // 当前页数
 | 
				
			||||||
        pageSize: 10, // 页面大小
 | 
					        pageSize: 10, // 页面大小
 | 
				
			||||||
        sort: "startTime", // 默认排序字段
 | 
					        sort: "create_time", // 默认排序字段
 | 
				
			||||||
        order: "desc", // 默认排序方式
 | 
					        order: "desc", // 默认排序方式
 | 
				
			||||||
        getType: "", // 默认排序方式
 | 
					        getType: "", // 默认排序方式
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
				
			|||||||
@ -79,14 +79,6 @@
 | 
				
			|||||||
              @click="openOrClose(row)"
 | 
					              @click="openOrClose(row)"
 | 
				
			||||||
              >关闭</Button
 | 
					              >关闭</Button
 | 
				
			||||||
            >
 | 
					            >
 | 
				
			||||||
            <Button
 | 
					 | 
				
			||||||
              type="success"
 | 
					 | 
				
			||||||
              v-if="row.promotionStatus === 'CLOSE' || row.promotionStatus === 'NEW'"
 | 
					 | 
				
			||||||
              style="margin-left: 5px"
 | 
					 | 
				
			||||||
              size="small"
 | 
					 | 
				
			||||||
              @click="openOrClose(row)"
 | 
					 | 
				
			||||||
              >开启</Button
 | 
					 | 
				
			||||||
            >
 | 
					 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
      </Table>
 | 
					      </Table>
 | 
				
			||||||
@ -177,11 +169,8 @@ export default {
 | 
				
			|||||||
    // 开启或关闭活动
 | 
					    // 开启或关闭活动
 | 
				
			||||||
    openOrClose(row) {
 | 
					    openOrClose(row) {
 | 
				
			||||||
      let name = "开启";
 | 
					      let name = "开启";
 | 
				
			||||||
      let status = "START";
 | 
					 | 
				
			||||||
      if (row.promotionStatus === "START") {
 | 
					      if (row.promotionStatus === "START") {
 | 
				
			||||||
        name = "关闭";
 | 
					        name = "关闭";
 | 
				
			||||||
        status = "CLOSE";
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
        this.$Modal.confirm({
 | 
					        this.$Modal.confirm({
 | 
				
			||||||
          title: "提示",
 | 
					          title: "提示",
 | 
				
			||||||
          // 记得确认修改此处
 | 
					          // 记得确认修改此处
 | 
				
			||||||
@ -189,7 +178,7 @@ export default {
 | 
				
			|||||||
          loading: true,
 | 
					          loading: true,
 | 
				
			||||||
          onOk: () => {
 | 
					          onOk: () => {
 | 
				
			||||||
            // 删除
 | 
					            // 删除
 | 
				
			||||||
          updateFullDiscount(row.id, status).then((res) => {
 | 
					            updateFullDiscount(row.id).then((res) => {
 | 
				
			||||||
              this.$Modal.remove();
 | 
					              this.$Modal.remove();
 | 
				
			||||||
              if (res.success) {
 | 
					              if (res.success) {
 | 
				
			||||||
                this.$Message.success(`${name}成功`);
 | 
					                this.$Message.success(`${name}成功`);
 | 
				
			||||||
@ -198,6 +187,7 @@ export default {
 | 
				
			|||||||
            });
 | 
					            });
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    changePage(v) {
 | 
					    changePage(v) {
 | 
				
			||||||
      // 改变页数
 | 
					      // 改变页数
 | 
				
			||||||
 | 
				
			|||||||
@ -341,10 +341,10 @@ export default {
 | 
				
			|||||||
        onOk: () => {
 | 
					        onOk: () => {
 | 
				
			||||||
          let ids = [];
 | 
					          let ids = [];
 | 
				
			||||||
          this.selectedGoods.forEach(function (e) {
 | 
					          this.selectedGoods.forEach(function (e) {
 | 
				
			||||||
            ids.push(e.id);
 | 
					            ids.push(e.skuId);
 | 
				
			||||||
          });
 | 
					          });
 | 
				
			||||||
          this.promotionGoodsList = this.promotionGoodsList.filter((item) => {
 | 
					          this.promotionGoodsList = this.promotionGoodsList.filter((item) => {
 | 
				
			||||||
            return !ids.includes(item.id);
 | 
					            return !ids.includes(item.skuId);
 | 
				
			||||||
          });
 | 
					          });
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
 | 
				
			|||||||
@ -121,7 +121,7 @@
 | 
				
			|||||||
            >关闭</Button
 | 
					            >关闭</Button
 | 
				
			||||||
          >
 | 
					          >
 | 
				
			||||||
          <Button
 | 
					          <Button
 | 
				
			||||||
            v-if="row.promotionStatus === 'CLOSE'"
 | 
					            v-if="row.promotionStatus === 'CLOSE' || row.promotionStatus === 'END'"
 | 
				
			||||||
            type="error"
 | 
					            type="error"
 | 
				
			||||||
            size="small"
 | 
					            size="small"
 | 
				
			||||||
            @click="close(row.id)"
 | 
					            @click="close(row.id)"
 | 
				
			||||||
@ -168,6 +168,7 @@ export default {
 | 
				
			|||||||
        // 搜索框初始化对象
 | 
					        // 搜索框初始化对象
 | 
				
			||||||
        pageNumber: 1, // 当前页数
 | 
					        pageNumber: 1, // 当前页数
 | 
				
			||||||
        pageSize: 10, // 页面大小
 | 
					        pageSize: 10, // 页面大小
 | 
				
			||||||
 | 
					        sort: "create_time",
 | 
				
			||||||
        order: "desc", // 默认排序方式
 | 
					        order: "desc", // 默认排序方式
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      statusList: [
 | 
					      statusList: [
 | 
				
			||||||
 | 
				
			|||||||
@ -290,10 +290,10 @@ export default {
 | 
				
			|||||||
        onOk: () => {
 | 
					        onOk: () => {
 | 
				
			||||||
          let ids = [];
 | 
					          let ids = [];
 | 
				
			||||||
          this.selectList.forEach(function (e) {
 | 
					          this.selectList.forEach(function (e) {
 | 
				
			||||||
            ids.push(e.id);
 | 
					            ids.push(e.skuId);
 | 
				
			||||||
          });
 | 
					          });
 | 
				
			||||||
          this.goodsData = this.goodsData.filter((item) => {
 | 
					          this.goodsData = this.goodsData.filter((item) => {
 | 
				
			||||||
            return !ids.includes(item.id);
 | 
					            return !ids.includes(item.skuId);
 | 
				
			||||||
          });
 | 
					          });
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user