@@ -140,8 +140,8 @@
-
-
+
+
@@ -259,10 +259,14 @@ export default {
* 删除直播间商品
*/
async deleteGoods(val, index) {
+ this.$Spin.show();
let res = await delRoomLiveGoods(this.liveForm.roomId, val.liveGoodsId);
if (res.success) {
this.$Message.success("删除成功!");
this.liveData.splice(index, 1);
+ this.$Spin.hide();
+ } else {
+ this.$Spin.hide();
}
},
/**
@@ -325,35 +329,19 @@ export default {
* 回调的商品选择数据
*/
callBackData(way) {
- this.$set(this, "liveData", way);
- },
-
- /**
- * 提交直播间商品
- */
- addGoods() {
+ console.log(way);
+ this.liveGoodsVisible = false;
+ this.$Spin.show();
addLiveGoods({
roomId: this.$route.query.roomId,
- liveGoodsId: item.liveGoodsId,
- });
- },
-
- /**
- * dialog点击确定时判断
- */
- addGoods() {
- this.liveData.forEach((item) => {
- if (this.commodityList.length == 1 && this.liveData.length == 1) {
- addLiveGoods({
- roomId: this.$route.query.roomId,
- liveGoodsId: item.liveGoodsId,
- });
+ liveGoodsId: way.liveGoodsId,
+ }).then((res) => {
+ if (res.success) {
+ this.liveData.push(way);
+ this.$Spin.hide();
+ console.log(this.liveData);
} else {
- this.commodityList.forEach((oldVal, i) => {
- // 如果商品里面没有商品,以及添加商品为第一次的话
- if (oldVal.liveGoodsId != item.liveGoodsId) {
- }
- });
+ this.$Spin.hide();
}
});
},
diff --git a/seller/src/views/promotion/live/liveGoods.vue b/seller/src/views/promotion/live/liveGoods.vue
index eb2def25..230712c0 100644
--- a/seller/src/views/promotion/live/liveGoods.vue
+++ b/seller/src/views/promotion/live/liveGoods.vue
@@ -208,20 +208,20 @@ export default {
* 回调参数补充
*/
selectedLiveGoods(val, index) {
- if (!val.___selected) {
- val.___selected = true;
- this.$set(this.liveGoodsData[index], "___selected", true);
- this.selectedGoods.push(this.liveGoodsData[index]);
- } else {
- this.$nextTick(() => {
- val.___selected = false;
+ // if (!val.___selected) {
+ // val.___selected = true;
+ // this.$set(this.liveGoodsData[index], "___selected", true);
+ // this.selectedGoods.push(this.liveGoodsData[index]);
+ // } else {
+ // this.$nextTick(() => {
+ // val.___selected = false;
- this.$set(this.liveGoodsData[index], "___selected", true);
- this.selectedGoods.splice(index, 1);
- });
- }
+ // this.$set(this.liveGoodsData[index], "___selected", true);
+ // this.selectedGoods.splice(index, 1);
+ // });
+ // }
- this.$emit("selectedGoods", this.selectedGoods);
+ this.$emit("selectedGoods", val);
},
/**
* 解决radio数据不回显问题
@@ -279,7 +279,7 @@ export default {
console.log(element);
return {
goodsId: element.goodsId, //商品id
- goodsImage: element.small, //商品图片 必须为 300 * 300
+ goodsImage: element.small, //商品图片 最大为 300 * 300
name: element.goodsName, //商品昵称
price: parseInt(element.price), //商品价格
quantity: element.quantity, //库存
diff --git a/seller/src/views/shop/ship/shipTemplate.vue b/seller/src/views/shop/ship/shipTemplate.vue
index 813c4664..fc7f227b 100644
--- a/seller/src/views/shop/ship/shipTemplate.vue
+++ b/seller/src/views/shop/ship/shipTemplate.vue
@@ -95,8 +95,8 @@
-
- 元
+
+ 元
|
@@ -104,7 +104,7 @@
|
- 元
+ 元
|
@@ -135,7 +135,7 @@
- |