flat: 兼容

This commit is contained in:
史典卓
2025-05-13 11:42:17 +08:00
parent fd74b7d4df
commit 5333254c58
8 changed files with 68 additions and 23 deletions

12
App.vue
View File

@@ -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(() => {