作者 jinglong
1 个管道 的构建 通过 耗费 7 秒

修改历届回顾

... ... @@ -328,6 +328,18 @@ class AdminExhibitionController extends AdminBaseController
}
}
//删除历届回顾
public function review_delete(){
$showModel = new ShowModel();
$id = $this->request->param('id','','intval');
$res = $showModel->where(['id'=>$id])->delete();
if($res){
$this->success('删除成功');
}else{
$this->error('删除失败');
}
}
/**
* 关于我们
* @adminMenu(
... ...
... ... @@ -62,15 +62,33 @@
<th><b>缩略图</b></th>
</tr>
<tr>
<!--<td>-->
<!--<div style="text-align: center;">-->
<!--<input type="hidden" name="thumb" id="thumbnail"-->
<!--value="{$info.thumb|default=''}">-->
<!--<a href="javascript:uploadOneImage('图片上传','#thumbnail');">-->
<!--<img src="{:cmf_get_image_preview_url($info.thumb)}"-->
<!--id="thumbnail-preview"-->
<!--width="135" style="cursor: pointer"/>-->
<!--</a>-->
<!--</div>-->
<!--</td>-->
<td>
<div style="text-align: center;">
<input type="hidden" name="thumb" id="thumbnail"
value="{$info.thumb|default=''}">
<a href="javascript:uploadOneImage('图片上传','#thumbnail');">
<img src="{:cmf_get_image_preview_url($info.thumb)}"
id="thumbnail-preview"
width="135" style="cursor: pointer"/>
<if condition="empty($info.thumb)">
<img src="__TMPL__/public/assets/images/default-thumbnail.png"
id="thumbnail-preview"
width="135" style="cursor: pointer"/>
<else/>
<img src="{:cmf_get_image_preview_url($info.thumb)}"
id="thumbnail-preview"
width="135" style="cursor: pointer"/>
</if>
</a>
<input type="button" class="btn btn-sm btn-cancel-thumbnail" value="取消图片">
</div>
</td>
</tr>
... ...
... ... @@ -32,6 +32,8 @@
<td>{:date('Y-m-d H:i',$vo['update_time'])}</td>
<td>
<a href="{:url('AdminExhibition/review_detail',array('id'=>$vo['id']))}">详情</a>
<a class="btn btn-xs btn-danger js-ajax-delete"
href="{:url('AdminExhibition/review_delete',array('id'=>$vo['id']))}">{:lang('DELETE')}</a>
</td>
</tr>
</foreach>
... ...