pull/5/head
wanghousheng 5 months ago
parent 2b3e058c65
commit a1e03a9707
  1. 14
      app/admin/controller/Wxwholesaler.php
  2. 1
      app/common/library/wxserver/Server.php
  3. 12
      app/common/library/wxserver/Wholesaler.php

@ -188,6 +188,20 @@ class Wxwholesaler extends Controller
return $this->renderError('操作失败');
}
public function commitOne(): Json
{
$appid = $this->request->get('appid');
$obj = new Wholesaler();
$msg = $obj->privacyInfo($appid);
if ($msg == 'ok') {
$msg = $obj->submitAudit($appid);
if ($msg == 'ok') {
return $this->renderSuccess('success');
}
}
return $this->renderError($msg);
}
/**
* @notes:获取版本信息
* @return Json

@ -660,6 +660,7 @@ class Server
{
$token = $this->authorizerAccessToken($appid);
if ($token) {
$url = "https://api.weixin.qq.com/wxa/setwebviewdomain?access_token=$token";
$data['action'] = 'set';
$data['webviewdomain'] = $domain;

@ -546,8 +546,6 @@ class Wholesaler
$data['owner_setting']['contact_qq'] = '527264601';
$data['owner_setting']['notice_method'] = '公告';
$result = $this->curlPost($url, json_encode($data));
Db::table('yoshop_wx_server')->insertGetId(['content' => "设置隐私信息", 'created_at' => date('Y-m-d H:i:s')]);
Db::table('yoshop_wx_server')->insertGetId(['content' => $result, 'created_at' => date('Y-m-d H:i:s')]);
$result = json_decode($result, true);
if ($result && !empty($result['errmsg']) && $result['errmsg'] == 'ok') {
return true;
@ -659,8 +657,6 @@ class Wholesaler
$data['action'] = 'set';
$data['webviewdomain'] = $domain;
$result = $this->curlPost($url, json_encode($data));
Db::table('yoshop_wx_server')->insertGetId(['content' => "业务域名", 'created_at' => date('Y-m-d H:i:s')]);
Db::table('yoshop_wx_server')->insertGetId(['content' => $result, 'created_at' => date('Y-m-d H:i:s')]);
$result = json_decode($result, true);
if ($result && !empty($result['errmsg']) && $result['errmsg'] == 'ok') {
return true;
@ -698,8 +694,9 @@ class Wholesaler
return 0;
}
public function submitAudit($appid): bool
public function submitAudit($appid)
{
$msg = 'ok';
$access_token = $this->authorizerAccessToken($appid);
if ($access_token) {
$url = 'https://api.weixin.qq.com/wxa/submit_audit?access_token=' . $access_token;
@ -718,11 +715,12 @@ class Wholesaler
$up['audit_time'] = date('Y-m-d H:i:s');
$up['auditid'] = $result['auditid'];
$model->update($up, ['appid' => $appid]);
return true;
} else {
$msg = !empty($result['errmsg']) ? $result['errmsg'] : '提交失败(未知错误)';
}
}
return false;
return $msg;
}
/**

Loading…
Cancel
Save