import {
|
config
|
} from "@/common/config.js"
|
function getArrayImgPath(jsonArray, url) {
|
var result = ''
|
if (!jsonArray) {
|
return "";
|
}
|
try {
|
var json = JSON.parse(jsonArray)[0];
|
var baseUrl = url || config.ftpUrl
|
// var result = 'https://scstq.183.sc.cn/f-static' + json.path;//邮政
|
result = baseUrl + json.path; //金明源
|
} catch (e) {
|
//TODO handle the exception
|
}
|
|
return result;
|
}
|
|
function getImgPath(jsonstr, url) {
|
//if (jsonstr != null && jsonstr != 'null') {
|
// }
|
// var result = 'https://scstq.183.sc.cn/f-static' + jsonstr.path;//邮政
|
var baseUrl = url || config.ftpUrl
|
var result = baseUrl + jsonstr.path;
|
return result;
|
}
|
|
module.exports = {
|
getArrayImgPath: getArrayImgPath,
|
getImgPath: getImgPath
|
}
|