wx_header.vue 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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" @click="jumpTo">
  4. <el-dropdown class="nav-dropdown">
  5. <el-button class="text" type="text" style="font-size: 18px;">
  6. <i class="el-icon-tickets" style="width: 40px;"></i>
  7. </el-button>
  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. appendClass = 'wx-header-custom-list'
  47. } else if (routeName.indexOf('SeoLearnDetail') > -1 ||
  48. routeName.indexOf('SeoConsultUser') > -1) {
  49. appendClass = 'wx-header-custom-detail'
  50. }
  51. return appendClass
  52. }
  53. }
  54. }
  55. </script>
  56. <style scoped>
  57. .wx-header {
  58. display: flex;
  59. justify-content: space-between;
  60. align-items: center;
  61. width: 100%;
  62. height: 64px;
  63. padding: 0 20px;
  64. background: white;
  65. }
  66. .logo {
  67. width: auto;
  68. height: 32px;
  69. }
  70. .text, .text i {
  71. color: #333;
  72. }
  73. .text span {
  74. padding-left: 10px;
  75. }
  76. </style>