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;