|
|
|
|
@ -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) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|