This commit is contained in:
尖叫 2023-12-08 11:15:12 +08:00
parent ff56dcd1b4
commit d8cf28aeef

View File

@ -134,7 +134,7 @@ class User extends Controller
*/
public function getWxUserCoupon()
{
$post = $this->request->post();
$post = $this->request->get();
$where = [
'openid' => $post['openid'],
];
@ -194,7 +194,7 @@ class User extends Controller
if (isset($result['access_token'])) {
$access_token = $result['access_token'];
$openid = $result['openid'];
$wx_url = "https://api.weixin.qq.com/sns/userinfo?access_token=$access_token&openid=$openid&lang=zh_CN";
$data = json_decode(Http::get($wx_url), true);
if (isset($data['headimgurl'])) {