小程序
小游戏
企业微信
微信支付
扫描小程序码分享
配置及报错如图,开发时已勾选『启用数据预拉取』,请问是服务端地址配置有误吗?因为使用https,没法使用postman测试(需要ssl证书)
2 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
App({ onLaunch() { wx.getBackgroundFetchData({ fetchType: 'pre', success(res) { console.log(res.fetchedData) // 缓存数据 console.log(res.timeStamp) // 客户端拿到缓存数据的时间戳 console.log(res.path) // 页面路径 console.log(res.query) // query 参数 console.log(res.scene) // 场景值 } }) } }) 我这样为什么不成功,能指点以下吗?
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
补充一下:后端开启node.js服务(使用koa框架),以443端口启动(因为只能使用https协议),在postman上访问时能拿到数据(只能用http+443端口去拿数据):
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
App({ onLaunch() { wx.getBackgroundFetchData({ fetchType: 'pre', success(res) { console.log(res.fetchedData) // 缓存数据 console.log(res.timeStamp) // 客户端拿到缓存数据的时间戳 console.log(res.path) // 页面路径 console.log(res.query) // query 参数 console.log(res.scene) // 场景值 } }) } }) 我这样为什么不成功,能指点以下吗?
补充一下:后端开启node.js服务(使用koa框架),以443端口启动(因为只能使用https协议),在postman上访问时能拿到数据(只能用http+443端口去拿数据):