From d3a5476064256802f9e0c0626bed6b8048e51bc0 Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期五, 13 十月 2023 17:37:00 +0800 Subject: [PATCH] 部分get请求获取返回数据修改 --- src/store/modules/getClientName.js | 8 ++++---- src/views/service/clientServiceOrder/mixin/codeMixin.js | 13 ++++--------- src/views/client/followupRecords/mixin/codeMixin.js | 13 ++++--------- 3 files changed, 12 insertions(+), 22 deletions(-) diff --git a/src/store/modules/getClientName.js b/src/store/modules/getClientName.js index c53f358..5ae3def 100644 --- a/src/store/modules/getClientName.js +++ b/src/store/modules/getClientName.js @@ -84,7 +84,7 @@ } }) }, - getContactFilter({commit},newData){ + getContactFilter({ commit }, newData) { commit("contactNameList", newData) }, geChance(context) { @@ -161,9 +161,9 @@ }, geProductList(context) { getProductList({ productName: "", productNumber: "", page: 1, pageSize: 10 }).then((res) => { - if (res.data.code == 200) { - console.log(res.data.data.data) - context.commit("productList", res.data.data.data) + if (res.code == 200) { + console.log(res.data.data) + context.commit("productList", res.data.data) } else { Message.error(res.msg) } diff --git a/src/views/client/followupRecords/mixin/codeMixin.js b/src/views/client/followupRecords/mixin/codeMixin.js index 70bac5d..a370e3b 100644 --- a/src/views/client/followupRecords/mixin/codeMixin.js +++ b/src/views/client/followupRecords/mixin/codeMixin.js @@ -27,20 +27,15 @@ this.codenumer = [] this.sum = 0 this.explain = "" - if (res.data.code == 200) { - const { - List = [], - ID, - AutoRule = {}, - Method - } = res.data.data && res.data.data.data ? res.data.data.data[0] : [] - this.codeRule = res.data.data && res.data.data.data ? res.data.data.data[0] : {} + if (res.code == 200) { + const { List = [], ID, AutoRule = {}, Method } = res.data && res.data.data ? res.data.data[0] : [] + this.codeRule = res.data && res.data.data ? res.data.data[0] : {} let autoRule = AutoRule let method = Method ? Method : 0 this.method = method let rules = List this.editConfig.infomation.ID = ID - if (method == 0 && res.data.data.data.length > 0) { + if (method == 0 && res.data.data.length > 0) { console.log("sss") rules.forEach((item, index) => { // setTimeout(() => { diff --git a/src/views/service/clientServiceOrder/mixin/codeMixin.js b/src/views/service/clientServiceOrder/mixin/codeMixin.js index b0f9b5e..db2034f 100644 --- a/src/views/service/clientServiceOrder/mixin/codeMixin.js +++ b/src/views/service/clientServiceOrder/mixin/codeMixin.js @@ -27,20 +27,15 @@ this.codenumer = [] this.sum = 0 this.explain = "" - if (res.data.code == 200) { - const { - List = [], - ID, - AutoRule = {}, - Method - } = res.data.data && res.data.data.data ? res.data.data.data[0] : [] - this.codeRule = res.data.data && res.data.data.data ? res.data.data.data[0] : {} + if (res.code == 200) { + const { List = [], ID, AutoRule = {}, Method } = res.data && res.data.data ? res.data.data[0] : [] + this.codeRule = res.data && res.data.data ? res.data.data[0] : {} let autoRule = AutoRule let method = Method ? Method : 0 this.method = method let rules = List this.editConfig.infomation.ID = ID - if (method == 0 && res.data.data.data.length > 0) { + if (method == 0 && res.data.data.length > 0) { rules.forEach((item, index) => { // setTimeout(() => { // this.codenumer = item.length; -- Gitblit v1.8.0