提交 cd662f71 编写于 作者: A Anne_LXM

通过点号操作符访问 UTSJSONObject 中的数据报错改为下标方式

上级 29bd0ac5
......@@ -147,8 +147,6 @@
if (tempFilePath == null) {
tempFilePath = ""
}
// console.log('tempFileName',tempFileName);
// console.log('tempFilePath',tempFilePath);
let avatar_file = {
// #ifdef WEB
extname: tempFileName.split(".")[tempFileName.split(".").length - 1],
......@@ -192,20 +190,17 @@
// _id = "" as string
// }
let cloudPath = _id + '' + Date.now()
avatar_file.name = cloudPath
avatar_file['name'] = cloudPath
uni.showLoading({
title: "更新中",
mask: true
});
// console.log('filePath', filePath);
uniCloud.uploadFile({
filePath,
cloudPath,
})
.then(function (res) {
// console.log('res', res);
avatar_file.url = res.fileID
// console.log('avatar_file111', avatar_file);
avatar_file['url'] = res.fileID
mutations.updateUserInfo({ avatar_file } as UTSJSONObject)
})
.catch(function (err : any | null) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册