<template>
  <view>
    <!-- 自定义导航栏 -->
    <view class="navBarBox">
      <!-- 状态栏占位 -->
      <view class="statusBar"></view>
      <!-- 真正的导航栏内容 -->
      <view class="navBar" :style="{ min_height: statusBarHeight + 'px'}">
        <uni-icons @click="goBack()" type="arrow-left" color="#fff" size="30"></uni-icons>
        <view>画框参数设置</view>
        <image class="logo-image" ></image>
      </view>
    </view>

  </view>
</template>

<script>
import UniIcons from "../uni_modules/uni-icons/components/uni-icons/uni-icons.vue";

export default {
  components: {UniIcons},
  data() {
    return {
      src:"/static/images/left.jpg",
      // 状态栏高度
      statusBarHeight: 0,
      // 导航栏高度
      navBarHeight: 82 + 11,
    };
  },
  props: {},
  //第一次加载时调用
  created() {
    //获取手机状态栏高度
    this.statusBarHeight = uni.getSystemInfoSync()['statusBarHeight'];
  }, methods: {
    goBack(){
      uni.navigateBack({
        delta: 2
      });
    },
    toLogin() {
      //跳转传参示例
      this.$Router.push({
        path: '/pages/login/login',
        query: {msg: '我要登录！'}
      });
    },
    toOrder() {
      //跳转传参示例
      this.$Router.push({
        path: '/pages/order/order',
        query: {msg: '前往订单！'}
      });
    }
  }
}
</script>

<style>
.navBarBox {
  width: 100vw;
}

.navBarBox .navBar {
  padding: 3rpx 50rpx;
  padding-bottom: 8rpx;
  color: white;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: black;
  flex-direction: row;
}

.navBarBox .navBar .logo-image {
  width: 16rpx;
  height: 16rpx;
  margin-right: 10rpx;
}

.button {
  padding: 4rpx 40rpx;
  border-radius: 5px;
  font-size: 16px;
}

.button:hover {
  background: #2b85e4;
}
</style>
