From 455a1716b89a9518b37ea68563c9ffdcf2c93d60 Mon Sep 17 00:00:00 2001
From: wangyifeng <812766448@qq.com>
Date: Fri, 8 Aug 2025 14:45:27 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E5=AE=A1=E6=89=B9=E5=82=AC?=
=?UTF-8?q?=E5=8A=9E=E9=A1=B5=E9=9D=A2=E8=B7=B3=E8=BD=AC=EF=BC=8C=E7=94=A8?=
=?UTF-8?q?iframe=E7=BB=93=E5=90=88drawer=E5=AE=9E=E7=8E=B0=EF=BC=9B?=
=?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=81=8A=E5=A4=A9=E5=8A=A9=E6=89=8B=E5=BC=80?=
=?UTF-8?q?=E5=90=AF=E6=8F=90=E9=86=92=E5=92=8C=E5=85=B3=E9=97=AD=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/chat/index.js | 21 +++++++++-
.../talk/message/system/sysPushMessage.vue | 29 ++++++++-----
.../components/settingFormItem.vue | 34 +++++++++++++--
src/pages/chatSettings/index.vue | 19 ++++++++-
src/pages/dialog/index.vue | 41 +++++++++++++++++--
src/uni_modules/tmui/locale/zh-Hans.json | 1 +
6 files changed, 124 insertions(+), 21 deletions(-)
diff --git a/src/api/chat/index.js b/src/api/chat/index.js
index 4ecb97c..a055e57 100644
--- a/src/api/chat/index.js
+++ b/src/api/chat/index.js
@@ -234,4 +234,23 @@ export const ServeUserGroupChatList = (data) => {
method: 'POST',
data,
})
-}
\ No newline at end of file
+}
+
+//查询聊天助手是否开启
+export const ServeContactRobotQuery = (data) => {
+ return request({
+ url: '/api/v1/contact/robot/query',
+ method: 'POST',
+ data,
+ })
+}
+
+//开关聊天助手
+export const ServeContactRobotUpdate = (data) => {
+ return request({
+ url: '/api/v1/contact/robot/update',
+ method: 'POST',
+ data,
+ })
+}
+
diff --git a/src/components/talk/message/system/sysPushMessage.vue b/src/components/talk/message/system/sysPushMessage.vue
index 6a9a2d6..5615b17 100644
--- a/src/components/talk/message/system/sysPushMessage.vue
+++ b/src/components/talk/message/system/sysPushMessage.vue
@@ -6,6 +6,8 @@ import copy from '@/static/image/chatBotMessageCard/copy.png'
import errorClock from '@/static/image/chatBotMessageCard/errorClock.png'
import prompt from '@/static/image/chatBotMessageCard/prompt.png'
+const emits = defineEmits(['openPromptDrawer'])
+
const props = defineProps({
extra: Object,
data: Object,
@@ -63,17 +65,22 @@ const getTextContent = computed(() => {
//点击向webview通信,处理智能助手系统消息
const handleSysMessagePush = () => {
- handleFindWebview(
- `handleChatRobotSysMessagePush('${encodeURIComponent(
- JSON.stringify({
- url: props?.extra?.url,
- msg_type: props?.data?.msg_type,
- }),
- )}')`,
- )
- uni.reLaunch({
- url: '/pages/index/index',
- })
+ if (props?.extra?.url) {
+ //直接返回地址的,直接在当前页面弹出抽屉打开
+ emits('openPromptDrawer', encodeURIComponent(props?.extra?.url))
+ } else {
+ handleFindWebview(
+ `handleChatRobotSysMessagePush('${encodeURIComponent(
+ JSON.stringify({
+ url: props?.extra?.url,
+ msg_type: props?.data?.msg_type,
+ }),
+ )}')`,
+ )
+ uni.reLaunch({
+ url: '/pages/index/index',
+ })
+ }
}
diff --git a/src/pages/chatSettings/components/settingFormItem.vue b/src/pages/chatSettings/components/settingFormItem.vue
index e75f1d9..bce01fa 100644
--- a/src/pages/chatSettings/components/settingFormItem.vue
+++ b/src/pages/chatSettings/components/settingFormItem.vue
@@ -28,8 +28,8 @@
barIcon=""
color="#46299D"
unCheckedColor="#EEEEEE"
- :modelValue="modelValue"
- :defaultValue="modelValue"
+ :modelValue="props?.item?.label === t('chat.settings.openReminder') ? openReminderStatus : modelValue"
+ :defaultValue="props?.item?.label === t('chat.settings.openReminder') ? openReminderStatus : modelValue"
@change="changeSwitch($event, props?.item)"
>
@@ -46,8 +46,8 @@
+
diff --git a/src/uni_modules/tmui/locale/zh-Hans.json b/src/uni_modules/tmui/locale/zh-Hans.json
index f152e4d..5fe4e3c 100644
--- a/src/uni_modules/tmui/locale/zh-Hans.json
+++ b/src/uni_modules/tmui/locale/zh-Hans.json
@@ -90,6 +90,7 @@
"chat.settings.groupType": "群类型",
"chat.settings.topSession": "置顶会话",
"chat.settings.messageNoDisturb": "消息免打扰",
+ "chat.settings.openReminder": "开启提醒",
"chat.settings.groupGag": "群内禁言",
"chat.settings.groupAdmin": "群管理员",
"chat.settings.groupMember": "群成员",