pull/8/head
kele 2023-02-07 14:16:13 +08:00
commit 447ece1a49
2 changed files with 6 additions and 3 deletions

4
env
View File

@ -11,4 +11,6 @@ SHOPRO_DEV_PORT = 3000
SHOPRO_API_PATH = /shop/api/
# 客户端静态资源地址 空=默认使用服务端指定的CDN资源地址前缀 | local=本地 | http(s)://xxx.xxx=自定义静态资源地址前缀
SHOPRO_STATIC_URL = https://file.sheepjs.com
SHOPRO_STATIC_URL = https://file.sheepjs.com
SHOPRO_VERSION = v1.1.15

View File

@ -1,12 +1,13 @@
// 开发环境配置
export let baseUrl;
export let version;
if (process.env.NODE_ENV === 'development') {
baseUrl = import.meta.env.SHOPRO_DEV_BASE_URL;
} else {
baseUrl = import.meta.env.SHOPRO_BASE_URL;
}
console.log(`[Shopro v1.0.8] https://www.sheepjs.com/`);
version = import.meta.env.SHOPRO_VERSION;
console.log(`[Shopro ${version}] https://www.sheepjs.com/`);
export const apiPath = import.meta.env.SHOPRO_API_PATH;
export const staticUrl = import.meta.env.SHOPRO_STATIC_URL;