showTopTips:function name(e) {
wx.cloud.uploadFile({
cloudPath:'abc.png',
filePath:'files',
success: res => {
// get resource ID
console.log('图片提交数据:', res.fileIDs)
console.log('图片提交数据:', res.files)
},
fail: err => {
// handle error
console.log('图片提交数据失败')
},
complete: ()=>{
wx.hideLoading({
success: (res) => { },
})
}
})
this.setData({
toast: true
});
setTimeout(() => {
this.setData({
hideToast: true
});
setTimeout(() => {
this.setData({
toast: false,
hideToast: false,
});
}, 300);
}, 3000);
},