course.vue 8.6 KB

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