|
|
|
|
@ -1,10 +1,6 @@ |
|
|
|
|
<template> |
|
|
|
|
<div class="text-template-box" v-if="introduce"> |
|
|
|
|
<div |
|
|
|
|
class="text-folding-box" |
|
|
|
|
:class="showTotal ? 'total-introduce' : 'detailed-introduce'" |
|
|
|
|
ref="textFolding" |
|
|
|
|
> |
|
|
|
|
<div class="text-folding-box" :class="showTotal ? 'total-introduce' : 'detailed-introduce'" ref="textFolding"> |
|
|
|
|
<div class="question-answer-con" v-if="introduce" ref="desc"> |
|
|
|
|
<policy-list :data="itemlist" :tips1="tips1" :tips2="tips2" @descHeightChange="descHeightChange" /> |
|
|
|
|
<xuqi-policy-list :data="itemlist" @descHeightChange="descHeightChange" /> |
|
|
|
|
@ -80,29 +76,10 @@ const tips1 = ref('') |
|
|
|
|
const tips2 = ref('') |
|
|
|
|
const cmd = ref('') |
|
|
|
|
|
|
|
|
|
// 小程序 webview 里开放标签不生效(仅公众号 H5 可渲染),改为提取标签的 path |
|
|
|
|
// 用 wx.miniProgram.navigateTo 自动跳转;公众号 H5 环境仍靠用户点击开放标签 |
|
|
|
|
function autoLaunchWeapp() { |
|
|
|
|
if (props.isHistory) return |
|
|
|
|
if (!utils.isMiniProgram()) return |
|
|
|
|
const raw = String(props.introduce || props.itemlist?.msgText || '') |
|
|
|
|
const m = raw.match(/<wx-open-launch-weapp[^>]*\spath="([^"]+)"/) |
|
|
|
|
if (!m) return |
|
|
|
|
const key = `weapp_auto_jump_${props.itemlist?.timestamp || ''}` |
|
|
|
|
if (sessionStorage.getItem(key)) return |
|
|
|
|
sessionStorage.setItem(key, '1') |
|
|
|
|
console.log(m[1], 11111) |
|
|
|
|
setTimeout(() => { |
|
|
|
|
console.log(21212,m); |
|
|
|
|
wx.miniProgram.navigateTo({ url: m[1] }) |
|
|
|
|
}, 500) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
onMounted(() => { |
|
|
|
|
processedEmoji() |
|
|
|
|
descHeightChange() |
|
|
|
|
cmd.value = props.itemlist.cmd |
|
|
|
|
autoLaunchWeapp() |
|
|
|
|
nextTick(() => { |
|
|
|
|
initGlobalCallbacks() |
|
|
|
|
}) |
|
|
|
|
|