78 lines
1.5 KiB
Vue
78 lines
1.5 KiB
Vue
<template>
|
|
<view class="header">
|
|
<span @tap="goBack" class="iconfont icon_back"></span>
|
|
<span class="page_name">{{title}}</span>
|
|
<span @tap="backHome" class="iconfont icon_home" :class="{'vhide': show1 === false}"></span>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
};
|
|
},
|
|
props: {
|
|
title: String,
|
|
inner: {
|
|
type: Boolean,
|
|
default: false
|
|
},
|
|
inner2: {
|
|
type: Boolean,
|
|
default: false
|
|
},
|
|
show1: {
|
|
type: Boolean,
|
|
default: true
|
|
}
|
|
},
|
|
methods: {
|
|
goBack () {
|
|
if (this.inner) {
|
|
uni.navigateBack()
|
|
} else if (this.inner2) {
|
|
this.$emit('goIn')
|
|
} else {
|
|
uni.redirectTo({
|
|
url: '/pages/home/home'
|
|
})
|
|
// uni.navigateBack()
|
|
}
|
|
},
|
|
backHome () {
|
|
uni.redirectTo({
|
|
url: '/pages/home/home'
|
|
})
|
|
// uni.navigateBack()
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="stylus">
|
|
@import '@/common/style/mixin.styl';
|
|
.header
|
|
_fj()
|
|
_wh(100%, 30px)
|
|
background: center / 100% 100% url(../static/images/header_bg_s.png) no-repeat
|
|
z-index 200
|
|
padding 0 10px
|
|
.page_name
|
|
_font(22px, 30px, #F6F9FE,700,center)
|
|
font-family: YouSheBiaoTiHei
|
|
background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(49,190,255,0.9) 0%, rgba(239,252,254,1) 40%);
|
|
-webkit-background-clip: text;
|
|
-webkit-text-fill-color: transparent;
|
|
.icon_back {
|
|
font-size: 26px;
|
|
line-height: 30px;
|
|
color: #fff;
|
|
}
|
|
.icon_home {
|
|
font-size: 26px;
|
|
line-height: 30px;
|
|
color: #fff;
|
|
}
|
|
</style>
|