银狼
银狼
  • 发布:2025-10-29 10:32
  • 更新:2025-10-29 10:32
  • 阅读:22

鸿蒙分享小程序图片需要小于13KB吗?

分类:uni-app

uniapp开发APP 现遇到问题:

安卓、IOS机型 分享功能,分享小程序图片需小于20KB才能分享,超出报错。

鸿蒙机型 分享功能,分享小程序图片需小于13KB才能分享成功,超出报错。

但我看文档是推荐使用 20 KB 的图片,并不是最大20KB啊?这个正常吗?

// 封装APP分享  
export function appShare(shareInfo) {  
    uni.share({  
        provider: shareInfo.provider||"weixin",  
        scene: shareInfo.scene||"WXSceneSession",  
        type: shareInfo.type||5,  
        title: shareInfo.title||'农千问',  
        summary: shareInfo.summary||'农千问',  
        imageUrl: shareInfo.imageUrl||'static/logo.png',  
        miniProgram: {  
            id: 'gh_xxxxxxxxxxxx',  
            path: shareInfo.miniProgram.path||`/pages/index/index`,  
            type: globalSetting.env == 'production' ? 0 : 2,  
            webUrl: '#'  
        },  
        success: function (res) {  
            console.log("success:" + JSON.stringify(res));  
        },  
        fail: function (err) {  
            console.log("fail:" + JSON.stringify(err));  
        }  
    });  
}
2025-10-29 10:32 负责人:DCloud_UNI_OttoJi 分享
已邀请:

要回复问题请先登录注册