From 60e32fc842982be87abe6d49668140621b3064dd Mon Sep 17 00:00:00 2001 From: gitee-api <15399561+gitee-api@user.noreply.gitee.com> Date: Wed, 5 Feb 2025 03:33:01 +0800 Subject: [PATCH] =?UTF-8?q?H5=E8=AE=BF=E9=97=AE=E5=9F=9F=E5=90=8D=20?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=20.env=20=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 3 +++ sheep/config/index.js | 2 ++ sheep/store/app.js | 3 ++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.env b/.env index 0c3c73f7..70eeb7be 100644 --- a/.env +++ b/.env @@ -8,6 +8,9 @@ SHOPRO_BASE_URL=http://api-dashboard.yudao.iocoder.cn SHOPRO_DEV_BASE_URL=http://127.0.0.1:48080 ### SHOPRO_DEV_BASE_URL = http://yunai.natapp1.cc +# H5访问域名 +SHOPRO_H5_URL=http://test.yudao.iocoder.cn + # 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务 SHOPRO_UPLOAD_TYPE=server diff --git a/sheep/config/index.js b/sheep/config/index.js index 9aa4f523..331d5412 100644 --- a/sheep/config/index.js +++ b/sheep/config/index.js @@ -13,6 +13,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, @@ -20,4 +21,5 @@ export default { staticUrl, tenantId, websocketPath, + h5Url, }; diff --git a/sheep/store/app.js b/sheep/store/app.js index 36f767f1..141af9d0 100644 --- a/sheep/store/app.js +++ b/sheep/store/app.js @@ -4,6 +4,7 @@ import $platform from '@/sheep/platform'; import $router from '@/sheep/router'; import user from './user'; import sys from './sys'; +import { h5Url } from '@/sheep/config'; const app = defineStore({ id: 'app', @@ -72,7 +73,7 @@ const app = defineStore({ this.platform = { share: { methods: ['forward', 'poster', 'link'], - linkAddress: 'http://127.0.0.1:3000', // TODO 芋艿:可以考虑改到 .env 那 + linkAddress: h5Url, // 改到 .env 配置 posterInfo: { user_bg: '/static/img/shop/config/user-poster-bg.png', goods_bg: '/static/img/shop/config/goods-poster-bg.png', -- Gitee