xu-li / cordova-plugin-wechat

A cordova plugin, a JS version of Wechat SDK
1.22k stars 509 forks source link

cordova-plugin-wechat添加后Wechat 是全局变量吗? #376

Closed iwen-pengh closed 5 years ago

iwen-pengh commented 7 years ago

ionic plugin add cordova-plugin-wechat --variable wechatappid=wx4a525790c75c494f

后使用 Wechat.isInstalled(function (installed) { alert("Wechat installed: " + (installed ? "Yes" : "No")); }, function (reason) { alert("Failed: " + reason); });

提示wechat 不存在

xu-li commented 7 years ago

是全局变量。

On Wed, Oct 25, 2017 at 10:42 AM iwen-pengh notifications@github.com wrote:

ionic plugin add cordova-plugin-wechat --variable wechatappid=wx4a525790c75c494f

后使用 Wechat.isInstalled(function (installed) { alert("Wechat installed: " + (installed ? "Yes" : "No")); }, function (reason) { alert("Failed: " + reason); });

提示wechat 不存在

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/xu-li/cordova-plugin-wechat/issues/376, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKekfYWG_EMp2SZo4_8_l7QRpvwsXhKks5svqAggaJpZM4QFW5e .

13191868165 commented 7 years ago

我也是这个问题,提示Wechat undefind

13191868165 commented 7 years ago

我知道原因了,你是不是在首页调试的,首页调试不行,其他页面没问题 你试试首页用 $timeout 执行

xu-li commented 7 years ago

device ready了么?

On Thu, Oct 26, 2017, 17:55 y13818463245 notifications@github.com wrote:

我知道原因了,你是不是在首页调试的,首页调试不行,其他页面没问题 你试试首页用 $timeout 执行

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/xu-li/cordova-plugin-wechat/issues/376#issuecomment-339614925, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKekdiZaBMOs3BGSSl_sSft0PPeNCcTks5swFcmgaJpZM4QFW5e .