<?php

namespace app\extra\weMini;

use yzh52521\EasyHttp\Http;

class UserInfo extends BasicWeChat
{

    public function getPhoneNumber(string $code = "")
    {
        $url = "https://api.weixin.qq.com/wxa/business/getuserphonenumber?access_token=ACCESS_TOKEN";
        $this->registerApi($url,"post");
        return Http::asJson()->post($url,[
            "code"  => $code
        ])->array();
    }

}