Files
frontend-app/App.vue
T
2025-05-07 09:54:33 +08:00

48 lines
1.0 KiB
Vue
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<script>
export default {
onLaunch: function() {
console.log('App Launch')
const res = uni.getSystemInfoSync();
uni.setStorageSync('platform', res.platform);
// #ifdef APP-PLUS         
// 获取应用版本信息
plus.runtime.getProperty(plus.runtime.appid, function(inf) {
uni.setStorageSync('version', inf.version); // 大版本号
uni.setStorageSync('versionCode', inf.versionCode); // 小版本号
});
let uuid = plus.device.uuid;
// #endif
},
onShow: function() {
console.log('App Show')
// 隐藏原生tabbar
/*#ifdef APP-PLUS*/
uni.hideTabBar({
animation: false
})
/*#endif*/
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style lang="scss">
@import "@/uni_modules/uview-plus/index.scss";
@import '@/uni.scss';
@import '@/common.scss';
.container {
padding: 15px;
}
button {
margin-bottom: 15px;
}
img {
width: 100%;
height: auto; /* 保持图片比例 */
}
</style>