diff --git a/pages/avatar/index.vue b/pages/avatar/index.vue index b1a0281..e7d2835 100644 --- a/pages/avatar/index.vue +++ b/pages/avatar/index.vue @@ -477,6 +477,13 @@ const onChooseAlbum = () => { sourceType: ["album"], success: (res) => { const path = res.tempFilePaths[0]; + + // #ifdef MP-ALIPAY + // 支付宝小程序不支持 cropImage,直接使用原图 + onAvatarSelect(path); + // #endif + + // #ifndef MP-ALIPAY // 调用系统裁剪,强制 1:1 uni.cropImage({ src: path, @@ -489,6 +496,7 @@ const onChooseAlbum = () => { onAvatarSelect(path); }, }); + // #endif }, }); };