正在显示
2 个修改的文件
包含
65 行增加
和
11 行删除
@@ -44,13 +44,15 @@ class AdminMessageController extends AdminBaseController | @@ -44,13 +44,15 @@ class AdminMessageController extends AdminBaseController | ||
44 | public function index() | 44 | public function index() |
45 | { | 45 | { |
46 | //数据提取 | 46 | //数据提取 |
47 | - $data=Db::name('warning') | ||
48 | - ->alias('w') | ||
49 | - ->join('light l','w.light_id=l.id') | 47 | + $data=Db::name('message') |
48 | + ->alias('m') | ||
49 | + ->join('message_category mc','m.category_id=mc.id') | ||
50 | + ->join('light_order lo','m.order_id=lo.id') | ||
51 | + ->join('light l','lo.light_id=l.id') | ||
50 | ->join('temple t','l.temple_id=t.id') | 52 | ->join('temple t','l.temple_id=t.id') |
51 | ->join('temple_area ta','l.area_id=ta.id') | 53 | ->join('temple_area ta','l.area_id=ta.id') |
52 | - ->field('w.*,l.row,l.column,l.address,l.temple_id,l.number,t.name as tname ,ta.name as taname,w.status as wstatus') | ||
53 | - ->order('w.create_time','desc') | 54 | + ->field('m.*,mc.*,l.row,l.column,l.address,l.temple_id,l.number,t.name as tname ,ta.name as taname') |
55 | + ->order('m.create_time','desc') | ||
54 | ->paginate(10); | 56 | ->paginate(10); |
55 | //向地址传参 | 57 | //向地址传参 |
56 | $this->assign('page',$data->render()); | 58 | $this->assign('page',$data->render()); |
@@ -66,6 +68,38 @@ class AdminMessageController extends AdminBaseController | @@ -66,6 +68,38 @@ class AdminMessageController extends AdminBaseController | ||
66 | return $this->fetch(); | 68 | return $this->fetch(); |
67 | } | 69 | } |
68 | 70 | ||
71 | + /** | ||
72 | + * 编辑消息 | ||
73 | + * @adminMenu( | ||
74 | + * 'name' => '编辑消息', | ||
75 | + * 'parent' => 'index', | ||
76 | + * 'display'=> false, | ||
77 | + * 'hasView'=> true, | ||
78 | + * 'order' => 10000, | ||
79 | + * 'icon' => '', | ||
80 | + * 'remark' => '编辑消息', | ||
81 | + * 'param' => '' | ||
82 | + * ) | ||
83 | + */ | ||
84 | + public function edit(){ | ||
85 | + | ||
86 | + } | ||
87 | + /** | ||
88 | + * 编辑消息提交 | ||
89 | + * @adminMenu( | ||
90 | + * 'name' => '编辑消息提交', | ||
91 | + * 'parent' => 'index', | ||
92 | + * 'display'=> false, | ||
93 | + * 'hasView'=> false, | ||
94 | + * 'order' => 10000, | ||
95 | + * 'icon' => '', | ||
96 | + * 'remark' => '编辑消息提交', | ||
97 | + * 'param' => '' | ||
98 | + * ) | ||
99 | + */ | ||
100 | + public function editPost(){ | ||
101 | + | ||
102 | + } | ||
69 | 103 | ||
70 | /** | 104 | /** |
71 | * 删除系统消息 | 105 | * 删除系统消息 |
@@ -27,10 +27,16 @@ | @@ -27,10 +27,16 @@ | ||
27 | <input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"> | 27 | <input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"> |
28 | </label> | 28 | </label> |
29 | </th> | 29 | </th> |
30 | - | ||
31 | <th width="50">ID</th> | 30 | <th width="50">ID</th> |
32 | - <th>消息类型</th> | 31 | + <th>时间</th> |
33 | <th>消息标题</th> | 32 | <th>消息标题</th> |
33 | + <th>接受用户姓名</th> | ||
34 | + <th>手机号</th> | ||
35 | + <th>设备ID</th> | ||
36 | + <th>设备位置</th> | ||
37 | + <th>所属地区</th> | ||
38 | + <th>所属寺庙</th> | ||
39 | + <th>设备到期时间</th> | ||
34 | <th>消息内容</th> | 40 | <th>消息内容</th> |
35 | <th>操作</th> | 41 | <th>操作</th> |
36 | </tr> | 42 | </tr> |
@@ -43,11 +49,18 @@ | @@ -43,11 +49,18 @@ | ||
43 | value="{$vo.id}" title="ID:{$vo.id}"> | 49 | value="{$vo.id}" title="ID:{$vo.id}"> |
44 | </td> | 50 | </td> |
45 | <td>{$vo.id}</td> | 51 | <td>{$vo.id}</td> |
46 | - <td>{$vo.category}</td> | 52 | + <td>{:date('Y-m-d H:i:s',$vo.create_time);}</td> |
47 | <td>{$vo.title}</td> | 53 | <td>{$vo.title}</td> |
54 | + <td>{$vo.user_name}</td> | ||
55 | + <td>{$vo.mobile}</td> | ||
56 | + <td>{$vo.number}</td> | ||
57 | + <td>{$vo.row}行{$vo.column}列</td> | ||
58 | + <td>{$vo.address}</td> | ||
59 | + <td>{$vo.tname}</td> | ||
60 | + <td>{:date('Y-m-d H:i:s',$vo.end_time);}</td> | ||
48 | <td>{$vo.content}</td> | 61 | <td>{$vo.content}</td> |
49 | <td> | 62 | <td> |
50 | - <a href="{:url('AdminWarning/delete',array('id'=>$vo['id']))}"> | 63 | + <a href="{:url('AdminMessage/delete',array('id'=>$vo['id']))}"> |
51 | {:lang('DELETE')} | 64 | {:lang('DELETE')} |
52 | </a> | 65 | </a> |
53 | </td> | 66 | </td> |
@@ -59,8 +72,15 @@ | @@ -59,8 +72,15 @@ | ||
59 | <th width="15"><label><input type="checkbox" class="js-check-all" data-direction="x" | 72 | <th width="15"><label><input type="checkbox" class="js-check-all" data-direction="x" |
60 | data-checklist="js-check-x"></label></th> | 73 | data-checklist="js-check-x"></label></th> |
61 | <th width="50">ID</th> | 74 | <th width="50">ID</th> |
62 | - <th>消息类型</th> | 75 | + <th>时间</th> |
63 | <th>消息标题</th> | 76 | <th>消息标题</th> |
77 | + <th>接受用户姓名</th> | ||
78 | + <th>手机号</th> | ||
79 | + <th>设备ID</th> | ||
80 | + <th>设备位置</th> | ||
81 | + <th>所属地区</th> | ||
82 | + <th>所属寺庙</th> | ||
83 | + <th>设备到期时间</th> | ||
64 | <th>消息内容</th> | 84 | <th>消息内容</th> |
65 | <th>操作</th> | 85 | <th>操作</th> |
66 | </tr> | 86 | </tr> |
@@ -69,7 +89,7 @@ | @@ -69,7 +89,7 @@ | ||
69 | <div class="table-actions"> | 89 | <div class="table-actions"> |
70 | <!--<button type="submit" class="btn btn-primary btn-sm js-ajax-submit">{:lang('SORT')}</button>--> | 90 | <!--<button type="submit" class="btn btn-primary btn-sm js-ajax-submit">{:lang('SORT')}</button>--> |
71 | <button class="btn btn-danger btn-sm js-ajax-submit" type="submit" | 91 | <button class="btn btn-danger btn-sm js-ajax-submit" type="submit" |
72 | - data-action="{:url('AdminWarning/delete')}" data-subcheck="true" data-msg="您确定删除吗?"> | 92 | + data-action="{:url('AdminMessage/delete')}" data-subcheck="true" data-msg="您确定删除吗?"> |
73 | {:lang('DELETE')} | 93 | {:lang('DELETE')} |
74 | </button> | 94 | </button> |
75 | </div> | 95 | </div> |
-
请 注册 或 登录 后发表评论