usercenter.vue 4.2 KB
<template>
  <div class="container">
    <div class="usertop">
      <div class="usertophead flextwo" @click="changeziliao">
        <div class="usertopheadleft flexone">
          <div class="userimg">
            <img src="../../../assets/touxiang.png" alt />
          </div>
          <div class="username">欧阳娜娜</div>
        </div>
        <img src="../../../assets/grayrow.png" alt class="yourow" />
      </div>
      <div class="userlsit flexsix">
        <div class="userlistitem flexseven" @click="join(1)">
          <img src="../../../assets/fatiezi.png" alt class="userlistimg" />

          <div class="iserlistname">发帖子</div>
        </div>
        <div class="userlistitem flexseven" @click="join(2)">
          <img src="../../../assets/joinus.png" alt class="userlistimg" />

          <div class="iserlistname">加入我们</div>
        </div>
        <div class="userlistitem flexseven" @click="join(3)">
          <img src="../../../assets/kefu.png" alt class="userlistimg" />

          <div class="iserlistname">客服中心</div>
        </div>
        <div class="userlistitem flexseven" @click="join(4)">
          <img src="../../../assets/jiangquan.png" alt class="userlistimg" />

          <div class="iserlistname">获得奖券</div>
        </div>
        <div class="userlistitem flexseven" @click="join(5)">
          <img src="../../../assets/collect.png" alt class="userlistimg" />

          <div class="iserlistname">我的收藏</div>
        </div>
      </div>
    </div>
    <div class="kaikeitem flextwo" @click="jump(1)">
      <div class="kaikeitemleft flexone">
        <div class="courseimg">
          <img src="../../../assets/kaike.png" alt />
        </div>

        <span class="kaiketext">去开课</span>
      </div>
      <img src="../../../assets/grayrow.png" alt class="yourow" />
    </div>
    <div class="kaikeitem flextwo" @click="jump(2)">
      <div class="kaikeitemleft flexone">
        <div class="courseimg">
          <img src="../../../assets/zuozhan.png" alt />
        </div>

        <span class="kaiketext">作战包</span>
      </div>
      <img src="../../../assets/grayrow.png" alt class="yourow" />
    </div>
    <div class="kaikeitem flextwo" @click="jump(3)">
      <div class="kaikeitemleft flexone">
        <div class="courseimg">
          <img src="../../../assets/sucai.png" alt />
        </div>

        <span class="kaiketext">素材</span>
      </div>
      <img src="../../../assets/grayrow.png" alt class="yourow" />
    </div>
    <tabBar v-bind:active="3" />
  </div>
</template>

<script>
import tabBar from "@/components/views/tabBar.vue";
export default {
  components: {
    tabBar
  },
  data() {
    return {
      selnav: 3
    };
  },
  methods: {
    selcourse(e) {
      console.log(37344);
      console.log(e);
      this.selnav = e.currentTarget.dataset.id;
    },
    // 修改资料
    changeziliao() {
      this.$router.push({
        path: "/changeziliao",
        // query: { testId: item.test_student_id }
      });
    },
    jump(id) {
      if (id == 1) {
        this.$router.push({
          path: "/opencourse",
          // query: { testId: item.test_student_id }
        });
      } else if (id == 2) {
        this.$router.push({
          path: "/zuozhanbao",
          // query: { testId: item.test_student_id }
        });
      } else if (id == 3) {
        this.$router.push({
          path: "/sucaibao",
          // query: { testId: item.test_student_id }
        });
      }
    },
    // 上面跳转
    join(id) {
      if (id == 1) {

      } else if (id == 2) {
        this.$router.push({
          path: "/joinus",
          // query: { testId: item.test_student_id }
        });


      } else if (id == 3) {

        this.$router.push({
          path: "/kefucenter",
          // query: { testId: item.test_student_id }
        });
      } else if (id == 4) {
        this.$router.push({
          path: "/coupon",
          // query: { testId: item.test_student_id }
        });
      } else if (id == 5) {
        this.$router.push({
          path: "/mycollect",
          // query: { testId: item.test_student_id }
        });
      }
    }
  }
};
</script>

<style>
@import "../../../style/usercenter.css";
</style>