This commit is contained in:
尖叫 2023-12-08 15:02:37 +08:00
parent ff80ab71e6
commit a4ecac7c8e

View File

@ -174,12 +174,7 @@ class User extends Controller
public function wxCode() public function wxCode()
{ {
$appid = 'wx89c12dd426a55a2e'; $appid = 'wx89c12dd426a55a2e';
$redirect_uri = 'https://app.cxhxy.dev.1nww.com/#/pages/details/detail';
$redirect_uri = $this->request->host() . 'api/food.user/wxLogin';
$url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=$appid&redirect_uri={$redirect_uri}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect"; $url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=$appid&redirect_uri={$redirect_uri}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect";
return $this->renderSuccess($url, '成功'); return $this->renderSuccess($url, '成功');
} }