From d99e0f13807123022389299b41e28f7a65c65054 Mon Sep 17 00:00:00 2001 From: bb_pan Date: Wed, 12 Feb 2025 13:50:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=90=8C=E7=AE=A1=E7=90=86=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/user/contract-manage/index.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/views/user/contract-manage/index.vue b/src/views/user/contract-manage/index.vue index 924d7ec..2c2f546 100644 --- a/src/views/user/contract-manage/index.vue +++ b/src/views/user/contract-manage/index.vue @@ -526,11 +526,19 @@ const onDialogClose_2 = () => {} // 自定义事件 const onFileChange = (fileList: any) => { addAndEditForm.value.fileInfoTempList = [] + const origin = window.location.origin + const isProd = origin.indexOf('sgwpdm.ah.sgcc.com.cn') > -1 const fileListTemp = fileList.map((e: any) => { console.log('111111', e) + let testUrl = '' + if (import.meta.env.VITE_API_URL == '/proxyApi') { + testUrl = e.url // 公司-测试环境 + } else { + testUrl = origin + '/ahbns/' + e.url // 宏源-测试环境 + } return { fileName: e.name, - fileUrl: e.url, + fileUrl: isProd ? 'http://sgwpdm.ah.sgcc.com.cn/iws/ahbns/' + e.url : testUrl, } })