|
|
@@ -115,7 +115,7 @@ class Messages extends Base
|
|
|
}
|
|
|
|
|
|
//留言类型
|
|
|
- $type = db('messagetype')->select();
|
|
|
+ $type = db('messagetype')->where('status',1)->select();
|
|
|
$optiontype = '';
|
|
|
if(!empty($users)){
|
|
|
$option = '<option value="0">留言类型</option>';
|
|
|
@@ -264,10 +264,10 @@ class Messages extends Base
|
|
|
$limit = $param['pageSize'];
|
|
|
$offset = ($param['pageNumber'] - 1) * $limit;
|
|
|
|
|
|
- $where = [];
|
|
|
- if (strlen($param['searchText'])) {
|
|
|
- $where['account_name'] = $param['searchText'];
|
|
|
- }
|
|
|
+// $where = [];
|
|
|
+// if (strlen($param['searchText'])) {
|
|
|
+// $where['account_name'] = $param['searchText'];
|
|
|
+// }
|
|
|
|
|
|
$result = db('messagetype')->limit($offset, $limit)->select();
|
|
|
foreach($result as $key=>$vo){
|
|
|
@@ -312,7 +312,7 @@ class Messages extends Base
|
|
|
} catch (\Exception $e) {
|
|
|
return json(['code' => -2, 'data' => '', 'msg' => $e->getMessage()]);
|
|
|
}
|
|
|
- return json(['code' => 1, 'data' => '', 'msg' => '添加留言类型成功']);
|
|
|
+ return json(['code' => 1, 'data' => url('messages/type'), 'msg' => '添加留言类型成功']);
|
|
|
}
|
|
|
$this->assign([
|
|
|
'status' => config('kf_status')
|
|
|
@@ -340,7 +340,7 @@ class Messages extends Base
|
|
|
} catch (\Exception $e) {
|
|
|
return json(['code' => -2, 'data' => '', 'msg' => $e->getMessage()]);
|
|
|
}
|
|
|
- return json(['code' => 1, 'data' => '', 'msg' => '编辑留言类型成功']);
|
|
|
+ return json(['code' => 1, 'data' => url('messages/type'), 'msg' => '编辑留言类型成功']);
|
|
|
}
|
|
|
$type = db('messagetype')->where('id',$id)->find();
|
|
|
|