Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

小程序获取OpenID失败 #23

Open
yangboz opened this issue Aug 21, 2018 · 1 comment
Open

小程序获取OpenID失败 #23

yangboz opened this issue Aug 21, 2018 · 1 comment

Comments

@yangboz
Copy link

yangboz commented Aug 21, 2018

信息如下:

invalid appsecret, view more at http://t.cn/RAEkdVq, hints: [ req_id: jtjo.a0275shc1 ]

调用代码:

console.log("成功获取用户信息(公开信息)");
                app.globalData.isGetUserInfo = true;
                self.setData({
                    userInfo: response.userInfo
                });

                var url = Api.getOpenidUrl();
                var data = {
                    js_code: jscode,
                    encryptedData: response.encryptedData,
                    iv: response.iv,
                    avatarUrl: response.userInfo.avatarUrl
                }
                var postOpenidRequest = wxRequest.postRequest(url, data);
                //获取openid
                postOpenidRequest.then(response =>

是不是旧版本代码问题?

@iamxjb
Copy link
Owner

iamxjb commented Sep 3, 2018

报错很明显:错误的appsecret

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

No branches or pull requests

2 participants