diff --git a/pages.json b/pages.json index bd172dc..6566d9d 100644 --- a/pages.json +++ b/pages.json @@ -17,6 +17,7 @@ "backgroundColorTop": "#ffd1c7", "mp-weixin": { "navigationStyle": "custom", + "navigationBarTitleText": "", "navigationBarBackgroundColor": "#ffd1c7", "backgroundColorTop": "#ffd1c7" } diff --git a/pages/yxg-magic/index.vue b/pages/yxg-magic/index.vue index 16d774d..f722832 100644 --- a/pages/yxg-magic/index.vue +++ b/pages/yxg-magic/index.vue @@ -1,70 +1,91 @@ diff --git a/static/n-main/yxg-brand-logo.png b/static/n-main/yxg-brand-logo.png new file mode 100644 index 0000000..7ec701b Binary files /dev/null and b/static/n-main/yxg-brand-logo.png differ diff --git a/util/yxgConfig.js b/util/yxgConfig.js index 1a8ecac..185f17f 100644 --- a/util/yxgConfig.js +++ b/util/yxgConfig.js @@ -1,16 +1,16 @@ /** 愈心魔方 H5(digital-psychology user-h5) */ -import { LOCAL_H5_HOST } from './yxgConfig.local.js' +import { LOCAL_H5_HOST, USE_LOCAL_H5 } from './yxgConfig.local.js' const PROD_BASE = 'https://h5.yuxingu.com.cn/psy/' -const PROD_VERSION = '202608256' -const PROD_LOGO_URL = 'https://miniapp.yuxingu.com.cn/yxg-mp/logo.png' +const PROD_VERSION = '202608278' +/** 愈心魔方顶栏 logo(小程序包内 static,不请求外网) */ +export const YXG_MP_LOGO_URL = '/static/n-main/yxg-brand-logo.png' const isDev = import.meta.env.DEV +const useLocalH5 = isDev && USE_LOCAL_H5 -export const YXG_H5_VERSION = isDev ? 'local' : PROD_VERSION -export const YXG_H5_BASE = isDev ? `http://${LOCAL_H5_HOST}/psy/` : PROD_BASE -/** cover-image 仅支持网络图/临时路径,不能用 /static */ -export const YXG_H5_LOGO_URL = isDev - ? `http://${LOCAL_H5_HOST}/psy/logo.png` - : PROD_LOGO_URL +export const YXG_H5_VERSION = useLocalH5 ? 'local' : PROD_VERSION +export const YXG_H5_BASE = useLocalH5 ? `http://${LOCAL_H5_HOST}/psy/` : PROD_BASE +/** H5 内嵌场景用远程 logo(与小程序顶栏无关) */ +export const YXG_H5_LOGO_URL = 'https://miniapp.yuxingu.com.cn/yxg-mp/logo.png' export const YXG_H5_HOME_URL = `${YXG_H5_BASE}?mp=1&v=${YXG_H5_VERSION}` diff --git a/util/yxgConfig.local.js b/util/yxgConfig.local.js index baf0336..229e2f0 100644 --- a/util/yxgConfig.local.js +++ b/util/yxgConfig.local.js @@ -1,5 +1,7 @@ /** - * 本地联调 H5(仅开发编译生效,发行仍走线上域名) - * 改成你电脑局域网 IP — 运行 digital-psychology 的 `npm run dev:mp` 会打印 + * 本地小程序联调 H5 + * USE_LOCAL_H5=false → 开发编译也访问远程 https://h5.yuxingu.com.cn/psy/(默认) + * USE_LOCAL_H5=true → 访问本机 Vite,LOCAL_H5_HOST 与 npm run dev:mp 打印一致 */ +export const USE_LOCAL_H5 = false export const LOCAL_H5_HOST = '192.168.100.16:5173'