From b06e11597761a35c6e60450232b38e4f7e9c870b Mon Sep 17 00:00:00 2001 From: RIceWqy <1840169763@qq.com> Date: Mon, 25 Dec 2023 16:51:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=B8=80=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/category/takeout-catgory.vue | 10 +++++++--- pages/index/category/three-catgory.vue | 4 ++-- shopro/request/request.js | 4 ++-- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/pages/index/category/takeout-catgory.vue b/pages/index/category/takeout-catgory.vue index 1c67d65..c61c23c 100644 --- a/pages/index/category/takeout-catgory.vue +++ b/pages/index/category/takeout-catgory.vue @@ -196,11 +196,15 @@ // 获取分类 async getCategory() { - console.log("getCategory222") - const tabbarData = await this.$http('category.detail', { + console.log("getCategory#@#@") + const tabbarData = await this.$jsonrpc('category.detail', { id: this.categoryStyleId }); - this.tabbarList = tabbarData.data.children; + + /* const tabbarData = await this.$http('category.detail', { + id: this.categoryStyleId + }); */ + this.tabbarList = tabbarData.result.children; this.categoryID = this.tabbarList[0]?.id; }, diff --git a/pages/index/category/three-catgory.vue b/pages/index/category/three-catgory.vue index 3e2c50a..ce22ed4 100644 --- a/pages/index/category/three-catgory.vue +++ b/pages/index/category/three-catgory.vue @@ -68,11 +68,11 @@ export default { }, methods: { getCategory() { - console.log("getCategory222") + this.$jsonrpc('category.info', { id: this.categoryStyleId }).then(res => { - console.log("jsonrpc detail @@@",res) + this.categoryData = res.result.children; diff --git a/shopro/request/request.js b/shopro/request/request.js index d47002a..b057ee6 100644 --- a/shopro/request/request.js +++ b/shopro/request/request.js @@ -148,7 +148,7 @@ async requestJson(options = {}) { options.data = createJsonRpc options.method="POST" - console.log(createJsonRpc) + /* let mergeUrl = Request.isUrl(options.url) ? options.url : (options.baseUrl + options.url) if (JSON.stringify(options.params) !== '{}') { let query = Request.addQueryString(options.params); @@ -157,7 +157,7 @@ async requestJson(options = {}) { options.url = mergeUrl */ options.success = res => { - console.log(res,"res") + resolve(this.requestAfter(res.data)) } options.fail = err => {