From 114b218b196864c369272530c9e46a3d75527415 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Sat, 12 Oct 2019 17:55:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E5=AE=98=E7=BD=91->?= =?UTF-8?q?=E5=AE=A2=E6=9C=8D=E5=B8=AE=E5=8A=A9->=E6=A8=A1=E7=B3=8A?= =?UTF-8?q?=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/ServiceController.class.php | 206 ++++++++++-------- 1 file changed, 111 insertions(+), 95 deletions(-) diff --git a/Application/Media/Controller/ServiceController.class.php b/Application/Media/Controller/ServiceController.class.php index b783d66e1..9833b57d8 100644 --- a/Application/Media/Controller/ServiceController.class.php +++ b/Application/Media/Controller/ServiceController.class.php @@ -8,106 +8,122 @@ // +---------------------------------------------------------------------- namespace Media\Controller; + use Admin\Model\GameModel; /** * 文档模型控制器 * 文档模型列表和详情 */ -class ServiceController extends BaseController { - - public function index($value=''){ - $yidata=M('Kefuquestion') - ->field('title,titleurl') - ->where(array('state'=>1,'title'=>array('neq','常见问题'))) - ->group('title') - ->select(); - $erdata=M('Kefuquestion') - ->where(array('state'=>1,'istitle'=>2,'title'=>'常见问题')) - ->select(); - - $oftendata=M('Kefuquestion') - ->where(array('state'=>1,'istitle'=>2,'title'=>array('eq','常见问题'))) - ->select(); - $this->assign('oftendata',$oftendata); - $this->assign('yidata',$yidata); - $this->assign('erdata',$erdata); - $this->display(); - } - public function detail(){ - $yidata=M('Kefuquestion') - ->field('title,titleurl') - ->where(array('status'=>1,'istitle'=>1)) - ->group('title') - ->order('id asc') - ->select(); - if(I('kefu')!=''){ - $map1['status']=1; - $map1['istitle']=2; - $map1['titleurl']=I('kefu'); - if($_REQUEST['para']!=''){ - $map1['id']=$_REQUEST['para']; - } - $erdata=M('Kefuquestion') - ->where($map1) - ->order('sort desc') - ->select(); - $title=M('Kefuquestion') - ->where(array('titleurl'=>I('kefu'))) - ->find(); - $this->assign('title',$title); - } - $this->assign('yidata',$yidata); - $this->assign('erdata',$erdata); - $this->display(); - } - public function uploadAvatar() { - // 成功 $this->ajaxReturn(array('state'=>'SUCCESS','url'=>'图片地址'),C('DEFAULT_AJAX_RETURN')); - $this->ajaxReturn(array('state'=>'上传失败'),C('DEFAULT_AJAX_RETURN')); - } - - public function sask() { - if(IS_POST) { - - } - - $this->display(); - } - - public function sask2() { - if(IS_POST) { - - } - - $this->display(); - } - - public function sask3() { - if(IS_POST) { - - } - - $this->display(); - } - - public function spwd($p=1) { - $this->display(); - } - - public function spay($p=1) { - $this->display(); - } - - public function saccont($p=1) { - $this->display(); - } - - public function sgift($p=1) { - $this->display(); - } - - public function sother($p=1) { - $this->display(); - } +class ServiceController extends BaseController +{ + + public function index($value = '') + { + $yidata = M('Kefuquestion') + ->field('title,titleurl') + ->where(array('state' => 1, 'title' => array('neq', '常见问题'))) + ->group('title') + ->select(); + $erdata = M('Kefuquestion') + ->where(array('state' => 1, 'istitle' => 2, 'title' => '常见问题')) + ->select(); + + $oftendata = M('Kefuquestion') + ->where(array('state' => 1, 'istitle' => 2, 'title' => array('eq', '常见问题'))) + ->select(); + $this->assign('oftendata', $oftendata); + $this->assign('yidata', $yidata); + $this->assign('erdata', $erdata); + $this->display(); + } + + public function detail() + { + $yidata = M('Kefuquestion') + ->field('title,titleurl') + ->where(array('status' => 1, 'istitle' => 1)) + ->group('title') + ->order('id asc') + ->select(); + if (I('kefu') != '') { + $map1['status'] = 1; + $map1['istitle'] = 2; + $map1['titleurl'] = I('kefu'); + empty(I('get.search')) || $map1['zititle'] = ['like', '%' . I('get.search') . '%']; + if ($_REQUEST['para'] != '') { + $map1['id'] = $_REQUEST['para']; + } + $erdata = M('Kefuquestion') + ->where($map1) + ->order('sort desc') + ->select(); + $title = M('Kefuquestion') + ->where(array('titleurl' => I('kefu'))) + ->find(); + $this->assign('title', $title); + } + $this->assign('yidata', $yidata); + $this->assign('erdata', $erdata); + $this->display(); + } + + public function uploadAvatar() + { + // 成功 $this->ajaxReturn(array('state'=>'SUCCESS','url'=>'图片地址'),C('DEFAULT_AJAX_RETURN')); + $this->ajaxReturn(array('state' => '上传失败'), C('DEFAULT_AJAX_RETURN')); + } + + public function sask() + { + if (IS_POST) { + + } + + $this->display(); + } + + public function sask2() + { + if (IS_POST) { + + } + + $this->display(); + } + + public function sask3() + { + if (IS_POST) { + + } + + $this->display(); + } + + public function spwd($p = 1) + { + $this->display(); + } + + public function spay($p = 1) + { + $this->display(); + } + + public function saccont($p = 1) + { + $this->display(); + } + + public function sgift($p = 1) + { + $this->display(); + } + + public function sother($p = 1) + { + $this->display(); + } }