123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- <?php
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- namespace app\admin\controller\setting;
-
-
- use app\admin\logic\setting\SmsLogic;
- use app\common\basics\AdminBase;
- use app\common\enum\SmsEnum;
- use app\common\server\ConfigServer;
- use app\common\server\JsonServer;
-
-
- class Sms extends AdminBase
- {
-
-
-
- public function lists()
- {
- if ($this->request->isAjax()) {
- $lists = SmsLogic::configLists();
- return JsonServer::success('获取成功', $lists);
- }
- return view('', ['status_list' => SmsEnum::getSendStatusDesc(true)]);
- }
-
-
-
- public function config()
- {
- if ($this->request->isAjax()) {
- $post = $this->request->post();
- $res = SmsLogic::setConfig($post);
- if (false === $res) {
- return JsonServer::error(SmsLogic::getError());
- }
- return JsonServer::success('设置成功');
- }
- $engine = $this->request->get('engine');
- $info = SmsLogic::getConfigInfo($engine);
- if (false === $info) {
- return JsonServer::error('数据错误');
- }
- return view('', [
- 'engine' => $engine,
- 'info' => $info
- ]);
- }
-
-
-
-
-
-
- public function logLists()
- {
- if ($this->request->isAjax()) {
- $get = $this->request->get();
- $lists = SmsLogic::logLists($get);
- return JsonServer::success('', $lists);
- }
- }
-
-
-
- public function detail()
- {
- $id = $this->request->get('id');
- $info = SmsLogic::detail($id);
- return view('', ['info' => $info]);
- }
- }
|