小程序
小游戏
企业微信
微信支付
扫描小程序码分享
当使用wx.login的时候,URL中写入https://api.weixin.qq.com
会报错,我在网上查教程有人说把编辑器的不教研合法域名关闭就可以了,我想请问一下,如果这样操作,项目上线之后可以正常使用所有功能吗?
1 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
求助为什么我在 .js文件中已经没有写api.weixin.qq.com了,为什么还是报错?
wx.login({
success: res => {
// console.log(res.code);
if (res.code) {
wx.request({
url: "https://cx.zhdc-china.com",
然后我的后端是这样的:
$appid = '';
$secret = '';
$js_code = ;
$grant_type = '';
$url = 'https://api.weixin.qq.com/sns/jscode2session?appid=' . $appid . '&secret=' . $secret . '&js_code=' . $js_code . '&grant_type=' . $grant_type;
$t = header("Location: $url");
echo $t;
这个得看报什么错哈
https://api.weixin.qq.com 不在以下 request 合法域名列表中,请参考文档:https://developers.weixin.qq.com/miniprogram/dev/framework/ability/network.html
全局搜一下这个域名
全局搜索过,没有
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
求助为什么我在 .js文件中已经没有写api.weixin.qq.com了,为什么还是报错?
wx.login({
success: res => {
// console.log(res.code);
if (res.code) {
wx.request({
url: "https://cx.zhdc-china.com",
然后我的后端是这样的:
$appid = '';
$secret = '';
$js_code = ;
$grant_type = '';
$url = 'https://api.weixin.qq.com/sns/jscode2session?appid=' . $appid . '&secret=' . $secret . '&js_code=' . $js_code . '&grant_type=' . $grant_type;
$t = header("Location: $url");
echo $t;
这个得看报什么错哈
https://api.weixin.qq.com 不在以下 request 合法域名列表中,请参考文档:https://developers.weixin.qq.com/miniprogram/dev/framework/ability/network.html
全局搜一下这个域名
全局搜索过,没有