更新优化

This commit is contained in:
吴昊天 2023-03-21 15:41:14 +08:00
parent 5ae976edc6
commit 676ce022c4
5 changed files with 10 additions and 17 deletions

View File

@ -60,7 +60,7 @@ class Common extends AuthController
$res = $res ? json_decode($res, true) : [];
//兼容test.
if ($res['data']['status'] !== 1) {
if (!isset($res['data']['status']) || $res['data']['status'] !== 1) {
$host = str_replace('test.', '', $host);
$res = HttpService::request('http://authorize.crmeb.net/api/auth_cert_query', 'post', [
'domain_name' => $host,
@ -71,7 +71,7 @@ class Common extends AuthController
}
//如果是主域名兼容www.
if ($res['data']['status'] !== 1) {
if (!isset($res['data']['status']) || $res['data']['status'] !== 1) {
$host = str_replace('www.', '', $host);
$res = HttpService::request('http://authorize.crmeb.net/api/auth_cert_query', 'post', [
'domain_name' => $host,
@ -82,9 +82,9 @@ class Common extends AuthController
}
//升级状态
/** @var UpgradeServices $upgradeServices */
$upgradeServices = app()->make(UpgradeServices::class);
$upgradeStatus = $upgradeServices->getUpgradeStatus();
// /** @var UpgradeServices $upgradeServices */
// $upgradeServices = app()->make(UpgradeServices::class);
// $upgradeStatus = $upgradeServices->getUpgradeStatus();
$status = $res['data']['status'] ?? -9;
switch ((int)$status) {

View File

@ -91,10 +91,7 @@ class SystemNotification extends AuthController
if ($data['mark'] == 'verify_code') $data['type'] = 'is_sms';
if (!$data['id']) return app('json')->fail(100100);
if ($this->services->saveData($data)) {
CacheService::delete('NOTICE_SMS_' . $data['mark']);
CacheService::delete('wechat_' . $data['mark']);
CacheService::delete('routine_' . $data['mark']);
CacheService::delete('TEMP_IDS_LIST');
CacheService::clear();
return app('json')->success(100001);
} else {
return app('json')->fail(100007);
@ -117,10 +114,7 @@ class SystemNotification extends AuthController
if ($type == '' || $status == '' || $id == 0) return app('json')->fail(100100);
$this->services->update($id, [$type => $status]);
$res = $this->services->getOneNotce(['id' => $id]);
CacheService::delete('NOTICE_SMS_' . $res->mark);
CacheService::delete('wechat_' . $res->mark);
CacheService::delete('routine_' . $res->mark);
CacheService::delete('TEMP_IDS_LIST');
CacheService::clear();
return app('json')->success(100014);
}
}

View File

@ -50,6 +50,7 @@ class PublicController
$data['site_name'] = sys_config('site_name');
$data['site_keywords'] = sys_config('site_keywords');
$data['site_description'] = sys_config('site_description');
$data['network_security'] = sys_config('network_security');
$logoUrl = sys_config('pc_logo');
if (strstr($logoUrl, 'http') === false && $logoUrl) {
$logoUrl = sys_config('site_url') . $logoUrl;

View File

@ -168,7 +168,7 @@ class StoreOrderController
$userInfo = $request->user()->toArray();
if ($checkOrder = $this->services->getOne(['order_id|unique' => $key, 'uid' => $userInfo['uid'], 'is_del' => 0]))
return app('json')->status('extend_order', 410209, ['orderId' => $checkOrder['order_id'], 'key' => $key]);
[$addressId, $couponId, $payType, $useIntegral, $mark, $combinationId, $pinkId, $seckillId, $bargainId, $shipping_type, $real_name, $phone, $storeId, $news, $invoice_id, $quitUrl, $advanceId, $virtual_type, $customForm] = $request->postMore([
[$addressId, $couponId, $payType, $useIntegral, $mark, $combinationId, $pinkId, $seckillId, $bargainId, $shipping_type, $real_name, $phone, $storeId, $news, $invoice_id, $advanceId, $customForm] = $request->postMore([
[['addressId', 'd'], 0],
[['couponId', 'd'], 0],
['payType', ''],
@ -184,9 +184,7 @@ class StoreOrderController
[['store_id', 'd'], 0],
['new', 0],
[['invoice_id', 'd'], 0],
['quitUrl', ''],
[['advanceId', 'd'], 0],
['virtual_type', 0],
['custom_form', []],
], true);
$payType = strtolower($payType);

View File

@ -53,7 +53,7 @@ class UserRechargeController
$uid = (int)$request->uid();
$re = $this->services->recharge($uid, $price, $recharId, $type, $from, true);
if ($re) {
$payType = $re['pay_type'];
$payType = $re['pay_type'] ?? '';
unset($re['pay_type']);
return app('json')->status($payType, 410125, $re);
}