diff --git a/backend/app/adminapi/controller/PublicController.php b/backend/app/adminapi/controller/PublicController.php
index de8e414b2..ebc2f36e4 100644
--- a/backend/app/adminapi/controller/PublicController.php
+++ b/backend/app/adminapi/controller/PublicController.php
@@ -155,6 +155,7 @@ class PublicController
};
$runtime = root_path('runtime');
$info['process'] = [
+ ['name' => '长链接', 'require' => '开启', 'value' => $isHeartbeatFresh($runtime . '.workerman') || $checkLegacyPid('workerman')],
['name' => '定时任务', 'require' => '开启', 'value' => $isHeartbeatFresh($runtime . '.timer') || $checkLegacyPid('timer')],
['name' => '消息队列', 'require' => '开启', 'value' => sys_config('queue_open', 0) == 1 && $isHeartbeatFresh($runtime . '.queue_heartbeat')],
];
diff --git a/frontend/admin/src/pages/account/login/index.vue b/frontend/admin/src/pages/account/login/index.vue
index 499880f38..7b4420d85 100644
--- a/frontend/admin/src/pages/account/login/index.vue
+++ b/frontend/admin/src/pages/account/login/index.vue
@@ -87,6 +87,7 @@ import 'swiper/css';
import 'swiper/css/pagination';
import { AccountLogin, loginInfoApi } from '@/api/account';
+import { getWorkermanUrl } from '@/api/setting';
import { setCookies } from '@/libs/util';
import '@/assets/js/canvas-nest.min';
import Verify from '@/components/verifition/Verify';
@@ -237,6 +238,7 @@ function closeModel(params) {
});
}, 0);
}
+ checkSocket();
} catch (e) {}
PrevLoading.start();
router.push({
@@ -266,6 +268,31 @@ function formatTwoStageRoutes(arr) {
keepAliveNamesStore.setCacheKeepAlive(cacheList);
}
}
+function checkSocket() {
+ getWorkermanUrl()
+ .then((res) => {
+ const url = res.data.admin;
+ let isNotice = false;
+ const socket = new window.WebSocket(url);
+ socket.onopen = () => {
+ isNotice = true;
+ socket.close();
+ };
+ socket.onerror = socket.onclose = () => {
+ if (!isNotice) {
+ isNotice = true;
+ ElNotification.warning({
+ title: '温馨提示',
+ message:
+ '您的【长连接】未开启,没有开启会导致系统默认客服无法使用,后台订单通知无法收到。请尽快执行命令开启!!点击查看开启方法',
+ dangerouslyUseHTMLString: true,
+ duration: 30000,
+ });
+ }
+ };
+ })
+ .catch(() => {});
+}
function getExpiresTime(expiresTime) {
const nowTimeNum = Math.round(Date.now() / 1000);
const expiresTimeNum = expiresTime - nowTimeNum;
diff --git a/frontend/admin/src/pages/system/auth/index.vue b/frontend/admin/src/pages/system/auth/index.vue
index 694e64c09..88e6919f7 100644
--- a/frontend/admin/src/pages/system/auth/index.vue
+++ b/frontend/admin/src/pages/system/auth/index.vue
@@ -36,8 +36,13 @@ import { copyrightList as copyrightListApi } from '@/api/system';
defineOptions({ name: 'system_auth' });
const tableList = ref([]);
-// 与后端 process 数组顺序一一对应(长链接已移除):0=定时任务 1=消息队列
+// 与后端 process 数组顺序一一对应:0=长链接 1=定时任务 2=消息队列
const trips = [
+ {
+ title: '温馨提示',
+ message:
+ '您的【长连接】未开启,没有开启会导致系统默认客服无法使用,后台订单通知无法收到。请尽快执行命令开启!!点击查看开启方法',
+ },
{
title: '温馨提示',
message: