123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- <template>
- <view class="">
- <view class="header" :style="[{'height': customBarH + 'rpx', 'padding-top': statusBarH + 'px'}]">
- <view class="header-left">
- <image class="left-img" src="/static/img/my/like.png" mode="heightFix"></image>
- </view>
- <view class="header-right">
- <image @click="goToUrl(1)" class="right-img" src="/static/img/my/edit.png" mode="aspectFill"></image>
- <image @click="goToUrl(2)" class="right-img" src="/static/img/my/set.png" mode="aspectFill"></image>
- </view>
- </view>
- <view class="box-title">
- <view class="" :style="[{'height': customBarH + 'rpx', 'padding-top': statusBarH + 'px'}]">
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- name: "my-nav",
- data() {
- return {
- statusBarH: 0,
- customBarH: 132,
- left: 35,
- isXcx:false,
- tabNum:0
- }
- },
- props: {
- },
- computed: {
- },
- watch: {
- },
- methods: {
- setTabNum(tabNum){
- if(this.tabNum!==tabNum){
- this.tabNum=tabNum
- this.$emit('setTabNum',tabNum)
- }
- },
- goToUrl(type){
- if(type===1){
- uni.navigateTo({
- 'url':'./editInformation'
- })
- }else {
- uni.navigateTo({
- 'url':'./set'
- })
- }
- }
- },
- created() {
- uni.getSystemInfo({
- success: (e) =>{
- this.statusBarH = e.statusBarHeight + 10
- this.$emit('navHeight', this.customBarH+this.statusBarH)
- }
- })
- }
- }
- </script>
- <style scoped lang="scss">
- @import url("/static/css/en-common.css") ;
- .header {
- width: 100vw;
- position: fixed;
- left: 0;
- top: 0;
- z-index: 100;
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 0 44rpx 0 18rpx;
- height: 132rpx;
- box-sizing: border-box;
- //border-bottom: 1rpx solid #F2F2F2;
- .header-left{
- .left-img{
- height: 132rpx;
- }
- }
- .header-right{
- height: 52rpx;
- display: flex;
- justify-content: flex-end;
- .right-img{
- width: 52rpx;
- height: 52rpx;
- }
- .right-img:first-child{
- margin-right: 40rpx;
- }
- }
- }
- .box-title {
- width: 100vw;
- }
- </style>
|