<template>
|
<view class="fixed-down">
|
<view @click="activeClick(0)" :class="{ active: active == 0}">
|
<image src="/static/qiye/q03.png" mode="heightFix" v-if="active != 0"></image>
|
<image src="/static/qiye/q04.png" mode="heightFix" v-if="active == 0"></image>
|
<view>首页</view>
|
</view>
|
<view @click="activeClick(1)" :class="{ active: active == 1}">
|
<image src="/static/qiye/q01.png" mode="heightFix" v-if="active != 1"></image>
|
<image src="/static/qiye/q02.png" mode="heightFix" v-if="active == 1"></image>
|
<view>执法记录</view>
|
</view>
|
<view @click="activeClick(2)" :class="{ active: active == 2}">
|
<image src="/static/policy/user.png" mode="heightFix" v-if="active != 2"></image>
|
<image src="/static/policy/user-select.png" mode="heightFix" v-if="active == 2"></image>
|
<view>我的</view>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
export default {
|
props:{
|
activeNumber:{
|
type: [String, Number]
|
}
|
},
|
data() {
|
return {
|
active: this.activeNumber
|
}
|
},
|
methods: {
|
|
activeClick(number) {
|
if(this.active == number){
|
return
|
}
|
this.active = number
|
if(number==0){
|
uni.redirectTo({
|
url: `/qiye/qiyeIndex/qiyeIndex`
|
})
|
}
|
if(number==1){
|
uni.redirectTo({
|
url: `/qiye/record/record`
|
})
|
}
|
if(number==2){
|
uni.redirectTo({
|
url: `/qiye/my/my`
|
})
|
}
|
this.$emit('update:activeNumber', number)
|
}
|
}
|
}
|
</script>
|
|
<style scoped lang="scss">
|
.fixed-down{
|
position: fixed;
|
bottom: 0;
|
width: 100%;
|
display: flex;
|
justify-content: space-around;
|
align-items: center;
|
padding: 10rpx 0 40rpx;
|
background-color: white;
|
font-size: 20rpx;
|
color: #7E8596FF;
|
&>view{
|
text-align: center;
|
}
|
.active{
|
color: #1171E0FF;
|
}
|
image{
|
height: 58rpx;
|
width: 58rpx;
|
}
|
.code{
|
width: 108rpx;
|
height: 108rpx;
|
position: absolute;
|
top: -20rpx;
|
left: 0;
|
}
|
.relative{
|
position: relative;
|
width: 108rpx;
|
height: 108rpx;
|
}
|
}
|
</style>
|