uni-app:微信小程序登录:获取code时返回the code is a mock one(hbuilderx 3.7.3)

一,微信小程序:wx.login时报错

返回的code值为:the code is a mock one
如图:

说明:刘宏缔的架构森林是一个专注架构的博客,

网站:https://blog.imgtouch.com
原文: https://blog.imgtouch.com/index.php/2023/06/05/uniapp-wei-xin-xiao-cheng-xu-deng-lu-huo-qu-code-shi-fan/

         对应的源码可以访问这里获取: https://github.com/liuhongdi/
         或: https://gitee.com/liuhongdi

说明:作者:刘宏缔 邮箱: 371125307@qq.com

二,原因与解决

原因:
没有关联真实的 appid
解决:
填写真实的微信小程序的appid
配置后可以解决
如图:

三,查看hbuilderx的版本: 

 
 
posted @ 2023-03-14 15:18  刘宏缔的架构森林  阅读(3417)  评论(0)    收藏  举报