list.vue 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. <template>
  2. <div class="cate">
  3. <!-- 头部banner -->
  4. <div class="common-banner"><img :src="bannerImg" alt="" srcset=""></div>
  5. <div class="cate-list">
  6. <div :class="[`cate-bg cate${index + 1}`, index % 2 == 0 ? 'bg-white' : 'bg-silver']" v-for="(item, index) in cateList" :key="index">
  7. <div :class="['w1200 cate-item']" >
  8. <div class="item-content" v-if="index % 2 == 0">
  9. <div class="item-left">
  10. <img :src="item.imgUrl" v-scroll-reveal.reset="{ origin: 'left', distance: '100px', duration: 1500 }" data-scroll-reveal="enter left and move 100px over 1.5s" alt="" srcset="">
  11. </div>
  12. <div class="item-right">
  13. <div class="title" v-scroll-reveal.reset="{ delay: 250, origin: 'top', distance: '40px', easing: 'ease-in-out', duration: 1000 }">{{item.title}}</div>
  14. <div class="dec" v-scroll-reveal.reset="{ delay: 350, origin: 'bottom', distance: '30px', duration: 1000 }">{{item.desc}}</div>
  15. <div class="btn" v-scroll-reveal.reset="{ delay: 450, easing: 'ease-in-out', scale: 0.85 }" @click="navPage(item)">了解详情</div>
  16. </div>
  17. </div>
  18. <div class="item-content" v-else>
  19. <div class="item-left">
  20. <div class="title" v-scroll-reveal.reset="{ origin: 'right', distance: '80px', duration: 1000, easing: 'ease-in-out' }" data-scroll-reveal="enter right and move 80px over 1s" >{{item.title}}</div>
  21. <div class="dec" v-scroll-reveal.reset="{ delay: 350, origin: 'left', distance: '40px', duration: 1000 }" data-scroll-reveal="wait 0.35s, then enter left and move 40px over 1s">{{item.desc}}</div>
  22. <div class="btn" v-scroll-reveal.reset="{ delay: 450, easing: 'ease-in-out', scale: 0.85 }" @click="navPage(item)">了解详情</div>
  23. </div>
  24. <div class="item-right">
  25. <img v-scroll-reveal.reset="{ delay: 550, origin: 'right', distance: '80px', duration: 1000 }" data-scroll-reveal="wait 0.55s, then enter right and move 80px over 1s" :src="item.imgUrl" alt="" srcset="">
  26. </div>
  27. </div>
  28. </div>
  29. </div>
  30. </div>
  31. </div>
  32. </template>
  33. <script>
  34. var slideUp = {
  35. distance: '150%',
  36. origin: 'bottom',
  37. opacity: null
  38. };
  39. export default {
  40. name: 'ListPage',
  41. computed: {},
  42. head() {
  43. return {
  44. title: "逻辑狗官网-中德智慧教育",
  45. meta: [
  46. {
  47. name: "keywords",
  48. hid: "keywords",
  49. content: `逻辑狗官网、逻辑狗教材、 幼儿园教材、逻辑狗课程、逻辑狗思维训练课程、儿童思维教育、0-12岁儿童`,
  50. },
  51. {
  52. name: "description",
  53. hid: "description",
  54. content: `逻辑狗官方网站,专为0-12岁儿童设计的思维训练课程,中德智慧教育,全球优质教育内容输出平台`,
  55. },
  56. ],
  57. };
  58. },
  59. data () {
  60. return {
  61. bannerImg: require('~/assets/images/products/product_banner.png'),
  62. cateList: [
  63. {
  64. type: 1,
  65. title: '逻辑狗-思维游戏系列',
  66. desc: '以完善的理念,独特的教学方法,运用思维启蒙,思考策略及思考技巧的阶梯式教育方式与产品及培训服务体系,构建儿童优质思维模式',
  67. imgUrl: require('~/assets/images/products/cate_img_01@2x.png'),
  68. url: '1'
  69. },
  70. {
  71. type: 2,
  72. title: '逻辑狗-思维游戏系列',
  73. desc: '以完善的理念,独特的教学方法,运用思维启蒙,思考策略及思考技巧的阶梯式教育方式与产品及培训服务体系,构建儿童优质思维模式。',
  74. imgUrl: require('~/assets/images/products/cate_img_02@2x.png'),
  75. url: '2'
  76. },
  77. {
  78. type: 3,
  79. title: '逻辑狗-思维游戏系列',
  80. desc: '以完善的理念,独特的教学方法,运用思维启蒙,思考策略及思考技巧的阶梯式教育方式与产品及培训服务体系,构建儿童优质思维模式。',
  81. imgUrl: require('~/assets/images/products/cate_img_03@2x.png'),
  82. url: '3'
  83. },
  84. {
  85. type: 4,
  86. title: '逻辑狗-思维游戏系列',
  87. desc: '以完善的理念,独特的教学方法,运用思维启蒙,思考策略及思考技巧的阶梯式教育方式与产品及培训服务体系,构建儿童优质思维模式。',
  88. imgUrl: require('~/assets/images/products/cate_img_04@2x.png'),
  89. url: '4'
  90. },
  91. {
  92. type: 5,
  93. title: '逻辑狗-思维游戏系列',
  94. desc: '以完善的理念,独特的教学方法,运用思维启蒙,思考策略及思考技巧的阶梯式教育方式与产品及培训服务体系,构建儿童优质思维模式。',
  95. imgUrl: require('~/assets/images/products/cate_img_05@2x.png'),
  96. url: '5'
  97. },
  98. {
  99. type: 6,
  100. title: '逻辑狗-思维游戏系列',
  101. desc: '以完善的理念,独特的教学方法,运用思维启蒙,思考策略及思考技巧的阶梯式教育方式与产品及培训服务体系,构建儿童优质思维模式。',
  102. imgUrl: require('~/assets/images/products/cate_img_06@2x.png'),
  103. url: '6'
  104. },
  105. {
  106. type: 7,
  107. title: '逻辑狗-思维游戏系列',
  108. desc: '以完善的理念,独特的教学方法,运用思维启蒙,思考策略及思考技巧的阶梯式教育方式与产品及培训服务体系,构建儿童优质思维模式。',
  109. imgUrl: require('~/assets/images/products/cate_img_07@2x.png'),
  110. url: '7'
  111. },
  112. {
  113. type: 8,
  114. title: '逻辑狗-思维游戏系列',
  115. desc: '以完善的理念,独特的教学方法,运用思维启蒙,思考策略及思考技巧的阶梯式教育方式与产品及培训服务体系,构建儿童优质思维模式。',
  116. imgUrl: require('~/assets/images/products/cate_img_08@2x.png'),
  117. url: '8'
  118. }
  119. ]
  120. }
  121. },
  122. components: {},
  123. mounted () {
  124. // this.scrollReveal.reveal('item-content .title', slideUp);
  125. },
  126. methods: {
  127. navPage(item) {
  128. this.$router.push({ path: '/product/detail', query: {
  129. id: item.url
  130. } });
  131. }
  132. }
  133. }
  134. </script>
  135. <style scoped lang="scss">
  136. @import "~static/common/style.sass";
  137. $bg-silver: #F7FBFF;
  138. $bg-white: #FFFFFF;
  139. .common-banner {
  140. width: 100%;
  141. height: 521px;
  142. position: relative;
  143. font-size: 0;
  144. img {
  145. position: absolute;
  146. top: 0px;
  147. left: 50%;
  148. bottom: 0px;
  149. right: 0px;
  150. z-index: 1;
  151. -webkit-transform: translateX(-50%);
  152. transform: translateX(-50%);
  153. max-width: 2560px;
  154. max-height: 521px;
  155. height: 521px;
  156. display: block;
  157. }
  158. }
  159. .cate-list {
  160. .cate-bg {
  161. width: 100%;
  162. height: 530px;
  163. }
  164. .cate-item {
  165. height: 100%;
  166. .item-content {
  167. display: flex;
  168. justify-content: space-between;
  169. align-items: center;
  170. height: 100%;
  171. img {
  172. width: 639px;
  173. height: 400px;
  174. display: block;
  175. }
  176. }
  177. .title {
  178. width: 558px;
  179. font-size: 34px;
  180. font-family: PingFangSC-Medium, PingFang SC;
  181. font-weight: 500;
  182. color: #333333;
  183. line-height: 48px;
  184. margin-bottom: 29px;
  185. }
  186. .dec {
  187. width: 558px;
  188. height: 47px;
  189. font-size: 14px;
  190. font-family: PingFangSC-Regular, PingFang SC;
  191. font-weight: 400;
  192. color: #666666;
  193. line-height: 24px;
  194. }
  195. .btn {
  196. width: 100px;
  197. height: 30px;
  198. background: #0D5CFA;
  199. box-shadow: 0px 4px 11px 0px rgba(115, 161, 253, 0.6);
  200. border-radius: 23px;
  201. font-size: 12px;
  202. font-family: PingFangSC-Regular, PingFang SC;
  203. display: flex;
  204. justify-content: center;
  205. align-items: center;
  206. color: #FFFFFF;
  207. margin-top: 40px;
  208. cursor: pointer;
  209. }
  210. .item-right {
  211. font-size: 0;
  212. display: flex;
  213. flex-direction: column;
  214. .title {
  215. text-align: right;
  216. }
  217. .btn {
  218. align-self: flex-end;
  219. }
  220. }
  221. .item-left {
  222. font-size: 0;
  223. .btn {
  224. }
  225. }
  226. }
  227. .bg-silver {
  228. background: $bg-silver;
  229. }
  230. .bg-white {
  231. background: $bg-white;
  232. }
  233. }
  234. </style>