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

修改历届回顾

@@ -328,6 +328,18 @@ class AdminExhibitionController extends AdminBaseController @@ -328,6 +328,18 @@ class AdminExhibitionController extends AdminBaseController
328 } 328 }
329 } 329 }
330 330
  331 + //删除历届回顾
  332 + public function review_delete(){
  333 + $showModel = new ShowModel();
  334 + $id = $this->request->param('id','','intval');
  335 + $res = $showModel->where(['id'=>$id])->delete();
  336 + if($res){
  337 + $this->success('删除成功');
  338 + }else{
  339 + $this->error('删除失败');
  340 + }
  341 + }
  342 +
331 /** 343 /**
332 * 关于我们 344 * 关于我们
333 * @adminMenu( 345 * @adminMenu(
@@ -62,15 +62,33 @@ @@ -62,15 +62,33 @@
62 <th><b>缩略图</b></th> 62 <th><b>缩略图</b></th>
63 </tr> 63 </tr>
64 <tr> 64 <tr>
  65 + <!--<td>-->
  66 + <!--<div style="text-align: center;">-->
  67 + <!--<input type="hidden" name="thumb" id="thumbnail"-->
  68 + <!--value="{$info.thumb|default=''}">-->
  69 + <!--<a href="javascript:uploadOneImage('图片上传','#thumbnail');">-->
  70 + <!--<img src="{:cmf_get_image_preview_url($info.thumb)}"-->
  71 + <!--id="thumbnail-preview"-->
  72 + <!--width="135" style="cursor: pointer"/>-->
  73 + <!--</a>-->
  74 + <!--</div>-->
  75 + <!--</td>-->
65 <td> 76 <td>
66 <div style="text-align: center;"> 77 <div style="text-align: center;">
67 <input type="hidden" name="thumb" id="thumbnail" 78 <input type="hidden" name="thumb" id="thumbnail"
68 value="{$info.thumb|default=''}"> 79 value="{$info.thumb|default=''}">
69 <a href="javascript:uploadOneImage('图片上传','#thumbnail');"> 80 <a href="javascript:uploadOneImage('图片上传','#thumbnail');">
  81 + <if condition="empty($info.thumb)">
  82 + <img src="__TMPL__/public/assets/images/default-thumbnail.png"
  83 + id="thumbnail-preview"
  84 + width="135" style="cursor: pointer"/>
  85 + <else/>
70 <img src="{:cmf_get_image_preview_url($info.thumb)}" 86 <img src="{:cmf_get_image_preview_url($info.thumb)}"
71 id="thumbnail-preview" 87 id="thumbnail-preview"
72 width="135" style="cursor: pointer"/> 88 width="135" style="cursor: pointer"/>
  89 + </if>
73 </a> 90 </a>
  91 + <input type="button" class="btn btn-sm btn-cancel-thumbnail" value="取消图片">
74 </div> 92 </div>
75 </td> 93 </td>
76 </tr> 94 </tr>
@@ -32,6 +32,8 @@ @@ -32,6 +32,8 @@
32 <td>{:date('Y-m-d H:i',$vo['update_time'])}</td> 32 <td>{:date('Y-m-d H:i',$vo['update_time'])}</td>
33 <td> 33 <td>
34 <a href="{:url('AdminExhibition/review_detail',array('id'=>$vo['id']))}">详情</a> 34 <a href="{:url('AdminExhibition/review_detail',array('id'=>$vo['id']))}">详情</a>
  35 + <a class="btn btn-xs btn-danger js-ajax-delete"
  36 + href="{:url('AdminExhibition/review_delete',array('id'=>$vo['id']))}">{:lang('DELETE')}</a>
35 </td> 37 </td>
36 </tr> 38 </tr>
37 </foreach> 39 </foreach>