mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
修改后台注释
This commit is contained in:
parent
d44cad80c9
commit
ac61d77dbe
app
admin/controller
data
controller
api
base/postage
shop
service
@ -17,7 +17,6 @@
|
||||
namespace app\admin\controller;
|
||||
|
||||
use app\admin\model\SystemOplog;
|
||||
use Ip2Region;
|
||||
use think\admin\Controller;
|
||||
use think\admin\helper\QueryHelper;
|
||||
use think\exception\HttpResponseException;
|
||||
@ -57,7 +56,7 @@ class Oplog extends Controller
|
||||
*/
|
||||
protected function _index_page_filter(array &$data)
|
||||
{
|
||||
$region = new Ip2Region();
|
||||
$region = new \Ip2Region();
|
||||
foreach ($data as &$vo) {
|
||||
$isp = $region->btreeSearch($vo['geoip']);
|
||||
$vo['geoisp'] = str_replace(['内网IP', '0', '|'], '', $isp['region'] ?? '') ?: '-';
|
||||
@ -76,7 +75,7 @@ class Oplog extends Controller
|
||||
$this->success('日志清理成功!');
|
||||
} catch (HttpResponseException $exception) {
|
||||
throw $exception;
|
||||
} catch (Exception $exception) {
|
||||
} catch (\Exception $exception) {
|
||||
$this->error("日志清理失败,{$exception->getMessage()}");
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,6 @@
|
||||
namespace app\admin\controller;
|
||||
|
||||
use app\admin\model\SystemQueue;
|
||||
use Exception;
|
||||
use think\admin\Controller;
|
||||
use think\admin\helper\QueryHelper;
|
||||
use think\admin\service\AdminService;
|
||||
@ -81,7 +80,7 @@ class Queue extends Controller
|
||||
$this->success('任务重置成功!', $queue->code);
|
||||
} catch (HttpResponseException $exception) {
|
||||
throw $exception;
|
||||
} catch (Exception $exception) {
|
||||
} catch (\Exception $exception) {
|
||||
$this->error($exception->getMessage());
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,6 @@
|
||||
|
||||
namespace app\admin\controller\api;
|
||||
|
||||
use Exception;
|
||||
use think\admin\Controller;
|
||||
use think\admin\service\AdminService;
|
||||
use think\admin\service\QueueService;
|
||||
@ -62,7 +61,7 @@ class Queue extends Controller
|
||||
}
|
||||
} catch (HttpResponseException $exception) {
|
||||
throw $exception;
|
||||
} catch (Exception $exception) {
|
||||
} catch (\Exception $exception) {
|
||||
$this->error($exception->getMessage());
|
||||
}
|
||||
}
|
||||
@ -85,7 +84,7 @@ class Queue extends Controller
|
||||
}
|
||||
} catch (HttpResponseException $exception) {
|
||||
throw $exception;
|
||||
} catch (Exception $exception) {
|
||||
} catch (\Exception $exception) {
|
||||
$this->error($exception->getMessage());
|
||||
}
|
||||
}
|
||||
@ -103,7 +102,7 @@ class Queue extends Controller
|
||||
} else {
|
||||
echo '<span class="color-red">' . $message . '</span>';
|
||||
}
|
||||
} catch (Exception $exception) {
|
||||
} catch (\Exception $exception) {
|
||||
echo '<span class="color-red">' . $exception->getMessage() . '</span>';
|
||||
} else {
|
||||
echo '<span class="color-red">只有超级管理员才能操作!</span>';
|
||||
|
@ -16,7 +16,6 @@
|
||||
|
||||
namespace app\admin\controller\api;
|
||||
|
||||
use Exception;
|
||||
use think\admin\Controller;
|
||||
use think\admin\service\AdminService;
|
||||
use think\admin\service\SystemService;
|
||||
@ -43,7 +42,7 @@ class Runtime extends Controller
|
||||
$this->success('网站缓存加速成功!', 'javascript:location.reload()');
|
||||
} catch (HttpResponseException $exception) {
|
||||
throw $exception;
|
||||
} catch (Exception $exception) {
|
||||
} catch (\Exception $exception) {
|
||||
$this->error($exception->getMessage());
|
||||
} else {
|
||||
$this->error('只有超级管理员才能操作!');
|
||||
@ -63,7 +62,7 @@ class Runtime extends Controller
|
||||
$this->success('清空缓存日志成功!', 'javascript:location.reload()');
|
||||
} catch (HttpResponseException $exception) {
|
||||
throw $exception;
|
||||
} catch (Exception $exception) {
|
||||
} catch (\Exception $exception) {
|
||||
$this->error($exception->getMessage());
|
||||
} else {
|
||||
$this->error('只有超级管理员才能操作!');
|
||||
@ -111,7 +110,7 @@ class Runtime extends Controller
|
||||
$this->success('清理系统配置成功!', 'javascript:location.reload()');
|
||||
} catch (HttpResponseException $exception) {
|
||||
throw $exception;
|
||||
} catch (Exception $exception) {
|
||||
} catch (\Exception $exception) {
|
||||
$this->error($exception->getMessage());
|
||||
} else {
|
||||
$this->error('只有超级管理员才能操作!');
|
||||
|
@ -16,7 +16,6 @@
|
||||
|
||||
namespace app\admin\controller\api;
|
||||
|
||||
use Exception;
|
||||
use think\admin\Controller;
|
||||
use think\admin\Storage;
|
||||
use think\admin\storage\AliossStorage;
|
||||
@ -149,7 +148,7 @@ class Upload extends Controller
|
||||
}
|
||||
} catch (HttpResponseException $exception) {
|
||||
throw $exception;
|
||||
} catch (Exception $exception) {
|
||||
} catch (\Exception $exception) {
|
||||
$this->error($exception->getMessage());
|
||||
}
|
||||
}
|
||||
@ -195,7 +194,7 @@ class Upload extends Controller
|
||||
}
|
||||
} catch (HttpResponseException $exception) {
|
||||
throw $exception;
|
||||
} catch (Exception $exception) {
|
||||
} catch (\Exception $exception) {
|
||||
$this->error(lang($exception->getMessage()));
|
||||
}
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ namespace app\data\controller\api;
|
||||
|
||||
use app\data\service\UserAdminService;
|
||||
use app\data\service\UserTokenService;
|
||||
use Exception;
|
||||
use think\admin\Controller;
|
||||
use think\exception\HttpResponseException;
|
||||
|
||||
@ -78,7 +79,7 @@ abstract class Auth extends Controller
|
||||
return UserAdminService::instance()->get($this->uuid, $this->type);
|
||||
} catch (HttpResponseException $exception) {
|
||||
throw $exception;
|
||||
} catch (\Exception $exception) {
|
||||
} catch (Exception $exception) {
|
||||
$this->error($exception->getMessage());
|
||||
}
|
||||
}
|
||||
|
@ -6,8 +6,6 @@ use app\data\service\payment\AlipayPaymentService;
|
||||
use app\data\service\payment\JoinpayPaymentService;
|
||||
use app\data\service\payment\WechatPaymentService;
|
||||
use think\admin\Controller;
|
||||
use think\admin\Exception;
|
||||
use WeChat\Exceptions\InvalidResponseException;
|
||||
|
||||
/**
|
||||
* 异步通知处理
|
||||
|
@ -5,7 +5,6 @@ namespace app\data\controller\api;
|
||||
use app\data\service\UserAdminService;
|
||||
use app\wechat\service\WechatService;
|
||||
use think\admin\Controller;
|
||||
use think\admin\Exception;
|
||||
use think\Response;
|
||||
|
||||
/**
|
||||
|
@ -3,6 +3,7 @@
|
||||
namespace app\data\controller\api;
|
||||
|
||||
use app\data\service\UserAdminService;
|
||||
use Exception;
|
||||
use think\admin\Controller;
|
||||
use think\exception\HttpResponseException;
|
||||
use think\Response;
|
||||
@ -98,7 +99,7 @@ class Wxapp extends Controller
|
||||
}
|
||||
} catch (HttpResponseException $exception) {
|
||||
throw $exception;
|
||||
} catch (\Exception $exception) {
|
||||
} catch (Exception $exception) {
|
||||
$this->error("数据处理失败,{$exception->getMessage()}");
|
||||
}
|
||||
}
|
||||
@ -127,7 +128,7 @@ class Wxapp extends Controller
|
||||
}
|
||||
} catch (HttpResponseException $exception) {
|
||||
throw $exception;
|
||||
} catch (\Exception $exception) {
|
||||
} catch (Exception $exception) {
|
||||
$this->error("授权换取失败,{$exception->getMessage()}");
|
||||
}
|
||||
}
|
||||
@ -153,7 +154,7 @@ class Wxapp extends Controller
|
||||
}
|
||||
} catch (HttpResponseException $exception) {
|
||||
throw $exception;
|
||||
} catch (\Exception $exception) {
|
||||
} catch (Exception $exception) {
|
||||
$this->error($exception->getMessage());
|
||||
}
|
||||
}
|
||||
@ -169,7 +170,7 @@ class Wxapp extends Controller
|
||||
$this->success('获取直播列表成功!', $list);
|
||||
} catch (HttpResponseException $exception) {
|
||||
throw $exception;
|
||||
} catch (\Exception $exception) {
|
||||
} catch (Exception $exception) {
|
||||
$this->error($exception->getMessage());
|
||||
}
|
||||
}
|
||||
@ -190,7 +191,7 @@ class Wxapp extends Controller
|
||||
$this->success('获取回放视频成功!', $result);
|
||||
} catch (HttpResponseException $exception) {
|
||||
throw $exception;
|
||||
} catch (\Exception $exception) {
|
||||
} catch (Exception $exception) {
|
||||
$this->error($exception->getMessage());
|
||||
}
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ use app\data\controller\api\Auth;
|
||||
use app\data\service\RebateService;
|
||||
use app\data\service\UserAdminService;
|
||||
use app\data\service\UserUpgradeService;
|
||||
use Exception;
|
||||
use think\admin\Storage;
|
||||
use think\exception\HttpResponseException;
|
||||
|
||||
@ -70,7 +71,7 @@ class Center extends Auth
|
||||
}
|
||||
} catch (HttpResponseException $exception) {
|
||||
throw $exception;
|
||||
} catch (\Exception $exception) {
|
||||
} catch (Exception $exception) {
|
||||
$this->error($exception->getMessage());
|
||||
}
|
||||
}
|
||||
|
@ -11,6 +11,8 @@ use app\data\service\GoodsService;
|
||||
use app\data\service\OrderService;
|
||||
use app\data\service\PaymentService;
|
||||
use app\data\service\UserAdminService;
|
||||
use Exception;
|
||||
use stdClass;
|
||||
use think\admin\extend\CodeExtend;
|
||||
use think\exception\HttpResponseException;
|
||||
|
||||
@ -184,7 +186,7 @@ class Order extends Auth
|
||||
$this->success('商品下单成功', $order);
|
||||
} catch (HttpResponseException $exception) {
|
||||
throw $exception;
|
||||
} catch (\Exception $exception) {
|
||||
} catch (Exception $exception) {
|
||||
$this->error("商品下单失败,{$exception->getMessage()}");
|
||||
}
|
||||
}
|
||||
@ -345,10 +347,10 @@ class Order extends Auth
|
||||
// 返回订单数据及支付发起参数
|
||||
$type = $order['amount_real'] <= 0 ? 'empty' : $data['payment_code'];
|
||||
$param = PaymentService::instance($type)->create($openid, $order['order_no'], $order['amount_real'], '商城订单支付', '', $data['payment_back'], $data['payment_image']);
|
||||
$this->success('获取支付参数', ['order' => ShopOrder::mk()->where($map)->find() ?: new \stdClass(), 'param' => $param]);
|
||||
$this->success('获取支付参数', ['order' => ShopOrder::mk()->where($map)->find() ?: new stdClass(), 'param' => $param]);
|
||||
} catch (HttpResponseException $exception) {
|
||||
throw $exception;
|
||||
} catch (\Exception $exception) {
|
||||
} catch (Exception $exception) {
|
||||
$this->error($exception->getMessage());
|
||||
}
|
||||
}
|
||||
@ -473,7 +475,7 @@ class Order extends Auth
|
||||
empty($result['code']) ? $this->error($result['info']) : $this->success('快递追踪信息', $result);
|
||||
} catch (HttpResponseException $exception) {
|
||||
throw $exception;
|
||||
} catch (\Exception $exception) {
|
||||
} catch (Exception $exception) {
|
||||
$this->error($exception->getMessage());
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,7 @@
|
||||
namespace app\data\controller\base\postage;
|
||||
|
||||
use app\data\service\ExpressService;
|
||||
use Exception;
|
||||
use think\admin\Controller;
|
||||
use think\exception\HttpResponseException;
|
||||
|
||||
@ -105,7 +106,7 @@ class Company extends Controller
|
||||
$this->success('同步快递公司成功!');
|
||||
} catch (HttpResponseException $exception) {
|
||||
throw $exception;
|
||||
} catch (\Exception $exception) {
|
||||
} catch (Exception $exception) {
|
||||
$this->error('同步快递公司数据失败!');
|
||||
}
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ namespace app\data\controller\shop;
|
||||
use app\data\service\OrderService;
|
||||
use app\data\service\PaymentService;
|
||||
use app\data\service\UserAdminService;
|
||||
use Exception;
|
||||
use think\admin\Controller;
|
||||
use think\admin\extend\CodeExtend;
|
||||
use think\exception\HttpResponseException;
|
||||
@ -178,7 +179,7 @@ class Order extends Controller
|
||||
}
|
||||
} catch (HttpResponseException $exception) {
|
||||
throw $exception;
|
||||
} catch (\Exception $exception) {
|
||||
} catch (Exception $exception) {
|
||||
$this->error($exception->getMessage());
|
||||
}
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ namespace app\data\controller\shop;
|
||||
|
||||
use app\data\service\ExpressService;
|
||||
use app\data\service\OrderService;
|
||||
use Exception;
|
||||
use think\admin\Controller;
|
||||
use think\exception\HttpResponseException;
|
||||
|
||||
@ -154,7 +155,7 @@ class Send extends Controller
|
||||
$this->fetch('truck_query');
|
||||
} catch (HttpResponseException $exception) {
|
||||
throw $exception;
|
||||
} catch (\Exception $exception) {
|
||||
} catch (Exception $exception) {
|
||||
$this->error($exception->getMessage());
|
||||
}
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ use app\data\model\DataUser;
|
||||
use app\data\model\DataUserBalance;
|
||||
use app\data\model\ShopOrder;
|
||||
use app\data\model\ShopOrderItem;
|
||||
use Exception;
|
||||
use think\admin\Service;
|
||||
|
||||
/**
|
||||
@ -72,7 +73,7 @@ class UserUpgradeService extends Service
|
||||
});
|
||||
$this->upgrade($user['id']);
|
||||
return [1, '绑定代理成功'];
|
||||
} catch (\Exception $exception) {
|
||||
} catch (Exception $exception) {
|
||||
return [0, "绑定代理失败, {$exception->getMessage()}"];
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user