package cn.exrick.xboot.your.util;
|
|
import cn.hutool.core.util.StrUtil;
|
|
public class ImageShowUtil {
|
public static String getImgX(String imgx) {
|
String temp = "";
|
if (StrUtil.isEmpty(imgx)) {
|
return temp;
|
}
|
String[] imgss = imgx.split(",");
|
for (int i = 0; i < imgss.length; i++) {
|
String url = imgss[i];
|
if (StrUtil.isNotEmpty(url)) {
|
if (url.contains("http") && url.contains("/xboot")) {
|
try{
|
if("".equals(temp)){
|
temp += "/xboot" + url.split("/xboot")[1];
|
}else{
|
temp += ",/xboot" + url.split("/xboot")[1];
|
}
|
}catch (Exception e){
|
if("".equals(temp)){
|
temp += url;
|
}else{
|
temp += "," + url;
|
}
|
}
|
} else {
|
if("".equals(temp)){
|
temp += url;
|
}else {
|
temp += "," + url;
|
}
|
}
|
}
|
}
|
return temp;
|
}
|
}
|