调用wx.cloud.uploadFile,报错wx is not define是为什么呢?
myuploadFile(tempFilePath,successUp,failUp,i,length){
wx.cloud.uploadFile({
cloudPath:'filebase_app/'+new Date()+'/'+tempFilePath[i].name,
filePath:tempFilePath[i].path,
success:(res)=>{
successUp++
console.log(res.data)
},
fail:(err)=>{
failUp++
console.log(err)
},
complete:()=>{
i++
if(i==length){
wx.showToast({
title: successUp+'份上传完成',
})
}
else{
// this.myuploadFile(tempFilePath,successUp,failUp,i)
}
}
})
},