course.vue 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  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. head() {
  108. return {
  109. title: "逻辑狗官网-中德智慧教育",
  110. meta: [
  111. {
  112. name: "keywords",
  113. hid: "keywords",
  114. content: `逻辑狗官网、逻辑狗教材、 幼儿园教材、逻辑狗课程、逻辑狗思维训练课程、儿童思维教育、0-12岁儿童`,
  115. },
  116. {
  117. name: "description",
  118. hid: "description",
  119. content: `逻辑狗官方网站,专为0-12岁儿童设计的思维训练课程,中德智慧教育,全球优质教育内容输出平台`,
  120. },
  121. ],
  122. };
  123. },
  124. components: {
  125. Xcx,
  126. Label,
  127. H5,
  128. Pc,
  129. Parent,
  130. Teacher
  131. },
  132. mounted () {
  133. if (process.browser) {
  134. new WOW({
  135. offset: 0,
  136. live: true
  137. }).init()
  138. }
  139. },
  140. computed: {
  141. lineStyle () {
  142. let site = 250 * this.currentTabId
  143. if (site === 250) {
  144. site = 245
  145. }
  146. return `transform: translateX(${site + 'px'})`
  147. },
  148. labelProps () {
  149. return this.childLabelData.slice(this.currentTabId, this.currentTabId + 1)[0]
  150. }
  151. },
  152. data () {
  153. return {
  154. tabsData,
  155. currentTabId: 0,
  156. comName: 'Xcx',
  157. childLabelData,
  158. }
  159. },
  160. methods: {
  161. changeTabgs (tab) {
  162. this.currentTabId = tab.id
  163. switch (tab.id) {
  164. case 0:
  165. this.comName = 'Xcx'
  166. break;
  167. case 1:
  168. this.comName = 'H5'
  169. break;
  170. case 2:
  171. this.comName = 'Pc'
  172. break;
  173. case 3:
  174. this.comName = 'Parent'
  175. break;
  176. case 4:
  177. this.comName = 'Teacher'
  178. break;
  179. default:
  180. break;
  181. }
  182. }
  183. }
  184. }
  185. </script>
  186. <style scoped lang="scss">
  187. .Course-container {
  188. .course-change {
  189. position: relative;
  190. .tabs {
  191. display: flex;
  192. justify-content: center;
  193. position: relative;
  194. z-index: 3;
  195. margin-top: 106px;
  196. img {
  197. width: 1200px;
  198. height: 179px;
  199. }
  200. .tags-box {
  201. width: 1070px;
  202. position: absolute;
  203. top: 50%;
  204. left: 50%;
  205. transform: translate(-50%, -50%);
  206. display: flex;
  207. justify-content: space-between;
  208. align-items: center;
  209. .tabs-item {
  210. display: flex;
  211. flex-direction: column;
  212. justify-content: space-between;
  213. align-items: center;
  214. img {
  215. width: 50px;
  216. height: 50px;
  217. object-fit: fill;
  218. margin-bottom: 30px;
  219. }
  220. }
  221. }
  222. }
  223. .line {
  224. width: 1070px;
  225. position: absolute;
  226. left: 416px;
  227. top: 153px;
  228. img {
  229. width: 72px;
  230. height: 9px;
  231. transition: transform 1s;
  232. }
  233. }
  234. }
  235. .label {
  236. margin-top: 130px;
  237. margin-bottom: 55px;
  238. }
  239. }
  240. .cp {
  241. cursor: pointer;
  242. }
  243. </style>