<template>
  <view class="">
    <view class="finance_head">
      <view class="top">
        <view class="left">
          <u--image :showLoading="true" :src="userInfo.avatar||''" width="44px" height="44px" shape="circle"></u--image>
          <view class="name">{{userInfo.nickname}}</view>
          <image src="../../static/img/contract/setting.png"></image>
        </view>
        <view class="right" @click="naviTo('/subpkg/topUp/topUp')">
          账户充值
        </view>
      </view>
      <view class="center">
        <view class="title">
          <text style="margin-right: 20rpx;">账户总金额(元)</text><uni-icons type="eye" color="#fff"></uni-icons>
        </view>
        <view class="price">1338.96</view>
        <view class="bubble">
          <!-- <image src="../../static/img/contract/bubble.png"></image> -->
          <view class="text">可提现金额100.00元</view>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      userInfo:{} 
    }
  },
  onLoad() {
    // console.log(this.userInfo);
    this.userInfo = this.$store.state.app.userInfo;
    uni.setNavigationBarColor({
      frontColor: '#ffffff',
      backgroundColor: '#3175f9'
    })
  },
  onShow() {},
  methods: {
    naviTo(url) {
      url ?
        uni.navigateTo({
          url: url
        }) : Toast('暂未开放')
    },
  },
  onPullDownRefresh() {
      uni.stopPullDownRefresh()
    }
  }
</script>

<style lang="scss">
.finance_head{
  background-color: #3274F9FF;
  height: 500rpx;
  .top{
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    padding: 10rpx 28rpx;
    .left{
      display: flex;
      align-items: center;
      flex: 1;
      font-size: 28rpx;
      font-weight: 500;
      color: #FFFFFF;
      .name{
        margin: 0 17.5rpx;
      }
      image{
        width: 40rpx;
        height: 40rpx;
      }
    }
    .right{
      font-size: 24.53rpx;
      font-weight: 400;
      color: #FFFFFF;
    }
  }
  .center{
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    .title{
      font-size: 25rpx;
      font-weight: 400;
      line-height: 39rpx;
    }
    .price{
      font-size: 60rpx;
      font-weight: bold;
      line-height: 39rpx;
      margin-top: 28rpx;
      margin-bottom: 14rpx;
    }
    .bubble{
      padding: 20rpx 28rpx 10rpx 28rpx;
      background-image: url('../../static/img/contract/bubble.png');
      background-repeat: no-repeat;
      background-size: 100% 100%;
      .text{
      }
    }
  }
}
</style>
