[更新]简化代码,优化结构

This commit is contained in:
邹景立 2017-04-21 17:27:50 +08:00
parent bcc5e57154
commit 80d634d881
2 changed files with 5 additions and 0 deletions

View File

@ -16,6 +16,7 @@ namespace app\admin\controller;
use controller\BasicAdmin;
use service\DataService;
use service\LogService;
/**
* 后台参数配置控制器
@ -48,6 +49,7 @@ class Config extends BasicAdmin {
foreach ($this->request->post() as $key => $vo) {
sysconf($key, $vo);
}
LogService::write('系统管理', '修改系统配置参数成功');
$this->success('数据修改成功!', '');
}
}

View File

@ -15,6 +15,7 @@ namespace app\wechat\controller;
use controller\BasicAdmin;
use service\DataService;
use service\LogService;
use service\PayService;
use think\Db;
use Wechat\WechatService;
@ -46,6 +47,7 @@ class Config extends BasicAdmin {
foreach ($this->request->post() as $key => $vo) {
sysconf($key, $vo);
}
LogService::write('微信管理', '修改微信接口参数成功');
$this->success('数据修改成功!', '');
}
@ -116,6 +118,7 @@ class Config extends BasicAdmin {
foreach ($data as $key => $vo) {
DataService::save($this->table, ['name' => $key, 'value' => $vo], 'name');
}
LogService::write('微信管理', '修改微信支付参数成功');
$this->success('数据修改成功!', '');
}
}