From 2e56d71b0cb7b4bfb5ef8843ecbca42b30933552 Mon Sep 17 00:00:00 2001 From: yaoqin <497681109@qq.com> Date: Wed, 30 Apr 2025 15:22:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=9C=8D=E8=81=8A=E5=A4=A9=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E5=AF=B9=E6=8E=A5=E5=8F=8A=E5=8A=9F=E8=83=BD=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mining-pool/.env.development | 1 + mining-pool/package-lock.json | 59 +- mining-pool/package.json | 3 +- mining-pool/public/index.html | 2 +- mining-pool/src/App.vue | 2 +- mining-pool/src/api/customerService.js | 24 +- mining-pool/src/components/ChatWidget.vue | 981 ++++++++----- mining-pool/src/router/index.js | 5 +- .../src/views/customerService/index.vue | 1268 +++++++++++++---- .../src/views/submitWorkOrder/index.vue | 4 +- 10 files changed, 1648 insertions(+), 701 deletions(-) diff --git a/mining-pool/.env.development b/mining-pool/.env.development index b1d6875..9f360fd 100644 --- a/mining-pool/.env.development +++ b/mining-pool/.env.development @@ -6,6 +6,7 @@ ENV = 'development' #开发环境 VUE_APP_BASE_API = 'https://test.m2pool.com/api/' +# VUE_APP_BASE_API = 'http://10.168.2.150:8101/' VUE_APP_BASE_URL = 'https://test.m2pool.com/' # 路由懒加载 VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/mining-pool/package-lock.json b/mining-pool/package-lock.json index 9959c32..7dde179 100644 --- a/mining-pool/package-lock.json +++ b/mining-pool/package-lock.json @@ -290,13 +290,45 @@ } }, "@babel/helpers": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.9.tgz", - "integrity": "sha512-Mz/4+y8udxBKdmzt/UjPACs4G3j5SshJJEFFKxlCGPydG4JAHXxjWjAwjd09tf6oINvl1VfMJo+nB7H2YKQ0dA==", + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.0.tgz", + "integrity": "sha512-U5eyP/CTFPuNE3qk+WZMxFkp/4zUzdceQlfzf7DdGdhp+Fezd7HD+i8Y24ZuTMKX3wQBld449jijbGq6OdGNQg==", "dev": true, "requires": { - "@babel/template": "^7.26.9", - "@babel/types": "^7.26.9" + "@babel/template": "^7.27.0", + "@babel/types": "^7.27.0" + }, + "dependencies": { + "@babel/parser": { + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.0.tgz", + "integrity": "sha512-iaepho73/2Pz7w2eMS0Q5f83+0RKI7i4xmiYeBmDzfRVbQtTOG7Ts0S4HzJVsTMGI9keU8rNfuZr8DKfSt7Yyg==", + "dev": true, + "requires": { + "@babel/types": "^7.27.0" + } + }, + "@babel/template": { + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.0.tgz", + "integrity": "sha512-2ncevenBqXI6qRMukPlXwHKHchC7RyMuu4xv5JBXRfOGVcTy1mXCD12qrp7Jsoxll1EV3+9sE4GugBVRjT2jFA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.26.2", + "@babel/parser": "^7.27.0", + "@babel/types": "^7.27.0" + } + }, + "@babel/types": { + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.0.tgz", + "integrity": "sha512-H45s8fVLYjbhFH62dIJ3WtmJ6RSPt/3DRO0ZcT2SUiYiQyz3BLVb9ADEnLl91m74aQPS3AzzeajZHYOalWe3bg==", + "dev": true, + "requires": { + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" + } + } } }, "@babel/highlight": { @@ -1104,9 +1136,9 @@ } }, "@babel/runtime": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.9.tgz", - "integrity": "sha512-aA63XwOkcl4xxQa3HjPMqOP6LiK0ZDv3mUPYEFXkpHbaFjtGggE1A61FjFzJnB+p7/oy2gA8E+rcBNl/zC1tMg==", + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.27.0.tgz", + "integrity": "sha512-VtPOkrdPHZsKc/clNqyi9WUA8TINkZ4cGk63UUE3u4pmB2k+ZMQRDuIOagv8UVd6j7k0T3+RRIb7beKTebNbcw==", "dev": true, "requires": { "regenerator-runtime": "^0.14.0" @@ -1718,6 +1750,11 @@ "integrity": "sha512-T7VNNlYVM1SgQ+VsMYhnDkcGmWhQdL0bDyGm5TlQ3GBXnJscEClUUOKduWTmm2zCnvNLC1hc3JpuXjs/nFOc5w==", "dev": true }, + "@stomp/stompjs": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@stomp/stompjs/-/stompjs-7.1.1.tgz", + "integrity": "sha512-chcDs6YkAnKp1FqzwhGvh3i7v0+/ytzqWdKYw6XzINEKAzke/iD00dNgFPWSZEqktHOK+C1gSzXhLkLbARIaZw==" + }, "@trysound/sax": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.2.0.tgz", @@ -3032,9 +3069,9 @@ } }, "axios": { - "version": "1.7.9", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz", - "integrity": "sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==", + "version": "1.8.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.8.4.tgz", + "integrity": "sha512-eBSYY4Y68NNlHbHBMdeDmKNtDgXWhQsJcGqzO3iLUM0GraQFSS9cVgPX5I9b3lbdFKyYoAEGAZF1DwhTaljNAw==", "requires": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", diff --git a/mining-pool/package.json b/mining-pool/package.json index f8ef2ae..de65d9c 100644 --- a/mining-pool/package.json +++ b/mining-pool/package.json @@ -10,8 +10,9 @@ }, "dependencies": { "@dreysolano/prerender-spa-plugin": "^1.0.3", + "@stomp/stompjs": "^7.1.1", "amfe-flexible": "^2.2.1", - "axios": "^1.5.0", + "axios": "^1.8.4", "core-js": "^3.8.3", "echarts": "^5.5.1", "element-ui": "^2.15.14", diff --git a/mining-pool/public/index.html b/mining-pool/public/index.html index 3d6ca6f..588f211 100644 --- a/mining-pool/public/index.html +++ b/mining-pool/public/index.html @@ -45,7 +45,7 @@ - + M2pool - Stable leading high-yield mining pool diff --git a/mining-pool/src/App.vue b/mining-pool/src/App.vue index 3519071..c9353a5 100644 --- a/mining-pool/src/App.vue +++ b/mining-pool/src/App.vue @@ -1,7 +1,7 @@ @@ -1257,7 +1490,7 @@ updateMessageReadStatus(messageIds) { background-color: #f0f0f0; width: fit-content; margin: 0 auto 10px; - + &:hover { background-color: #e0e0e0; color: #333; @@ -1272,15 +1505,13 @@ updateMessageReadStatus(messageIds) { .chat-message-hint { margin: 5px 0; justify-content: center; - + span { color: #999; font-size: 12px; } } - - .message-footer { display: flex; justify-content: space-between; diff --git a/mining-pool/src/router/index.js b/mining-pool/src/router/index.js index 87c6442..0197610 100644 --- a/mining-pool/src/router/index.js +++ b/mining-pool/src/router/index.js @@ -124,7 +124,7 @@ const childrenRoutes = [ component: () => import('../views/customerService/index.vue'), meta: {title: '在线客服', description:i18n.t(`seo.apiFile`), - allAuthority:[`all`], + allAuthority:[`customer_service`],//客服权限 // keywords: 'M2Pool 矿池,API 文档,认证 token,接口调用,API file,authentication token,Interface call' keywords:{ en: 'API file,authentication token,Interface call', @@ -689,7 +689,10 @@ router.beforeEach((to, from, next) => { message:i18n.t(`mining.jurisdiction`), type: 'error' }); + + next({ path: `/${lang}` }) // 添加这行,重定向到首页 } + }else{ diff --git a/mining-pool/src/views/customerService/index.vue b/mining-pool/src/views/customerService/index.vue index c9736e0..2558b64 100644 --- a/mining-pool/src/views/customerService/index.vue +++ b/mining-pool/src/views/customerService/index.vue @@ -24,12 +24,13 @@ @click="selectContact(contact.roomId)" >
- - {{ contact.name ? contact.name.charAt(0) : "?" }} - + {{ contact.unread }} + + + 游客
@@ -45,6 +46,15 @@ {{ contact.lastMessage }}
+ +
+ +
@@ -84,12 +94,12 @@
- - + > --> +
@@ -100,6 +110,21 @@

您尚未选择联系人