管理后台->游戏管理->合作方管理->新增批量删除

master
chenxiaojun 5 years ago
parent 41d45995b0
commit 0963c69f4d

@ -173,10 +173,14 @@ class PartnerController extends ThinkController
//删除 //删除
public function del() public function del()
{ {
if ($_POST['ids']) {
$id = implode(',', $_POST['ids']);
} else {
$id = intval(I('get.id', 0)); $id = intval(I('get.id', 0));
if ($id == 0) { if ($id == 0) {
$this->error('参数异常'); $this->error('参数异常');
} }
}
$res = M($this->modelName, 'tab_')->delete($id); $res = M($this->modelName, 'tab_')->delete($id);
if ($res === false) { if ($res === false) {

@ -39,7 +39,7 @@
<div class="fl button_list"> <div class="fl button_list">
<div class="tools"> <div class="tools">
<a class="" href="{:U('add')}"><span class="button_icon button_icon1"></span>新增</a> <a class="" href="{:U('add')}"><span class="button_icon button_icon1"></span>新增</a>
<!-- <a class="ajax-post confirm " target-form="ids" url="{:U('del')}"><span class="button_icon button_icon2"></span>删除</a>--> <a class="ajax-post confirm " target-form="ids" url="{:U('del')}"><span class="button_icon button_icon2"></span>删除</a>
</div> </div>
</div> </div>
<!-- <div class="jssearch fl cf search_list" >--> <!-- <div class="jssearch fl cf search_list" >-->
@ -68,9 +68,9 @@
<!-- 表头 --> <!-- 表头 -->
<thead> <thead>
<tr> <tr>
<!-- <th>--> <th>
<!-- <input class="check-all" type="checkbox">--> <input class="check-all" type="checkbox">
<!-- </th>--> </th>
<th>合作方</th> <th>合作方</th>
<th>显示状态</th> <th>显示状态</th>
<th>添加人</th> <th>添加人</th>
@ -86,7 +86,7 @@
<else /> <else />
<volist name="listData" id="data"> <volist name="listData" id="data">
<tr> <tr>
<!-- <td><input class="ids" type="checkbox" value="{$data['id']}" name="ids[]"></td>--> <td><input class="ids" type="checkbox" value="{$data['id']}" name="ids[]"></td>
<td>{$data.partner}</td> <td>{$data.partner}</td>
<td>{$data.status}</td> <td>{$data.status}</td>
<td>{$data.nickname}</td> <td>{$data.nickname}</td>

Loading…
Cancel
Save