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

修改展商名录排序

... ... @@ -230,6 +230,7 @@ class AdminBusinessmanController extends AdminBaseController
$showModel = new ShowModel();
$list = $showModel
->where($map)
->order('sort desc')
->paginate(30);
$this->assign('list',$list);
... ... @@ -262,7 +263,7 @@ class AdminBusinessmanController extends AdminBaseController
}
$res = $showModel->save($param);
if($res){
$this->success('添加成功');
$this->success('添加成功','AdminBusinessman/aspirations');
}
}else{
return $this->fetch();
... ... @@ -293,7 +294,7 @@ class AdminBusinessmanController extends AdminBaseController
}
$res = $showModel->isUpdate(true)->save($param);
if($res){
$this->success('更新成功');
$this->success('更新成功','AdminBusinessman/aspirations');
}
}else{
$info = $showModel->where('id',$id)->find();
... ...
... ... @@ -81,7 +81,7 @@ class BusinessmanController extends HomeBaseController
//分类信息
$info = $cateModel->where('id',$cate_id)->find();
//列表信息
$list = $showModel->getList($cate_id,'',4);
$list = $showModel->getList($cate_id,'',4,'sort desc');
//分页样式
$page = $this->getPageStyle($list);
//增加阅读量
... ...
... ... @@ -29,6 +29,7 @@
<th>公司名称</th>
<th>姓名</th>
<th>职位</th>
<th>排序</th>
<th>创建时间</th>
<th width="120">操作</th>
</tr>
... ... @@ -39,6 +40,7 @@
<td>{$vo.title}</td>
<td>{$vo.name}</td>
<td>{$vo.post}</td>
<td>{$vo.sort}</td>
<td>{:date('Y-m-d H:i',$vo['update_time'])}</td>
<td>
<a href="{:url('AdminBusinessman/aspirations_detail',array('id'=>$vo['id']))}">{:lang('EDIT')}</a>
... ...
... ... @@ -61,6 +61,12 @@
placeholder="请填写心声"></textarea>
</td>
</tr>
<tr>
<th width="100">排序<span class="form-required">*</span></th>
<td>
<input class="form-control" type="number" name="sort" required value="1"/>
</td>
</tr>
</table>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
... ...
... ... @@ -61,6 +61,12 @@
placeholder="请填写心声">{$info.briefcontent}</textarea>
</td>
</tr>
<tr>
<th width="100">排序<span class="form-required">*</span></th>
<td>
<input class="form-control" type="number" name="sort" required value="{$info.sort}"/>
</td>
</tr>
</table>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
... ...