初始化代码

This commit is contained in:
2025-08-11 10:22:05 +08:00
commit ebd8d85201
4206 changed files with 753018 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
<?php
namespace app\api\wxapi\request;
use app\api\wxapi\Base;
/* 检验授权凭证access_token是否有效
* $AuthAccessTokenRequest = new AuthAccessTokenRequest();
* $AuthAccessTokenRequest->setAccessToken($resp->access_token);
* $AuthAccessTokenRequest->setOpenid($resp->openid);
* $AuthAccessTokenRequest=$WxClient->execute($AuthAccessTokenRequest);
* */
class AuthAccessTokenRequest extends Base
{
private $apiParas = array();
private $access_token;
private $openid;
public function init(){
$this->setAccessToken('');
$this->setOpenid('');
}
public function getApiMethodName(){
return "sns/auth";
}
public function getApiParas(){
return $this->apiParas;
}
public function setOpenid($openid){
$this->openid = $openid;
$this->apiParas["openid"] = $openid;
}
public function getOpenid(){
return $this->openid;
}
public function setAccessToken($access_token){
$this->access_token = $access_token;
$this->apiParas["access_token"] = $access_token;
}
public function getAccessToken(){
return $this->access_token;
}
}