Pre Merge pull request !171 from wuKong/fix(app)-iOS网络权限检查

pull/171/MERGE
wuKong 2025-12-08 11:02:05 +00:00 committed by Gitee
commit d1c6e2951a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 15 additions and 1 deletions

View File

@ -22,7 +22,7 @@
<script setup>
import { computed } from 'vue';
import { onLoad, onPageScroll, onPullDownRefresh } from '@dcloudio/uni-app';
import { onLoad, onShow, onPageScroll, onPullDownRefresh } from '@dcloudio/uni-app';
import sheep from '@/sheep';
import $share from '@/sheep/platform/share';
// tabBar
@ -79,6 +79,20 @@
}
});
onShow(async() => {
// #ifdef APP-PLUS
// ios
// uni.onNetworkStatusChangeuni.offNetworkStatusChange
// app.vue
//
if (sheep.$platform.os === 'ios') {
if (await sheep.$platform.checkNetwork()) {
await sheep.$store('app').init();
}
}
// #endif
});
//
onPullDownRefresh(() => {
sheep.$store('app').init();