mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-07 01:46:44 +08:00
138 lines
2.5 KiB
Vue
138 lines
2.5 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);
|
|
}
|
|
uni-modal {
|
|
.uni-modal {
|
|
width: 288px !important;
|
|
max-width: 288px !important;
|
|
border-radius: 26upx;
|
|
.uni-modal__bd{
|
|
font-size: 36upx;
|
|
font-weight: 600;
|
|
color: #333333;
|
|
padding: 33px 25px 33px 25px;
|
|
}
|
|
.uni-modal__ft{
|
|
font-size: 32upx;
|
|
.uni-modal__btn_default{
|
|
color: #333333;
|
|
}
|
|
.uni-modal__btn_primary{
|
|
color: #387DF7;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
uni-toast .uni-toast{
|
|
img{
|
|
width: 38px;
|
|
height: 18px;
|
|
}
|
|
}
|
|
/**统一样式*/
|
|
.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>
|