index.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <template>
  2. <div class="header ng-scope">
  3. <div class="p-wrap-full clear">
  4. <div class="logo fl" style="padding-top: 24px;">
  5. <a href="javascript:void(0)" style="text-decoration: none"
  6. class="rel ng-binding waphide" @click="$router.push('/')">
  7. 三明市建设人才服务中心
  8. <div class="hover-block" style="padding-top: 24px;">
  9. <div class="hover-bd ng-scope" style="width:137px;margin-top: -20px" @click="$router.push('/')">
  10. <i class="arrowleft"></i>
  11. <div>点击进入门户首页</div>
  12. </div>
  13. </div>
  14. </a>
  15. </div>
  16. <div class="nav fr">
  17. <a href="javascript:void(0)" @click="gotoPage('/')" >
  18. <span class="p-ico2 ico-index"></span>
  19. <span class="nav-txt">回到主页</span>
  20. </a>
  21. <a href="javascript:void(0)" class="ng-scope current">
  22. <span class="p-ico2 ico-center"></span>
  23. <span class="nav-txt">学习中心</span>
  24. </a>
  25. <a href="javascript:void(0)" @click="gotoPage('/center/sign')">
  26. <span class="p-ico2 ico-bmpx"></span>
  27. <span class="nav-txt">学时证明</span>
  28. </a>
  29. <span class="p-ico2 ico-line"></span>
  30. <a href="javascript:void(0)" @click="logout()">
  31. <span class="p-ico2 ico-exit"></span>
  32. <span class="nav-txt">退出</span>
  33. </a>
  34. </div>
  35. </div>
  36. </div>
  37. </template>
  38. <script>
  39. import { mapActions } from "vuex";
  40. export default {
  41. props: {
  42. user: {
  43. type: Object,
  44. default: {
  45. nickanme: '',
  46. headImg:''
  47. }
  48. }
  49. },
  50. methods:{
  51. ...mapActions("user", [ "doLogout"]),
  52. gotoPage( route ){
  53. if( this.$route.path == route){
  54. return;
  55. }
  56. this.$router.push(route);
  57. },
  58. isActive( path ){
  59. let rpath = this.$route.path;
  60. return rpath.indexOf( path )> -1;
  61. },
  62. logout(){
  63. this.doLogout().then( res=>{
  64. this.$router.push('/');
  65. })
  66. }
  67. }
  68. }
  69. </script>
  70. <style>
  71. @import url("./index.css");
  72. </style>