Commit 308f259a by baihong

add;新增OpenSans字体

parent 0fefa2bd
<script>
import Vue from 'vue';
export default {
onLaunch: function() {
console.log('App Launch');
uni.getSystemInfo({
success: e => {
this.initSize(e);
import Vue from 'vue';
export default {
onLaunch: function() {
console.log('App Launch');
uni.getSystemInfo({
success: e => {
this.initSize(e);
}
});
},
methods: {
/**
* 存储设备信息 参考colorUI
* @param {Object}
*/
initSize(e) {
const systemInfo = e;
let navigationBarHeight;
let custom = {};
// #ifndef MP
custom = {
height: 36,
width: 88
};
navigationBarHeight = 44;
// #endif
// #ifdef MP-WEIXIN
custom = wx.getMenuButtonBoundingClientRect();
navigationBarHeight = custom.bottom + custom.top - e.statusBarHeight * 2;
// 导航栏高度 = 状态栏到胶囊的间距(胶囊距上距离-状态栏高度) * 2 + 胶囊高度 + 状态栏高度
navigationBarHeight = (custom.top - systemInfo.statusBarHeight) * 2 + custom.height + systemInfo
.statusBarHeight;
systemInfo.menuBotton = custom.top - systemInfo.statusBarHeight;
systemInfo.menuRight = systemInfo.screenWidth - custom.right;
systemInfo.menuHeight = custom.height;
// #endif
systemInfo.custom = custom;
systemInfo.navigationBarHeight = navigationBarHeight;
Vue.prototype.systemInfo = systemInfo;
}
});
},
methods: {
/**
* 存储设备信息 参考colorUI
* @param {Object}
*/
initSize(e) {
const systemInfo = e;
let navigationBarHeight;
let custom = {};
// #ifndef MP
custom = { height: 36, width: 88 };
navigationBarHeight = 44;
// #endif
// #ifdef MP-WEIXIN
custom = wx.getMenuButtonBoundingClientRect();
navigationBarHeight = custom.bottom + custom.top - e.statusBarHeight * 2;
// 导航栏高度 = 状态栏到胶囊的间距(胶囊距上距离-状态栏高度) * 2 + 胶囊高度 + 状态栏高度
navigationBarHeight = (custom.top - systemInfo.statusBarHeight) * 2 + custom.height + systemInfo.statusBarHeight;
systemInfo.menuBotton = custom.top - systemInfo.statusBarHeight;
systemInfo.menuRight = systemInfo.screenWidth - custom.right;
systemInfo.menuHeight = custom.height;
// #endif
systemInfo.custom = custom;
systemInfo.navigationBarHeight = navigationBarHeight;
Vue.prototype.systemInfo = systemInfo;
},
onShow: function() {
console.log('App Show');
},
onHide: function() {
console.log('App Hide');
}
},
onShow: function() {
console.log('App Show');
},
onHide: function() {
console.log('App Hide');
}
};
};
</script>
<style lang="scss">
/*每个页面公共css */
@import 'uview-ui/index.scss';
.app{
background-color: #F5F7F9;
height: 100vh;
}
/*每个页面公共css */
@import 'uview-ui/index.scss';
@font-face {
font-family: OpenSans;
font-weight: normal;
font-style: normal;
src: url('static/OpenSans.ttf');
}
@font-face {
font-family: OpenSans-Bold;
font-weight: bold;
src: url('static/OpenSansBold.ttf');
}
.app {
background-color: #F5F7F9;
height: 100vh;
}
</style>
......@@ -329,7 +329,7 @@
margin-top: 10px;
text {
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-family: OpenSans;
font-weight: 400;
color: #555555;
//line-height: 33rpx;
......@@ -506,7 +506,7 @@
display: flex;
align-items: center;
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-family: OpenSans;
font-weight: 400;
color: #333333;
line-height: 30rpx;
......
......@@ -83,7 +83,7 @@
align-items: center;
margin-right: 65rpx;
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-family: OpenSans;
font-weight: 400;
color: #555555;
line-height: 33rpx;
......
......@@ -229,14 +229,14 @@
}
p {
font-size: 36rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-family: OpenSans;
font-weight: 500;
color: #333333;
line-height: 50rpx;
}
text{
font-size: 26rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-family: OpenSans;
font-weight: 400;
color: #999999;
line-height: 37rpx;
......@@ -250,8 +250,8 @@
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-size: 28rpx;
font-family: OpenSans;
font-weight: 600;
color: #000000;
line-height: 40rpx;
......@@ -291,8 +291,8 @@
.item {
display: flex;
flex-direction: column;
font-size: 28rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-size: 28rpx;
font-family: OpenSans;
font-weight: 600;
color: #333333;
line-height: 40rpx;
......@@ -368,7 +368,7 @@
align-items: center;
margin-right: 65rpx;
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-family: OpenSans;
font-weight: 400;
color: #555555;
line-height: 33rpx;
......@@ -392,7 +392,7 @@
.gz {
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-family: OpenSans;
font-weight: 400;
color: #999999;
line-height: 24rpx;
......@@ -459,7 +459,7 @@
display: flex;
flex-direction: column;
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-family: OpenSans;
font-weight: 400;
color: #333333;
line-height: 30rpx;
......@@ -521,7 +521,7 @@
text {
font-size: 22rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-family: OpenSans;
font-weight: 500;
color: #FFC915;
line-height: 24rpx;
......
......@@ -133,7 +133,7 @@
text:nth-child(1) {
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-family: OpenSans;
font-weight: 400;
color: #333333;
line-height: 40rpx;
......@@ -195,7 +195,7 @@
display: flex;
align-items: flex-end;
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-family: OpenSans;
font-weight: 400;
color: #333333;
line-height: 30rpx;
......
......@@ -153,7 +153,7 @@
text:nth-child(1) {
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-family: OpenSans;
font-weight: 400;
color: #333333;
line-height: 40rpx;
......@@ -217,7 +217,7 @@
display: flex;
align-items: center;
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-family: OpenSans;
font-weight: 400;
color: #333333;
line-height: 30rpx;
......
......@@ -135,7 +135,7 @@
display: flex;
align-items: center;
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-family: OpenSans;
font-weight: 400;
color: #333333;
line-height: 30rpx;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment