wx.loadFontFace 为啥每次在onLaunch中调用,小程的缓存一直在增加?
使用了cdn 地址,字体11MB, if (!wx.getStorageSync('font_inited')) { wx.loadFontFace({ global: true, family: '台北', source: 'xxxxxxxx/font/TaipeiSansTCBeta-Bold.woff', success: (res) => { wx.setStorageSync('font_inited', true) // 字体加载成功,跳转首页, console.log(res.status, 'loading页面字体加载状态') if (res.status == 'loaded') { wx.switchTab({ url: '/pages/index/index' }) } else { console.log(err, '字体文件还在加载过程中,但 API 认为没失败') } }, fail: (err) => { console.log(err, '字体获取失败') } })