qingyiay
2023-05-10 14df401b50272890dc910bbd95d98a8b6caf48d3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<script>
export default {
    onShow() {},
    methods: {}
    // created() {
    //     uni.loadFontFace({
    //         family: 'siYuanLight', // 字体名称,可以自定义
    //         source: 'url("/utils/fonts/siyuan.OTF")', // 字体文件路径
    //         success() {
    //             console.log('字体加载成功');
    //         },
    //         fail() {
    //             console.log('字体加载失败');
    //         }
    //     });
    // }
};
</script>
 
<style lang="scss" scoped>
/*每个页面公共css */
@import '@/uni_modules/uview-ui/index.scss';
@font-face {
    font-family: siYuanLight;
    src: url('https://mx.jzeg.cn:9095/appimg/fonts/siyuan.OTF');
}
@font-face {
    font-family: weighting;
    src: url('https://mx.jzeg.cn:9095/appimg/fonts/weighting.TTF');
}
body {
    font-family: siYuanLight, sans-serif;
}
// @font-face {
//     font-family: 'weighting';
//     src: url('./utils/fonts/weighing.TTF');
// }
</style>