<script>
|
export default {
|
onLaunch: function() {
|
uni.getSystemInfo({
|
success:(res=>{
|
if (!res.safeAreaInsets) res.safeAreaInsets = {}
|
if (!res.safeAreaInsets) res.safeArea = {}
|
let safetySize = {
|
top:(res.safeAreaInsets.top || 0),
|
bottom:(res.safeAreaInsets.bottom || 0),
|
left:(res.safeAreaInsets.left || 0),
|
right:(res.safeAreaInsets.right || 0)
|
}
|
safetySize.height = res.safeArea.height || 0
|
this.$store.commit('system/setSafety',safetySize)
|
})
|
})
|
/* 获取并记录版本号 */
|
try{
|
plus.runtime.getProperty(plus.runtime.appid, (res)=>{
|
this.$store.commit('system/setVersion',res.version)
|
});
|
}catch(e){
|
//TODO handle the exception
|
}
|
},
|
onShow: function() {
|
console.log('App Show')
|
},
|
onHide: function() {
|
console.log('App Hide')
|
}
|
}
|
</script>
|
|
<style lang="scss">
|
@import "@/static/fonts/iconfont.css";
|
@import "@/uni_modules/uview-ui/index.scss";
|
.app-page {
|
font-size: 28rpx;
|
color: $uni-text-color;
|
background-color: $uni-bg-color;
|
box-sizing: border-box;
|
overflow: hidden;
|
}
|
.auto-wrap{
|
word-break:break-all;
|
word-wrap:break-word;
|
}
|
.no-wrap,.ellipsis{
|
white-space:nowrap;
|
}
|
.ellipsis{
|
overflow:hidden;
|
text-overflow:ellipsis;
|
}
|
.ml{
|
margin-left: 12rpx;
|
}
|
.mr{
|
margin-right: 12rpx;
|
}
|
.no-more-text-row{
|
text-align: center;
|
color: $uni-text-color-grey;
|
padding: 4rpx 0;
|
}
|
.page-frame{
|
position: relative;
|
box-sizing: border-box;
|
&.with-action-user-row{
|
padding-top: 54rpx;;
|
}
|
.with-action-user-row-page-content{
|
height: 100%;
|
position: relative;
|
box-sizing: border-box;
|
overflow: auto;
|
}
|
}
|
.link-text,.enable-input{
|
color: $u-primary;
|
text-decoration: underline;
|
}
|
</style>
|