index.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500
  1. <template>
  2. <div class="container">
  3. <!-- banner -->
  4. <VBanner :bannerData="bannerData"></VBanner>
  5. <!-- 思维“芯”产品 -->
  6. <div class="index-thinking">
  7. <div class="i-t-content">
  8. <div class="t-top title-content">
  9. <!-- <div class="title-en">PRODUCT</div> -->
  10. <div class="title-zh">
  11. 思维“芯”产品
  12. </div>
  13. </div>
  14. <div class="content-box thinking-content-box">
  15. <div class="cate-box thinking-cate-box">
  16. <ul class="cate-nav thinking-cate-nav">
  17. <li class="thinking-products-kind" v-for="(item, index) in productCate" :class="{active:index == clickProdIndex}" :key="index" @click="getProdList(index)">
  18. <nuxt-link to="/">
  19. {{ item.title }}
  20. </nuxt-link>
  21. <div class="line"></div>
  22. </li>
  23. </ul>
  24. <div class="cate-list thinking-cate-list">
  25. <div class="thinking-product-item" v-for="(item, index) in productCate" :key="index">
  26. <div class="thinking-product-item-img">
  27. <nuxt-link to="/">
  28. <img src="~/assets/images/index/tab-right-pic-dg.png" alt="" srcset="">
  29. </nuxt-link>
  30. <div class="product-tag">
  31. 基础版
  32. <!-- <img src="~/assets/images/index/product_tag.png" alt="" srcset=""> -->
  33. </div>
  34. </div>
  35. <div class="thinking-product-info">
  36. <div class="thinking-product-title">幼小衔接课程……</div>
  37. <div class="thinking-product-content">
  38. <div class="thinking-product-price">
  39. ¥<span class="price-num">888</span>
  40. </div>
  41. <div class="thinking-product-btn">
  42. 查看产品
  43. </div>
  44. </div>
  45. </div>
  46. </div>
  47. </div>
  48. </div>
  49. </div>
  50. </div>
  51. </div>
  52. <!-- 网校课程 -->
  53. <div class="index-course">
  54. <div class="i-c-content">
  55. <div class="c-top title-content">
  56. <!-- <div class="title-en">PRODUCT</div> -->
  57. <div class="title-zh">
  58. 网校课程
  59. </div>
  60. </div>
  61. <div class="content-box course-content-box">
  62. <div class="cate-box course-cate-box">
  63. <ul class="cate-nav course-cate-nav">
  64. <li class="products-kind thinking-products-kind" v-for="(item, index) in productCate" :class="{active:index == clickProdIndex}" :key="index" @click="getProdList(index)">
  65. <nuxt-link to="/">
  66. {{ item.title }}
  67. </nuxt-link>
  68. <div class="line"></div>
  69. </li>
  70. </ul>
  71. <div class="cate-list course-cate-list">
  72. <div class="product-item course-product-item" v-for="(item, index) in productCate" :key="index">
  73. <div class="product-item-img course-product-item-img">
  74. <nuxt-link to="/">
  75. <img src="~/assets/images/index/tab-right-pic-dg.png" alt="" srcset="">
  76. </nuxt-link>
  77. </div>
  78. <div class="course-product-info">
  79. <div class="course-product-title">幼小衔接课程……</div>
  80. <div class="course-product-content">
  81. <div class="course-product-price">
  82. ¥<span class="price-num">888</span>
  83. </div>
  84. <div class="course-product-user">
  85. <img src="~/assets/images/index/product_person.png" alt="" srcset="">
  86. <img src="~/assets/images/join/business_banner.jpg" alt="" srcset="">
  87. <div>158</div>
  88. </div>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. </div>
  94. </div>
  95. </div>
  96. </div>
  97. </div>
  98. </template>
  99. <script>
  100. import axios from 'axios';
  101. import VBanner from '~/components/home/banner';
  102. // import indexVideo from '~/components/home/indexVideo';
  103. // import prodListShow from '~/components/common/prodListShow';
  104. // import indexNewsListShow from '~/components/common/indexNewsListShow'
  105. export default {
  106. data() {
  107. return {
  108. experiencePlace:['包头','成都','南京','东莞'],
  109. num:0,
  110. clickProdIndex:0,
  111. clickNewsIndex: 0,
  112. productCate: [
  113. {
  114. title: '全部',
  115. type: 0
  116. },
  117. {
  118. title: '0-3岁思维启蒙',
  119. type: 1
  120. },
  121. {
  122. title: '3-7岁能力训练',
  123. type: 2
  124. },
  125. {
  126. title: '5-7岁入学思考',
  127. type: 3
  128. },
  129. {
  130. title: '7-12岁技巧学习',
  131. type: 4
  132. }
  133. ]
  134. }
  135. },
  136. components: {
  137. VBanner,
  138. // indexVideo,
  139. // prodListShow,
  140. // indexNewsListShow
  141. },
  142. head() {
  143. return {
  144. title:'【中德智慧官网】逻辑狗 中华小熊猫',
  145. meta: [
  146. {name:'keywords',hid: 'keywords',content:`${this.metaData.navigationKeyword}`},
  147. {name:'description',hid:'description',content:`${this.metaData.navigationDescription}`}
  148. ],
  149. }
  150. },
  151. async asyncData({params,store}){
  152. //首页head信息
  153. let metaData = await axios(`${store.state.wordpressAPI}/NavigationMeta/get/1`);
  154. //banner数据动态获取
  155. let banner = await axios(`${store.state.wordpressAPI}/banner/selectAllByTpye/1`);
  156. //首页新闻信息
  157. // let indexFirstNewsList1 = await axios(`${store.state.wordpressAPI}/article/getRecommend/1`);
  158. // let indexFirstNewsList2 = await axios(`${store.state.wordpressAPI}/article/getRecommend/2`);
  159. // let indexFirstNewsList3 = await axios(`${store.state.wordpressAPI}/article/getRecommend/3`);
  160. // let indexFirstNewsList4 = await axios(`${store.state.wordpressAPI}/article/getRecommend/4`);
  161. // let indexFirstNewsList5 = await axios(`${store.state.wordpressAPI}/article/getRecommend/5`);
  162. // let indexNewsList1 = await axios(`${store.state.wordpressAPI}/article/getRecommendsByCategoryId/1/9`);
  163. // let indexNewsList2 = await axios(`${store.state.wordpressAPI}/article/getRecommendsByCategoryId/2/9`);
  164. // let indexNewsList3 = await axios(`${store.state.wordpressAPI}/article/getRecommendsByCategoryId/3/9`);
  165. // let indexNewsList4 = await axios(`${store.state.wordpressAPI}/article/getRecommendsByCategoryId/4/9`);
  166. // let indexNewsList5 = await axios(`${store.state.wordpressAPI}/article/getRecommendsByCategoryId/5/9`);
  167. //首页产品展示信息
  168. // let indexProdNav = await axios(`${store.state.wordpressAPI}/proCategory/showFirst`);
  169. // let indexProdList1 = await axios(`${store.state.wordpressAPI}/product/selectByPosition/1`);
  170. // let indexProdList2 = await axios(`${store.state.wordpressAPI}/product/selectByPosition/2`);
  171. // let indexProdList3 = await axios(`${store.state.wordpressAPI}/product/selectByPosition/3`);
  172. // let indexProdList4 = await axios(`${store.state.wordpressAPI}/product/selectByPosition/4`);
  173. // let indexProdList6 = await axios(`${store.state.wordpressAPI}/product/selectByPosition/97`);
  174. return {
  175. metaData: metaData.data,
  176. bannerData: banner.data,
  177. //首页新闻信息
  178. // indexFirstNewsList1: indexFirstNewsList1.data,
  179. // indexFirstNewsList2: indexFirstNewsList2.data,
  180. // indexFirstNewsList3: indexFirstNewsList3.data,
  181. // indexFirstNewsList4: indexFirstNewsList4.data,
  182. // indexFirstNewsList5: indexFirstNewsList5.data,
  183. // indexNewsList1: indexNewsList1.data,
  184. // indexNewsList2: indexNewsList2.data,
  185. // indexNewsList3: indexNewsList3.data,
  186. // indexNewsList4: indexNewsList4.data,
  187. // indexNewsList5: indexNewsList5.data,
  188. //首页产品信息
  189. // indexProdNav: indexProdNav.data,
  190. // indexProdList1: indexProdList1.data,
  191. // indexProdList2: indexProdList2.data,
  192. // indexProdList3: indexProdList3.data,
  193. // indexProdList4: indexProdList4.data,
  194. // indexProdList6: indexProdList6.data,
  195. }
  196. },
  197. methods: {
  198. tab (index){
  199. this.num = index;
  200. },
  201. getProdList (index){
  202. this.clickProdIndex = index;
  203. },
  204. getNewsList (index){
  205. this.clickNewsIndex = index;
  206. }
  207. }
  208. };
  209. </script>
  210. <style lang="scss" scoped>
  211. @import '~static/common/style.sass';
  212. .container {
  213. width: 100%;
  214. background: #F0F2F5;
  215. height: auto;
  216. }
  217. .title-content {
  218. margin-top: 164px;
  219. }
  220. .title-en {
  221. height:110px;
  222. line-height:110px;
  223. font-size:78px;
  224. font-family:PingFangSC-Semibold,PingFang SC;
  225. font-weight:600;
  226. color:#353956;
  227. }
  228. .title-zh {
  229. height: 81px;
  230. line-height: 81px;
  231. font-size: 58px;
  232. font-family: PingFangSC-Semibold,PingFang SC;
  233. font-weight: 600;
  234. color:#000000;
  235. letter-spacing: 1px;
  236. text-align: center;
  237. }
  238. ul.cate-nav {
  239. margin: 124px 0 116px;
  240. li.products-kind {
  241. display: inline-block;
  242. margin: 0 30px;
  243. cursor: pointer;
  244. &:first-child {
  245. margin-left: 0;
  246. }
  247. &.active, &:hover {
  248. a {
  249. color: $theme_color;
  250. }
  251. }
  252. .line {
  253. visibility: hidden;
  254. margin: 22px auto 0;
  255. width:60px;
  256. border-radius: 50px;
  257. height: 15px;
  258. background: $theme_color_fu;
  259. box-shadow: 0px 2px 8px 0px rgba(45,112,245,0.64);
  260. // -webkit-transition: all 0.5s ease;
  261. // -o-transition: all 0.5s ease;
  262. // transition: all 0.5s ease;
  263. }
  264. a {
  265. font-size: 32px;
  266. color: #747885;
  267. }
  268. }
  269. li.products-kind:hover, li.products-kind.active {
  270. .line {
  271. display: block;
  272. visibility: visible;
  273. transition: all 0.5s ease;
  274. }
  275. }
  276. }
  277. .cate-list {
  278. display: flex;
  279. align-items: center;
  280. flex-wrap: wrap;
  281. .product-item {
  282. position: relative;
  283. box-sizing: border-box;
  284. width:372px;
  285. margin-bottom: 42px;
  286. margin-right: 36px;
  287. &:nth-child(3n) {
  288. margin-right: 0px;
  289. }
  290. }
  291. .product-tag {
  292. padding: 0 6px 0 10px;
  293. background: $theme_color_fu;
  294. position: absolute;
  295. top: 0;
  296. left: 0;
  297. font-size: 12px;
  298. color: #FFFFFF;
  299. height: 24px;
  300. line-height: 24px;
  301. font-family: PingFangSC-Semibold,PingFang SC;
  302. font-weight: 600;
  303. border-radius:18px 0px 7px 0px;
  304. // img {
  305. // width:52px;
  306. // height:24px;
  307. // object-fit: cover;
  308. // }
  309. }
  310. }
  311. /* index-thinking */
  312. .index-thinking {
  313. width: 1200px;
  314. margin: 0 auto;
  315. // text-align: center;
  316. .i-t-content {
  317. position: relative;
  318. .title-zh {
  319. z-index: 666;
  320. }
  321. .title-en {
  322. position: absolute;
  323. top: 0;
  324. left: 50%;
  325. transform: translateX(-50%);
  326. z-index: 1;
  327. }
  328. }
  329. ul.thinking-cate-nav {
  330. margin: 124px 0 116px;
  331. }
  332. li.thinking-products-kind {
  333. display: inline-block;
  334. margin: 0 30px;
  335. cursor: pointer;
  336. -webkit-transition: all 0.5s ease;
  337. -o-transition: all 0.5s ease;
  338. transition: all 0.5s ease;
  339. .line {
  340. visibility: hidden;
  341. margin: 22px auto 0;
  342. width:60px;
  343. border-radius: 50px;
  344. height: 15px;
  345. width:59px;
  346. height:15px;
  347. background: $theme_color_fu;
  348. box-shadow: 0px 2px 8px 0px rgba(94,161,241,0.87);
  349. }
  350. a {
  351. font-size: 32px;
  352. color: #747885;
  353. }
  354. }
  355. li.thinking-products-kind:hover, li.thinking-products-kind.active {
  356. .line {
  357. display: block;
  358. visibility: visible;
  359. }
  360. }
  361. li.thinking-products-kind:first-child {
  362. margin-left: 0;
  363. }
  364. li.thinking-products-kind.active a,
  365. .thinking-products-kind:hover a{
  366. // font-size: 42px;
  367. color: $theme_color;
  368. // border-bottom: 6px solid $theme_color;
  369. // box-shadow:0px 2px 8px 0px rgba(240,53,94,0.61);
  370. }
  371. .thinking-cate-list {
  372. display: flex;
  373. align-items: center;
  374. flex-wrap: wrap;
  375. .thinking-product-item {
  376. position: relative;
  377. box-sizing: border-box;
  378. width:372px;
  379. margin-bottom: 42px;
  380. margin-right: 36px;
  381. &:nth-child(3n) {
  382. margin-right: 0px;
  383. }
  384. .thinking-product-item-img {
  385. img {
  386. border-radius:18px 18px 0px 0px;
  387. }
  388. }
  389. }
  390. }
  391. .thinking-product-info {
  392. box-sizing: border-box;
  393. background: #FFFFFF;
  394. height:90px;
  395. box-shadow:0px 5px 21px 0px rgba(232,243,243,1);
  396. border-radius:0px 0px 18px 18px;
  397. padding: 26px 22px;
  398. .thinking-product-title {
  399. width: 160px;
  400. height: 28px;
  401. font-size: 20px;
  402. font-family: PingFangSC-Medium,PingFang SC;
  403. font-weight: 500;
  404. color:rgba(52,62,48,1);
  405. line-height: 28px;
  406. }
  407. .thinking-product-content {
  408. display: flex;
  409. align-items: center;
  410. justify-content: space-between;
  411. }
  412. .thinking-product-price {
  413. color: #EA0B4A;
  414. .price-num {
  415. font-size: 22px;
  416. font-weight: bold;
  417. }
  418. }
  419. .thinking-product-btn {
  420. height:18px;
  421. line-height:18px;
  422. font-size:13px;
  423. font-family:PingFangSC-Regular,PingFang SC;
  424. font-weight:400;
  425. color: #3E8EFF;
  426. }
  427. // .thinking-product-user {
  428. // display: flex;
  429. // img {
  430. // width: 18px;
  431. // height: 22px;
  432. // }
  433. // }
  434. }
  435. }
  436. /* index-thinking */
  437. .index-course {
  438. width: 1200px;
  439. margin: 0 auto;
  440. .course-product-info {
  441. box-sizing: border-box;
  442. background: #FFFFFF;
  443. height:90px;
  444. box-shadow:0px 5px 21px 0px rgba(232,243,243,1);
  445. border-radius:0px 0px 18px 18px;
  446. padding: 26px 22px;
  447. .course-product-title {
  448. width: 160px;
  449. height: 28px;
  450. font-size: 20px;
  451. font-family: PingFangSC-Medium,PingFang SC;
  452. font-weight: 500;
  453. color:rgba(52,62,48,1);
  454. line-height: 28px;
  455. }
  456. .course-product-content {
  457. display: flex;
  458. align-items: center;
  459. justify-content: space-between;
  460. }
  461. .course-product-price {
  462. color: #EA0B4A;
  463. .price-num {
  464. font-size: 22px;
  465. font-weight: bold;
  466. }
  467. }
  468. .course-product-user {
  469. display: flex;
  470. align-items: flex-end;
  471. img {
  472. width: 18px;
  473. height: 22px;
  474. margin-right: 10px;
  475. }
  476. }
  477. }
  478. }
  479. /* 新闻资讯部分结束 */
  480. </style>