course.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  1. <template>
  2. <section class="Course-container">
  3. <common-banner
  4. :img="bgImg"
  5. :height="595">
  6. <div class="course-header">
  7. <div class="content w1200">
  8. <div class="left">
  9. <div class="title">思维探索OMO</div>
  10. <div class="subTitle">在线教育平台,覆盖线上多场景</div>
  11. </div>
  12. <img class="bg-logo" :src="bgLogo" alt="" srcset="">
  13. </div>
  14. </div>
  15. </common-banner>
  16. <component :is="comName" >
  17. <div class="course-change">
  18. <div class="tabs">
  19. <div class="tags-box">
  20. <div :class="['tabs-item', currentTabId === tab.id ? 'active' : '']"
  21. @click="changeTabgs(tab)"
  22. v-for="tab in tabsData" :key="tab.id">
  23. <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="">
  24. <section class="cp" :style="{color: currentTabId === tab.id ? '#2169FA' : '#000'}">
  25. {{tab.label}}
  26. </section>
  27. </div>
  28. </div>
  29. </div>
  30. </div>
  31. <!-- <Label class="label" :labelProps="labelProps" v-solt:label /> -->
  32. <Label class="label" :labelProps="labelProps" />
  33. </component>
  34. </section>
  35. </template>
  36. <script>
  37. import Xcx from '@/components/products/xcx.vue'
  38. import Label from '@/components/products/label.vue'
  39. import H5 from '@/components/products/h5'
  40. import Pc from '@/components/products/pc'
  41. import Parent from '@/components/products/parent'
  42. import Teacher from '@/components/products/teacher'
  43. import CommonBanner from "@/components/common/banner";
  44. // console.log(Xcx);
  45. const tabsData = Object.freeze([
  46. {
  47. id: 0,
  48. imgUrl: require('~/assets/images/products/tab_parent_nor.png'),
  49. activeImgUrl: require('~/assets/images/products/tab_parent_active.png'),
  50. srcsetImg: [require('~/assets/images/products/tab_parent_nor.png'), require('~/assets/images/products/tab_parent_nor@2x.png')],
  51. srcsetActiveImg: [require('~/assets/images/products/tab_parent_active.png'), require('~/assets/images/products/tab_parent_active@2x.png')],
  52. label: '逻辑狗·一起成长'
  53. },
  54. {
  55. id: 1,
  56. imgUrl: require('~/assets/images/products/tab_teacher_nor.png'),
  57. activeImgUrl: require('~/assets/images/products/tab_teacher_active.png'),
  58. srcsetImg: [require('~/assets/images/products/tab_teacher_nor.png'), require('~/assets/images/products/tab_teacher_nor@2x.png')],
  59. srcsetActiveImg: [require('~/assets/images/products/tab_teacher_active.png'), require('~/assets/images/products/tab_teacher_active@2x.png')],
  60. label: '逻辑狗·家园共育'
  61. },
  62. {
  63. id: 2,
  64. // imgUrl: 'http://res.training.luojigou.vip/FkSnoRtRQ4WY_f3M3TQEJcn_du_Z?imageView2/0/q/50|imageslim',
  65. // activeImgUrl: 'http://res.training.luojigou.vip/FnzQdBDxbMr-Ek5HlcWCQ_Dk12zn?imageView2/0/q/50|imageslim',
  66. imgUrl: require('~/assets/images/products/tab_xcx_nor.png'),
  67. activeImgUrl: require('~/assets/images/products/tab_xcx_active.png'),
  68. srcsetImg: [require('~/assets/images/products/tab_xcx_nor.png'), require('~/assets/images/products/tab_xcx_nor@2x.png')],
  69. srcsetActiveImg: [require('~/assets/images/products/tab_xcx_active.png'),require('~/assets/images/products/tab_xcx_active@2x.png')],
  70. label: '小程序/h5'
  71. },
  72. {
  73. id: 3,
  74. // imgUrl: 'http://res.training.luojigou.vip/FuV6EjLrPYoiFII0iLYQlW51Bemq?imageView2/0/q/50|imageslim',
  75. // activeImgUrl: 'http://res.training.luojigou.vip/FoRYr27YPRQ5dcZy6hjWkqCB3bUc?imageView2/0/q/50|imageslim',
  76. imgUrl: require('~/assets/images/products/tab_h5_nor.png'),
  77. activeImgUrl: require('~/assets/images/products/tab_h5_active.png'),
  78. srcsetImg: [require('~/assets/images/products/tab_h5_nor.png'), require('~/assets/images/products/tab_h5_nor@2x.png')],
  79. srcsetActiveImg: [require('~/assets/images/products/tab_h5_active.png'), require('~/assets/images/products/tab_h5_active@2x.png')],
  80. label: '互联网矩阵'
  81. },
  82. // {
  83. // id: 4,
  84. // imgUrl: require('~/assets/images/products/tab_pc_nor.png'),
  85. // activeImgUrl: require('~/assets/images/products/tab_pc_active.png'),
  86. // srcsetImg: [require('~/assets/images/products/tab_pc_nor.png'), require('~/assets/images/products/tab_pc_nor@2x.png')],
  87. // srcsetActiveImg: [require('~/assets/images/products/tab_pc_active.png'), require('~/assets/images/products/tab_pc_active@2x.png')],
  88. // label: 'PC端独立课堂'
  89. // },
  90. ])
  91. const childLabelData = Object.freeze([
  92. {
  93. // imgUrl: 'http://res.training.luojigou.vip/FtLPk1zWRF5EBAbJrousaqoPqg_y?imageView2/0/q/50|imageslim',
  94. imgUrl: require('~/assets/images/products/en_parent.png'),
  95. label: '逻辑狗·一起成长',
  96. firstText: '每天进步一点点',
  97. secoendText: ''
  98. },
  99. {
  100. imgUrl: require('~/assets/images/products/en_teach.png'),
  101. // imgUrl: 'http://res.training.luojigou.vip/Fu5OdPJa9vbxGjpYwGh6n-IysLQE?imageView2/0/q/50|imageslim',
  102. label: '逻辑狗·家园共育',
  103. firstText: '家长宝宝一站式服务平台',
  104. secoendText: ''
  105. },
  106. {
  107. // imgUrl: 'http://res.training.luojigou.vip/FhtCI0QNlGfUD8ag9J6oWgQgNfZl?imageView2/0/q/50|imageslim',
  108. imgUrl: require('~/assets/images/products/en_xcx.png'),
  109. label: '小程序/h5',
  110. firstText: '中德智慧教学通/好老师教育服务平台',
  111. secoendText: ''
  112. },
  113. {
  114. // imgUrl: 'http://res.training.luojigou.vip/FhtCI0QNlGfUD8ag9J6oWgQgNfZl?imageView2/0/q/50|imageslim',
  115. imgUrl: require('~/assets/images/products/en_xcx.png'),
  116. label: '互联网矩阵',
  117. firstText: '中德智慧教育公众号',
  118. secoendText: ''
  119. },
  120. // {
  121. // // imgUrl: 'http://res.training.luojigou.vip/Fu5OdPJa9vbxGjpYwGh6n-IysLQE?imageView2/0/q/50|imageslim',
  122. // imgUrl: require('~/assets/images/products/en_classroom.png'),
  123. // label: 'PC端独立课堂',
  124. // firstText: '家长宝宝一站式服务平台',
  125. // secoendText: ''
  126. // },
  127. ])
  128. export default {
  129. name: 'CoursePage',
  130. head() {
  131. return {
  132. title: "逻辑狗官网-中德智慧教育",
  133. meta: [
  134. {
  135. name: "keywords",
  136. hid: "keywords",
  137. content: `逻辑狗官网、逻辑狗教材、 幼儿园教材、逻辑狗课程、逻辑狗思维训练课程、儿童思维教育、0-12岁儿童`,
  138. },
  139. {
  140. name: "description",
  141. hid: "description",
  142. content: `逻辑狗官方网站,专为0-12岁儿童设计的思维训练课程,中德智慧教育,全球优质教育内容输出平台`,
  143. },
  144. ],
  145. };
  146. },
  147. components: {
  148. Xcx,
  149. Label,
  150. H5,
  151. Pc,
  152. Parent,
  153. Teacher,
  154. CommonBanner
  155. },
  156. mounted () {},
  157. computed: {
  158. lineStyle () {
  159. let site = 250 * this.currentTabId
  160. if (site === 250) {
  161. site = 245
  162. }
  163. return `transform: translateX(${site + 'px'})`
  164. },
  165. labelProps () {
  166. return this.childLabelData.slice(this.currentTabId, this.currentTabId + 1)[0]
  167. }
  168. },
  169. data () {
  170. return {
  171. bgImg: require("~/assets/images/course/banner-xcx.png"),
  172. bgLogo: require("~/assets/images/course/bgLogo.png"),
  173. tabsData,
  174. currentTabId: 0,
  175. comName: 'Parent',
  176. childLabelData,
  177. }
  178. },
  179. methods: {
  180. changeTabgs (tab) {
  181. this.currentTabId = tab.id
  182. switch (tab.id) {
  183. case 0:
  184. this.comName = 'Parent'
  185. break;
  186. case 1:
  187. this.comName = 'Teacher'
  188. break;
  189. case 2:
  190. this.comName = 'Xcx'
  191. break;
  192. case 3:
  193. this.comName = 'H5'
  194. break;
  195. case 4:
  196. this.comName = 'Pc'
  197. break;
  198. default:
  199. break;
  200. }
  201. }
  202. }
  203. }
  204. </script>
  205. <style scoped lang="scss">
  206. @import "~static/common/style.sass";
  207. .Course-container {
  208. .course-header {
  209. height: 100%;
  210. padding-top: 170px;
  211. .content {
  212. height: 100%;
  213. position: relative;
  214. .left {
  215. text-align: left;
  216. }
  217. .title {
  218. font-size: 66px;
  219. font-family: PingFangSC-Medium, PingFang SC;
  220. font-weight: 500;
  221. color: #FFFFFF;
  222. line-height: 92px;
  223. }
  224. .subTitle {
  225. margin-top: 39px;
  226. font-size: 20px;
  227. font-family: PingFangSC-Regular, PingFang SC;
  228. font-weight: 400;
  229. color: #FFFFFF;
  230. line-height: 28px;
  231. }
  232. .bg-logo {
  233. position: absolute;
  234. bottom: 20px;
  235. right: 46px;
  236. width: 168px;
  237. height: 129px;
  238. }
  239. }
  240. }
  241. .course-change {
  242. position: relative;
  243. .tabs {
  244. display: flex;
  245. justify-content: center;
  246. position: relative;
  247. z-index: 3;
  248. // margin-top: 106px;
  249. padding-top: 100px;
  250. img {
  251. width: 1200px;
  252. height: 179px;
  253. }
  254. .tags-box {
  255. padding: 48px 60px 36px;
  256. width: 1200px;
  257. background: #FFFFFF;
  258. box-shadow: 0px 1px 15px 0px rgba(218, 230, 255, 0.74);
  259. border-radius: 17px;
  260. display: flex;
  261. justify-content: space-between;
  262. align-items: center;
  263. .tabs-item {
  264. display: flex;
  265. flex-direction: column;
  266. justify-content: space-between;
  267. align-items: center;
  268. &.active {
  269. position: relative;
  270. &:after {
  271. content: ''; /*CSS伪类用法*/
  272. position: absolute; /*定位背景横线的位置*/
  273. bottom: -28px;
  274. background: $theme_color_fu; /*宽和高做出来的背景横线*/
  275. width: 62px;
  276. height: 1px;
  277. box-shadow: 0px 2px 4px 0px rgba(85, 141, 253, 0.77);
  278. }
  279. // border-bottom: 1px solid $theme_color_fu;
  280. }
  281. img {
  282. width: 57px;
  283. height: 42px;
  284. object-fit: fill;
  285. margin-bottom: 30px;
  286. }
  287. }
  288. }
  289. }
  290. .line {
  291. // width: 1070px;
  292. position: absolute;
  293. left: 416px;
  294. top: 153px;
  295. img {
  296. width: 72px;
  297. height: 9px;
  298. transition: transform 1s;
  299. }
  300. }
  301. }
  302. }
  303. .cp {
  304. cursor: pointer;
  305. }
  306. </style>