added 测试版本,和admin.our-dream.cn同步

This commit is contained in:
zhaoxiang 2016-11-28 10:27:50 +08:00
parent 402dd11095
commit 1962bd23c0
2 changed files with 4 additions and 0 deletions

View File

@ -196,6 +196,7 @@ class Menu extends Base {
public function add(){
if( $this->request->isPost() ){
$this->error('体验版本,关键数据,请勿操作', '');
$menuModel = new \app\admin\model\Menu();
$result = $menuModel->allowField(true)->validate(
[
@ -345,6 +346,7 @@ class Menu extends Base {
public function edit(){
if( $this->request->isPut() ){
$this->error('体验版本,关键数据,请勿操作', '');
$data = $this->request->put();
$validate = new Validate([
'name' => 'require',
@ -503,6 +505,7 @@ class Menu extends Base {
}
public function del(){
$this->error('体验版本,关键数据,请勿操作', '');
if( $this->request->isDelete() ){
$key = $this->request->delete($this->primaryKey);
$childNum = \app\admin\model\Menu::where(['fid' => $key])->count();

View File

@ -303,6 +303,7 @@ class User extends Base {
$userModel = new \app\admin\model\User();
$userDetail = $userModel->where([$this->primaryKey => $this->uid])->find();
if( !empty($this->request->put('password')) ){
$this->error('体验版本,关键数据,请勿操作', '');
$userDetail->password = $this->request->put('password');
}
$userDetail->nickname = $this->request->put('nickname');