正在显示
1 个修改的文件
包含
2 行增加
和
1 行删除
@@ -48,13 +48,14 @@ class Wechat extends Api | @@ -48,13 +48,14 @@ class Wechat extends Api | ||
48 | $app = WehcatModule::getInstance()->initWechat(); | 48 | $app = WehcatModule::getInstance()->initWechat(); |
49 | if(empty($code)){ | 49 | if(empty($code)){ |
50 | //跳转官方 | 50 | //跳转官方 |
51 | - $APPID = config('site.appid'); | 51 | + $APPID = 'wxb9b259e7a17bda27'; |
52 | $REDIRECT_URI = 'https://coupon.xp.yn.cn/index.php/api/v1/Wechat/test_code'; | 52 | $REDIRECT_URI = 'https://coupon.xp.yn.cn/index.php/api/v1/Wechat/test_code'; |
53 | $SCOPE = 'snsapi_base'; | 53 | $SCOPE = 'snsapi_base'; |
54 | $redirect = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=$APPID&redirect_uri=$REDIRECT_URI&response_type=code&scope=$SCOPE&state=STATE#wechat_redirect"; | 54 | $redirect = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=$APPID&redirect_uri=$REDIRECT_URI&response_type=code&scope=$SCOPE&state=STATE#wechat_redirect"; |
55 | $curUrl = request()->url(true); | 55 | $curUrl = request()->url(true); |
56 | 56 | ||
57 | $response = $app->oauth->scopes(['snsapi_userinfo']) ->redirect($curUrl); | 57 | $response = $app->oauth->scopes(['snsapi_userinfo']) ->redirect($curUrl); |
58 | + | ||
58 | return $response; | 59 | return $response; |
59 | }else{ | 60 | }else{ |
60 | //解析code | 61 | //解析code |
-
请 注册 或 登录 后发表评论