<template>
  <div class="my-messagge pagePadding">
    <div class="change">
      <div class="title">我的信息</div>
      <div class="change-main">
        <el-row class="infor">
          <el-col
            :span="7"
          ><div class="grid-content bg-purple tr">用 户 名：</div></el-col>
          <el-col
            :span="17"
          ><div class="grid-content bg-purple">{{ infor.username }}</div></el-col>
        </el-row>
        <el-row class="infor">
          <el-col
            :span="7"
          ><div class="grid-content bg-purple tr">姓 名：</div></el-col>
          <el-col
            :span="17"
          ><div class="grid-content bg-purple">{{ infor.name }}</div></el-col>
        </el-row>
        <el-row class="infor">
          <el-col
            :span="7"
          ><div class="grid-content bg-purple tr">手 机 号：</div></el-col>
          <el-col
            :span="17"
          ><div class="grid-content bg-purple">
            {{ infor.mobile }}
          </div></el-col>
        </el-row>
        <el-row class="infor">
          <el-col
            :span="7"
          ><div class="grid-content bg-purple tr">邮 箱：</div></el-col>
          <el-col
            :span="17"
          ><div class="grid-content bg-purple">{{ infor.email }}</div></el-col>
        </el-row>
        <el-row class="infor">
          <el-col
            :span="7"
          ><div class="grid-content bg-purple tr">当前角色：</div></el-col>
          <el-col
            :span="17"
          ><div class="grid-content bg-purple">{{ infor.role_name }}</div></el-col>
        </el-row>
        <el-row class="infor">
          <el-col
            :span="7"
          ><div class="grid-content bg-purple tr" v-if="infor.addtime">加入日期：</div></el-col>
          <el-col
            :span="17"
          ><div class="grid-content bg-purple">
            {{ infor.addtime }}
          </div></el-col>
        </el-row>
      </div>
    </div>
  </div>
</template>

<script>
import asyncRequest from '@/apis/service/user/index'
export default {
  name: 'Login',
  data() {
    return {
      // const loadding = this.$loading();
      infor: {}
    }
  },

  created() {},
  mounted() {
    this.getDetail()
  },
  destroyed() {},
  methods: {
    async getDetail() {
      const res = await asyncRequest.detail({})
      if (res.code === 0 && res.data) {
        this.infor = res.data
        console.log(this.infor)
      }
    }
  }
}
</script>

<style lang="scss">
.my-messagge {
}

.my-messagge {
  background: rgba(242, 242, 242, 1);
  text-align: center;
  .change {
    padding: 0 8% 0 0;
    .title {
      border-width: 0px;
      width: 100%;
      height: 170px;
      display: flex;
      font-weight: 400;
      font-style: normal;
      font-size: 22px;
      text-align: left;
      padding: 0;
      padding: 60px 0 0 100px;
      width: 100%;
      box-sizing: border-box;
    }
  }
  .change-main {
    width: 370px;
    margin: 0 auto;
    text-align: left;
  }
  .infor {
    padding: 0 0 40px 0;
    .tr {
      text-align: right;
      padding: 0 15px 0 0;
    }
  }
}
/* 修复input 背景不协调 和光标变色 */
/* Detail see https://github.com/PanJiaChen/vue-element-admin/pull/927 */

$bg: #283443;
$light_gray: #fff;
$cursor: #fff;

@supports (-webkit-mask: none) and (not (cater-color: $cursor)) {
  .my-messagge .el-input input {
    color: $cursor;
  }
}

/* reset element-ui css */
.my-messagge {

}
</style>

<style lang="scss" scoped>
$bg: rgba(242, 242, 242, 1);
$dark_gray: #889aa4;
$light_gray: #eee;

.my-messagge {
  min-height: 100%;
  width: 100%;
  height: 100%;
  background-color: $bg;
  overflow: hidden;
  position: absolute;
  z-index: 2;
  background: #fff;

  .login-form {
    position: relative;
    width: 415px;
    max-width: 100%;
    height: 100%;
    padding: 50px 35px 150px 35px;
    margin: 0 auto;
    overflow: hidden;
    .el-form-item__label {
      height: 49px;
      line-height: 49px;
    }
  }

  .tips {
    font-size: 14px;
    color: #fff;
    margin-bottom: 10px;

    span {
      &:first-of-type {
        margin-right: 16px;
      }
    }
  }

  .svg-container {
    padding: 6px 5px 6px 15px;
    color: $dark_gray;
    vertical-align: middle;
    width: 30px;
    display: inline-block;
  }

  .show-pwd {
    position: absolute;
    right: 10px;
    top: 7px;
    font-size: 16px;
    color: $dark_gray;
    cursor: pointer;
    user-select: none;
  }

  .thirdparty-button {
    position: absolute;
    right: 0;
    bottom: 6px;
  }

  @media only screen and (max-width: 470px) {
    .thirdparty-button {
      display: none;
    }
  }
}
</style>
