|
|
|
@ -698,7 +698,33 @@ class Server |
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function submitAudit($appid) |
|
|
|
|
public function submitAuditOne($appid): array |
|
|
|
|
{ |
|
|
|
|
$access_token = $this->authorizerAccessToken($appid); |
|
|
|
|
if ($access_token) { |
|
|
|
|
$url = 'https://api.weixin.qq.com/wxa/submit_audit?access_token=' . $access_token; |
|
|
|
|
$data['item_list'] = $this->getAllCategory($appid); |
|
|
|
|
if (!empty($data['item_list'])) { |
|
|
|
|
$data = '{}'; |
|
|
|
|
} else { |
|
|
|
|
$data = json_encode($data); |
|
|
|
|
} |
|
|
|
|
$result = $this->curlPost($url, $data); |
|
|
|
|
$result = json_decode($result, true); |
|
|
|
|
if (!empty($result) && intval($result['errcode']) == 0 && !empty($result['auditid'])) { |
|
|
|
|
$model = new WxserverAccount(); |
|
|
|
|
$up['audit_status'] = 1; |
|
|
|
|
$up['audit_reason'] = ''; |
|
|
|
|
$up['audit_time'] = date('Y-m-d H:i:s'); |
|
|
|
|
$up['auditid'] = $result['auditid']; |
|
|
|
|
$model->update($up, ['appid' => $appid]); |
|
|
|
|
return ['status' => true, 'msg' => 'success']; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return ['status' => false, 'msg' => !empty($result['errmsg']) ? $result['errmsg'] : '位置错误']; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function submitAudit($appid): bool |
|
|
|
|
{ |
|
|
|
|
$access_token = $this->authorizerAccessToken($appid); |
|
|
|
|
if ($access_token) { |
|
|
|
@ -711,7 +737,6 @@ class Server |
|
|
|
|
} |
|
|
|
|
$result = $this->curlPost($url, $data); |
|
|
|
|
$result = json_decode($result, true); |
|
|
|
|
return $result; |
|
|
|
|
if (!empty($result) && intval($result['errcode']) == 0 && !empty($result['auditid'])) { |
|
|
|
|
$model = new WxserverAccount(); |
|
|
|
|
$up['audit_status'] = 1; |
|
|
|
|