2 回复
你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)
cos.postObject({
Bucket: --,
Region: --,
Key: fileKey,
FilePath: filePath,
onProgress: function (info) {
let oldP = _this.data.percent1;
let percent = Math.floor(info.percent*100);
let loaded = info.loaded;
console.log(oldP + ":" + percent + "->" + info.loaded + ": " + info.total)
if(oldP != percent){
_this.setData({
percent1: info.percent * 100
})
}
}
}, function (err, data) {
//...
}