1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- <?php
- // +----------------------------------------------------------------------
- // | ThinkAdmin
- // +----------------------------------------------------------------------
- // | 版权所有 2014~2022 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
- // +----------------------------------------------------------------------
- // | 官方网站: https://thinkadmin.top
- // +----------------------------------------------------------------------
- // | 开源协议 ( https://mit-license.org )
- // | 免费声明 ( https://thinkadmin.top/disclaimer )
- // +----------------------------------------------------------------------
- // | gitee 代码仓库:https://gitee.com/zoujingli/ThinkAdmin
- // | github 代码仓库:https://github.com/zoujingli/ThinkAdmin
- // +----------------------------------------------------------------------
- namespace app\admin\controller;
- use app\data\model\DataFeedback;
- use app\data\model\DataPoolTalent;
- use app\data\model\DataTeachingKnowledge;
- use app\data\model\DataZhicheng;
- use Carbon\Carbon;
- use think\admin\Controller;
- use app\data\model\SystemUser;
- use think\Db;
- use think\db\Query;
- /**
- * 商家反馈列表
- * Class Shopfeedback
- * @package app\admin\controller
- */
- class Shopfeedback extends Controller
- {
- /**
- * 用户反馈列表
- * @auth true
- * @menu true
- */
- public function index(){
- $this->title='商家反馈列表';
- $phone=input('phone');
- \app\data\model\ShopFeedback::mQuery()
- ->when($phone,function (Query $query) use ($phone) {
- $query->hasWhere('user',function (Query $query) use ($phone) {
- $query->whereLike('username',"%{$phone}%");
- });
- })
- ->like('content')
- ->where('is_del',1)
- ->with(['user'])
- ->order('id','desc')
- ->layTable();
- }
- protected function _index_page_filter(&$data)
- {
- foreach ($data as &$v){
- $v['imgs'] = array_filter(explode(',',$v['image']));
- }
- // dump($data);die;
- }
- /**
- * 回复
- * @auth true
- * @menu true
- */
- public function reply(){
- \app\data\model\ShopFeedback::mForm('form');
- }
- public function _form_filter($vo){
- if ($this->request->isGet()) {
- }elseif ($this->request->isPost()){
- \app\data\model\ShopFeedback::mk()->where('id',$vo['id'])->update(['status'=>2,'reply'=>$vo['content'],'reply_time'=>date('Y-m-d H:i:s')]);
- $this->success('回复成功');
- }
- }
- /**
- * 删除
- * @auth true
- * @menu true
- */
- public function del($id){
- \app\data\model\ShopFeedback::whereIn('id',$id)->save([
- 'is_del'=>0,
- ]);
- $this->success('删除成功');
- }
- }
|