2025-09-12 17:23:03 +08:00
|
|
|
<script>
|
2025-09-28 17:30:20 +08:00
|
|
|
import {
|
|
|
|
|
createRequestPermissionListener,
|
|
|
|
|
stopRequestPermissionListener
|
|
|
|
|
} from '@/uni_modules/colorful-uni-perm';
|
|
|
|
|
|
2025-09-12 17:23:03 +08:00
|
|
|
export default {
|
|
|
|
|
onLaunch: function() {
|
2025-09-28 17:30:20 +08:00
|
|
|
// #ifdef APP-PLUS
|
|
|
|
|
if (plus.runtime.channel === 'huawei') {
|
|
|
|
|
// 创建权限申请监听
|
|
|
|
|
createRequestPermissionListener();
|
|
|
|
|
}
|
|
|
|
|
// #endif
|
2025-09-12 17:23:03 +08:00
|
|
|
console.log('App Launch')
|
2025-09-17 16:59:23 +08:00
|
|
|
let token = uni.getStorageSync("token")
|
|
|
|
|
if (token) {
|
|
|
|
|
plus.navigator.closeSplashscreen();
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
uni.reLaunch({
|
|
|
|
|
url: "/pages/login/login",
|
|
|
|
|
success() {
|
|
|
|
|
plus.navigator.closeSplashscreen();
|
|
|
|
|
}
|
|
|
|
|
})
|
2025-09-12 17:23:03 +08:00
|
|
|
},
|
|
|
|
|
onShow: function() {
|
|
|
|
|
console.log('App Show')
|
|
|
|
|
},
|
|
|
|
|
onHide: function() {
|
|
|
|
|
console.log('App Hide')
|
2025-09-28 17:30:20 +08:00
|
|
|
},
|
|
|
|
|
onExit() {
|
|
|
|
|
// #ifdef APP-PLUS
|
|
|
|
|
if (plus.runtime.channel === 'huawei') {
|
|
|
|
|
// 清除权限申请监听
|
|
|
|
|
stopRequestPermissionListener();
|
|
|
|
|
}
|
|
|
|
|
// #endif
|
|
|
|
|
},
|
2025-09-12 17:23:03 +08:00
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
@import "./uni_modules/vk-uview-ui/index.scss";
|
2025-10-15 17:22:54 +08:00
|
|
|
// @import "./static/fontsFamily/ht.css";
|
|
|
|
|
// @import "./static/fontsFamily/fs.css";
|
|
|
|
|
// @import "./static/fontsFamily/kt.css";
|
|
|
|
|
// @import "./static/fontsFamily/bkt.css";
|
|
|
|
|
// @import "./static/fontsFamily/hwfs.css";
|
|
|
|
|
// @import "./static/fontsFamily/hwkt.css";
|
|
|
|
|
// @import "./static/fontsFamily/st.css";
|
|
|
|
|
// @import "./static/fontsFamily/wryh.css";
|
2025-09-15 11:34:07 +08:00
|
|
|
</style>
|