Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

真机调试时,wechat.sendAuthRequest()无任何反应,其他api均有反应,有哪些可能的原因? #552

Open
damon0121 opened this issue Feb 25, 2020 · 7 comments
Labels

Comments

@damon0121
Copy link

Please read and follow the issue templates:

  1. Bug Report or Documentation Issue or Questions and Help?
    Bug Report
  2. Which react-native-wechat version are you using?
    "react-native-wechat": "^1.9.12"
  3. What platform does your issue occur on? (Android/iOS/Both)
    Android
  4. Please provide a clear and concise description of what the bug is as precisely as possible,you can:
  1. post a screenshot to explain in which case you get the issue?
  2. related logs
  3. show us the code you are using?
   handleWxLogin = () => {
    let scope = 'snsapi_userinfo';
    let state = 'wechat_sdk_demo';
    //判断微信是否安装
    WeChat.isWXAppInstalled().then(async isInstalled => {
      if (isInstalled) {
        // WeChat.openWXApp();

        // WeChat.shareToSession({
        //   type: 'imageUrl',
        //   title: 'web image',
        //   description: 'share web image to time line',
        //   mediaTagName: 'email signature',
        //   messageAction: undefined,
        //   messageExt: undefined,
        //   imageUrl: 'http://www.ncloud.hk/email-signature-262x100.png',
        // });
        //发送授权请求

        try {
          const responseCode = await WeChat.sendAuthRequest(scope, state);
          Toast.info(responseCode.code);
        } catch (error) {
          Toast.info('登录授权发生错误' + error.message);
        }
      } else {
        Toast.info('没有安装微信');
      }
    });
  };
  1. others.

Your Environment

software version
react-native-wechat ^1.9.12
react-native 0.61.5
node ^ version
npm or yarn ^ version
@niklauseSun
Copy link

你可以看下你的WXEntryActivity 有没有在wxapi文件夹下

@V1sk
Copy link

V1sk commented Mar 19, 2020

我也出现了同样的问题,在iOS上,断点显示sendAuthRequest方法已经成功,callback也回调了,可是js端就是没有反应

@mikedream89
Copy link

@V1sk 有解决吗? 我遇到同样的问题

@happy-func
Copy link

问题+1

@happy-func
Copy link

@PanRu
Copy link

PanRu commented May 14, 2020

same issue+1

@z3season
Copy link

依照此文件构建问题解决。 https://github.com/yorkie/react-native-wechat/blob/master/docs/build-setup-android.md

请问解决方法有吗 链接失效了

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

8 participants