wx_header_no_jump.vue 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <template>
  2. <section class="wx-header" :class="appendClass">
  3. <img class="logo" src="https://stacdn.proginn.com/image/common/logo3@2x.png" alt="icon" >
  4. <el-button class="text" type="text" style="font-size: 18px;">
  5. <i class="el-icon-tickets" style="width: 40px;"></i>
  6. </el-button>
  7. <!-- <el-dropdown class="nav-dropdown">
  8. <el-dropdown-menu slot="dropdown">
  9. <el-dropdown-item>
  10. <a class="workstation text" href="https://www.proginn.com/cat/">
  11. <i class="el-icon-service"></i><span>程序员</span>
  12. </a>
  13. </el-dropdown-item>
  14. <el-dropdown-item>
  15. <a class="workstation text" href="https://jishuin.proginn.com/">
  16. <i class="el-icon-message"></i><span>技术圈</span>
  17. </a>
  18. </el-dropdown-item>
  19. <el-dropdown-item>
  20. <a class="workstation text" href="https://support.proginn.com/">
  21. <i class="el-icon-question"></i><span>帮助</span>
  22. </a>
  23. </el-dropdown-item>
  24. <el-dropdown-item>
  25. <a class="workstation text" href="https://inn.proginn.com/sites/index.html">
  26. <i class="el-icon-phone"></i><span>合作伙伴</span>
  27. </a>
  28. </el-dropdown-item>
  29. </el-dropdown-menu>
  30. </el-dropdown> -->
  31. </section>
  32. </template>
  33. <script>
  34. export default {
  35. methods: {
  36. jumpTo() {
  37. location.href = this.$store.state.domainConfig.siteUrl
  38. }
  39. },
  40. computed: {
  41. appendClass () {
  42. let appendClass = ''
  43. const routeName = this.$route.name
  44. if (routeName.indexOf('SeoLearnList') > -1 ||
  45. routeName.indexOf('SeoConsultList') > -1 ||
  46. routeName.indexOf('SeoSkillList') > -1) {
  47. appendClass = 'wx-header-custom-list'
  48. } else if (routeName.indexOf('SeoLearnDetail') > -1 ||
  49. routeName.indexOf('SeoConsultUser') > -1 ||
  50. routeName.indexOf('SeoSkillDetail') > -1) {
  51. appendClass = 'wx-header-custom-detail'
  52. }
  53. return appendClass
  54. }
  55. }
  56. }
  57. </script>
  58. <style scoped>
  59. .wx-header {
  60. display: flex;
  61. justify-content: space-between;
  62. align-items: center;
  63. width: 100%;
  64. height: 64px;
  65. padding: 0 20px;
  66. background: white;
  67. }
  68. .logo {
  69. width: auto;
  70. height: 32px;
  71. }
  72. .text, .text i {
  73. color: #333;
  74. }
  75. .text span {
  76. padding-left: 10px;
  77. }
  78. </style>