feat:H5 访问域名,改为 .env 配置

This commit is contained in:
YunaiV
2025-04-28 23:01:34 +08:00
parent 20e7593e14
commit 791e99057c
4 changed files with 7 additions and 3 deletions
+2
View File
@@ -19,6 +19,7 @@ export const apiPath = import.meta.env.SHOPRO_API_PATH;
export const staticUrl = import.meta.env.SHOPRO_STATIC_URL;
export const tenantId = import.meta.env.SHOPRO_TENANT_ID;
export const websocketPath = import.meta.env.SHOPRO_WEBSOCKET_PATH;
export const h5Url = import.meta.env.SHOPRO_H5_URL;
export default {
baseUrl,
@@ -26,4 +27,5 @@ export default {
staticUrl,
tenantId,
websocketPath,
h5Url,
};
-1
View File
@@ -309,4 +309,3 @@ export function jsonParse(str) {
return str;
}
}
// TODO @芋艿:融合下;
+2 -2
View File
@@ -4,7 +4,7 @@ import $platform from '@/sheep/platform';
import $router from '@/sheep/router';
import user from './user';
import sys from './sys';
import { baseUrl } from '@/sheep/config';
import { baseUrl, h5Url } from '@/sheep/config';
const app = defineStore({
id: 'app',
@@ -78,7 +78,7 @@ const app = defineStore({
this.platform = {
share: {
methods: ['forward', 'poster', 'link'],
linkAddress: 'http://127.0.0.1:3000', // TODO 芋艿:可以考虑改到 .env 那
linkAddress: h5Url,
posterInfo: {
user_bg: '/static/img/shop/config/user-poster-bg.png',
goods_bg: '/static/img/shop/config/goods-poster-bg.png',