获取模板列表.

@return mixed
488413
public function getList()
    {
        $url = self::GET_LIST_URL.$this->access_token;
        $data = $this->curl->get($url);

        return $data;
    }
1216358
public function save()
    {
        if (!empty($this->log)) {

            if (!$this->check($this->config)) {
                // 检测日志写入权限
                return false;
            }

            if (empty($this->config['level'])) {
                // 获取全部日志
                $log = $this->log;
                if (!$this->config['debug'] && isset($log['debug'])) {
                    unset($log['debug']);
                }
            } else {
                // 记录允许级别
                $log = [];
                foreach ($this->config['level'] as $level) {
                    if (isset($this->log[$level])) {
                        $log[$level] = $this->log[$level];
                    }
                }
            }

            $result = $this->driver->save($log);
            if ($result) {
                $this->log = [];
            }

            return $result;
        }

        return true;
    }
438181
private function parseReq()
    {
        $this->ip = $this->getIp();
        $this->hostname = $this->env->get('HTTP_HOST');
        $this->referrer = $this->env->get('HTTP_REFERER');
        $this->referer = $this->referrer;
        //请求协议
        $protocol = $this->env->get('SERVER_PROTOCOL');
        //设置变量
        if ($protocol) {
            list($this->protocol, $this->version) = explode('/', $protocol);
            if ($this->protocol == 'https') {
                $this->secure = true;
            } else {
                $this->secure = false;
            }
        } else {
            $this->secure = false;
        }

        return $this;
    }
1216271
public function getData()
    {
        $this->validate('txnTime', 'orderId', 'trId');

        $data = array(
            'version'       => $this->getVersion(),  //版本号
            'encoding'      => $this->getEncoding(),  //编码方式
            'certId'        => $this->getTheCertId(),    //证书ID
            'signMethod'    => $this->getSignMethod(),  //签名方法
            'txnType'       => '79',        //交易类型
            'txnSubType'    => '05',        //交易子类
            'bizType'       => '000301',    //业务类型 000301 000902
            'accessType'    => '0',         //接入类型
            'channelType'   => '07',        //渠道类型 05:语音 07:互联网 08:移动
            'encryptCertId' => $this->getEncryptCertId(),
            'merId'         => $this->getMerId(),     //商户代码
            'orderId'       => $this->getOrderId(),     //商户订单号，填写开通并支付交易的orderId
            'txnTime'       => $this->getTxnTime(),    //订单发送时间
            'tokenPayData'  => sprintf('{trId=%s&tokenType=01}', $this->getTrId()), //标记请求者 trId
        );

        $data = $this->filter($data);

        $data['signature'] = $this->sign($data);

        var_dump($data);

        return $data;
    }
1152789
public function login()
    {
        $pass = $this->doc->__get("password");
        if($pass && $this->request->param('pass') === $pass){
            session('pass', md5($pass));
            $data = ['status' => '200', 'message' => '登录成功'];
        }else if(!$pass){
            $data = ['status' => '200', 'message' => '登录成功'];
        }else{
            $data = ['status' => '300', 'message' => '密码错误'];
        }
        return response($data, 200, [], 'json');
    }
274260
public function getquery()
      {
            $query = \Grace\Req\Environment::getInstance()->all()['query'];
            $_p = array();
            $_query = explode('&', $query);
            foreach($_query as $k=>$value){
                  //存在=号
                  $p = explode('=', $value);
                  if(!empty($p[0])){
                        $_p[$p[0]] = isset($p[1])?$p[1]:'';
                  }
            }
            return $_p;       //获得通过querystring 分析出来的参数
      }
682898
public function getPathinfo()
    {
        //pathinfo已经被重写过
        if ($this->_pathinfo !== null) {
            return $this->_pathinfo;
        }
        $pathinfo = $this->get('PATH_INFO');
        if (!$pathinfo) {
            //兼容模式
            $vitex = Vitex::getInstance();
            if ($vitex->getConfig('router.compatible')) {
                $pathinfo = isset($_GET['u']) ? $_GET['u'] : '';
            }
        }
        return $pathinfo;
    }
309673
public function getData()
    {
        if (is_null($this->data)) {
            $this->data = $this->index->getParser()->getData($this->getOffset());
            
        }
        return $this->data;
    }
748064
final public function getMeta()
    {
        static $tableMetas = [];
        $tableName = $this->getTable();

        if (isset($tableMetas[$tableName])) {
            return $tableMetas[$tableName];
        }
        $sql = 'describe ' . $tableName;
        $this->sql = $sql;
        /**
         * 仅仅获得sql
         */
        if ($this->justSql) {
            return [];
        }
        $this->DB->query($sql);
        $this->lastQueryAt = time();
        $rows = $this->DB->fetchAll(\PDO::FETCH_ASSOC);
        $metaData = [];
        foreach ($rows as $row) {
            $metaData[] = [
                'field' => $row['Field'],
                'typeArr' => $this->parseType($row['Type']),
                'type' => $this->parseType($row['Type'])[0],
                'null' => $row['Null'] == 'NO' ? false : true,//是否可以是NULL
                'key' => $row['Key'],
                'default' => $row['Default'],
                'extra' => $row['Extra']
            ];
        }
        $tableMetas[$tableName] = $metaData;
        return $metaData;
    }
862092
public function toArray()
    {
        $arr = [];
        // 从保存未定义属性的变量中读取字段kv
        foreach ($this->attrs as $field => $value) {
            $arr[$field] = $value;
        }

        // 从指定的属性中读取字段kv
        foreach ($this->columnMap as $field => $attr) {
            if (property_exists($this, $attr)) {
                $arr[$field] = $this->$attr;
            } else {
                unset($arr[$field]);
            }
        }

        return $arr;
    }
611157
public function get()
	{
		$options = array();

		if ($this->columns) {
			$options['columns'] = $this->columns;
		}
		
		if ($this->limit) {
			$options['limit'] = $this->limit;
			$options['offset'] = $this->offset;
		}
		
		$this->executeCallbacks();
		
		$results = $this->index->runQuery($this->query, $options);
		
		if ($this->columns && !in_array('*', $this->columns)) {
			$new_results = array();
			foreach ($results as $result) {
				$new_result = array();
				foreach ($this->columns as $field) {
					if (array_key_exists($field, $result)) {
						$new_result[$field] = $result[$field];
					}
				}
				$new_results[] = $new_result;
			}
			$results = $new_results;
		}
		
		return $results;
	}
455191
public function select(): array
    {
        //生成请求游标
        $cursor = call_user_func_array([
            $this->collection,
            'find'
        ], func_get_args());

        //逐条取出结果,构造数组
        $result = [];
        while ($cursor->hasNext()) {
            $result[] = $cursor->getNext();
        }

        return $result;
    }
1003297
public function index()
    {
        return Admin::content(function (Content $content) {
            $content->header(trans('admin.menu'));
            $content->description(trans('admin.list'));

            $content->row(function (Row $row) {
                $row->column(6, $this->treeView()->render());

                $row->column(6, function (Column $column) {
                    $form = new \Encore\Admin\Widgets\Form();
                    $form->action(admin_base_path('auth/menu'));

                    $form->select('parent_id', trans('admin.parent_id'))->options(Menu::selectOptions());
                    $form->text('title', trans('admin.title'))->rules('required');
                    $form->icon('icon', trans('admin.icon'))->default('fa-bars')->rules('required')->help($this->iconHelp());
                    $form->text('uri', trans('admin.uri'));
                    $form->multipleSelect('roles', trans('admin.roles'))->options(Role::all()->pluck('name', 'id'));
                    $form->radio('blank', '加载方式')->options(['0' => 'pjax', '1'=>'no-pjax' ])->default('0');
                    $form->hidden('_token')->default(csrf_token());

                    $column->append((new Box(trans('admin.new'), $form))->style('success'));
                });
            });
        });
    }
1270045
public function getImage()
    {
        $value = parent::getValue();
        
        if ($value) {
            return Yii::$app->storage->getImage($value);
        }
        
        return false;
    }
1167986
public function
	GetData() {

		$Data = $this->Data;
		if(!is_array($Data)) $Data = [$Data];

		foreach($Data as $Key => $Val) {
			if(!$this->MountStart && !$this->MountEnd)
			$Data[$Key] = "%{$Val}%";

			elseif($this->MountStart && !$this->MountEnd)
			$Data[$Key] = "{$Val}%";

			elseif(!$this->MountStart && $this->MountEnd)
			$Data[$Key] = "%{$Val}";
		}

		return $Data;
	}
974140
public function getDepartments()
	{

		$me = Member::find($this->selfId)->department;

		$myDepartmentCode = Department::find($me)->code;

		$likeCode = $myDepartmentCode.'%';

		$recs = Department::where('code','LIKE', $likeCode)->get();

		if(count($recs)){
			$arr = [];
			foreach ($recs as $rec) {
				$arr = array_add($arr, $rec->id, $rec->name);
			}
			return $arr;
		}else{
			die('FooWeChat\Authorize\Auth\getDepartments: 记录异常');
			//return view('40x',['color'=>'danger', 'type'=>'1', 'code'=>'1.2']);
		}

	}
262104
public function show() {
        if(0 == $this->totalRows) return '';

        /* 生成URL */
        $this->parameter[$this->p] = '[PAGE]';
        $this->url = U(ACTION_NAME, $this->parameter);
        /* 计算分页信息 */
        $this->totalPages = ceil($this->totalRows / $this->listRows); //总页数
        if(!empty($this->totalPages) && $this->nowPage > $this->totalPages) {
            $this->nowPage = $this->totalPages;
        }

        /* 计算分页临时变量 */
        $now_cool_page      = $this->rollPage/2;
		$now_cool_page_ceil = ceil($now_cool_page);
		$this->lastSuffix && $this->config['last'] = $this->totalPages;

        //上一页
        $up_row  = $this->nowPage - 1;
        $up_page = $up_row > 0 ? '<a class="prev" href="' . $this->url($up_row) . '">' . $this->config['prev'] . '</a>' : '';

        //下一页
        $down_row  = $this->nowPage + 1;
        $down_page = ($down_row <= $this->totalPages) ? '<a class="next" href="' . $this->url($down_row) . '">' . $this->config['next'] . '</a>' : '';

        //第一页
        $the_first = '';
        if($this->totalPages > $this->rollPage && ($this->nowPage - $now_cool_page) >= 1){
            $the_first = '<a class="first" href="' . $this->url(1) . '">' . $this->config['first'] . '</a>';
        }

        //最后一页
        $the_end = '';
        if($this->totalPages > $this->rollPage && ($this->nowPage + $now_cool_page) < $this->totalPages){
            $the_end = '<a class="end" href="' . $this->url($this->totalPages) . '">' . $this->config['last'] . '</a>';
        }

        //数字连接
        $link_page = "";
        for($i = 1; $i <= $this->rollPage; $i++){
			if(($this->nowPage - $now_cool_page) <= 0 ){
				$page = $i;
			}elseif(($this->nowPage + $now_cool_page - 1) >= $this->totalPages){
				$page = $this->totalPages - $this->rollPage + $i;
			}else{
				$page = $this->nowPage - $now_cool_page_ceil + $i;
			}
            if($page > 0 && $page != $this->nowPage){

                if($page <= $this->totalPages){
                    $link_page .= '<a class="num" href="' . $this->url($page) . '">' . $page . '</a>';
                }else{
                    break;
                }
            }else{
                if($page > 0 && $this->totalPages != 1){
                    $link_page .= '<span class="current">' . $page . '</span>';
                }
            }
        }

        //替换分页内容
        $page_str = str_replace(
            array('%HEADER%', '%NOW_PAGE%', '%UP_PAGE%', '%DOWN_PAGE%', '%FIRST%', '%LINK_PAGE%', '%END%', '%TOTAL_ROW%', '%TOTAL_PAGE%'),
            array($this->config['header'], $this->nowPage, $up_page, $down_page, $the_first, $link_page, $the_end, $this->totalRows, $this->totalPages),
            $this->config['theme']);
        return "<div>{$page_str}</div>";
    }