12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <?php
- // +----------------------------------------------------------------------
- // | framework
- // +----------------------------------------------------------------------
- // | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
- // +----------------------------------------------------------------------
- // | 官方网站: http://framework.thinkadmin.top
- // +----------------------------------------------------------------------
- // | 开源协议 ( https://mit-license.org )
- // +----------------------------------------------------------------------
- // | github开源项目:https://github.com/zoujingli/framework
- // +----------------------------------------------------------------------
- namespace app\store\controller;
- use app\store\service\ExtendService;
- use library\Controller;
- /**
- * 商城参数配置
- * Class Config
- * @package app\store\controller
- */
- class Config extends Controller
- {
- /**
- * 商城参数配置
- * @throws \think\Exception
- * @throws \think\exception\PDOException
- */
- public function index()
- {
- $this->applyCsrfToken();
- $this->title = '商城参数配置';
- if ($this->request->isGet()) {
- $this->query = ExtendService::querySmsBalance();
- $this->fetch();
- } else {
- foreach ($this->request->post() as $k => $v) sysconf($k, $v);
- $this->success('商城参数配置保存成功!');
- }
- }
- /**
- * 商城短信配置
- * @throws \think\Exception
- * @throws \think\exception\PDOException
- */
- public function sms()
- {
- $this->applyCsrfToken();
- $this->title = '商城短信配置';
- if ($this->request->isGet()) {
- $this->query = ExtendService::querySmsBalance();
- $this->fetch();
- } else {
- foreach ($this->request->post() as $k => $v) sysconf($k, $v);
- $this->success('商城短信配置保存成功!');
- }
- }
- }
|