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
+210
View File
@@ -0,0 +1,210 @@
<template>
<view class="content">
<view class="page-header">
<text class="header-back" @tap="goBack">‹</text>
<text class="header-title">法治学习</text>
</view>
<view class="body">
<view class="group" v-for="(group, gi) in articles" :key="gi">
<view class="group-title">{{ group.name }}</view>
<view class="article-item" v-for="item in group.articles" :key="item.url" @tap="openArticle(item)">
<view class="article-index">
<text class="article-index-text">{{ item.no }}</text>
</view>
<text class="article-title">{{ item.title }}</text>
<text class="article-arrow">›</text>
</view>
</view>
<view class="tip-text">点击法规名称跳转至官方发布页面阅读学习</view>
<view style="height: 40rpx;"></view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
groups: [{
name: '一、生态环境法典及配套规定',
list: [{
title: '中华人民共和国生态环境法典',
url: 'https://www.mee.gov.cn/ywgz/fgbz/fl/202603/t20260313_1146496.shtml'
},
{
title: '最高人民法院关于适用《中华人民共和国生态环境法典》时间效力的若干规定',
url: 'https://www.court.gov.cn/fabu/xiangqing/508001.html',
direct: true
}
]
},
{
name: '二、权威解读与学习资料',
list: [ {
title: '全国人大常委会法工委施春风:何以生态环境法典',
url: 'http://www.npc.gov.cn/c2/c30834/202603/t20260316_453286.html',
direct: true
},
{
title: '沈春耀:编纂生态环境法典 在法治轨道上以美丽中国建设全面推进人与自然和谐共生的现代化',
url: 'http://www.npc.gov.cn/npc/c2/kgfb/202603/t20260320_453349.html',
direct: true
},
{
title: '生态环境部部长黄润秋:加强生态环境法典学习贯彻 在法治轨道上全面推进美丽中国建设',
url: 'https://www.mee.gov.cn/ywdt/hjywnews/202606/t20260618_1159676.shtml'
}
]
}
]
}
},
computed: {
articles() {
let no = 0
return this.groups.map(g => ({
name: g.name,
articles: g.list.map(a => Object.assign({
no: ++no
}, a))
}))
}
},
methods: {
goBack() {
const pages = getCurrentPages()
if (pages.length > 1) {
uni.navigateBack()
} else {
uni.reLaunch({ url: '/pages/hj-index/hj-index' })
}
},
openArticle(item) {
if (item.direct) {
const w = window.open(item.url, '_blank')
if (!w) {
window.location.href = item.url
}
return
}
uni.navigateTo({
url: '/pages/hj-web/hj-web?url=' + encodeURIComponent(item.url) + '&title=' + encodeURIComponent(item.title)
})
}
}
}
</script>
<style lang="scss">
page {
background-color: #F8F8F8;
overflow-x: hidden;
}
.content {
position: relative;
min-height: 100vh;
width: 100%;
max-width: 100vw;
overflow-x: hidden;
box-sizing: border-box;
}
.page-header {
position: sticky;
top: 0;
z-index: 10;
display: flex;
align-items: center;
padding: 20rpx 30rpx;
background: linear-gradient(135deg, #FD5401, #FF7A3D);
}
.header-back {
font-size: 48rpx;
color: #fff;
line-height: 1;
margin-right: 16rpx;
padding: 0 10rpx;
}
.header-title {
font-size: 30rpx;
font-weight: 600;
color: #fff;
flex: 1;
}
.body {
width: 100%;
padding: 24rpx 30rpx;
box-sizing: border-box;
}
.group {
margin-bottom: 24rpx;
box-sizing: border-box;
}
.group-title {
font-size: 28rpx;
font-weight: 700;
color: #FD5401;
padding: 8rpx 4rpx 16rpx;
}
.article-item {
width: 100%;
max-width: 100%;
box-sizing: border-box;
background: #fff;
border-radius: 16rpx;
padding: 26rpx 24rpx;
margin-bottom: 14rpx;
display: flex;
align-items: center;
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.04);
}
.article-index {
width: 44rpx;
height: 44rpx;
border-radius: 50%;
background: linear-gradient(135deg, #FD5401, #FF7A3D);
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
margin-right: 18rpx;
}
.article-index-text {
font-size: 22rpx;
font-weight: 700;
color: #fff;
}
.article-title {
flex: 1;
min-width: 0;
word-break: break-all;
font-size: 27rpx;
color: #333;
line-height: 1.4;
}
.article-arrow {
font-size: 36rpx;
color: #ccc;
flex-shrink: 0;
margin-left: 10rpx;
}
.tip-text {
font-size: 22rpx;
color: #999;
text-align: center;
margin: 6rpx 0 20rpx;
padding: 0 30rpx;
}
</style>