fix(webview): 修复url实体编码未解码的问题

1. 新增HTML实体解码工具函数decodeEntity
2. 在webview页面和跳转逻辑中调用该函数解码url参数
3. 统一格式化代码缩进风格
This commit is contained in:
2026-05-25 14:06:17 +08:00
parent 63789124f4
commit 107b5dd71b
2 changed files with 52 additions and 22 deletions

View File

@@ -3,12 +3,14 @@
<view class="iconfont iconshang navigate-back" @click="navigateBack"></view>
<web-view :src="src"></web-view>
<!-- 隐私弹窗 -->
<!-- 隐私弹窗 -->
<privacy-popup ref="privacyPopup"></privacy-popup>
</view>
</template>
<script>
import { decodeEntity } from '@/common/js/util.js';
export default {
data() {
return {
@@ -16,7 +18,7 @@ export default {
};
},
onLoad(option) {
this.src = decodeURIComponent(option.src);
this.src = decodeEntity(decodeURIComponent(option.src));
},
methods: {
navigateBack() {