course.vue 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  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', currentTabId === tab.id ? 'active' : '']"
  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. <Label class="label" :labelProps="labelProps" />
  27. </component>
  28. <!-- </div> -->
  29. </section>
  30. </template>
  31. <script>
  32. import Xcx from '@/components/products/xcx.vue'
  33. import Label from '@/components/products/label.vue'
  34. import H5 from '@/components/products/h5'
  35. import Pc from '@/components/products/pc'
  36. import Parent from '@/components/products/parent'
  37. import Teacher from '@/components/products/teacher'
  38. if (process.browser) {
  39. var {WOW} = require('wowjs')
  40. }
  41. // console.log(Xcx);
  42. const tabsData = Object.freeze([
  43. {
  44. id: 0,
  45. // imgUrl: 'http://res.training.luojigou.vip/FkSnoRtRQ4WY_f3M3TQEJcn_du_Z?imageView2/0/q/50|imageslim',
  46. // activeImgUrl: 'http://res.training.luojigou.vip/FnzQdBDxbMr-Ek5HlcWCQ_Dk12zn?imageView2/0/q/50|imageslim',
  47. imgUrl: require('~/assets/images/products/tab_xcx_nor.png'),
  48. activeImgUrl: require('~/assets/images/products/tab_xcx_active.png'),
  49. label: '小程序课堂'
  50. },
  51. {
  52. id: 1,
  53. // imgUrl: 'http://res.training.luojigou.vip/FuV6EjLrPYoiFII0iLYQlW51Bemq?imageView2/0/q/50|imageslim',
  54. // activeImgUrl: 'http://res.training.luojigou.vip/FoRYr27YPRQ5dcZy6hjWkqCB3bUc?imageView2/0/q/50|imageslim',
  55. imgUrl: require('~/assets/images/products/tab_h5_nor.png'),
  56. activeImgUrl: require('~/assets/images/products/tab_h5_active.png'),
  57. label: '微信H5课堂'
  58. },
  59. {
  60. id: 2,
  61. // imgUrl: 'http://res.training.luojigou.vip/FsVRp9Lk4Cyp5O_JNBe49kfz7vZh?imageView2/0/q/50|imageslim',
  62. // activeImgUrl: 'http://res.training.luojigou.vip/FhFDmhtts6iIWXD_Z16JOmMeqbh6?imageView2/0/q/50|imageslim',
  63. imgUrl: require('~/assets/images/products/tab_pc_nor.png'),
  64. activeImgUrl: require('~/assets/images/products/tab_pc_active.png'),
  65. label: 'PC端独立课堂'
  66. },
  67. {
  68. id: 3,
  69. // imgUrl: 'http://res.training.luojigou.vip/FsGTOeaPqx7Ipow75LJYM8ETlKew?imageView2/0/q/50|imageslim',
  70. // activeImgUrl: 'http://res.training.luojigou.vip/FqmqyLMeRxdvj__Z618fkgVHJV7J?imageView2/0/q/50|imageslim',
  71. imgUrl: require('~/assets/images/products/tab_parent_nor.png'),
  72. activeImgUrl: require('~/assets/images/products/tab_parent_active.png'),
  73. label: '家长端APP'
  74. },
  75. {
  76. id: 4,
  77. // imgUrl: 'http://res.training.luojigou.vip/FgoA_S33kLvcoMktbN4ORQO9Kfc8?imageView2/0/q/50|imageslim',
  78. // activeImgUrl: 'http://res.training.luojigou.vip/Fgm-DUhf4ySZc6uEX2IZXzP-NdzS?imageView2/0/q/50|imageslim',
  79. imgUrl: require('~/assets/images/products/tab_teacher_nor.png'),
  80. activeImgUrl: require('~/assets/images/products/tab_teacher_active.png'),
  81. label: '园长端APP'
  82. },
  83. ])
  84. const childLabelData = Object.freeze([
  85. {
  86. // imgUrl: 'http://res.training.luojigou.vip/FhtCI0QNlGfUD8ag9J6oWgQgNfZl?imageView2/0/q/50|imageslim',
  87. imgUrl: require('~/assets/images/products/en_xcx.png'),
  88. label: '小程序课堂',
  89. firstText: '中德智慧教学通',
  90. secoendText: '好老师教育服务平台'
  91. },
  92. {
  93. // imgUrl: 'http://res.training.luojigou.vip/FhtCI0QNlGfUD8ag9J6oWgQgNfZl?imageView2/0/q/50|imageslim',
  94. imgUrl: require('~/assets/images/products/en_xcx.png'),
  95. label: 'H5课堂',
  96. firstText: '给每个公众号装上强大的移动课堂',
  97. secoendText: ''
  98. },
  99. {
  100. // imgUrl: 'http://res.training.luojigou.vip/Fu5OdPJa9vbxGjpYwGh6n-IysLQE?imageView2/0/q/50|imageslim',
  101. imgUrl: require('~/assets/images/products/en_classroom.png'),
  102. label: 'PC端独立课堂',
  103. firstText: '家长宝宝一站式服务平台',
  104. secoendText: ''
  105. },
  106. {
  107. // imgUrl: 'http://res.training.luojigou.vip/FtLPk1zWRF5EBAbJrousaqoPqg_y?imageView2/0/q/50|imageslim',
  108. imgUrl: require('~/assets/images/products/en_parent.png'),
  109. label: '家长APP',
  110. firstText: '家长宝宝一站式服务平台',
  111. secoendText: ''
  112. },
  113. {
  114. imgUrl: require('~/assets/images/products/en_teach.png'),
  115. // imgUrl: 'http://res.training.luojigou.vip/Fu5OdPJa9vbxGjpYwGh6n-IysLQE?imageView2/0/q/50|imageslim',
  116. label: '教师端APP',
  117. firstText: '家长宝宝一站式服务平台',
  118. secoendText: ''
  119. },
  120. ])
  121. export default {
  122. name: 'CoursePage',
  123. head() {
  124. return {
  125. title: "逻辑狗官网-中德智慧教育",
  126. meta: [
  127. {
  128. name: "keywords",
  129. hid: "keywords",
  130. content: `逻辑狗官网、逻辑狗教材、 幼儿园教材、逻辑狗课程、逻辑狗思维训练课程、儿童思维教育、0-12岁儿童`,
  131. },
  132. {
  133. name: "description",
  134. hid: "description",
  135. content: `逻辑狗官方网站,专为0-12岁儿童设计的思维训练课程,中德智慧教育,全球优质教育内容输出平台`,
  136. },
  137. ],
  138. };
  139. },
  140. components: {
  141. Xcx,
  142. Label,
  143. H5,
  144. Pc,
  145. Parent,
  146. Teacher
  147. },
  148. mounted () {
  149. if (process.browser) {
  150. new WOW({
  151. offset: 0,
  152. live: true
  153. }).init()
  154. }
  155. },
  156. computed: {
  157. lineStyle () {
  158. let site = 250 * this.currentTabId
  159. if (site === 250) {
  160. site = 245
  161. }
  162. return `transform: translateX(${site + 'px'})`
  163. },
  164. labelProps () {
  165. return this.childLabelData.slice(this.currentTabId, this.currentTabId + 1)[0]
  166. }
  167. },
  168. data () {
  169. return {
  170. tabsData,
  171. currentTabId: 0,
  172. comName: 'Xcx',
  173. childLabelData,
  174. }
  175. },
  176. methods: {
  177. changeTabgs (tab) {
  178. this.currentTabId = tab.id
  179. switch (tab.id) {
  180. case 0:
  181. this.comName = 'Xcx'
  182. break;
  183. case 1:
  184. this.comName = 'H5'
  185. break;
  186. case 2:
  187. this.comName = 'Pc'
  188. break;
  189. case 3:
  190. this.comName = 'Parent'
  191. break;
  192. case 4:
  193. this.comName = 'Teacher'
  194. break;
  195. default:
  196. break;
  197. }
  198. }
  199. }
  200. }
  201. </script>
  202. <style scoped lang="scss">
  203. @import "~static/common/style.sass";
  204. .Course-container {
  205. .course-change {
  206. position: relative;
  207. .tabs {
  208. display: flex;
  209. justify-content: center;
  210. position: relative;
  211. z-index: 3;
  212. // margin-top: 106px;
  213. padding-top: 123px;
  214. img {
  215. width: 1200px;
  216. height: 179px;
  217. }
  218. .tags-box {
  219. padding: 48px 65px 36px;
  220. width: 1200px;
  221. background: #FFFFFF;
  222. box-shadow: 0px 1px 15px 0px rgba(218, 230, 255, 0.74);
  223. border-radius: 17px;
  224. display: flex;
  225. justify-content: space-between;
  226. align-items: center;
  227. .tabs-item {
  228. display: flex;
  229. flex-direction: column;
  230. justify-content: space-between;
  231. align-items: center;
  232. &.active {
  233. position: relative;
  234. &:after {
  235. content: ''; /*CSS伪类用法*/
  236. position: absolute; /*定位背景横线的位置*/
  237. bottom: -28px;
  238. background: $theme_color_fu; /*宽和高做出来的背景横线*/
  239. width: 62px;
  240. height: 1px;
  241. box-shadow: 0px 2px 4px 0px rgba(85, 141, 253, 0.77);
  242. }
  243. // border-bottom: 1px solid $theme_color_fu;
  244. }
  245. img {
  246. width: 57px;
  247. height: 42px;
  248. object-fit: fill;
  249. margin-bottom: 30px;
  250. }
  251. }
  252. }
  253. }
  254. .line {
  255. // width: 1070px;
  256. position: absolute;
  257. left: 416px;
  258. top: 153px;
  259. img {
  260. width: 72px;
  261. height: 9px;
  262. transition: transform 1s;
  263. }
  264. }
  265. }
  266. .label {
  267. margin-top: 130px;
  268. margin-bottom: 55px;
  269. }
  270. }
  271. .cp {
  272. cursor: pointer;
  273. }
  274. </style>