course.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. <template>
  2. <section class="Course-container">
  3. <!-- <div class="wow wow animate__animated animate__fadeInUp"> -->
  4. <!-- animate__delay-.2s -->
  5. <!-- class="wow animate__animated animate__rotateIn " -->
  6. <component :is="comName" >
  7. <div class="course-change">
  8. <div class="tabs">
  9. <img src="http://res.training.luojigou.vip/FhHOYFM_rwtBGKZ9OCDgGs0PvGNw?imageView2/0/q/50|imageslim" alt="">
  10. <div class="tags-box">
  11. <div class="tabs-item"
  12. @click="changeTabgs(tab)"
  13. v-for="tab in tabsData" :key="tab.id">
  14. <img class="cp" :src="currentTabId !== tab.id ? tab.imgUrl : tab.activeImgUrl" alt="">
  15. <section class="cp" :style="{color: currentTabId === tab.id ? '#2169FA' : '#000'}">
  16. {{tab.label}}
  17. </section>
  18. </div>
  19. </div>
  20. </div>
  21. <div class="line" >
  22. <img :style="lineStyle" src="http://res.training.luojigou.vip/FrCpRmLbuGygO2NdcTJrbFGMSqYS?imageView2/0/q/50|imageslim" alt="">
  23. </div>
  24. </div>
  25. <Label class="label" :labelProps="labelProps" v-solt:label />
  26. </component>
  27. <!-- </div> -->
  28. </section>
  29. </template>
  30. <script>
  31. import Xcx from '@/components/products/xcx.vue'
  32. import Label from '@/components/products/label.vue'
  33. import H5 from '@/components/products/H5'
  34. import Pc from '@/components/products/pc'
  35. import Parent from '@/components/products/parent'
  36. import Teacher from '@/components/products/teacher'
  37. if (process.browser) {
  38. var {WOW} = require('wowjs')
  39. }
  40. // console.log(Xcx);
  41. const tabsData = Object.freeze([
  42. {
  43. id: 0,
  44. imgUrl: 'http://res.training.luojigou.vip/FkSnoRtRQ4WY_f3M3TQEJcn_du_Z?imageView2/0/q/50|imageslim',
  45. activeImgUrl: 'http://res.training.luojigou.vip/FnzQdBDxbMr-Ek5HlcWCQ_Dk12zn?imageView2/0/q/50|imageslim',
  46. label: '小程序课堂'
  47. },
  48. {
  49. id: 1,
  50. imgUrl: 'http://res.training.luojigou.vip/FuV6EjLrPYoiFII0iLYQlW51Bemq?imageView2/0/q/50|imageslim',
  51. activeImgUrl: 'http://res.training.luojigou.vip/FoRYr27YPRQ5dcZy6hjWkqCB3bUc?imageView2/0/q/50|imageslim',
  52. label: '微信H5课堂'
  53. },
  54. {
  55. id: 2,
  56. imgUrl: 'http://res.training.luojigou.vip/FsVRp9Lk4Cyp5O_JNBe49kfz7vZh?imageView2/0/q/50|imageslim',
  57. activeImgUrl: 'http://res.training.luojigou.vip/FhFDmhtts6iIWXD_Z16JOmMeqbh6?imageView2/0/q/50|imageslim',
  58. label: 'PC端独立课堂'
  59. },
  60. {
  61. id: 3,
  62. imgUrl: 'http://res.training.luojigou.vip/FsGTOeaPqx7Ipow75LJYM8ETlKew?imageView2/0/q/50|imageslim',
  63. activeImgUrl: 'http://res.training.luojigou.vip/FqmqyLMeRxdvj__Z618fkgVHJV7J?imageView2/0/q/50|imageslim',
  64. label: '家长端APP'
  65. },
  66. {
  67. id: 4,
  68. imgUrl: 'http://res.training.luojigou.vip/FgoA_S33kLvcoMktbN4ORQO9Kfc8?imageView2/0/q/50|imageslim',
  69. activeImgUrl: 'http://res.training.luojigou.vip/Fgm-DUhf4ySZc6uEX2IZXzP-NdzS?imageView2/0/q/50|imageslim',
  70. label: '教师端APP'
  71. },
  72. ])
  73. const childLabelData = Object.freeze([
  74. {
  75. imgUrl: 'http://res.training.luojigou.vip/FhtCI0QNlGfUD8ag9J6oWgQgNfZl?imageView2/0/q/50|imageslim',
  76. label: '小程序课堂',
  77. firstText: '中德智慧教学通',
  78. secoendText: '好老师教育服务平台'
  79. },
  80. {
  81. imgUrl: 'http://res.training.luojigou.vip/FhtCI0QNlGfUD8ag9J6oWgQgNfZl?imageView2/0/q/50|imageslim',
  82. label: 'H5课堂',
  83. firstText: '给每个公众号装上强大的移动课堂',
  84. secoendText: ''
  85. },
  86. {
  87. imgUrl: 'http://res.training.luojigou.vip/Fu5OdPJa9vbxGjpYwGh6n-IysLQE?imageView2/0/q/50|imageslim',
  88. label: 'PC端独立课堂',
  89. firstText: '家长宝宝一站式服务平台',
  90. secoendText: ''
  91. },
  92. {
  93. imgUrl: 'http://res.training.luojigou.vip/FtLPk1zWRF5EBAbJrousaqoPqg_y?imageView2/0/q/50|imageslim',
  94. label: '家长APP',
  95. firstText: '家长宝宝一站式服务平台',
  96. secoendText: ''
  97. },
  98. {
  99. imgUrl: 'http://res.training.luojigou.vip/Fu5OdPJa9vbxGjpYwGh6n-IysLQE?imageView2/0/q/50|imageslim',
  100. label: '教师端APP',
  101. firstText: '家长宝宝一站式服务平台',
  102. secoendText: ''
  103. },
  104. ])
  105. export default {
  106. name: 'CoursePage',
  107. components: {
  108. Xcx,
  109. Label,
  110. H5,
  111. Pc,
  112. Parent,
  113. Teacher
  114. },
  115. mounted () {
  116. if (process.browser) {
  117. new WOW({
  118. offset: 0,
  119. live: true
  120. }).init()
  121. }
  122. },
  123. computed: {
  124. lineStyle () {
  125. let site = 250 * this.currentTabId
  126. if (site === 250) {
  127. site = 245
  128. }
  129. return `transform: translateX(${site + 'px'})`
  130. },
  131. labelProps () {
  132. return this.childLabelData.slice(this.currentTabId, this.currentTabId + 1)[0]
  133. }
  134. },
  135. data () {
  136. return {
  137. tabsData,
  138. currentTabId: 0,
  139. comName: 'Xcx',
  140. childLabelData,
  141. }
  142. },
  143. methods: {
  144. changeTabgs (tab) {
  145. this.currentTabId = tab.id
  146. switch (tab.id) {
  147. case 0:
  148. this.comName = 'Xcx'
  149. break;
  150. case 1:
  151. this.comName = 'H5'
  152. break;
  153. case 2:
  154. this.comName = 'Pc'
  155. break;
  156. case 3:
  157. this.comName = 'Parent'
  158. break;
  159. case 4:
  160. this.comName = 'Teacher'
  161. break;
  162. default:
  163. break;
  164. }
  165. }
  166. }
  167. }
  168. </script>
  169. <style scoped lang="scss">
  170. .Course-container {
  171. .course-change {
  172. position: relative;
  173. .tabs {
  174. display: flex;
  175. justify-content: center;
  176. position: relative;
  177. z-index: 3;
  178. margin-top: 106px;
  179. img {
  180. width: 1200px;
  181. height: 179px;
  182. }
  183. .tags-box {
  184. width: 1070px;
  185. position: absolute;
  186. top: 50%;
  187. left: 50%;
  188. transform: translate(-50%, -50%);
  189. display: flex;
  190. justify-content: space-between;
  191. align-items: center;
  192. .tabs-item {
  193. display: flex;
  194. flex-direction: column;
  195. justify-content: space-between;
  196. align-items: center;
  197. img {
  198. width: 50px;
  199. height: 50px;
  200. object-fit: fill;
  201. margin-bottom: 30px;
  202. }
  203. }
  204. }
  205. }
  206. .line {
  207. width: 1070px;
  208. position: absolute;
  209. left: 416px;
  210. top: 153px;
  211. img {
  212. width: 72px;
  213. height: 9px;
  214. transition: transform 1s;
  215. }
  216. }
  217. }
  218. .label {
  219. margin-top: 130px;
  220. margin-bottom: 55px;
  221. }
  222. }
  223. .cp {
  224. cursor: pointer;
  225. }
  226. </style>