From a817db8c5a493ac3efa7267512b269c614a1a92c Mon Sep 17 00:00:00 2001 From: wujingling0908 <2.com> Date: Tue, 29 Sep 2026 11:45:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/abstract.vue | 12 ++++++++++-- src/components/chat-new.vue | 14 +++++++------- src/utils/https.js | 2 +- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/src/components/abstract.vue b/src/components/abstract.vue index b6b78c6..f4ff7ab 100644 --- a/src/components/abstract.vue +++ b/src/components/abstract.vue @@ -113,8 +113,16 @@ const toDetail = (record) => { businessClick() } if (record.title === '保障状态') { - // 只把问题写入对话气泡,不走对话接口 - store.addSendMessageList({ msgText: record.name, reqAndResType: '1', sendLoading: false }) + const text = record?.name || '查保单' + // 发送文字并直接走对话接口 + const request = store?.sendingRobot?.({ + reqAndResType: '1', + msgText: text, + msgSource: store?.manualService, + }) || messageSend(text) + Promise.resolve(request).catch((err) => { + console.log(err) + }) } } const refreshAbstractData = async () => { diff --git a/src/components/chat-new.vue b/src/components/chat-new.vue index fd0fb81..cc8b193 100644 --- a/src/components/chat-new.vue +++ b/src/components/chat-new.vue @@ -582,7 +582,7 @@ function extractJumpOpenWebCalls(msgText) { /jumpOpenWeb\s*\(\s*(['"`])(.*?)\1\s*,\s*(['"`])(.*?)\3(?:\s*,\s*(['"`])(.*?)\5)?\s*\)/g let match = re.exec(text) while (match) { - console.log('match[2]',match[2]); + console.log('match[2]', match[2]); calls.push({ type: match[2], url: match[4], @@ -594,11 +594,11 @@ function extractJumpOpenWebCalls(msgText) { // 2) 微信开放标签 wx-open-launch-weapp → 小程序内自动跳转(与 text-folding 一致) // 示例: - if (text.includes('wx-open-launch-weapp') ) { + if (text.includes('wx-open-launch-weapp')) { const pathRe = /]*\spath="([^"]+)"/gi let pathMatch = pathRe.exec(text) - const seenPath = new Set() - console.log('pathMatch',pathMatch); + const seenPath = new Set() + console.log('pathMatch', pathMatch); while (pathMatch) { const path = pathMatch[1] if (path && !seenPath.has(path)) { @@ -632,7 +632,7 @@ function maybeAutoJumpOpenWeb(list) { if (!calls.length) return const msgKey = String(latest?.VIEW_ID || latest?.timestamp || latest?.id || arr.length) - calls.forEach(({ type, url, urlType },index) => { + calls.forEach(({ type, url, urlType }, index) => { if (!type || !url) return const key = `${msgKey}::${type}::${url}::${urlType || ''}` if (invokedJumpKeys.has(key)) return @@ -647,13 +647,13 @@ function maybeAutoJumpOpenWeb(list) { } catch (e) { } console.log('[auto jumpOpenWeb YY_GWXCX]', url) setTimeout(() => { - if(index === 0) jumpOpenWeb(type, url, urlType) + if (index === 0) jumpOpenWeb(type, url, urlType) }, 300) return } console.log('[auto jumpOpenWeb]', type, url, urlType) - if(index === 0) jumpOpenWeb(type, url, urlType) + if (index === 0) jumpOpenWeb(type, url, urlType) }) } diff --git a/src/utils/https.js b/src/utils/https.js index 0c81bbf..3cf33e7 100644 --- a/src/utils/https.js +++ b/src/utils/https.js @@ -45,7 +45,7 @@ const closeWindow = () => { const toast = (msg) => { showToast({ message: msg, - duration: 4000, + duration: 3000, forbidClick: true, }) }