获取部门列表
@return boolean|array	 成功返回结果
{
"errcode": 0,
"errmsg": "ok",
"department": [          //部门列表数据。以部门的order字段从小到大排列
{
"id": 1,
"name": "广州研发中心",
"parentid": 0,
"order": 40
},
{
"id": 2
"name": "邮箱产品部",
"parentid": 1,
"order": 40
}
]
}
779927
public function getDepartment(){
	    if (!$this->access_token && !$this->checkAuth()) return false;
	    $result = $this->http_get(self::API_URL_PREFIX.self::DEPARTMENT_LIST_URL.'access_token='.$this->access_token);
	    if ($result)
	    {
	        $json = json_decode($result,true);
	        if (!$json || !empty($json['errcode'])) {
	            $this->errCode = $json['errcode'];
	            $this->errMsg = $json['errmsg'];
	            return false;
	        }
	        return $json;
	    }
	    return false;
	}
751627
public function verifyReturn(){
        if(empty($_GET)) {//判断POST来的数组是否为空
            return false;
        }
        else {
            //生成签名结果
            $isSign = $this->getSignVeryfy($_GET, $_GET["sign"]);
            //获取支付宝远程服务器ATN结果（验证是否是支付宝发来的消息）
            $responseTxt = 'true';
            if (! empty($_GET["notify_id"])) {$responseTxt = $this->getResponse($_GET["notify_id"]);}

            //写日志记录
            //if ($isSign) {
            //	$isSignStr = 'true';
            //}
            //else {
            //	$isSignStr = 'false';
            //}
            //$log_text = "responseTxt=".$responseTxt."\n return_url_log:isSign=".$isSignStr.",";
            //$log_text = $log_text.createLinkString($_GET);
            //logResult($log_text);

            //验证
            //$responsetTxt的结果不是true，与服务器设置问题、合作身份者ID、notify_id一分钟失效有关
            //isSign的结果不是true，与安全校验码、请求时的参数格式（如：带自定义参数等）、编码格式有关
            if (preg_match("/true$/i",$responseTxt) && $isSign) {
                return true;
            } else {
                return false;
            }
        }
    }
1000022
public function orderBy($args) {
        if (!is_array($args)) {
            $args = func_get_args();
        }
        // 把关联数组变成 1，asc
        foreach ($args as $key => $item) {
            if (!is_integer($key)) {
                if (is_array($item)) {
                    //'asc' => ['a', 'b']
                    foreach ($item as $value) {
                        $this->orders[] = $value;
                        $this->orders[] = $key;
                    }
                    continue;
                }
                // 'a' => 'b'
                $this->orders[] = $key;
                $this->orders[] = $item;
                continue;
            }
            if (is_array($item)) {
                // ['a', 'asc']
                $this->orders[] = $item[0];
                $this->orders[] = $item[1];
                continue;
            }
            $this->orders[] = $item;
        }
        return $this;
    }
551793
public static function GetPdoParamList () {
		return [
			//数値
			'INTEGER'			=> \PDO::PARAM_INT,
			'NUMERIC'			=> \PDO::PARAM_STR,
			'REAL'				=> \PDO::PARAM_STR,
			//文字・文字列
			'TEXT'				=> \PDO::PARAM_STR,
			//バイナリ
			'NONE'				=> \PDO::PARAM_LOB,
		];
	}
877542
public function getResultados()
    {
        if (!$this->esResultadoDTE())
            return false;
        // si no hay respustas se deben crear
        if (!$this->respuesta_documentos) {
            // si no está creado el arrelgo con los datos error
            if (!$this->arreglo) {
                return false;
            }
            // crear repuestas a partir del arreglo
            $Resultados = $this->arreglo['RespuestaDTE']['Resultado']['ResultadoDTE'];
            if (!isset($Resultados[0]))
                $Resultados = [$Resultados];
            foreach ($Resultados as $Resultado) {
                $this->respuesta_documentos[] = $Resultado;
            }
        }
        // entregar recibos
        return $this->respuesta_documentos;
    }
975828
public function getBlameableRules()
    {
        $cache = $this->getCache();
        if ($cache) {
            $this->blameableLocalRules = $cache->get($this->getBlameableRulesCacheKey());
        }
        // 若当前规则不为空，且是数组，则认为是规则数组，直接返回。
        if (!empty($this->blameableLocalRules) && is_array($this->blameableLocalRules)) {
            return $this->blameableLocalRules;
        }

        // 父类规则与确认规则合并。
        if ($cache) {
            TagDependency::invalidate($cache, [$this->getEntityRulesCacheTag()]);
        }
        $rules = array_merge(
            parent::rules(),
            $this->getConfirmationRules(),
            $this->getBlameableAttributeRules(),
            $this->getDescriptionRules(),
            $this->getContentRules(),
            $this->getSelfBlameableRules()
        );
        $this->setBlameableRules($rules);
        return $this->blameableLocalRules;
    }
266619
public function getData()
    {
        $this->validateData();

        $data = array(
            //版本号
            'version'        => $this->getVersion(),
            //编码方式
            'encoding'       => $this->getEncoding(),
            //证书ID
            'certId'         => $this->getTheCertId(),
            //交易类型
            'txnType'        => $this->getTxnSubType() ?: '01',
            //交易子类
            'txnSubType'     => $this->getTxnSubType() ?: '01',
            //业务类型
            'bizType'        => $this->getBizType(),
            //前台通知地址
            'frontUrl'       => $this->getReturnUrl(),
            //后台通知地址
            'backUrl'        => $this->getNotifyUrl(),
            //签名方法
            'signMethod'     => $this->getSignMethod(),
            //渠道类型，07-PC，08-手机
            'channelType'    => $this->getChannelType(),
            //接入类型
            'accessType'     => $this->getAccessType(),
            //商户代码，请改自己的测试商户号
            'merId'          => $this->getMerId(),
            //商户订单号
            'orderId'        => $this->getOrderId(),
            //订单发送时间
            'txnTime'        => $this->getTxnTime(),
            //交易金额，单位分
            'txnAmt'         => $this->getTxnAmt(),
            //交易币种
            'currencyCode'   => $this->getCurrencyCode(),
            //默认支付方式
            'defaultPayType' => $this->getDefaultPayType(),
            //订单描述，网关支付和wap支付暂时不起作用
            'orderDesc'      => $this->getOrderDesc(),
            //请求方保留域，透传字段，查询、通知、对账文件中均会原样出现
            'reqReserved'    => $this->getReqReserved(),
        );

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

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

        return $data;
    }
1295003
public static function getModuleRoute() {
        //获取请求URL
        $requestUrlArr = self::getRouteArray();

        //处理请求URL
        if (count($requestUrlArr) == 1) {//dev.example.com/aaa
            $data = array(array(
                    'module' => $requestUrlArr[0],
                    'act' => 'index',
                    'op' => 'actionIndex',
                    'namespace' => ''
            ));
        } elseif (count($requestUrlArr) == 2) {//dev.example.com/aaa/bbb
            $data = array(array(
                    'module' => $requestUrlArr[0],
                    'act' => $requestUrlArr[1],
                    'op' => 'actionIndex',
                    'namespace' => ''
            ));
        } elseif (count($requestUrlArr) == 3) {//dev.example.com/aaa/bbb
            $data = array(array(
                    'module' => $requestUrlArr[0],
                    'act' => $requestUrlArr[1],
                    'op' => 'action' . ucfirst($requestUrlArr[2]),
                    'namespace' => ''
                ),
                array(
                    'module' => $requestUrlArr[0],
                    'act' => $requestUrlArr[2],
                    'op' => 'actionIndex',
                    'namespace' => $requestUrlArr[1]
            ));
        } elseif (count($requestUrlArr) >= 4) {//dev.example.com/aaa/bbb/ccc //dev.example.com/aaa/bbb/ccc/index
            $module = array_shift($requestUrlArr); //第一个元素即为module名字
            $origRequestUrlArr = $requestUrlArr;
            $lastParam = array_pop($requestUrlArr);

            if ($lastParam == 'index') {
                $data = array(array(
                        'module' => $module,
                        'act' => array_pop($requestUrlArr),
                        'op' => 'actionIndex',
                        'namespace' => implode('/', $requestUrlArr)
                ));
            } else {
                $data = array(
                    array(
                        'module' => $module,
                        'act' => array_pop($origRequestUrlArr),
                        'op' => 'actionIndex',
                        'namespace' => implode('/', $origRequestUrlArr),
                    ),
                    array(
                        'module' => $module,
                        'act' => array_pop($requestUrlArr),
                        'op' => 'action' . ucfirst($lastParam),
                        'namespace' => implode('/', $requestUrlArr),
                    )
                );
            }
        }

        return $data;
    }
1274923
public function actionResort()
    {
        $response =
            [
                'success' => false,
            ];

        Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;

        if (\Yii::$app->request->isPost) {
            $tree = new Tree();

            $post = \Yii::$app->request->post();

            //$ids = array_reverse(array_filter($post['ids']));
            $ids = array_filter($post['ids']);

            $priority = 100;

            foreach ($ids as $id) {
                $node = $tree->find()->where(['id' => $id])->one();
                $node->priority = $priority;
                $node->save(false);
                $priority += 100;
            }

            $response['success'] = true;
        }

        /*
        if (\Yii::$app->request->isPost)
        {
            $tree = new Tree();

            $post = \Yii::$app->request->post();

            $resortIds = array_filter($post['ids']);
            $changeId = intval($post['changeId']);

            $changeNode = $tree->find()->where(['id' => $changeId])->one();

            $nodes = $tree->find()->where(['pid' =>$changeNode->pid])->orderBy(["priority" => SORT_DESC])->all();
            $origIds = [];
            foreach($nodes as $node)
            {
                $origIds[] = $node->id;
            }

            $origPos = array_search($changeId, $origIds);
            $resortPos = array_search($changeId, $resortIds);

            if($origPos > $resortPos)
            {
                $origIds = array_reverse($origIds);
                $offset = count($origIds) - 1;
                $origPos = $offset - $origPos;
                $resortPos = $offset - $resortPos;
            }

            for($i = $origPos+1; $i <= $resortPos; $i++)
            {
                $id = $origIds[$i];
                $node = $tree->find()->where(['id'=>$id])->one();
                $changeNode->swapPriorities($node);
            }

            $response['success'] = true;
        }
        */

        return $response;
    }
1180805
public function asArray()
    {
		if (func_num_args() == 0) {
			$fields = array('id');
		}
		else {
			$fields = array();
			$args = func_get_args();
			if (count($args)==1 && is_array($args[0])) {
				$args = $args[0];
			}			
			foreach ($args as $f ) {
				if (is_string($f)) $fields[] = $f;
			}
		}
		
		$obj = array();
		foreach ($fields as $f) {
			$obj[$f] = $this->$f;
		}
		return $obj;
    }
89977
private function getMdContent()
    {
        $tables = $this->initTablesData();
        $content = "## 数据字典\n";
        foreach ($tables as $table){
            $content .= $this->tableName($table);
        }
        $content .= "\n";
        foreach ($tables as $key => $table){
            $content .= $this->tableDetail($key, $table);
        }
        return $content;
    }
1335230
public function buildOrder()
	{
		$orders = [];

		foreach ($this->order as $order)
		{
			if (is_object($order['column']))
			{
				$string = $order['column']->build($this);
			}
			else
			{
				$string = $this->connection->quoteName($order['column']);
			}

			$string .= ' ' . strtoupper($order['dir']);
			$orders[] = $string;
		}

		return 'ORDER BY ' . implode(',', $orders);
	}
1033626
public function BGCreateShippingOrder()
        {
            // 參數初始化
            $ParamList = [
                'MerchantID' => '',
                'MerchantTradeNo' => '',
                'MerchantTradeDate' => '',
                'LogisticsType' => '',
                'LogisticsSubType' => '',
                'GoodsAmount' => 0,
                'CollectionAmount' => 0,
                'IsCollection' => IsCollection::NO,
                'GoodsName' => '',
                'SenderName' => '',
                'SenderPhone' => '',
                'SenderCellPhone' => '',
                'ReceiverName' => '',
                'ReceiverPhone' => '',
                'ReceiverCellPhone' => '',
                'ReceiverEmail' => '',
                'TradeDesc' => '',
                'ServerReplyURL' => '',
                'LogisticsC2CReplyURL' => '',
                'Remark' => '',
                'PlatformID' => '',
            ];

            // 幕後物流訂單建立不可設定Client端回覆網址(ClientReplyURL)
            if (! empty($this->Send['ClientReplyURL'])) {
                throw new Exception('ClientReplyURL should be null.');
            }

            $this->PostParams = $this->GetPostParams($this->Send, $ParamList);
            $MinAmount = 1; // 金額下限
            $MaxAmount = 20000; // 金額上限

            // 參數檢查
            $this->ValidateHashKey();
            $this->ValidateHashIV();
            $this->ValidateID('MerchantID', $this->PostParams['MerchantID'], 10);
            $this->ServiceURL = $this->GetURL('SHIPPING_ORDER');
            $this->ValidateMerchantTradeDate();
            $this->ValidateLogisticsType();
            $this->ValidateLogisticsSubType();

            // 依不同的物流類型(LogisticsType)設定專屬參數並檢查
            switch ($this->PostParams['LogisticsType']) {
                case LogisticsType::CVS:
                    $CvsParamList = [
                        'ReceiverStoreID' => '',
                        'ReturnStoreID' => '',
                    ];
                    $this->PostParams = $this->GetPostParams($this->SendExtend, $CvsParamList, $this->PostParams);

                    $this->ValidateMixTypeID('ReceiverStoreID', $this->PostParams['ReceiverStoreID'], 6);
                    $this->ValidateMixTypeID('ReturnStoreID', $this->PostParams['ReturnStoreID'], 6, true);
                    break;
                case LogisticsType::HOME:
                    $HomeParamList = [
                        'SenderZipCode' => '',
                        'SenderAddress' => '',
                        'ReceiverZipCode' => '',
                        'ReceiverAddress' => '',
                        'Temperature' => Temperature::ROOM,
                        'Distance' => Distance::SAME,
                        'Specification' => Specification::CM_60,
                        'ScheduledDeliveryTime' => '',
                        'ScheduledDeliveryDate' => '',
                        'PackageCount' => 0,
                    ];
                    $this->PostParams = $this->GetPostParams($this->SendExtend, $HomeParamList, $this->PostParams);
                    $this->PostParams['ScheduledPickupTime'] = ScheduledPickupTime::UNLIMITED;

                    $this->ValidateZipCode('SenderZipCode', $this->PostParams['SenderZipCode']);
                    $this->ValidateAddress('SenderAddress', $this->PostParams['SenderAddress'], 6, 60);
                    $this->ValidateZipCode('ReceiverZipCode', $this->PostParams['ReceiverZipCode']);
                    $this->ValidateAddress('ReceiverAddress', $this->PostParams['ReceiverAddress'], 6, 60);
                    $this->ValidateTemperature();
                    $this->ValidateDistance();
                    $this->ValidateSpecification();
                    $this->ValidateScheduledDeliveryTime(true);
                    break;
                default:
            }

            $this->ValidateAmount('GoodsAmount', $this->PostParams['GoodsAmount']);
            if (
                $this->PostParams['LogisticsSubType'] == LogisticsSubType::UNIMART ||
                $this->PostParams['LogisticsSubType'] == LogisticsSubType::UNIMART_C2C
            ) {
                // 物流子類型(LogisticsSubType)為統一超商(UNIMART)或統一超商交貨便(UNIMARTC2C)時，商品金額範圍為1~19,999元
                $MaxAmount = 19999;
            }
            if ($this->PostParams['GoodsAmount'] < $MinAmount or $this->PostParams['GoodsAmount'] > $MaxAmount) {
                throw new Exception('Invalid GoodsAmount.');
            }

            $this->ValidateIsCollection(true);
            if ($this->PostParams['IsCollection'] == IsCollection::NO) {
                // 若設定為僅配送，清除代收金額
                unset($this->PostParams['CollectionAmount']);
            } else {
                $this->ValidateAmount('CollectionAmount', $this->PostParams['CollectionAmount']);
                if ($this->PostParams['CollectionAmount'] < $MinAmount or $this->PostParams['CollectionAmount'] > $MaxAmount) {
                    throw new Exception('Invalid CollectionAmount.');
                }
            }

            if ($this->PostParams['LogisticsSubType'] == LogisticsSubType::HILIFE_C2C or $this->PostParams['LogisticsSubType'] == LogisticsSubType::UNIMART_C2C) {
                // 物流子類型(LogisticsSubType)為萊爾富店到店(HILIFEC2C)、 統一超商交貨便(UNIMARTC2C)時，不可為空
                $this->ValidateString('GoodsName', $this->PostParams['GoodsName'], 60);
            } else {
                $this->ValidateString('GoodsName', $this->PostParams['GoodsName'], 60, true);
            }

            $this->ValidateString('SenderName', $this->PostParams['SenderName'], 10);
            $this->ValidatePhoneNumber('SenderPhone', $this->PostParams['SenderPhone'], true);
            $this->ValidateCellphoneNumber('SenderCellPhone', $this->PostParams['SenderCellPhone'], true);
            if ($this->PostParams['LogisticsType'] == LogisticsType::HOME) {
                // 物流類型(LogisticsType)為宅配(Home)時，寄件人電話(SenderPhone)或寄件人手機(SenderCellPhone)不可為空
                if (empty($this->PostParams['SenderPhone']) and empty($this->PostParams['SenderCellPhone'])) {
                    throw new Exception('SenderPhone or SenderCellPhone is required when LogisticsType is Home.');
                }
            } elseif ($this->PostParams['LogisticsSubType'] == LogisticsSubType::HILIFE_C2C or $this->PostParams['LogisticsSubType'] == LogisticsSubType::UNIMART_C2C) {
                // 物流子類型(LogisticsSubType)為統一超商交貨便(UNIMARTC2C)、萊爾富店到店(HILIFEC2C)時，寄件人手機(SenderCellPhone)不可為空
                if (empty($this->PostParams['SenderCellPhone'])) {
                    throw new Exception('SenderCellPhone is required when LogisticsSubType is UNIMARTC2C or HILIFEC2C.');
                }
            }

            $this->ValidateString('ReceiverName', $this->PostParams['ReceiverName'], 10);
            $this->ValidatePhoneNumber('ReceiverPhone', $this->PostParams['ReceiverPhone'], true);
            $this->ValidateCellphoneNumber('ReceiverCellPhone', $this->PostParams['ReceiverCellPhone'], true);
            if ($this->PostParams['LogisticsType'] == LogisticsType::HOME) {
                // 物流類型(LogisticsType)為宅配(Home)時，收件人電話(ReceiverPhone)或收件人手機(ReceiverCellPhone)不可為空
                if (empty($this->PostParams['ReceiverPhone']) and empty($this->PostParams['ReceiverCellPhone'])) {
                    throw new Exception('ReceiverPhone or ReceiverCellPhone is required when LogisticsType is Home.');
                }
            } else {
                // 物流子類型(LogisticsSubType)為統一超商(UNIMART)、全家(FAMILY)、萊爾富(HILIFE)、統一超商交貨便(UNIMARTC2C)、全家超商店到店(FAMILYC2C)、萊爾富富店到店(HILIFEC2C)時，收件人手機(ReceiverCellPhone)不可為空
                if (empty($this->PostParams['ReceiverCellPhone'])) {
                    throw new Exception('ReceiverCellPhone is required.');
                }
            }

            if ($this->PostParams['LogisticsSubType'] == LogisticsSubType::ECAN and $this->PostParams['Temperature'] !== Temperature::ROOM) {
                // 物流子類型為宅配通(ECAN)時，溫層(Temperature)只能用常溫(ROOM)
                throw new Exception('Temperature should be ROOM when LogisticsSubType is ECAN.');
            }

            if ($this->PostParams['LogisticsSubType'] == LogisticsSubType::ECAN and date('Ymd', strtotime($this->PostParams['ScheduledDeliveryDate'])) < date('Ymd', strtotime('+3 day'))) {
                // 指定送達日期為該訂單建立時間 + 3 天
                throw new Exception('ScheduledDeliveryDate should be the time that create order + 3 day.');
            }

            $this->ValidateEmail('ReceiverEmail', $this->PostParams['ReceiverEmail'], 50, true);
            $this->ValidateString('TradeDesc', $this->PostParams['TradeDesc'], 200, true);
            $this->ValidateURL('ServerReplyURL', $this->PostParams['ServerReplyURL']);

            if ($this->PostParams['LogisticsSubType'] == LogisticsSubType::UNIMART_C2C) {
                // 物流子類型(LogisticsSubType)為統一超商交貨便(UNIMARTC2C)時，此欄位不可為空
                $this->ValidateURL('LogisticsC2CReplyURL', $this->PostParams['LogisticsC2CReplyURL']);
            } else {
                $this->ValidateURL('LogisticsC2CReplyURL', $this->PostParams['LogisticsC2CReplyURL'], 200, true);
            }

            $this->ValidateString('Remark', $this->PostParams['Remark'], 200, true);
            $this->ValidateID('PlatformID', $this->PostParams['PlatformID'], 10, true);

            // 物流類型(LogisticsType)為宅配(Home)且溫層(Temperature)為冷凍(0003)時，規格(Specification)不可為 150cm(0004)
            if ($this->PostParams['LogisticsType'] == LogisticsType::HOME and $this->PostParams['Temperature'] == Temperature::FREEZE) {
                if ($this->PostParams['Specification'] == Specification::CM_150) {
                    throw new Exception('Specification could not be 0004 when LogisticsType is Home and Temperature is 0003.');
                }
            }

            // 產生 CheckMacValue
            $this->PostParams['CheckMacValue'] = ECPay_CheckMacValue::generate($this->PostParams, $this->HashKey, $this->HashIV);

            // urlencode
            foreach ($this->PostParams as $key => $value) {
                $this->PostParams[$key] = urlencode($value);
            }

            // 解析回傳結果
            // 正確：1|MerchantID=XXX&MerchantTradeNo=XXX&RtnCode=XXX&RtnMsg=XXX&AllPayLogisticsID=XXX&LogisticsType=XXX&LogisticsSubType=XXX&GoodsAmount=XXX&UpdateStatusDate=XXX&ReceiverName=XXX&ReceiverPhone=XXX&ReceiverCellPhone=XXX&ReceiverEmail=XXX&ReceiverAddress=XXX&CVSPaymentNo=XXX&CVSValidationNo=XXX &CheckMacValue=XXX
            // 錯誤：0|ErrorMessage
            $Feedback = ECPay_IO::ServerPost($this->PostParams, $this->ServiceURL);
            $Pieces = explode('|', $Feedback);
            $Result = [];
            $Result['ResCode'] = $Pieces[0];
            if ($Result['ResCode']) {
                $RtnCont = [];
                parse_str($Pieces[1], $RtnCont);
                $Result = array_merge($Result, $RtnCont);
            } else {
                $Result['ErrorMessage'] = $Pieces[1];
            }

            return $Result;
        }
369698
protected function checkAutoRelationWrite()
    {
        foreach ($this->together as $key => $name) {
            if (is_array($name)) {
                if (key($name) === 0) {
                    $this->relationWrite[$key] = [];
                    // 绑定关联属性
                    foreach ((array) $name as $val) {
                        if (isset($this->data[$val])) {
                            $this->relationWrite[$key][$val] = $this->data[$val];
                        }
                    }
                } else {
                    // 直接传入关联数据
                    $this->relationWrite[$key] = $name;
                }
            } elseif (isset($this->relation[$name])) {
                $this->relationWrite[$name] = $this->relation[$name];
            } elseif (isset($this->data[$name])) {
                $this->relationWrite[$name] = $this->data[$name];
                unset($this->data[$name]);
            }
        }
    }
463057
public function getDirections()
	{
		if($this->_directions===null)
		{
			$this->_directions=array();
			if(isset($_GET[$this->sortVar]) && is_string($_GET[$this->sortVar]))
			{
				$attributes=explode($this->separators[0],$_GET[$this->sortVar]);
				foreach($attributes as $attribute)
				{
					if(($pos=strrpos($attribute,$this->separators[1]))!==false)
					{
						$descending=substr($attribute,$pos+1)===$this->descTag;
						if($descending)
							$attribute=substr($attribute,0,$pos);
					}
					else
						$descending=false;

					if(($this->resolveAttribute($attribute))!==false)
					{
						$this->_directions[$attribute]=$descending;
						if(!$this->multiSort)
							return $this->_directions;
					}
				}
			}
			if($this->_directions===array() && is_array($this->defaultOrder))
				$this->_directions=$this->defaultOrder;
		}
		return $this->_directions;
	}
561109
public function getCardColors()
    {
        if (!$this->access_token && !$this->getAccessToken()) {
            return false;
        }
        $result = Tools::httpGet(self::API_BASE_URL_PREFIX . self::CARD_GETCOLORS . "access_token={$this->access_token}");
        if ($result) {
            $json = json_decode($result, true);
            if (empty($json) || !empty($json['errcode'])) {
                $this->errCode = isset($json['errcode']) ? $json['errcode'] : '505';
                $this->errMsg = isset($json['errmsg']) ? $json['errmsg'] : '无法解析接口返回内容！';
                return $this->checkRetry(__FUNCTION__, func_get_args());
            }
            return $json;
        }
        return false;
    }
472150
public static function isSuperUser()
    {
        $authInfo = self::getLoginInfo();
        if (!$authInfo) {//登录超时
            return false;
        }
        $admin = Config::get('administratorid');
        return is_array($admin) ? in_array($authInfo['id'], $admin) : ($authInfo['id'] === $admin);
    }