jiangchengfeiyi-xiaochengxu/common/globalFont.js

44 lines
875 B
JavaScript
Raw Normal View History

2025-03-01 05:33:28 +00:00
export const getFonts =()=>{
2025-03-13 02:49:36 +00:00
2025-03-19 07:16:09 +00:00
//其他页面
uni.loadFontFace({
family: 'FangZhengFonts',
2025-03-19 08:22:28 +00:00
source: `url("https://www.carboner.cn:8888/api/file/download/FangZhengFonts.ttf")`,
2025-03-19 07:16:09 +00:00
success:(res) =>{
console.log('success',res);
},
fail:(err) => {
console.log('err',err);
}
})
}
export const getZSFont = () => {
uni.loadFontFace({
family: 'ZhongShanFonts',
2025-03-19 08:22:28 +00:00
source: `url("https://www.carboner.cn:8888/api/file/download/ZhongShanFonts.ttf")`,
2025-03-19 07:16:09 +00:00
success:(res) =>{
console.log('success',res);
},
fail:(err) => {
console.log('err',err);
}
})
}
//欢迎页
export const getFZXZFont = () => {
uni.loadFontFace({
family: 'FangZhengXiaoZhuan',
2025-03-19 08:22:28 +00:00
source: `url("https://www.carboner.cn:8888/api/file/download/FangZhengXiaoZhuan.ttf")`,
2025-03-19 07:16:09 +00:00
success:(res) =>{
console.log('success',res);
},
fail:(err) => {
console.log('err',err);
}
})
}