From 0fb70fcc96c39d49125fa19942a45078986be7c7 Mon Sep 17 00:00:00 2001
From: "DESKTOP-3IDLUFC\\admin" <381890123@qq.com>
Date: Thu, 22 Jan 2026 17:35:13 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E5=85=B3=E9=94=AE=E8=AF=8D=E8=BF=87?=
=?UTF-8?q?=E6=BB=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/TopNavBar/index.vue | 2 ++
src/pages.json | 1 +
.../components/chat/ChatMainList/index.vue | 31 ++++++++++++++++---
src/request/api/MainPageDataApi.js | 7 ++++-
4 files changed, 36 insertions(+), 5 deletions(-)
diff --git a/src/components/TopNavBar/index.vue b/src/components/TopNavBar/index.vue
index b4c1a68..55a67dc 100644
--- a/src/components/TopNavBar/index.vue
+++ b/src/components/TopNavBar/index.vue
@@ -8,7 +8,9 @@
:style="{ height: navBarHeight + 'px' }">
+
+
diff --git a/src/pages.json b/src/pages.json
index ac0bc86..ee33e85 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -78,6 +78,7 @@
}
],
"globalStyle": {
+ "navigationStyle": "custom",
"navigationBarTextstyle": "black",
"navigationBarTitleText": "",
"navigationBarBackgroundcolor": "#F8F8F8",
diff --git a/src/pages/index/components/chat/ChatMainList/index.vue b/src/pages/index/components/chat/ChatMainList/index.vue
index 5407656..69b58e6 100644
--- a/src/pages/index/components/chat/ChatMainList/index.vue
+++ b/src/pages/index/components/chat/ChatMainList/index.vue
@@ -13,8 +13,8 @@
-
+
{
};
// 输入区的发送消息事件
-const sendMessageAction = (inputText) => {
+const sendMessageAction = async (inputText) => {
console.log("输入消息:", inputText);
if (!inputText.trim()) return;
+
+ // contentSecurityDetection
+
+ // #ifdef MP-TOUTIAO
+ if (await contentSecurityDetectionApi(inputText)) {
+ uni.showToast({
+ title: "不能输入违法、违规内容",
+ icon: "none",
+ });
+ return false;
+ }
+ // #endif
+
handleNoHideKeyboard();
// 重置消息状态,准备接收新的AI回复
@@ -261,6 +275,15 @@ const sendMessageAction = (inputText) => {
setTimeoutScrollToBottom();
};
+// 抖音内容安全检测
+const contentSecurityDetectionApi = async (inputText) => {
+ const { data } = await contentSecurityDetection({
+ clientId: getCurrentConfig().clientId,
+ detectionContent: inputText
+ })
+ return data;
+}
+
/// 添加通知
const addNoticeListener = () => {
uni.$on(NOTICE_EVENT_LOGIN_SUCCESS, () => {
diff --git a/src/request/api/MainPageDataApi.js b/src/request/api/MainPageDataApi.js
index 7ae9fd9..eea7b80 100644
--- a/src/request/api/MainPageDataApi.js
+++ b/src/request/api/MainPageDataApi.js
@@ -16,4 +16,9 @@ function discoveryCradComponent() {
return request.get("/hotelBiz/mainScene/discoveryComponent", {});
}
-export { mainPageData, quickBookingComponent, discoveryCradComponent };
+// 抖音内容安全检测
+function contentSecurityDetection(args) {
+ return request.post("/hotelBiz/douyin/contentSecurityDetection", args);
+}
+
+export { mainPageData, quickBookingComponent, discoveryCradComponent, contentSecurityDetection };