77 lines
1.6 KiB
PHP
77 lines
1.6 KiB
PHP
|
|
<?php
|
||
|
|
namespace app\api\wxapi\request;
|
||
|
|
|
||
|
|
use app\api\wxapi\Base;
|
||
|
|
/* 获取小程序码
|
||
|
|
* $GetWxAcodeUnLimitRequest=new GetWxAcodeUnLimitRequest();
|
||
|
|
* $GetWxAcodeUnLimitRequest->setAccessToken($AccessTokenRequest->access_token);
|
||
|
|
* $GetWxAcodeUnLimitRequest=$WxClient->execute($GetWxAcodeUnLimitRequest);
|
||
|
|
* */
|
||
|
|
class GetWxAcodeUnLimitRequest extends Base
|
||
|
|
{
|
||
|
|
private $apiParas = array();
|
||
|
|
|
||
|
|
private $access_token;
|
||
|
|
|
||
|
|
public function init(){
|
||
|
|
$this->setPage();
|
||
|
|
$this->setWidth();
|
||
|
|
$this->setAutoColor();
|
||
|
|
}
|
||
|
|
|
||
|
|
public function getApiMethodName(){
|
||
|
|
return "wxa/getwxacodeunlimit";
|
||
|
|
}
|
||
|
|
|
||
|
|
public function getApiParas(){
|
||
|
|
return $this->apiParas;
|
||
|
|
}
|
||
|
|
|
||
|
|
public function getGetParas(){
|
||
|
|
return $this->OtherData;
|
||
|
|
}
|
||
|
|
|
||
|
|
public function putOtherTextParam($key, $value){
|
||
|
|
$this->apiParas[$key] = $value;
|
||
|
|
$this->$key = $value;
|
||
|
|
}
|
||
|
|
|
||
|
|
public function setScene($scene){
|
||
|
|
$this->apiParas["scene"] = $scene;
|
||
|
|
}
|
||
|
|
|
||
|
|
public function setPage($page=''){
|
||
|
|
$this->apiParas["page"] = $page;
|
||
|
|
}
|
||
|
|
|
||
|
|
public function setWidth($width=500){
|
||
|
|
$this->apiParas["width"] = $width;
|
||
|
|
}
|
||
|
|
|
||
|
|
public function setAutoColor($AutoColor=false){
|
||
|
|
$this->apiParas["auto_color"] = $AutoColor;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* auto_color为false时生效{"r":0,"g":0,"b":0}
|
||
|
|
* */
|
||
|
|
public function setLineColor($LineColor=[]){
|
||
|
|
$this->apiParas["line_color"] = $LineColor;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* 底色是否透明
|
||
|
|
* */
|
||
|
|
public function setIsHyaline($IsHyaline=false){
|
||
|
|
$this->apiParas["is_hyaline"] = $IsHyaline;
|
||
|
|
}
|
||
|
|
|
||
|
|
public function setAccessToken($access_token){
|
||
|
|
$this->access_token = $access_token;
|
||
|
|
$this->OtherData["access_token"] = $access_token;
|
||
|
|
}
|
||
|
|
|
||
|
|
public function getAccessToken(){
|
||
|
|
return $this->access_token;
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|