Ethan 6 жил өмнө
parent
commit
d442bc91b7

+ 2 - 2
pc_chat/config/index.js

@@ -20,14 +20,14 @@ module.exports = {
     },
 
     // Various Dev Server settings
-    host: '192.168.2.160', // can be overwritten by process.env.HOST
+    host: 'localhost', // can be overwritten by process.env.HOST
     port: 8000, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
     autoOpenBrowser: false,
     errorOverlay: true,
     notifyOnErrors: true,
     poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
 
-    
+
     /**
      * Source Maps
      */

+ 7 - 5
pc_chat/src/components/chat.vue

@@ -204,7 +204,7 @@
                     <img :src="serviceImg?url+serviceImg:require('@/assets/st-img/kf.png')" alt="">
                   </div>
                   <div class="cont left" >
-                    <div>{{item.chat}}</div>
+                    <div v-html="item.chat"></div>
                   </div>
 
                 </div>
@@ -222,7 +222,7 @@
                   <div style="width:66px;"></div>
                   <div class="row">
                     <div class="cont right">
-                      <div v-html="item.chat"></div>
+                      <div v-html="item.cont"></div>
                     </div>
                     <div class="headImg">
                       <img :src="user_info.avatar" alt="">
@@ -513,7 +513,8 @@ export default {
 
       machineAndAtl: 10, //默认为机器人,100为人工
       satisfaction :1 , //评价满意度,1为满意,2为一般,3为不满意
-      url :'http://192.168.2.186:8090', // 域名地址
+      url :'http://kfadmin.bocai186.com', // 域名地址
+      //url :'http://192.168.2.186:8090', // 域名地址
       user_info:'', // 用户信息
             // 人工客服信息
       service:'',
@@ -806,7 +807,7 @@ export default {
       // 当天时间戳
       // let date = new Date(new Date().setHours(0, 0, 0, 0)) / 1000;
       // let apiToken = this.$md5.hex_md5('Customer-Service'+date+'http://192.168.2.186:9010');
-      this.websock = new WebSocket('ws://192.168.2.186:9101?apiToken='+this.apiToken);
+      this.websock = new WebSocket('ws://103.108.43.176:9101?apiToken='+this.apiToken);
       // 数据接收
       this.websock.onmessage = this.websocketonmessage;
       // 连接建立之后
@@ -990,7 +991,7 @@ export default {
         }
         let obj = {
           time:timer,
-          chat:content,
+          chat:this.turnFace(content),
           cont:''
         }
         this.customerSviceChat.push(obj);
@@ -1136,6 +1137,7 @@ export default {
           if(this.senType == true){
             datas.doubType = 1;
           }
+          datas.chat = this.turnFace(datas.chat);
           this.chatCont.push(datas)
         }
           // 发送之后清空发送数据