home.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <template>
  2. <div class="home">
  3. <swiper></swiper>
  4. <div class='home-img-1'>
  5. <img :src='homeImg1' alt="">
  6. <div class="home-nav">
  7. <!--品牌-->
  8. <div class=""></div>
  9. <!--管家-->
  10. <div class=""></div>
  11. <!--证件-->
  12. <div class=""></div>
  13. <!--工具-->
  14. <div class=""></div>
  15. <!--赔退-->
  16. <div class=""><a href="http://commontest.yiguanjia.me/webapp/o2o/module/pay/"></a></div>
  17. </div>
  18. </div>
  19. <homeList></homeList>
  20. <navigation></navigation>
  21. </div>
  22. </template>
  23. <script>
  24. import {mapState, mapActions} from 'vuex'
  25. import { XSwitch } from 'vux'
  26. export default {
  27. name: 'home',
  28. data () {
  29. return {
  30. homeImg1: 'http://odulvej8l.bkt.clouddn.com/%E5%9B%BE%E6%A0%87-01.jpg'
  31. }
  32. },
  33. components: {
  34. XSwitch
  35. },
  36. computed: mapState({
  37. userInfo: state => state.userInfo,
  38. productInfo: state => state.product.productInfo
  39. }),
  40. created () {
  41. this.USERINFO()
  42. this.PRODUCT()
  43. },
  44. methods: {
  45. ...mapActions([
  46. 'USERINFO',
  47. 'PRODUCT'
  48. ])
  49. }
  50. }
  51. </script>
  52. <!-- 添加“scoped”属性来限制CSS到此组件 -->
  53. <style scoped>
  54. .home-img-1 {
  55. background-color: #fff;
  56. margin-top: 3%;
  57. padding: 3% 0;
  58. position: relative;
  59. }
  60. .home-img-1 img {
  61. display: block;
  62. width: 100%;
  63. }
  64. .home-img-1 .home-nav {
  65. position: absolute;
  66. top: 0;
  67. left: 0;
  68. right: 0;
  69. bottom: 0;
  70. padding: 0 3%;
  71. display: flex;
  72. display: -moz-flex;
  73. display: -webkit-flex;
  74. }
  75. .home-img-1 .home-nav div {
  76. width: 20%;
  77. color: rgba(0, 0, 0, 0.5);
  78. border: 1px solid rgba(0, 0, 0, 0.5);
  79. line-height: 54px;
  80. }
  81. </style>