代码提交

master
wujingling0908 5 days ago
parent b358e2364e
commit a817db8c5a
  1. 12
      src/components/abstract.vue
  2. 14
      src/components/chat-new.vue
  3. 2
      src/utils/https.js

@ -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 () => {

@ -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 一致)
// 示例:<wx-open-launch-weapp class="open-wx-web-button" path="/packageMember/...">
if (text.includes('wx-open-launch-weapp') ) {
if (text.includes('wx-open-launch-weapp')) {
const pathRe = /<wx-open-launch-weapp[^>]*\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)
})
}

@ -45,7 +45,7 @@ const closeWindow = () => {
const toast = (msg) => {
showToast({
message: msg,
duration: 4000,
duration: 3000,
forbidClick: true,
})
}

Loading…
Cancel
Save