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 };