浏览代码

Merge remote-tracking branch 'origin/master'

YunaiV 1 年之前
父节点
当前提交
0575bd56b0
共有 2 个文件被更改,包括 7 次插入2 次删除
  1. 0 1
      sheep/components/s-title-block/s-title-block.vue
  2. 7 1
      sheep/store/cart.js

+ 0 - 1
sheep/components/s-title-block/s-title-block.vue

@@ -49,7 +49,6 @@
 	});
 	// 设置背景样式
 	const bgStyle = computed(() => {
-		console.log(props.data)
 		// 直接从 props.styles 解构
 		const {
 			bgType,

+ 7 - 1
sheep/store/cart.js

@@ -57,7 +57,13 @@ const cart = defineStore({
 
     // 移除购物车
     async delete(ids) {
-      const { code } = await CartApi.deleteCart(ids.join(','));
+      let idsTemp = '';
+      if (Array.isArray(ids)) {
+        idsTemp = ids.join(',');
+      } else {
+        idsTemp = ids;
+      }
+      const { code } = await CartApi.deleteCart(idsTemp);
       if (code === 0) {
         await this.getList();
       }