You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

17 lines
375 B

import { serverUrl } from "./request";
export const extName = (str) => `${str}`;
/**
* 处理返回数据中的url字段
* @param {*} url 请求返回的图片url
*/
export const dalImageUrl = (url) => {
if (url) {
if (url.startsWith("http")) {
return url;
}
return serverUrl + url;
}
return "https://hugo.bnblogs.cc/images/img/20220215001349.png";
};