初始化代码
This commit is contained in:
57
application/api/wxapi/media/GetPicTextList.php
Normal file
57
application/api/wxapi/media/GetPicTextList.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
namespace app\api\wxapi\media;
|
||||
|
||||
|
||||
use app\api\wxapi\Base;
|
||||
|
||||
/*
|
||||
* */
|
||||
class GetPicTextList extends Base
|
||||
{
|
||||
private $apiParas = array();
|
||||
|
||||
private $getParas = array();
|
||||
|
||||
public function init(){
|
||||
$this->setOffset();
|
||||
$this->setCount();
|
||||
}
|
||||
|
||||
public function getApiMethodName(){
|
||||
return "cgi-bin/material/batchget_material";
|
||||
}
|
||||
|
||||
public function getApiParas(){
|
||||
return $this->apiParas;
|
||||
}
|
||||
|
||||
public function getGetParas(){
|
||||
return $this->getParas;
|
||||
}
|
||||
|
||||
public function putOtherTextParam($key, $value){
|
||||
$this->apiParas[$key] = $value;
|
||||
$this->$key = $value;
|
||||
}
|
||||
|
||||
public function setAccessToken($access_token){
|
||||
$this->getParas["access_token"] = $access_token;
|
||||
}
|
||||
|
||||
public function getAccessToken(){
|
||||
return $this->getParas["access_token"];
|
||||
}
|
||||
|
||||
public function setTypes($type){ //素材的类型,图片(image)、视频(video)、语音 (voice)、图文(news)
|
||||
$this->apiParas["type"] = $type;
|
||||
}
|
||||
|
||||
public function setOffset($offset=0){
|
||||
$this->apiParas["offset"] = $offset;
|
||||
}
|
||||
|
||||
public function setCount($count=20){
|
||||
$this->apiParas["count"] = $count;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user