course.vue 10 KB

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