From 1b845e5f2fd7acc3a63e94882aeeba62f20d72fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=8B=E4=BA=8E=E5=88=9D=E8=A7=81?= <752204717@qq.com> Date: Thu, 16 May 2024 15:47:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E7=B1=BB=E7=AD=9B=E9=80=89+=E5=8D=8F?= =?UTF-8?q?=E8=AE=AE=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/course/courseChapter.vue | 373 +++++++++++++-------- src/views/modules/shop/shopproduct.vue | 59 +++- 2 files changed, 277 insertions(+), 155 deletions(-) diff --git a/src/views/modules/course/courseChapter.vue b/src/views/modules/course/courseChapter.vue index 1ec7f7e..c87fa2b 100644 --- a/src/views/modules/course/courseChapter.vue +++ b/src/views/modules/course/courseChapter.vue @@ -1,64 +1,135 @@ + diff --git a/src/views/modules/shop/shopproduct.vue b/src/views/modules/shop/shopproduct.vue index 88b07b5..d0b89af 100644 --- a/src/views/modules/shop/shopproduct.vue +++ b/src/views/modules/shop/shopproduct.vue @@ -1,5 +1,5 @@ @@ -200,8 +212,9 @@ export default { data() { return { dataForm: { - key: "" - }, + key: "", + goodsType: "", + }, goodsTypeList: [], dataList: [], publishStatus: false, pageIndex: 1, @@ -224,8 +237,18 @@ export default { }, activated() { this.getDataList(); + this.getGoodsTypeList(); }, methods: { + getGoodsTypeList() { + this.$http({ + url: this.$http.adornUrl("/book/sysdictdata/selectByType/goodsType"), + method: "get" + }).then(({ data }) => { + // console.log(data.dataList) + this.goodsTypeList = data.dataList; + }); + }, handleEditTags(id) { this.$nextTick(() => { this.$refs.commonTags.open(id); @@ -251,18 +274,26 @@ export default { // 获取数据列表 getDataList() { this.dataListLoading = true; - this.$http({ - url: this.$http.adornUrl("/book/shopproduct/list"), - method: "get", - params: this.$http.adornParams({ - page: this.pageIndex, + + this.$http + .request({ + url: this.$http.adornUrl(`/master/shopProduct/listByPage`), + method: "POST", + data: { + current: this.pageIndex, limit: this.pageSize, - key: this.dataForm.key - }) - }).then(({ data }) => { + productName: this.dataForm.key, + goodsType: this.dataForm.goodsType + }, + header: { + //默认 无 说明:请求头 + "Content-Type": "application/json" + } + }) + .then(({ data }) => { if (data && data.code === 0) { - this.dataList = data.page.list; - this.totalPage = data.page.totalCount; + this.dataList = data.result.records; + this.totalPage = data.result.pages; } else { this.dataList = []; this.totalPage = 0;