Files
learning-system-mobile/App.vue
2022-05-29 18:59:24 +08:00

111 lines
2.0 KiB
Vue

<script>
import Vue from 'vue'
export default {
name: 'App',
onLaunch: function() {
//获取设备信息
uni.getSystemInfo({
success: function (res) {
Vue.prototype.$width=res.windowWidth;
Vue.prototype.$height=res.windowHeight;
// console.log(res.model,'model');
// console.log(res.pixelRatio,'pixelRatio');
// console.log(res.windowWidth,'windowWidth');
// console.log(res.windowHeight,'windowHeight');
// console.log(res.language,'language');
// console.log(res.version,'version');
// console.log(res.platform,'platform');
//console.log(this.$width,'$width');
}
});
//获取或加载一次用户信息
//console.log('App Launch');
this.$store.dispatch('GetUserInfo');
},
mounted() {
},
onShow: function() {
},
onHide: function() {
},
onload:function(){
}
}
</script>
<style lang="scss">
/*每个页面公共css */
@import "@/uni_modules/uview-ui/index.scss";
* {
margin: 0;
padding: 0;
font-family: Microsoft YaHei,PingFang SC,Arial Black,Source Han Sans SC,sans-serif,uicon-iconfont;
}
/* #ifdef H5 */
uni-page-head { display: none; }
/* #endif */
page {
background: #f4f4f4;
}
.content {
background: #FFFFFF;
padding: 10px;
border-radius: 20upx;
}
.arrow-right {
width: 9px;
height: 9px;
margin-top: 8px;
display: inline-block;
border-top: 1px solid #bdbdbd;
border-right: 1px solid #bdbdbd;
transform: rotate(45deg);
}
/**统一样式*/
.fixed-field{
width: 180px;
height: 30px;
background: rgb(247,247,249);
display: flex;
.fixed-field-icon{
margin-top: 2px;
margin-left: 10px;
}
.fixed-field-text{
font-size: 12px;
color: #000000;
margin-left: 2px;
margin-top: 5px;
}
}
/**统一分享样式*/
.share-btn{
display: flex;
justify-content: flex-end;
padding-top: 10upx;
line-height: 28upx;
.share-btn-icon{
img{
width: 28upx;
height: 28upx;
}
}
.share-btn-name{
font-size: 28upx;
margin-left: 8upx;
}
}
</style>