index.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <template>
  2. <div class="temp-layout">
  3. <div class="banner">
  4. <div class="container">
  5. <h1>{{$t('service.title')}}</h1>
  6. <ul>
  7. <li :class="{'is-active': $route.path === item.path}" v-for="item in listItem" :key="item.name" @click="$router.push(item.path)">{{ item.name }}</li>
  8. </ul>
  9. </div>
  10. </div>
  11. <div class="oper-btn" v-if="$route.params.id === 'use'">
  12. <a :href="`${$cdn}pdf/${language==='en'?'4DKanKan Pro Product Manual':'四维看看说明书_1.0'}.pdf`" target="_blank">
  13. <img :src="`${$cdn}images/use-download.png`" alt="">
  14. </a>
  15. </div>
  16. <component class="fix-layout" :is="active.cp" :data='active'/>
  17. </div>
  18. </template>
  19. <script>
  20. import lselect from '@/components/lselect'
  21. import {mapState} from 'vuex'
  22. import iuse from './use'
  23. import iapp from './app'
  24. import ibefore from './before'
  25. import iqa from './qa'
  26. import iclause from './clause'
  27. import iproduct from './product'
  28. import data from './config'
  29. import mVideo from '../video'
  30. export default {
  31. computed: {
  32. ...mapState({
  33. split: state => state.ui.navDivision,
  34. language: state => state.language.current
  35. })
  36. },
  37. data () {
  38. return {
  39. active: '',
  40. listItem: [
  41. {
  42. name: this.$t('service.app'),
  43. path: '/service/app/pro'
  44. },
  45. {
  46. name: this.$t('service.use'),
  47. path: '/service/use/pro'
  48. },
  49. {
  50. name: this.$t('service.clause'),
  51. path: '/service/clause/pro'
  52. },
  53. {
  54. name: this.$t('service.mVideo'),
  55. path: '/service/mVideo/all'
  56. }
  57. ]
  58. }
  59. },
  60. methods: {
  61. },
  62. watch: {
  63. '$route.params': {
  64. immediate: true,
  65. handler: function (newVal) {
  66. if (newVal.active && newVal.active !== 'all') {
  67. this.active = data[newVal.id][newVal.active]
  68. } else {
  69. this.active = {
  70. cp: newVal.id
  71. }
  72. }
  73. }
  74. }
  75. },
  76. components: {lselect, ibefore, iuse, iapp, iproduct, iclause, iqa, mVideo},
  77. mounted () {
  78. }
  79. }
  80. </script>
  81. <style lang="scss" scoped>
  82. .temp-layout{
  83. overflow: hidden;
  84. position: relative;
  85. .oper-btn{
  86. position: absolute;
  87. right: 50px;
  88. top: 50px;
  89. }
  90. }
  91. .banner {
  92. width: 100%;
  93. height: 290px;
  94. background: url(~@/assets/images/refactor/appDownload/banner.jpg) no-repeat center center;
  95. h1 {
  96. font-size: 40px;
  97. font-weight: normal;
  98. padding-top: 107px;
  99. line-height: 50px;
  100. margin-bottom: 30px;
  101. }
  102. ul {
  103. display: flex;
  104. }
  105. li {
  106. padding: 0 30px;
  107. font-size: 16px;
  108. color: #909090;
  109. cursor: pointer;
  110. font-weight: bold;
  111. &:first-child {
  112. padding-left: 0;
  113. }
  114. &.is-active, &:hover {
  115. color: #202020;
  116. }
  117. }
  118. }
  119. @media screen and (max-width: 1600px) {
  120. // .fix-layout{
  121. // margin-right: auto!important;
  122. // max-width: 900px!important;
  123. // }
  124. }
  125. </style>