数据预拉取接口,wx.setBackgroundFetchToken 中 token 不能为空?
发布于 4 年前 作者 ming22 6972 次浏览 来自 官方Issues

文档:https://developers.weixin.qq.com/miniprogram/dev/framework/ability/pre-fetch.html

 wx.setBackgroundFetchToken({ token: 'xxx' })

由文档可知,当 wx.setBackgroundFetchToken 为空时, wx.getBackgroundFetchData() 可以获得 code

实际在上 wx.setBackgroundFetchToken 无论是没有token字段还是 token为空字符串均报错

回到顶部