mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
[更新]修改粉丝标签模块
This commit is contained in:
parent
8637a53090
commit
b7982c5db0
@ -28,6 +28,7 @@ Think.Admin
|
|||||||
```
|
```
|
||||||
<IfModule mod_rewrite.c>
|
<IfModule mod_rewrite.c>
|
||||||
Options +FollowSymlinks -Multiviews
|
Options +FollowSymlinks -Multiviews
|
||||||
|
|
||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
@ -101,8 +101,6 @@ class Menu extends BasicAdmin {
|
|||||||
}
|
}
|
||||||
$this->assign('nodes', array_column($nodes, 'node'));
|
$this->assign('nodes', array_column($nodes, 'node'));
|
||||||
$this->assign('menus', $menus);
|
$this->assign('menus', $menus);
|
||||||
} else {
|
|
||||||
$this->error('请不要改菜单构造!');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,6 +58,15 @@ class Tags extends BasicAdmin {
|
|||||||
if ($this->request->isGet()) {
|
if ($this->request->isGet()) {
|
||||||
return parent::_form($this->table, 'form', 'id');
|
return parent::_form($this->table, 'form', 'id');
|
||||||
}
|
}
|
||||||
|
$name = $this->request->post('name', '');
|
||||||
|
empty($name) && $this->error('粉丝标签名不能为空!');
|
||||||
|
if (Db::name($this->table)->where('name', $name)->count() > 0) {
|
||||||
|
$this->error('粉丝标签标签名已经存在,请使用其它标签名!');
|
||||||
|
}
|
||||||
|
$result = DataService::save($this->table, ['name' => $name, 'count' => 0]);
|
||||||
|
empty($result) && $this->error('粉丝标签添加失败,请稍候再试!');
|
||||||
|
$info = Db::name($this->table)->where('name', $name)->find();
|
||||||
|
empty($info) && $this->error('粉丝标签添加失败,请稍候再试!');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user