博主送福利了,微信掃碼有驚喜。超值紅包等着你。。么么噠
言歸正轉
例如:cordova-plugin-wechat 這個插件可以做微信登錄,分享支付等
首先第一步:ionic plugin add cordova-plugin-wechat --variable wechatappid= 你的appid
然后引用的時候:首先要在組件里面 declare let Wechat;
最后
Wechat.isInstalled(function (installed) { alert("Wechat installed: " + (installed ? "Yes" : "No")); }, function (reason) { alert("Failed: " + reason); });
結束;可以正常調用里面的方法了。
注意:使用該cordova插件時,測試時應該生成正式帶簽名的包;