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, } })