k3sc 4 vuotta sitten
vanhempi
commit
328ca41191
2 muutettua tiedostoa jossa 9 lisäystä ja 10 poistoa
  1. 7 7
      public/layui/lay/modules/layim.js
  2. 2 3
      src/layout/index.vue

+ 7 - 7
public/layui/lay/modules/layim.js

@@ -173,13 +173,13 @@ layui.define(['layer', 'laytpl', 'upload'], function(exports) {
     , ' layim-this'
     , '{{# } }}'
     , '" title="联系人" layim-event="tab" lay-type="friend">&#xe612;</li>'
-    , '<li class="layui-icon'
-    , '{{# if(!d.base.isgroup){ }}'
-    , ' layim-hide'
-    , '{{# } else if(!d.base.isfriend) { }}'
-    , ' layim-this'
-    , '{{# } }}'
-    , '" title="群组" layim-event="tab" lay-type="group">&#xe613;</li>'
+    // , '<li class="layui-icon'
+    // , '{{# if(!d.base.isgroup){ }}'
+    // , ' layim-hide'
+    // , '{{# } else if(!d.base.isfriend) { }}'
+    // , ' layim-this'
+    // , '{{# } }}'
+    // , '" title="群组" layim-event="tab" lay-type="group">&#xe613;</li>'
     , '<li class="layui-icon" title="历史会话" layim-event="tab" lay-type="history">&#xe611;</li>'
     , '</ul>'
     , '<ul class="layui-unselect layim-tab-content {{# if(d.base.isfriend){ }}layui-show{{# } }} layim-list-friend">'

+ 2 - 3
src/layout/index.vue

@@ -20,7 +20,6 @@
   import { AppMain, Navbar, Settings, Sidebar, TagsView } from './components'
   import ResizeMixin from './mixin/ResizeHandler'
   import { mapState } from 'vuex'
-  import { getToken } from '@/utils/auth'
 
   export default {
     name: 'Layout',
@@ -60,7 +59,7 @@
       var hostname = document.location.hostname + ':3333'
       var basePath = process.env.VUE_APP_BASE_API + '/chat'
       // var socket = new WebSocket('ws://' + hostname + basePath + '/websocket/' + userid)
-      var socket = new WebSocket('ws://' + hostname + basePath + '/websocket/' + userid)
+      var socket = new WebSocket('ws://' + document.location.hostname + ':2222/chat/websocket/' + userid)
       layui.use('layim', function(layim) {
         //监听修改签名
         layim.on('sign', function(value) {
@@ -70,7 +69,7 @@
           object['sign'] = value
           var jsonData = JSON.stringify(object)
           $.ajax({
-            url: basePath + '/upsigin',
+            url: basePath + '/sign',
             data: jsonData,
             contentType: 'application/json;charset=UTF-8', //发送数据的格式
             type: 'post',