diff --git a/template/admin/src/components/goodsList/index.vue b/template/admin/src/components/goodsList/index.vue
index 400ba4e10..c3b8119ac 100644
--- a/template/admin/src/components/goodsList/index.vue
+++ b/template/admin/src/components/goodsList/index.vue
@@ -95,6 +95,12 @@ export default {
type: Boolean,
default: false,
},
+ selectIds: {
+ type: Array,
+ default: () => {
+ return [];
+ },
+ },
datas: {
type: Object,
default: function () {
@@ -259,6 +265,7 @@ export default {
} else {
this.getList();
}
+ console.log(this.diy);
},
methods: {
productList() {
@@ -324,7 +331,22 @@ export default {
}
changeListApi(this.formValidate)
.then(async (res) => {
+ console.log(this.selectIds);
+
let data = res.data;
+ if (this.selectIds.length) {
+ let arr = []
+ this.selectIds.map((item) => {
+ data.list.map((i) => {
+ if (i.id == item) {
+ console.log(i);
+ i._checked = true;
+ arr.push(i)
+ }
+ });
+ });
+ this.changeCheckbox(arr)
+ }
this.tableList = data.list;
this.total = res.data.count;
this.loading = false;
@@ -347,9 +369,23 @@ export default {
data.list.forEach((el) => {
el.image = el.cover_img;
});
- this.tableList = data.list;
- this.total = res.data.count;
- this.loading = false;
+
+ console.log(this.selectIds);
+ if (this.selectIds.length) {
+ this.selectIds.map((item) => {
+ data.list.map((i) => {
+ if (i.id == item) {
+ console.log(i);
+ i._checked = true;
+ }
+ });
+ });
+ }
+ this.$nextTick((e) => {
+ this.tableList = data.list;
+ this.total = res.data.count;
+ this.loading = false;
+ });
})
.catch((res) => {
this.loading = false;
diff --git a/template/admin/src/pages/marketing/live/add_goods.vue b/template/admin/src/pages/marketing/live/add_goods.vue
index 98855fa28..604c530d0 100644
--- a/template/admin/src/pages/marketing/live/add_goods.vue
+++ b/template/admin/src/pages/marketing/live/add_goods.vue
@@ -26,7 +26,7 @@