<template>
  <div class="course-my" style="background-color: white;">
      <div class="tc">
        <img v-if="user.headImg" :src="user.headImg" style="margin: 10px auto;width: 160px; border-radius: 10%;" >
        </img>
        <img  v-else-if="user.gender=='男'" style="margin: 10px auto;width: 160px; border-radius: 10%;"
          src="../../../assets/images/user-man.jpg">
         </img>
        <img v-else style="margin: 10px auto;width: 160px; border-radius: 10%;"
          src="../../../assets/images/user-man.jpg" >
        </img>
      </div>
      <div class="mt10 tc">
        <div class="pt20 fs18" style="color: #000000;">
          当前用户
          <span :title="user.nickname" style="display:inline" >
            {{user.nickname}}
          </span>
        </div>
    </div>

    <el-row class="login-entry" style="width: 100%;">
      <!-- <el-col :span="12" class="p10">
        <button class="btn-b-b fs15" @click="gotoPage('/center/home')">个人中心</button>
      </el-col>

      <el-col :span="12" class="p10">
        <button class="btn-b-b fs15" @click="gotoPage('/center/setting')">账号设置</button>
      </el-col>

      <el-col :span="12" class="p10">
        <button class="btn-b-b fs15" @click="gotoPage('/center/class/train')">我的课程</button>
      </el-col>

      <el-col :span="12" class="p10">
        <button class="btn-b-b fs15" @click="gotoPage('/center/market')">推荐课程</button>
      </el-col>

      <el-col :span="12" class="p10">
        <button class="btn-b-b fs15" @click="gotoPage('/center/myOrder')">我的订单</button>
      </el-col>

      <el-col :span="12" class="p10">
        <button class="btn-b-b fs15" @click="gotoPage('/center/sign')">学时证明</button>
      </el-col> -->

      <el-col :span="12" class="p10">
        <el-button type="primary" @click="gotoPage('/center/home')">个人中心</el-button>
      </el-col>
      <el-col :span="12" class="p10">
        <el-button type="primary" @click="logout()">退出登录</el-button>
      </el-col>
     </el-row>

<!--
    <ul class="entry-box clear">
      <li>
        <a href="javascript:void(0)" @click="gotoPage('/center/market')">
          <i class="p-ico i7"></i><span>在线课程</span></a>
      </li>
      <li><a href="javascript:void(0)" @click="gotoPage('/center/class/train')">
        <i class="p-ico i1"></i><span>我的学习</span></a>
      </li>
      <li><a href="javascript:void(0)" @click="gotoPage('/center/sign')">
        <i class="p-ico i2"></i><span>学时证明</span></a>
      </li>
      <li><a href="javascript:void(0)" @click="gotoPage('/center/myOrder')">
        <i class="p-ico i3"></i><span>我的订单</span>
        </a></li>
      <li><a href="javascript:void(0)" @click="gotoPage('/center/setting')">
        <i class="p-ico i6"></i><span>帐号设置</span></a>
      </li>
      <li><a href="javascript:void(0)" @click="logout()">
      <i class="p-ico i10"></i><span>退出登录</span></a></li>
    </ul> -->
  </div>
</template>

<script>
  export default {
    props: {
      user: {
        type: Object,
        default: {
          nickanme: '',
          gender: ''
        }
      }
    },
    methods: {
      openLoginDialog( event){
        this.$emit('openLoginDialog', event)
      },
      logout(){
        this.$emit('logout')
      },
      gotoPage( route ){
        this.$router.push( route );
      }

    }
  };
</script>

<style>
@import url("./loginBase.css");
</style>
