1.0.4 • Published 9 months ago

cordova-plugin-qywechat v1.0.4

Weekly downloads
-
License
Mezeron
Repository
-
Last release
9 months ago

cordova-plugin-qywechat

Feature

Documentation

分享到企业微信,现暂时支持分享小程序,分享网页,分享文本

Install

cordova plugin add cordova-plugin-qywechat  --variable 
 --variable QYAGENTID=YOUR_QYWECHAT_AGENTID --variable QYAPPID=YOUR_QYWECHAT_APPID --variable Q
YCORPId=YOUR_QYWECHAT_CORPId
cordova build ios
cordova build android
分享小程序
Qywechat.share({
            message: {
                title: "xxxxxxxx",
                description: "xxxxxxxx",
                path:  小程序的页面路径,
                hdImageData:  // 程序新版本的预览图二进制数据 ,
                miniprogramType: 0,
                userName: "xxxxxxxx@app", //必须是应用关联的小程序,注意要有@app后缀
                type: Qywechat.Type.MINI,
                webpageUrl: 兼容低版本的网页链接
            }
        }
        
分享网页
        
    Qywechat.share({
                message: {
                    thumbUrl: 图片地址,
                    title: 标题,
                    description: 说明,
                    icon: 图标地址,
                    type: Qywechat.Type.WEBPAGE,
                    webpageUrl: 网页地址
                }
            }    
        
分享文本
Qywechat.shareText({
                             text: "xxxxxxxxxxxxxxxxxxxxxxxxxxx",
                        })