feat: 新增sw(税务)与hj(生态环境)专区模块;自制hj/sw-tabbar底栏;hj-web内嵌阅读(双指缩放);hnlylaw三活动authorization隔离(Sft/Sw/Hj);缓存键Hj后缀;问卷1006/1007;home专区入口接线;sw/hj规则与隐私文案、学习清单及链接校修复
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
<template>
|
||||
<view class="hj-tabbar">
|
||||
<view class="hj-tabbar-item" v-for="item in list" :key="item.key" @click="go(item)">
|
||||
<image class="hj-tabbar-icon" :src="current === item.key ? item.activeIcon : item.icon" mode="aspectFit"></image>
|
||||
<text class="hj-tabbar-text" :class="{ active: current === item.key }">{{ item.text }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'hj-tabbar',
|
||||
props: {
|
||||
current: {
|
||||
type: String,
|
||||
default: 'index'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: [
|
||||
{ key: 'index', text: '首页', path: '/pages/hj-index/hj-index', icon: '/static/shouye.png', activeIcon: '/static/shouye_select.png' },
|
||||
{ key: 'winRecords', text: '中奖记录', path: '/pages/hj-win-records/hj-win-records', icon: '/static/zhongjiangjilu.png', activeIcon: '/static/zhongjiangjilu_select.png' },
|
||||
{ key: 'profile', text: '我的', path: '/pages/hj-profile/hj-profile', icon: '/static/wode.png', activeIcon: '/static/wode_select.png' }
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
go(item) {
|
||||
if (item.key === this.current) return
|
||||
uni.reLaunch({ url: item.path })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.hj-tabbar {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 998;
|
||||
height: 120rpx;
|
||||
display: flex;
|
||||
background: linear-gradient(to bottom, #FFEBBC, #FFD67E);
|
||||
box-shadow: 0 -2rpx 12rpx rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.hj-tabbar-item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 16rpx 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.hj-tabbar-icon {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
}
|
||||
|
||||
.hj-tabbar-text {
|
||||
font-size: 22rpx;
|
||||
color: #5D533D;
|
||||
margin-top: 4rpx;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.hj-tabbar-text.active {
|
||||
color: #FD5401;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,75 @@
|
||||
<template>
|
||||
<view class="sw-tabbar">
|
||||
<view class="sw-tabbar-item" v-for="item in list" :key="item.key" @click="go(item)">
|
||||
<image class="sw-tabbar-icon" :src="current === item.key ? item.activeIcon : item.icon" mode="aspectFit"></image>
|
||||
<text class="sw-tabbar-text" :class="{ active: current === item.key }">{{ item.text }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'sw-tabbar',
|
||||
props: {
|
||||
current: {
|
||||
type: String,
|
||||
default: 'index'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: [
|
||||
{ key: 'index', text: '首页', path: '/pages/sw-index/sw-index', icon: '/static/shouye.png', activeIcon: '/static/shouye_select.png' },
|
||||
{ key: 'winRecords', text: '中奖记录', path: '/pages/sw-win-records/sw-win-records', icon: '/static/zhongjiangjilu.png', activeIcon: '/static/zhongjiangjilu_select.png' },
|
||||
{ key: 'profile', text: '我的', path: '/pages/sw-profile/sw-profile', icon: '/static/wode.png', activeIcon: '/static/wode_select.png' }
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
go(item) {
|
||||
if (item.key === this.current) return
|
||||
uni.reLaunch({ url: item.path })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.sw-tabbar {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 998;
|
||||
height: 120rpx;
|
||||
display: flex;
|
||||
background: linear-gradient(to bottom, #FFEBBC, #FFD67E);
|
||||
box-shadow: 0 -2rpx 12rpx rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.sw-tabbar-item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 16rpx 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.sw-tabbar-icon {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
}
|
||||
|
||||
.sw-tabbar-text {
|
||||
font-size: 22rpx;
|
||||
color: #5D533D;
|
||||
margin-top: 4rpx;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.sw-tabbar-text.active {
|
||||
color: #FD5401;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user