<script>
|
import {
|
mapState,
|
mapMutations
|
} from 'vuex'
|
export default {
|
onLaunch: function() {
|
let userinfo = uni.getStorageSync('userInfo')
|
if(userinfo){
|
this.setUserInfo(userinfo)
|
}
|
let position = uni.getStorageSync('position')
|
if(position){
|
this.setPosition(position)
|
}
|
let system = uni.getSystemInfoSync()
|
this.setSystemInfo(system)
|
console.log(system)
|
},
|
onShow: function() {
|
},
|
onHide: function() {
|
},
|
methods:{
|
...mapMutations(['setUserInfo','setSystemInfo','setPosition']),
|
}
|
}
|
</script>
|
|
<style lang="scss">
|
@import "@/uni_modules/uview-ui/index.scss";
|
/*每个页面公共css */
|
@font-face {
|
font-family: 'PingFang Medium';
|
src: url('~@/static/fonts/PingFang Medium.otf'); //你的资源目录
|
font-weight: normal;
|
font-style: normal;
|
}
|
|
view,text{
|
box-sizing: border-box;
|
font-size: 26rpx;
|
font-family: 'PingFang Medium';
|
}
|
cover-view{
|
overflow: auto;
|
line-height: normal;
|
font-family: 'PingFang Medium';
|
visibility: initial;
|
}
|
|
|
.button{
|
background-color: #ffffff;
|
padding: 0;
|
margin: 0;
|
line-height: 1em;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
&::after{
|
border: none;
|
}
|
}
|
.nomore{
|
padding-top: 280rpx;
|
}
|
.safe-area-inset-bottom{
|
padding-bottom: 0;
|
padding-bottom: constant(safe-area-inset-bottom);
|
padding-bottom: env(safe-area-inset-bottom);
|
}
|
|
</style>
|