新增:官网->客服帮助->模糊搜索

master
chenxiaojun 5 years ago
parent 98392b21b8
commit 114b218b19

@ -8,105 +8,121 @@
// +----------------------------------------------------------------------
namespace Media\Controller;
use Admin\Model\GameModel;
/**
* 文档模型控制器
* 文档模型列表和详情
*/
class ServiceController extends BaseController {
class ServiceController extends BaseController
{
public function index($value=''){
$yidata=M('Kefuquestion')
public function index($value = '')
{
$yidata = M('Kefuquestion')
->field('title,titleurl')
->where(array('state'=>1,'title'=>array('neq','常见问题')))
->where(array('state' => 1, 'title' => array('neq', '常见问题')))
->group('title')
->select();
$erdata=M('Kefuquestion')
->where(array('state'=>1,'istitle'=>2,'title'=>'常见问题'))
$erdata = M('Kefuquestion')
->where(array('state' => 1, 'istitle' => 2, 'title' => '常见问题'))
->select();
$oftendata=M('Kefuquestion')
->where(array('state'=>1,'istitle'=>2,'title'=>array('eq','常见问题')))
$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->assign('oftendata', $oftendata);
$this->assign('yidata', $yidata);
$this->assign('erdata', $erdata);
$this->display();
}
public function detail(){
$yidata=M('Kefuquestion')
public function detail()
{
$yidata = M('Kefuquestion')
->field('title,titleurl')
->where(array('status'=>1,'istitle'=>1))
->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')
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')))
$title = M('Kefuquestion')
->where(array('titleurl' => I('kefu')))
->find();
$this->assign('title',$title);
$this->assign('title', $title);
}
$this->assign('yidata',$yidata);
$this->assign('erdata',$erdata);
$this->assign('yidata', $yidata);
$this->assign('erdata', $erdata);
$this->display();
}
public function uploadAvatar() {
public function uploadAvatar()
{
// 成功 $this->ajaxReturn(array('state'=>'SUCCESS','url'=>'图片地址'),C('DEFAULT_AJAX_RETURN'));
$this->ajaxReturn(array('state'=>'上传失败'),C('DEFAULT_AJAX_RETURN'));
$this->ajaxReturn(array('state' => '上传失败'), C('DEFAULT_AJAX_RETURN'));
}
public function sask() {
if(IS_POST) {
public function sask()
{
if (IS_POST) {
}
$this->display();
}
public function sask2() {
if(IS_POST) {
public function sask2()
{
if (IS_POST) {
}
$this->display();
}
public function sask3() {
if(IS_POST) {
public function sask3()
{
if (IS_POST) {
}
$this->display();
}
public function spwd($p=1) {
public function spwd($p = 1)
{
$this->display();
}
public function spay($p=1) {
public function spay($p = 1)
{
$this->display();
}
public function saccont($p=1) {
public function saccont($p = 1)
{
$this->display();
}
public function sgift($p=1) {
public function sgift($p = 1)
{
$this->display();
}
public function sother($p=1) {
public function sother($p = 1)
{
$this->display();
}

Loading…
Cancel
Save