From ea28ca6875863ed6bc5196fa0bea5ca6ba127cb1 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 19 Jan 2025 08:25:15 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E3=80=91App.vue=20=E5=BB=B6=E8=BF=9F=20200=20?= =?UTF-8?q?=E6=AF=AB=E7=A7=92=EF=BC=8C=E9=81=BF=E5=85=8D=20=20{errMsg:=20'?= =?UTF-8?q?hideTabBar:fail=20not=20TabBar=20page'}=EF=BC=88=E6=9D=A5?= =?UTF-8?q?=E8=87=AA=20cursor=20=E4=BF=AE=E5=A4=8D=E5=BB=BA=E8=AE=AE?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/App.vue b/App.vue index 485b5cbb..9053c4eb 100644 --- a/App.vue +++ b/App.vue @@ -3,33 +3,31 @@ import { ShoproInit } from './sheep'; onLaunch(() => { - // 隐藏原生导航栏 使用自定义底部导航 - uni.hideTabBar(); + // 延时隐藏原生导航栏 + setTimeout(() => { + uni.hideTabBar(); + }, 200); // 加载Shopro底层依赖 ShoproInit(); }); - onError((err) => { - console.log('AppOnError:', err); - }); - onShow((options) => { // #ifdef APP-PLUS // 获取urlSchemes参数 const args = plus.runtime.arguments; if (args) { - } + } // 获取剪贴板 uni.getClipboardData({ - success: (res) => { }, + success: (res) => {}, }); // #endif // #ifdef MP-WEIXIN // 确认收货回调结果 - console.log(options,'options'); + console.log(options, 'options'); // #endif }); From 8a9e0355e569f7ad3a9dfacd8c5af062419d9072 Mon Sep 17 00:00:00 2001 From: lifetime have you <121815889@qq.com> Date: Sun, 26 Jan 2025 16:37:09 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=B0=86H5=E8=AE=BF=E9=97=AE=E5=9F=9F?= =?UTF-8?q?=E5=90=8D=E4=BA=A4=E7=94=B1.env=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..605c0167 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://127.0.0.1:3000 + # 文件上传类型: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..90c173ed 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', From 082496f56dd2a3dfada489ae1786870ce614c25f Mon Sep 17 00:00:00 2001 From: lifetime have you <121815889@qq.com> Date: Sun, 26 Jan 2025 08:51:53 +0000 Subject: [PATCH 3/3] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20App.?= =?UTF-8?q?vue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 App.vue diff --git a/App.vue b/App.vue deleted file mode 100644 index 9053c4eb..00000000 --- a/App.vue +++ /dev/null @@ -1,37 +0,0 @@ - - -