From 2a59913e69af9b478312d30bb7c8e67dc5260fa8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=90=91=E6=96=87=E5=8F=AF?= <1041367524@qq.com>
Date: Mon, 16 May 2022 18:00:31 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E8=A7=A3=E6=9E=90=E8=87=AA=E5=AE=9A?=
=?UTF-8?q?=E4=B9=89=E6=B6=88=E6=81=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env | 4 +-
src/api/chat/index.js | 27 +++++
src/layouts/default.vue | 2 -
src/router/modules/chat.js | 11 +-
src/store/modules/chat/chat.js | 57 ++++++++++-
src/store/modules/chat/customerService.js | 91 +++++++++++++++++
src/views/chat/index.vue | 3 +-
src/views/chat/management.vue | 100 +++++++++++++++++++
src/views/chat/message.vue | 116 +++++++++++-----------
vite.config.js | 4 +-
10 files changed, 349 insertions(+), 66 deletions(-)
create mode 100644 src/store/modules/chat/customerService.js
create mode 100644 src/views/chat/management.vue
diff --git a/.env b/.env
index 95809c2..7c7751a 100644
--- a/.env
+++ b/.env
@@ -1,4 +1,4 @@
VITE_BASE_URL=/api
-#VITE_SOCKET_URL=wss://k8s-horse-gateway.mashibing.cn/ws
-VITE_SOCKET_URL=ws://192.168.10.93:8090/ws
+VITE_SOCKET_URL=wss://k8s-horse-gateway.mashibing.cn/ws
+#VITE_SOCKET_URL=ws://192.168.10.93:8090/ws
VITE_REQUEST_TIMEOUT=5000
diff --git a/src/api/chat/index.js b/src/api/chat/index.js
index 35c9804..c6bc2c0 100644
--- a/src/api/chat/index.js
+++ b/src/api/chat/index.js
@@ -6,3 +6,30 @@ export const login = (params) => {
params,
});
};
+export const searchService = (id) => {
+ return request({
+ url: '/im/admin/waiter/findAllWaiter/' + id,
+ method: 'get',
+ });
+};
+export const searchSession = (params) => {
+ return request({
+ url: '/im/admin/waiter/findWaiterSessions',
+ method: 'get',
+ params,
+ });
+};
+export const searchMessage = (params) => {
+ return request({
+ url: '/im/admin/waiter/findSessionMessage',
+ method: 'get',
+ params,
+ });
+};
+export const searchSummary = (params) => {
+ return request({
+ url: '/im/admin/waiter/waiterStatistics',
+ method: 'get',
+ params,
+ });
+};
diff --git a/src/layouts/default.vue b/src/layouts/default.vue
index f7a0f8f..2da54df 100644
--- a/src/layouts/default.vue
+++ b/src/layouts/default.vue
@@ -22,8 +22,6 @@
import LayoutMain from './components/main.vue';
import LayoutMenu from './components/menu.vue';
import LayoutTabs from './components/tabs.vue';
- const store = useStore();
- store.dispatch('chat/connect');
diff --git a/src/views/chat/message.vue b/src/views/chat/message.vue
index 07848e1..149c9a8 100644
--- a/src/views/chat/message.vue
+++ b/src/views/chat/message.vue
@@ -15,66 +15,80 @@
{{ props.message.fromNickname }}
-