diff --git a/src/views/components/commonBookTags/commonTags.vue b/src/views/components/commonBookTags/commonTags.vue index 1b788bf..c06104a 100644 --- a/src/views/components/commonBookTags/commonTags.vue +++ b/src/views/components/commonBookTags/commonTags.vue @@ -129,7 +129,7 @@ import debounce from "lodash/debounce"; //导入lodash中的debounce import commonTree from "./tags.vue"; import commonTreeMarket from "./tags.vue"; export default { - props: ["currentType", "currentId"], + props: ["currentType", "currentId","axiosType"], data() { return { productId: null, @@ -440,7 +440,8 @@ export default { type: "warning", } ).then(() => { - this.$http({ + if(this.axiosType=='raw'){ + this.$http({ url: this.$http.adornUrl("/book/shopproduct/delete"), method: "post", data: this.$http.adornData(ids, false), @@ -458,6 +459,27 @@ export default { this.$message.error(data.msg); } }); + }else{ + this.$http({ + url: this.$http.adornUrl("/book/shopproduct/delete"), + method: "post", + data: this.$http.adornData(ids, false), + }).then(({ data }) => { + if (data && data.code === 0) { + this.$message({ + message: "操作成功", + type: "success", + duration: 1500, + onClose: () => { + this.getDataList(); + }, + }); + } else { + this.$message.error(data.msg); + } + }); + } + }); }, SwitchChange(event) { diff --git a/src/views/components/commonBookTags/shopproduct.vue b/src/views/components/commonBookTags/shopproduct.vue index 942935e..fac380d 100644 --- a/src/views/components/commonBookTags/shopproduct.vue +++ b/src/views/components/commonBookTags/shopproduct.vue @@ -166,7 +166,10 @@ export default { "isEdit", "currentId", "currentType", - "isNoSearch" + "isNoSearch", + "isNoPaging", + "axiosType", + "otherInfo", ], data() { return { @@ -319,7 +322,30 @@ export default { this.dataListLoading = true; - if (this.defaultForm.httpType == "raw") { + if (this.axiosType == "raw") { + this.$http + .request({ + url: this.$http.adornUrl(`${this.urlList.getAssociatedGoodsList}`), + method: "POST", + data: { + ...form + }, + header: { + //默认 无 说明:请求头 + "Content-Type": "application/json" + } + }) + .then(async ({ data }) => { + console.log('data at line 338:', data) + if (data && data.code === 0) { + this.associatedGoodsList = [...data[this.otherInfo.httpDataValueName]]; + + this.dataListLoading = false; + } + }); + } + + else if (this.defaultForm.httpType == "raw") { this.$http .request({ url: this.$http.adornUrl(`${this.urlList.hasBindProductList}`), @@ -339,7 +365,9 @@ export default { this.dataListLoading = false; } }); - } else { + } + + else { await this.$http({ url: this.$http.adornUrl(`${this.urlList.getAssociatedGoodsList}`), method: "post", diff --git a/src/views/components/commonBookTags/shopproductTable.vue b/src/views/components/commonBookTags/shopproductTable.vue index 7c57037..ba9e884 100644 --- a/src/views/components/commonBookTags/shopproductTable.vue +++ b/src/views/components/commonBookTags/shopproductTable.vue @@ -113,12 +113,13 @@ export default { props: [ "defaultForm", + "otherInfo", "marketIdKey", "currentType", "currentId", "title", "isNoModal", - "urlList" + "urlList", ], data() { return { @@ -245,7 +246,7 @@ export default { // } this.dataListLoading = true; this.clear(); - if (this.defaultForm.httpType == "raw") { + if (this.defaultForm.httpType == "raw"||this.otherInfo.httpType == "raw") { form.page = this.pageIndex; this.$http .request({ @@ -272,7 +273,11 @@ export default { // }, 200); this.dataListLoading = false; }); - } else { + } + + + + else { form.current = this.pageIndex; await this.$http({ url: this.$http.adornUrl(this.urlList.getNotToLabelList), diff --git a/src/views/components/commonBookTags/tags.vue b/src/views/components/commonBookTags/tags.vue index 9647e68..1dc155d 100644 --- a/src/views/components/commonBookTags/tags.vue +++ b/src/views/components/commonBookTags/tags.vue @@ -1,13 +1,21 @@