downloadfont(c_tag, fonturl) {
return new Promise((resolve, reject) => {
wx.showLoading({
title: '字体加载中'
})
wx.loadFontFace({
family: c_tag,
global: true,
source: 'url("' + fonturl + '")',
scopes: ["webview", "native"],
success(e) {
wx.hideLoading();
resolve(0)
},
fail(e) {
wx.hideLoading()
resolve(1)
wx.showToast({
title: '字体加载失败',
})
}
});
})
}
跨域吧
打印一下fonturl是不是对的,以及看看是否勾选了玉米验证