puzhibing
6 天以前 0db8c9b94a9ac655549d5eba5c2a6c92ac386c06
culture/src/utils/baseurl.js
@@ -1,3 +1,8 @@
function getProductionFileUrl() {
    if (typeof window === 'undefined') return '/images/';
    return `${window.location.protocol}//${window.location.hostname}:11223/images/`;
}
const apiConfig = {
    // 开发环境
    development: {
@@ -9,7 +14,7 @@
    production: {
        baseURL: "/culture",
        imgUrl: "/culture/open/file/upload",
        showImgUrl:'http://127.0.0.1:11223/images/'
        showImgUrl: getProductionFileUrl()
    },
};