You've already forked guangan
文章
This commit is contained in:
@ -9,7 +9,7 @@ class Article extends Controller
|
||||
{
|
||||
public function index() {
|
||||
$categoryId = $this->request->get('cid');
|
||||
$query = CmsArticle::mk()->where('status', 1);
|
||||
$query = CmsArticle::mk()->where('status', 1)->where('is_deleted', 0);
|
||||
if (is_numeric($categoryId)) {
|
||||
$query->hasWhere('cateids', function ($subQuery) use ($categoryId) {
|
||||
$subQuery->where('cid', $categoryId);
|
||||
@ -21,7 +21,7 @@ class Article extends Controller
|
||||
|
||||
public function info() {
|
||||
$id = $this->request->get('id');
|
||||
$article = CmsArticle::mk()->where('id', $id)->find();
|
||||
$article = CmsArticle::mk()->where('id', $id)->where('is_deleted', 0)->find();
|
||||
if (empty($article)) {
|
||||
$this->error('文章不存在');
|
||||
}
|
||||
|
@ -21,7 +21,7 @@
|
||||
<select name="status">
|
||||
<option value="">请选择</option>
|
||||
<option value="1" {if input('get.status')==1}selected{/if}>启用</option>
|
||||
<option value="0" {if input('get.status')==0}selected{/if}>禁用</option>
|
||||
<option value="0" {if input('get.status', -1)==0}selected{/if}>禁用</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user