jiangchengfeiyi-xiaochengxu/common/globalFont.js
2025-03-19 16:22:28 +08:00

44 lines
875 B
JavaScript

export const getFonts =()=>{
//其他页面
uni.loadFontFace({
family: 'FangZhengFonts',
source: `url("https://www.carboner.cn:8888/api/file/download/FangZhengFonts.ttf")`,
success:(res) =>{
console.log('success',res);
},
fail:(err) => {
console.log('err',err);
}
})
}
export const getZSFont = () => {
uni.loadFontFace({
family: 'ZhongShanFonts',
source: `url("https://www.carboner.cn:8888/api/file/download/ZhongShanFonts.ttf")`,
success:(res) =>{
console.log('success',res);
},
fail:(err) => {
console.log('err',err);
}
})
}
//欢迎页
export const getFZXZFont = () => {
uni.loadFontFace({
family: 'FangZhengXiaoZhuan',
source: `url("https://www.carboner.cn:8888/api/file/download/FangZhengXiaoZhuan.ttf")`,
success:(res) =>{
console.log('success',res);
},
fail:(err) => {
console.log('err',err);
}
})
}