index.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <template>
  2. <!-- <view class="product">
  3. <view class="img_box">
  4. <img src="http://image.chuliu.cc/jingzhuangprice.jpg" @click="toDetail(0)">
  5. <img src="http://image.chuliu.cc/gaoyaoprice.jpg" @click="toDetail(1)">
  6. <img src="http://image.chuliu.cc/qingchunprice.jpg" @click="toDetail(2)">
  7. </view>
  8. </view> -->
  9. <view class="product">
  10. <img src="../../static/img/bg.png" alt="" class="bg">
  11. <view class="out">
  12. <view class="img_box">
  13. <img src="http://image.chuliu.cc/jingzhuangprice.jpg" @click="toDetail(0)">
  14. <img src="http://image.chuliu.cc/gaoyaoprice.jpg" @click="toDetail(1)">
  15. <img src="http://image.chuliu.cc/qingchunprice.jpg" @click="toDetail(2)">
  16. </view>
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. export default {
  22. data() {},
  23. methods: {
  24. toDetail(idx) {
  25. uni.navigateTo({
  26. url: '../detail/detail?idx=' + idx
  27. });
  28. }
  29. }
  30. }
  31. </script>
  32. <style lang="scss">
  33. html,
  34. body {
  35. overflow: hidden;
  36. }
  37. .product {
  38. width: 100vw;
  39. height: 100vh;
  40. display: flex;
  41. flex-direction: column;
  42. justify-content: center;
  43. position: relative;
  44. background: #cc120d;
  45. padding-bottom:30rpx;
  46. .bg {
  47. width: 100vw;
  48. height: auto;
  49. }
  50. .out {
  51. margin:-570rpx auto 0;
  52. background: #EB563E;
  53. padding:10rpx;
  54. border-radius: 16rpx;
  55. border: 2rpx solid #F9FFC6;
  56. .img_box {
  57. width: 650rpx;
  58. background: #fff;
  59. border-radius: 16rpx;
  60. margin:0 auto;
  61. text-align: center;
  62. padding-bottom:20rpx;
  63. img {
  64. width: 595rpx;
  65. height: 311rpx;
  66. border-radius: 16rpx;
  67. margin-top: 24rpx;
  68. }
  69. }
  70. }
  71. }
  72. // .product {
  73. // width: 100vw;
  74. // height: 100vh;
  75. // text-align: center;
  76. // position: relative;
  77. // background: url('../../static/img/bg.png') no-repeat;
  78. // background-size: 100% 100%;
  79. // position: relative;
  80. // overflow: hidden;
  81. // }
  82. // .img_box {
  83. // position: absolute;
  84. // left:0vw;
  85. // top: 21vh;
  86. // }
  87. // img {
  88. // width: 595rpx;
  89. // height: 311rpx;
  90. // border-radius: 16rpx;
  91. // margin-top: 10rpx;
  92. // }
  93. </style>