wx.downloadFile 超时 fail回调中无法调用当前块变量?
代码如下:
let task = {url: 'https://abc.com/mediafile' ,uid:1}; wx.downloadFile({ url:task.url, success: function (e){ console.log(task.uid) //输出1 }, fail: function (e){ console.log(task.uid) //报错找不到task为undefined } }) |