diff --git a/App.vue b/App.vue index fdb57b1..a1b412d 100644 --- a/App.vue +++ b/App.vue @@ -7,11 +7,11 @@ const { $api, navTo, appendScriptTagElement } = inject('globalFunction'); onLaunch((options) => { useDictStore().getDictData(); - uni.onTabBarMidButtonTap(() => { - uni.navigateTo({ - url: '/pages/chat/chat', - }); - }); + // uni.onTabBarMidButtonTap(() => { + // uni.navigateTo({ + // url: '/pages/chat/chat', + // }); + // }); let token = uni.getStorageSync('token') || ''; // 同步获取 缓存信息 if (token) { @@ -28,6 +28,7 @@ onLaunch((options) => { }); onMounted(() => { + // #ifndef MP-WEIXIN if (process.env.NODE_ENV === 'development') { appendScriptTagElement('./static/js/jweixin-1.4.0.js').then(() => { console.log('✅ 微信 JSSDK 加载完成'); @@ -37,6 +38,7 @@ onMounted(() => { console.log('✅ 微信 JSSDK 加载完成'); }); } + // #endif }); onShow(() => { diff --git a/components/md-render/md-render.vue b/components/md-render/md-render.vue index fa90d14..17185ba 100644 --- a/components/md-render/md-render.vue +++ b/components/md-render/md-render.vue @@ -164,10 +164,17 @@ pre code { white-space: pre-wrap; /* 保证换行处理 */ } +/* #ifndef MP-WEIXIN */ pre code:empty, pre code:not(:has(*)):not(:has(text)) { display: none; } +/* #endif */ +/* #ifdef MP-WEIXIN */ +pre code:empty { + display: none; +} +/* #endif */ .code-container { position: relative; diff --git a/components/selectPopup/selectPopupPlugin.js b/components/selectPopup/selectPopupPlugin.js index f61b746..bb2c3b3 100644 --- a/components/selectPopup/selectPopupPlugin.js +++ b/components/selectPopup/selectPopupPlugin.js @@ -7,6 +7,7 @@ import SelectPopup from './selectPopup.vue'; export default { install(app) { const popupApp = createApp(SelectPopup); + // #ifdef H5 const popupInstance = popupApp.mount(document.createElement('div')); document.body.appendChild(popupInstance.$el); @@ -14,7 +15,11 @@ export default { const openPopup = (config) => { popupInstance.open(config); }; + // #endif + // #ifndef H5 + const openPopup = (config) => {}; + // #endif // 提供给所有组件使用 app.provide('openSelectPopup', openPopup); } diff --git a/pages.json b/pages.json index 3bac979..8fc1194 100644 --- a/pages.json +++ b/pages.json @@ -4,8 +4,9 @@ "path": "pages/index/index", "style": { "navigationBarTitleText": "青岛智慧就业平台", + // #ifdef H5 "navigationStyle": "custom" - + // #endif } }, { diff --git a/pages/chat/components/ai-paging.vue b/pages/chat/components/ai-paging.vue index ea67261..6bb0046 100644 --- a/pages/chat/components/ai-paging.vue +++ b/pages/chat/components/ai-paging.vue @@ -1,6 +1,11 @@