48 lines
1.0 KiB
Vue
48 lines
1.0 KiB
Vue
<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>
|