From 10451bc2c0836b3e1da6957328d061f52f66897d Mon Sep 17 00:00:00 2001 From: chenhaojie Date: Mon, 23 Dec 2024 18:59:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A1=A5=E5=85=85=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E8=AF=B7=E6=B1=82token?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/aiSupervision/layerConfigApi.js | 5 ++--- .../aiSupervision/layerManage/resource/LayerDetails.vue | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api/aiSupervision/layerConfigApi.js b/src/api/aiSupervision/layerConfigApi.js index 2967bd1..604ed09 100644 --- a/src/api/aiSupervision/layerConfigApi.js +++ b/src/api/aiSupervision/layerConfigApi.js @@ -189,9 +189,8 @@ export function queryServiceInfoApi(url, layer) { const name = layer.name; const nameArr = name.split(":"); const splitUrl = url?.split("/rest/")[0]; - const newUrl = `${splitUrl.replace("/map-", "/data-")}/rest/data/datasources/${nameArr[0]}/datasets/${ - nameArr[1] - }/fields.json`; + const token = layer.token; + const newUrl = `${splitUrl.replace("/map-", "/data-")}/rest/data/datasources/${nameArr[0]}/datasets/${nameArr[1]}/fields.json?k=${token}`; const result = await axios.get(newUrl); if (result.status === 200 && result.data) { const fields = result.data.fieldNames.map((item) => { diff --git a/src/views/aiSupervision/layerManage/resource/LayerDetails.vue b/src/views/aiSupervision/layerManage/resource/LayerDetails.vue index c18f148..418bc90 100644 --- a/src/views/aiSupervision/layerManage/resource/LayerDetails.vue +++ b/src/views/aiSupervision/layerManage/resource/LayerDetails.vue @@ -518,6 +518,7 @@ export default { url: url, index: this.editDataInfoForm.serviceIndex, name: this.editDataInfoForm.serviceName, + token: this.editDataInfoForm.serviceToken, alias: this.editDataInfoForm.serviceNameAlias, }).then((res) => { this.fieldsTable =