摘要: wx.cloud.uploadFile({ cloudPath:new Date().getTime()+'.png', // 上传至云端的文件名称 filePath: fileURL, // fileURL为小程序临时文件路径 success: res => { // 返回文件 ID consol 阅读全文
posted @ 2021-03-17 17:26 _情书 阅读(368) 评论(0) 推荐(0) 编辑
摘要: 根据文件的File ID 删除文件: wx.cloud.deleteFile( { fileList:[e.currentTarget.dataset.url], success(){ wx.showToast({title: '删除成功',}) }, fail(){ wx.showToast({t 阅读全文
posted @ 2021-03-17 17:15 _情书 阅读(1534) 评论(0) 推荐(0) 编辑
摘要: //初始化云端数据库 const db = wx.cloud.database() // 引用云端集合 const Users = db.collection('Users') //Users为云端集合的名称 查询所有数据: Users.get().then(res=>{ console.log(r 阅读全文
posted @ 2021-03-17 17:09 _情书 阅读(153) 评论(0) 推荐(0) 编辑