代码拉取完成,页面将自动刷新
<script>
import Vue from "vue"
import pageAnimation from '@/components/page-animation'
export default {
mixins: [pageAnimation],
onLaunch: function() {
uni.getSystemInfo({
success: function(e) {
// #ifndef MP
Vue.prototype.StatusBar = e.statusBarHeight;
if (e.platform == 'android') {
Vue.prototype.CustomBar = e.statusBarHeight + 50;
} else {
Vue.prototype.CustomBar = e.statusBarHeight + 45;
};
// #endif
// #ifdef MP-WEIXIN
Vue.prototype.StatusBar = e.statusBarHeight;
let custom = wx.getMenuButtonBoundingClientRect();
Vue.prototype.Custom = custom;
Vue.prototype.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
// #endif
// #ifdef MP-ALIPAY
Vue.prototype.StatusBar = e.statusBarHeight;
Vue.prototype.CustomBar = e.statusBarHeight + e.titleBarHeight;
// #endif
}
})
let _this = this
uni.getStorage({
key:"userInfo",
success:function(data){
_this.$store.commit("user/setUserInfo",data.data)
},
fail:function(){
_this.$store.commit("user/setUserInfo",null)
}
})
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style>
@import url("//at.alicdn.com/t/font_2139421_ac288g3kl2v.css");
</style>
<style lang="scss">
@import "uview-ui/index.scss";
@import "./components/custom/main.css";
*{
margin: 0;
padding: 0;
}
view,text{
font-size: 24rpx;
line-height: 1.5;
}
image{
width: 100%;
}
</style>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。