提交 382ae57d 编写于 作者: A Anne_LXM

fix:PC设置头像无效

上级 a9429d4a
...@@ -129,26 +129,24 @@ ...@@ -129,26 +129,24 @@
filePath = res.tempFilePaths[0] filePath = res.tempFilePaths[0]
//非app端剪裁头像,app端用内置的原生裁剪 //非app端剪裁头像,app端用内置的原生裁剪
// #ifndef APP-PLUS // #ifdef H5
filePath = await new Promise((callback) => { if (!this.isPC) {
// #ifdef H5 filePath = await new Promise((callback) => {
if (!this.isPC) { uni.navigateTo({
uni.navigateTo({ url: '/uni_modules/uni-id-pages/pages/userinfo/cropImage/cropImage?path=' +
url: '/uni_modules/uni-id-pages/pages/userinfo/cropImage/cropImage?path=' + filePath + `&options=${JSON.stringify(crop)}`,
filePath + `&options=${JSON.stringify(crop)}`, animationType: "fade-in",
animationType: "fade-in", events: {
events: { success: url => {
success: url => { callback(url)
callback(url) }
} },
}, complete(e) {
complete(e) { console.log(e);
// console.log(e); }
} });
}); })
} }
// #endif
})
// #endif // #endif
let cloudPath = this.userInfo._id + '' + Date.now() let cloudPath = this.userInfo._id + '' + Date.now()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册