<template>
  <div class="course-my ng-scope">
    <div class="course-my-info clear">
      <a class="my-headimg">
        <img v-if="user.gender=='男'" src="../../../assets/images/user-man.jpg" >
        <img v-else-if="user.gender=='女'" src="../../../assets/images/user-woman.jpg" >
        <img v-else  src="../../../assets/images/user-img_hash24aa2f2347.jpg">
      </a>
      <div class="info-detail">
        <div class="pt20">欢迎您，
          <span class="aw ng-binding" :title="user.nickname" style="display:inline" >
            {{user.nickname}}
          </span>
        </div>
      </div>
    </div>


    <div class="login-entry" style="width: 100%;">
      <button class="btn-b-b w196" @click="gotoPage('/center/home')">进入学习中心</button>
     </div>


    <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: ''
        }
      }
    },
    methods: {
      openLoginDialog( event){
        this.$emit('openLoginDialog', event)
      },
      logout(){
        this.$emit('logout')
      },
      gotoPage( route ){
        this.$router.push( route );
      }

    }
  };
</script>

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