Commit a4b261f6 authored by v_liuhuaizhi's avatar v_liuhuaizhi

连接后台接口 待部署版本

parent c5c2b771
......@@ -3,5 +3,5 @@
* */
export default {
// 请求图片地址
getWadouri: 'http://114.67.241.140:8090/common/download/resource?resource='
getWadouri: 'https://qf.91isoft.com/cw/common/download/resource?resource='
}
......@@ -104,7 +104,8 @@ export default {
},
getFile() {
console.log('kkkkkkkkkk', getParamFromUrl('resource'));
const url = "wadouri:" + api.getWadouri + decodeURIComponent(getParamFromUrl('resource'));
const param = decodeURIComponent(getParamFromUrl('resource')? getParamFromUrl('resource') : 'https%3A%2F%2Fqf.91isoft.com%2Fcw%2Fprofile%2Fupload%2F2023%2F05%2F09%2Fdownload_20230509085603A001.dcm');
const url = "wadouri:" + api.getWadouri + param;
this.loadAndViewImage(url);
},
loadAndViewImage(imageId) {
......
......@@ -3,8 +3,14 @@ export const getParamFromUrl = (search, url) => {
if (!url) {
url = window.location.href;
}
let params = url.split('?')[1].split('&');
let obj = {};
params.map(v => (obj[v.split('=')[0]] = v.split('=')[1]));
return obj[search] || '';
try {
let params = url.split('?')[1].split('&');
let obj = {};
params.map(v => (obj[v.split('=')[0]] = v.split('=')[1]));
return obj[search] || '';
}catch (e) {
console.log(e);
return ''
}
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment