wang hou sheng 11 months ago
parent 6eaf74a04a
commit 0b32855f2f
  1. 12
      app/admin/controller/Wxserve.php
  2. 3
      app/common/library/wxserver/Server.php

@ -229,11 +229,13 @@ class Wxserve extends Controller
$obj = new Server(); $obj = new Server();
$res = $obj->privacyInfo($appid); $res = $obj->privacyInfo($appid);
if ($res == 'ok') { if ($res == 'ok') {
if ($obj->submitAudit($appid)) { $result = $obj->submitAudit($appid);
return $this->renderSuccess('success'); return $this->renderSuccess([$result]);
} else { // if ($result) {
return $this->renderError('发布失败'); // return $this->renderSuccess('success');
} // } else {
// return $this->renderSuccess([])
// }
} else { } else {
return $this->renderError('隐私接口错误'); return $this->renderError('隐私接口错误');
} }

@ -698,7 +698,7 @@ class Server
return 0; return 0;
} }
public function submitAudit($appid): bool public function submitAudit($appid)
{ {
$access_token = $this->authorizerAccessToken($appid); $access_token = $this->authorizerAccessToken($appid);
if ($access_token) { if ($access_token) {
@ -711,6 +711,7 @@ class Server
} }
$result = $this->curlPost($url, $data); $result = $this->curlPost($url, $data);
$result = json_decode($result, true); $result = json_decode($result, true);
return $result;
if (!empty($result) && intval($result['errcode']) == 0 && !empty($result['auditid'])) { if (!empty($result) && intval($result['errcode']) == 0 && !empty($result['auditid'])) {
$model = new WxserverAccount(); $model = new WxserverAccount();
$up['audit_status'] = 1; $up['audit_status'] = 1;

Loading…
Cancel
Save