We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
如题: 【请教】使用HBuilderX在电脑上开发微信小程序,在电脑上可以登录,发布后用手机测试,则无法登录,日志也正常,请问一般什么原因呢?谢谢 下面是登录代码,微信开发工具的本地配置,也取消了不校验合法域名,TLS版本这个选项。
export default { data() { return { phone: '', //手机号码 password: '' //密码 }; }, onLoad() {}, methods: { //当前登录按钮操作 getUserInfo() { var that = this; uni.showLoading({ // 展示加载框 title: '加载中', }); uni.login({ //获取到用户信息 provider: 'weixin', success: (res => { console.log('res-login', res); //获取到code that.code = res.code; //请求登录接口 if (res.errMsg == 'login:ok') { uni.request({ url: 'https://www.test.fun/api/code2Session', method: 'POST', data: { code: res.code }, success: (res) => { console.log(res.data) let name = res.data["realName"] if (name.length > 1){ uni.setStorageSync("diff", res.data["dif_day"]); uni.setStorageSync("realName", name); uni.switchTab({ url: "/pages/index/index" }) }else{ uni.setStorageSync("diff", 0); uni.navigateTo({ url: "/pages/login/signup/signup?code=" + that.code }) } } }) } }), fail: (err) => { uni.showToast({ title: '授权已取消', icon: 'error', mask: true, }); }, complete: () => { // 隐藏loading uni.hideLoading(); }, }); }, //注册按钮点击 reg() { uni.showToast({ title: '注册跳转', icon: 'none' }); }, //等三方微信登录 wxLogin() { uni.showToast({ title: '微信登录', icon: 'none' }); }, //第三方支付宝登录 zfbLogin() { uni.showToast({ title: '支付宝登录', icon: 'none' }); } } };
调试日志显示 login/login onRouteDone have been invoked 如何解决呢?原来都是可以在手机上运行的
The text was updated successfully, but these errors were encountered:
No branches or pull requests
如题:
【请教】使用HBuilderX在电脑上开发微信小程序,在电脑上可以登录,发布后用手机测试,则无法登录,日志也正常,请问一般什么原因呢?谢谢
下面是登录代码,微信开发工具的本地配置,也取消了不校验合法域名,TLS版本这个选项。
调试日志显示 login/login onRouteDone have been invoked
如何解决呢?原来都是可以在手机上运行的
The text was updated successfully, but these errors were encountered: