course.vue 11 KB

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