Jimy 6 年之前
父節點
當前提交
8b91471071

+ 0 - 4
application/admin/controller/Admingroup.php

@@ -226,10 +226,6 @@ class Admingroup extends AdminControl
                 array('name' => lang('ds_ckmessage'), 'action' => "reply", 'controller' => 'Message'),
                 array('name' => lang('ds_dlmessage'), 'action' => "del", 'controller' => 'Message'),
             )),
-            array('name' => lang('ds_kfchat'), 'child' => array(
-                array('name' => lang('ds_kfchat'), 'action' => null, 'controller' => 'Service'),
-                array('name' => lang('ds_kfchat'), 'action' => "index", 'controller' => 'Service'),
-            )),//对话平台
         );
 
         return $_limit;

+ 11 - 7
application/admin/controller/Config.php

@@ -26,13 +26,17 @@ class Config extends AdminControl {
             return $this->fetch();
         } else {
             $update_array = array();
-            $update_array['cache_open'] = isset($_POST['cache_open']) ? '1' : '';
-            $update_array['guest_comment'] = isset($_POST['guest_comment']) ? '1' : '';
-            $update_array['words_open'] = isset($_POST['words_open']) ? '1' : '';
-            $update_array['img_open'] = isset($_POST['img_open']) ? '1' : '';
-            $update_array['voice_open'] = isset($_POST['voice_open']) ? '1' : '';
-            $update_array['video_open'] = isset($_POST['video_open']) ? '1' : '';
-            $update_array['look_open'] = isset($_POST['look_open']) ? '1' : '';
+            // $update_array['cache_open'] = isset($_POST['cache_open']) ? '1' : '';
+            // $update_array['guest_comment'] = isset($_POST['guest_comment']) ? '1' : '';
+            // $update_array['words_open'] = isset($_POST['words_open']) ? '1' : '';
+            // $update_array['img_open'] = isset($_POST['img_open']) ? '1' : '';
+            // $update_array['voice_open'] = isset($_POST['voice_open']) ? '1' : '';
+            // $update_array['video_open'] = isset($_POST['video_open']) ? '1' : '';
+            $update_array['site_state'] = isset($_POST['site_state']) ? '1' : '';
+            $update_array['site_name'] = $_POST['site_name'];
+            $update_array['icp_number'] = $_POST['icp_number'];
+            $update_array['site_phone'] = $_POST['site_phone'];
+            $update_array['flow_static_code'] = $_POST['flow_static_code'];
             
             $result = $model_config->updateConfig($update_array);
             if ($result === true) {

+ 1 - 1
application/admin/controller/Member.php

@@ -70,7 +70,7 @@ class Member extends AdminControl
             $result = $model_member->addMember($data);
 
             if ($result) {
-                $cjglz =array('wlcome','wlcome.index','config','config.index','config.add','config.edit','config.del','admin','admin.index','admin.add','admin.edit','admin.del','admingroup','admingroup.index','admingroup.add','admingroup.edit','admingroup.del','product','product.index','product.add','product.edit','product.del','news','news.index','news.add','news.edit','news.del','message','message.index','message.reply','message.del','service','service.index','Visitkf','Visitkf.index','glservice','glservice.index');
+                $cjglz =array('wlcome','wlcome.index','config','config.index','config.add','config.edit','config.del','admin','admin.index','admin.add','admin.edit','admin.del','admingroup','admingroup.index','admingroup.add','admingroup.edit','admingroup.del','product','product.index','product.add','product.edit','product.del','news','news.index','news.add','news.edit','news.del','message','message.index','message.reply','message.del','Visitkf','Visitkf.index','glservice','glservice.index');
                 $limit_str = '';
                 if (is_array($cjglz)) {
                     $limit_str = implode('|', $cjglz);

+ 0 - 193
application/admin/controller/Service.php

@@ -1,193 +0,0 @@
-<?php
-/**
- * 客服
- * Date: 2019年1月9日
- * Time: 下午4:26:19
- */
-namespace app\admin\controller;
-
-use BM\Unit\Pusher;
-use BM\Model\Chat;
-use BM\Model\ChatList;
-use BM\Model\ChatMessage;
-use BM\Model\Reply;
-use app\common\model\Admin;
-
-class Service extends AdminControl
-{
-    
-    /**
-    * @客服聊天界面
-    */
-    public function index()
-    {
-        //通讯节点
-        $node_info = [
-            'address' => !empty(config('GATEWAY_NODE')) ? config('GATEWAY_NODE') : '',
-        ];
-        
-        //第三方平台信息
-        $site_info = [
-            'code' => 'kf_100001_1234566121',
-        ];
-        
-        //当前聊天列表
-        $res       = ChatList::instance()->getChatList(['sid' => $this->admin_info['admin_id']]);
-        $chat_list = $res['status'] == 1 ? $res['data'] : [];
-        
-        //客服常用语
-        $where  = [
-            'reply_company' => $this->admin_info['admin_pid'],
-            'reply_type'    => 3,
-            'reply_status'  => 1,
-            '_fields_'      => [
-                'reply_content'
-            ],
-        ];
-        $replys = Reply::instance()->lists($where);
-        
-        $data = [
-            'node'      => $node_info,
-            'site'      => $site_info,
-            'chat_list' => $chat_list,
-            'replys'    => $replys,
-        ];
-        
-        $this->assign('data', $data);
-        
-        return $this->fetch();
-    }
-    
-    /**
-    * @绑定客服
-    */
-    public function bind()
-    {
-        $client_id  = !empty($this->request->param('client_id')) ? $this->request->param('client_id') : '';
-        
-        if (empty($client_id)) {
-            return ['status' => 0, 'msg' => 'error[expect client_id]'];
-        }
-        
-        //绑定
-        Pusher::instance()->bindUid($client_id, $this->admin_info['admin_id']);
-        
-        return [
-            'status' => 200,
-            'msg'    => 'success'
-        ];
-    }
-    
-    /**
-    * @聊天
-    */
-    public function chat()
-    {
-        $to_id  = !empty($this->request->param('to_id')) ? $this->request->param('to_id') : '';
-        $content= !empty($this->request->param('content')) ? $this->request->param('content') : '';
-        $type   = !empty($this->request->param('type')) ? intval($this->request->param('type')) : ChatMessage::MESSAGE_TYPE_NORMAL;
-        
-        //获取聊天
-        $chat    = ChatList::instance()->info(['sid' => $this->admin_info['admin_id'], 'vid' => $to_id, '_fields_' => 'log_id']);
-        
-        if (empty($chat)) {
-            return ['status' => 0, 'msg' => 'fail["chat data not exist"]'];
-        }
-        
-        $param   = [
-            'log_id'  => $chat['log_id'],
-            'uid'     => $this->admin_info['admin_pid'],
-            'to_id'   => $to_id,//发送客户端
-            'from_id' => $this->admin_info['admin_id'],//来源客户端
-            'type'    => $type,//消息类型
-            'content' => $content,//内容
-        ];
-        
-        $res = Chat::instance()->sendMessage($param);
-        
-        if ($res['status'] != 1) {
-            return $res;
-        }
-        
-        return [
-            'status' => 200,
-            'msg'    => 'success'
-        ];
-    }
-    
-    /**
-    * @消息记录
-    */
-    public function messageLog()
-    {
-        $to_id      = !empty($this->request->param('to_id')) ? $this->request->param('to_id') : '';
-        $page       = !empty($this->request->param('page')) ? intval($this->request->param('page')) : 1;
-        $page_size  = 50;
-        
-        if (empty($to_id)) {
-            return [
-                'status' => 0,
-                'msg'    => '获取消息记录失败[无用户信息]',
-            ];
-        }
-        
-        $param = [
-            'sid'       => $this->admin_info['admin_id'],
-            'vid'       => $to_id,
-            'page'      => $page,
-            'page_size' => $page_size,
-        ];
-        
-        $res = ChatMessage::instance()->messageLog($param);
-        
-        if ($res['status'] != 1) {
-            return $res;
-        }
-        
-        return [
-            'status' => 200,
-            'msg'    => 'success',
-            'data'   => $res['data'],
-        ];
-    }
-    
-    /**
-    * @删除访问列表
-    */
-    public function delChatList()
-    {
-        $to_id      = !empty($this->request->param('to_id')) ? $this->request->param('to_id') : '';
-        
-        if (empty($to_id)) {
-            return [
-                'status' => 0,
-                'msg'    => 'fail[expect to_id]'
-            ];
-        }
-        
-        $where = [
-            'sid' => $this->admin_info['admin_id'],
-            'vid' => $to_id,
-        ];
-        
-        ChatList::instance()->del($where);
-        
-        //断开连接
-        $client_lists = Pusher::instance()->getClientIdByUid($to_id);
-        
-        $message = [
-            'method' => 'delVisitor',
-            'data'   => [
-                'time' => date('Y-m-d H:i:s'),
-            ],
-        ];
-        foreach ($client_lists as $item) {
-            Pusher::instance()->closeClient($item, json_encode($message));
-        }
-        
-        return [
-            'status' => 200,
-            'msg'    => 'success'
-        ];
-    }
-}

+ 0 - 1
application/admin/lang/zh-cn.php

@@ -117,7 +117,6 @@ $lang['ds_glmessage'] = '留言列表';
 $lang['ds_ckmessage'] = '留言查看';
 $lang['ds_dlmessage'] = '留言删除';
 $lang['ds_feedback'] = '网站反馈';
-$lang['ds_service'] = '客服聊天';
 $lang['ds_records'] = '历史记录';
 $lang['ds_glrecords'] = '历史列表';
 $lang['ds_gllink'] = '链接列表';

+ 1 - 1
application/admin/lang/zh-cn/config.lang.php

@@ -1,6 +1,6 @@
 <?php
 
-$lang['site_set'] = '前台设置';
+$lang['site_set'] = '网站设置';
 $lang['anti_irrigation_set'] = '网站防灌水';
 $lang['seo_set'] = 'seo设置';
 $lang['site_name'] = '网站名称';

+ 32 - 8
application/admin/view/config/index.html

@@ -6,7 +6,7 @@
         {include file="layout/admin_items" /}
         <div class="layui-tab-content page-tab-content">
             <div class="layui-tab-item layui-show ">
-                <div class="layui-form-item">
+                <!-- <div class="layui-form-item">
                     <label class="layui-form-label">{$Think.lang.cache_open}</label>
                     <div class="layui-input-block">
                         <input type="checkbox" name="cache_open" lay-skin="switch" lay-text="是|否" value="1" {if
@@ -20,7 +20,6 @@
                                condition="$list_config.guest_comment eq '1'" }checked{/if}>
                     </div>
                 </div>
-                <!-- //////////////////// -->
                 <div class="layui-form-item">
                     <label class="layui-form-label">{$Think.lang.words_open}</label>
                     <div class="layui-input-block">
@@ -43,17 +42,42 @@
                     </div>
                 </div>
                 <div class="layui-form-item">
-                    <label class="layui-form-label">{$Think.lang.video_open}</label>
+                    <label class="layui-form-label">{$Think.lang.site_name}</label>
                     <div class="layui-input-block">
-                        <input type="checkbox" name="video_open" lay-skin="switch" lay-text="是|否" value="1" {if
-                               condition="$list_config.video_open eq '1'" }checked{/if}>
+                        <input type="test" name="video_open" lay-skin="switch"  value="1" >
+                    </div>
+                </div> -->
+
+                <div class="layui-form-item">
+                    <label class="layui-form-label">{$Think.lang.site_name}</label>
+                    <div class="layui-input-inline">
+                        <input type="text" class="layui-input field-name" name="site_name" id="site_name" value="{$list_config.site_name|default=''}" lay-verify="" autocomplete="off" placeholder="{$Think.lang.ds_please_enter}{$Think.lang.site_name}" required />
+                    </div>
+                </div>
+                <div class="layui-form-item">
+                    <label class="layui-form-label">{$Think.lang.icp_number}</label>
+                    <div class="layui-input-inline">
+                        <input type="text" class="layui-input field-name" name="icp_number" id="icp_number" value="{$list_config.icp_number|default=''}" lay-verify="" autocomplete="off" placeholder="{$Think.lang.ds_please_enter}{$Think.lang.icp_number}" required />
                     </div>
                 </div>
                 <div class="layui-form-item">
-                    <label class="layui-form-label">{$Think.lang.look_open}</label>
+                    <label class="layui-form-label">{$Think.lang.site_phone}</label>
+                    <div class="layui-input-inline">
+                        <input type="text" class="layui-input field-name" name="site_phone" id="site_phone" value="{$list_config.site_phone|default=''}" lay-verify="" autocomplete="off" placeholder="{$Think.lang.ds_please_enter}{$Think.lang.site_phone}" required />
+                    </div>
+                </div>site_logowx
+                <div class="layui-form-item">
+                    <label class="layui-form-label">{$Think.lang.flow_static_code}</label>
+                    <div class="layui-input-inline">
+                        <input type="text" class="layui-input field-name" name="flow_static_code" id="flow_static_code" value="{$list_config.flow_static_code|default=''}" lay-verify="" autocomplete="off" placeholder="{$Think.lang.ds_please_enter}{$Think.lang.flow_static_code}" required />
+                    </div>
+                </div>
+
+                <div class="layui-form-item">
+                    <label class="layui-form-label">{$Think.lang.site_state}</label>
                     <div class="layui-input-block">
-                        <input type="checkbox" name="look_open" lay-skin="switch" lay-text="是|否" value="1" {if
-                               condition="$list_config.look_open eq '1'" }checked{/if}>
+                        <input type="checkbox" name="site_state" lay-skin="switch" lay-text="开启|关闭" value="1" {if
+                               condition="$list_config.site_state eq '1'" }checked{/if}>
                     </div>
                 </div>
                 <div class="layui-form-item">

文件差異過大導致無法顯示
+ 0 - 71
application/admin/view/service/index.html


+ 0 - 14
application/admin/view/service/upload.html

@@ -1,14 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="UTF-8">
-<title>Insert title here</title>
-</head>
-<body>
-    <form action="{:url('upload/upfile')}" method="post" enctype="multipart/form-data">
-        <input type='file' name='image'/>
-        <input type='hidden' name='type' value='image'/>
-        <input type='submit' value='提交'/>
-    </form>
-</body>
-</html>

部分文件因文件數量過多而無法顯示