1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- namespace app\index\controller\kefu;
- use think\exception\ValidateException;
- use app\model\kefu\Seating;
- class SeatingController extends Base
- {
- function index()
- {
- $where['status'] = 1;
- $field = 'id,title,chatid,touxiang,status,px';
- $query = Seating::where($where);
- $res = $query->field($field)
- ->order('id desc')
- ->select()
- ->toArray();
- $data['data'] = $res;
- return $this->json($data);
- }
- function listbygroups()
- {
- $res = Seating::getlistbygroups();
- $data['data'] = $res;
- return $this->json($data);
- }
- }
|