Jonlin 6 년 전
부모
커밋
a4f2e4dfbe
3개의 변경된 파일45개의 추가작업 그리고 16개의 파일을 삭제
  1. 10 11
      application/admin/controller/Accounts.php
  2. 21 0
      application/admin/controller/System.php
  3. 14 5
      application/admin/view/system/detail.html

+ 10 - 11
application/admin/controller/Accounts.php

@@ -53,28 +53,27 @@ class Accounts extends Base
         if(request()->isAjax()){
 
             $param = input('post.');
-
-            $addar = array();
-            $where = array();
-            $where['id'] = $param['id'];
+            $info = array();
             $rules = '/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/';
 
             if(!preg_match($rules,$param['account_email'])){
                 return json(['code' => -9, 'data' => '', 'msg' => '请输入正确的邮箱']);
             }
 
-            if(!preg_match("/^1[34578]\d{9}$/", $param['phone'])){
+            if(!preg_match("/^1[34578]\d{9}$/", $param['account_phone'])){
                 return json(['code' => -10, 'data' => '', 'msg' => '请输入正确的手机号码']);
             }
 
-            $addar['user_email'] = $param['account_email'];
-            $addar['phone'] = $param['phone'];
-            $addar['signature'] = $param['signature'];
-            $addar['group_id'] = $param['group_id'];
-            $addar['status'] = $param['status'];
+            $info['account_email'] = $param['account_email'];
+            $info['account_phone'] = $param['account_phone'];
+            $info['address'] = $param['address'];
+            $info['label'] = $param['label'];
+            $info['remark'] = $param['remark'];
+            $info['status'] = $param['status'];
+            $info['user_id'] = $param['user_id'];
 
             try{
-                db('account')->where('id', $param['id'])->update($addar);
+                db('accounts')->where('id', $param['id'])->update($info);
             }catch(\Exception $e){
                 return json(['code' => -6, 'data' => '', 'msg' => $e->getMessage()]);
             }

+ 21 - 0
application/admin/controller/System.php

@@ -300,10 +300,31 @@ class System extends Base
         $evaluate = db('evaluate')->where('evaluate_id',$servicelog['evaluate_id'])->find();
         $evaluate = $evaluate['evaluate_name'];
 
+        //$alarm报警信息
+        $alarm =  db('alarm')->where('servicelog_id',$id)->find();
+        $ul = '';
+        if(!empty($alarm)){
+            $ul = $ul . '<ul class="alarm"><li>触犯警报</li>';
+            if($alarm['alarm_userSensitive'] != 0){
+                $ul = $ul . '<li class="alarm_info">访客敏感词</li>';
+            }
+            if($alarm['alarm_serverSensitive'] != 0){
+                $ul = $ul . '<li class="alarm_info">客服敏感词</li>';
+            }
+            if($alarm['alarm_corresponding'] != 0){
+                $ul = $ul . '<li class="alarm_info">相应超时</li>';
+            }
+            if($alarm['alarm_cvtOvertime'] != 0){
+                $ul = $ul . '<li class="alarm_info">会话超时</li>';
+            }
+            $ul = $ul . '</ul>';
+        }
+
         //用户信息
         $account = db('accounts')->where('id',$servicelog['user_id'])->find();
         $this->assign([
             'html' => $html,
+            'ul' => $ul,
             'evaluate' => $evaluate,
             'servicelog' => $servicelog,
             'account' => $account

+ 14 - 5
application/admin/view/system/detail.html

@@ -46,6 +46,19 @@
         font-size: 15px;
         color: black;
     }
+    ul.alarm li.alarm_info{
+        background-color: #EC4859;
+        color: white;
+        margin-top: 20px;
+        margin-left: 5px;
+        float: left;
+        border-radius: 2px;
+        text-align: center;
+        height: 23px;
+        line-height: 23px;
+        font-size: 12px;
+        width: 65px;
+    }
 </style>
 <body class="gray-bg">
 <div class="wrapper wrapper-content animated fadeInRight">
@@ -64,11 +77,7 @@
                         <li>评价</li>
                         <li style="margin-left: 40px;">{$evaluate}</li>
                         <li style="margin-left: 50px;">
-                            <ul>
-                                <li>触犯警报</li>
-                                <li style="color: red;margin-top: 10px;">评价不满意1次 响应超时2次 会话超时1次</li>
-                                <li style="color: red;margin-top: 20px;">访客敏感词10次 客服敏感2次</li>
-                            </ul>
+                            {$ul}
                         </li>
                     </ul>
                 </div>