|
|
|
@ -544,6 +544,46 @@ class Server |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @notes:检测审核状态 |
|
|
|
|
* @param $appid |
|
|
|
|
* @param $auditid |
|
|
|
|
* @return bool |
|
|
|
|
* @author: wanghousheng |
|
|
|
|
*/ |
|
|
|
|
public function getAuditStatus($appid, $auditid): bool |
|
|
|
|
{ |
|
|
|
|
$access_token = $this->authorizerAccessToken($appid); |
|
|
|
|
if ($access_token && $auditid) { |
|
|
|
|
$url = 'https://api.weixin.qq.com/wxa/get_auditstatus?access_token=' . $access_token; |
|
|
|
|
$data['auditid'] = $auditid; |
|
|
|
|
$result = $this->curlPost($url, json_encode($data)); |
|
|
|
|
$result = json_decode($result, true); |
|
|
|
|
if (!empty($result) && intval($result['errcode']) == 0 && isset($result['status'])) { |
|
|
|
|
$status = intval($result['status']); |
|
|
|
|
$up = []; |
|
|
|
|
if ($status == 0) { |
|
|
|
|
$up['audit_status'] = 2; |
|
|
|
|
} elseif ($status == 1) { |
|
|
|
|
$up['audit_status'] = 3; |
|
|
|
|
} elseif ($status == 2) { |
|
|
|
|
$up['audit_status'] = 1; |
|
|
|
|
} elseif ($status == 4) { |
|
|
|
|
$up['audit_status'] = 4; |
|
|
|
|
} |
|
|
|
|
if (!empty($result['reason'])) { |
|
|
|
|
$up['audit_reason'] = $result['reason']; |
|
|
|
|
} |
|
|
|
|
if ($up) { |
|
|
|
|
$model = new WxserverAccount(); |
|
|
|
|
$model->update($up, ['appid' => $appid]); |
|
|
|
|
} |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function getAllCategory($appid): array |
|
|
|
|
{ |
|
|
|
|
$data = []; |
|
|
|
|