feat: 新增sw(税务)与hj(生态环境)专区模块;自制hj/sw-tabbar底栏;hj-web内嵌阅读(双指缩放);hnlylaw三活动authorization隔离(Sft/Sw/Hj);缓存键Hj后缀;问卷1006/1007;home专区入口接线;sw/hj规则与隐私文案、学习清单及链接校修复

This commit is contained in:
lcj
2026-11-11 15:20:20 +08:00
parent ead48745c2
commit 8a1ff90d6b
30 changed files with 6365 additions and 40 deletions
+76
View File
@@ -0,0 +1,76 @@
<template>
<view class="content">
<view class="frame-wrap" :style="{ height: wrapHeight + 'px' }">
<iframe class="frame" :src="url" frameborder="0" :style="frameStyle"></iframe>
</view>
</view>
</template>
<script>
export default {
data() {
return {
url: '',
title: '',
frameWidth: 1200,
screenW: 375,
wrapHeight: 600,
vpSaved: ''
}
},
computed: {
scale() {
return this.screenW / this.frameWidth
},
frameStyle() {
const h = Math.ceil(this.wrapHeight / this.scale)
return 'width:' + this.frameWidth + 'px;height:' + h + 'px;transform:scale(' + this.scale + ');transform-origin:0 0;'
}
},
onLoad(options) {
this.url = decodeURIComponent(options.url || '')
this.title = decodeURIComponent(options.title || '法规原文')
const meta = document.querySelector('meta[name="viewport"]')
if (meta) {
this.vpSaved = meta.getAttribute('content') || ''
meta.setAttribute('content', 'width=device-width,initial-scale=1.0,maximum-scale=3.0,user-scalable=yes')
}
},
onReady() {
const sys = uni.getSystemInfoSync()
this.screenW = sys.windowWidth
this.wrapHeight = sys.windowHeight
},
onUnload() {
const meta = document.querySelector('meta[name="viewport"]')
if (meta && this.vpSaved) {
meta.setAttribute('content', this.vpSaved)
}
}
}
</script>
<style lang="scss">
page {
background-color: #fff;
}
.content {
position: relative;
width: 100%;
max-width: 100vw;
overflow: hidden;
}
.frame-wrap {
position: relative;
width: 100%;
overflow: hidden;
background: #fff;
}
.frame {
display: block;
border: none;
}
</style>