提交 f897a7eb 编写于 作者: DCloud_JSON's avatar DCloud_JSON

刚刚微信头像上传目录

上级 e582aab8
......@@ -40,7 +40,7 @@
if(res.errMsg != "getUserProfile:ok"){
return this.closeMe()
}
let {avatarUrl,nickName} = res.userInfo, cloudPath = userId+'/'+Date.now()+'avatarUrl.jpg';
let {avatarUrl,nickName} = res.userInfo;
let tempFilePath = await new Promise((callBack)=>{
uni.downloadFile({
......@@ -60,6 +60,8 @@
}
});
})
const extName = tempFilePath.split('.').pop() || 'jpg'
const cloudPath = 'user/avatar/'+ userId+'/'+Date.now()+'-avatar.'+extName;
// console.log(tempFilePath);
const result = await uniCloud.uploadFile({
filePath: tempFilePath,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册