75 lines
1.6 KiB
Vue
75 lines
1.6 KiB
Vue
|
|
<script>
|
|
|
|
export default {
|
|
onLaunch: function() {
|
|
console.log('App Launch')
|
|
uni.showShareMenu({
|
|
withShareTicket: true, // 设置为 true,表示在分享时返回 shareTicket
|
|
menus: ['shareAppMessage', 'shareTimeline'] // 指定要显示的分享菜单项
|
|
})
|
|
// pingfang pingfang-medium
|
|
uni.loadFontFace({
|
|
global:true,
|
|
family: 'SourceHanSans',
|
|
source: 'url("https://miniapp.yuxingu.com.cn/yxg-mp/SourceHanSansCN-Regular.otf")',
|
|
success(res) {
|
|
console.log('加载SourceHanSans字体成功')
|
|
}
|
|
})
|
|
|
|
uni.loadFontFace({
|
|
global:true,
|
|
family: 'GenYoMinJP',
|
|
source: 'url("https://miniapp.yuxingu.com.cn/yxg-mp/GenYoMinJP-Regular-7.ttf")',
|
|
success(res) {
|
|
console.log('加载GenYoMinJP字体成功')
|
|
}
|
|
})
|
|
|
|
uni.loadFontFace({
|
|
global:true,
|
|
family: 'SourceHanSansBold',
|
|
source: 'url("https://miniapp.yuxingu.com.cn/yxg-mp/SourceHanSansCN-Bold.otf")',
|
|
success(res) {
|
|
console.log('加载SourceHanSansBold字体成功')
|
|
}
|
|
})
|
|
},
|
|
onShow: function() {
|
|
console.log('App Show')
|
|
},
|
|
onHide: function() {
|
|
console.log('App Hide')
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
/*每个页面公共css */
|
|
body{
|
|
font-family: 'SourceHanSans';
|
|
box-sizing: border-box;
|
|
}
|
|
image {
|
|
image-rendering: -webkit-optimize-contrast;
|
|
image-rendering: crisp-edges;
|
|
}
|
|
page-common{
|
|
display: flex;
|
|
justify-content: center;
|
|
}
|
|
all-center{
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
|
|
::-webkit-scrollbar {
|
|
display: none;
|
|
width: 0;
|
|
height: 0;
|
|
color: transparent;
|
|
}
|
|
</style>
|