<template>
  <div class="page">
    <div class="user-list">
      <div class="item">
        <div class="item-left">
          <img src="https://cdn.cunwuyun.cn/wxmp/mine/wodejiating.png" alt="">
          <div class="user-info">
            <h3>代玲昌</h3>
            <p>积玉桥社区</p>
          </div>
        </div>
        <div class="item-right">
          <div @click="toTransfer">转积分</div>
        </div>
      </div>
      <div class="item">
        <div class="item-left">
          <img src="https://cdn.cunwuyun.cn/wxmp/mine/wodejiating.png" alt="">
          <div class="user-info">
            <h3>代玲昌</h3>
            <p>积玉桥社区</p>
          </div>
        </div>
        <div class="item-right">
          <div>转积分</div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import {mapState} from 'vuex'

export default {
  appName: "我的家庭",
  computed: {
    ...mapState(['user', 'token'])
  },
  data() {
    return {
      info: {}
    }
  },
  onLoad() {
    this.$dict.load('householdRelation').then(() => {
      this.$nextTick(() => {
        this.getUser()
      })
    })
  },
  methods: {
    getUser() {
      // this.$instance.post(`/app/appresident/detailForWx?id=${this.user.residentId}`).then(res => {
      //   if (res.code === 0) {
      //     this.info = res.data
      //   }
      // })
    },
    toTransfer() {
      uni.navigateTo({url: `./transferIntrgral`})
    }
  }
}
</script>
<style scoped lang="scss">
@import "~dvcp-wui/common";

.page {
  width: 100%;
  background-color: #f3f6f9;

  .user-list {
    padding: 32px 32px 0;
    .item {
      padding: 26px;
      background-color: #fff;
      display: flex;
      margin-bottom: 24px;
      .item-left {
        width: calc(100% - 150px);
        display: flex;
        img {
          width: 108px;
          height: 108px;
          border-radius: 54px;
        }
        .user-info {
          margin-left: 20px;
          h3 {
            line-height: 42px;
            font-family: PingFangSC-Regular;
            font-weight: 400;
            font-size: 32px;
            color: #333;
            margin-bottom: 10px;
          }
          p {
            font-family: PingFangSC-Regular;
            font-size: 24px;
            color: #999;
            line-height: 40px;
          }
        }
      }
      .item-right {
        width: 150px;
        div {
          width: 126px;
          height: 56px;
          line-height: 56px;
          text-align: center;
          background: #2D7DFF;
          border-radius: 30px;
          font-family: PingFangSC-Regular;
          font-size: 26px;
          color: #FFF;
          margin-top: 26px;
        }
      }
    }
  }
}
</style>
