From c60e56e2b6ceb633c6b10f5dc52e3da88129ad70 Mon Sep 17 00:00:00 2001 From: 陈泽平 <chenzeping> Date: 星期五, 21 五月 2021 17:35:41 +0800 Subject: [PATCH] 管线分析相关功能问题修改 --- src/utils/AjaxUtils.js | 24 ++++-------------------- 1 files changed, 4 insertions(+), 20 deletions(-) diff --git a/src/utils/AjaxUtils.js b/src/utils/AjaxUtils.js index 0499763..b99fd67 100644 --- a/src/utils/AjaxUtils.js +++ b/src/utils/AjaxUtils.js @@ -33,7 +33,7 @@ axios({ method: 'get', url: pUrl, - data: pData + params: pData }).then(function (response) { pBackFun(response) }) @@ -44,31 +44,15 @@ const GetDataAsynByUrl = async (oUrl, pData) => { const pUrl = encodeURI(oUrl) - const res = await axios({ - method: 'get', - url: pUrl, - data: pData + const res = await axios.get(pUrl, { + params: pData }).then((response) => { return (response) }) .catch((error) => { console.error('鏁版嵁鑾峰彇澶辫触', error) }) - return res - - // $.ajax({ - // type: 'GET', - // url: pUrl, - // data: pData, - // timeout: 600000, - // async: true, - // success: function (datas, nnn) { - // pBackFun(datas) - // }, - // error: function (e, nnnn) { - // console.error('鏁版嵁鑾峰彇澶辫触', pUrl) - // } - // }) + return res.data } function postDataAsynByUrl (pUrl, pData, pBackFun) { $.ajax({ -- Gitblit v1.8.0