hot.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <template>
  2. <view class="content">
  3. <view class="box" v-for=" item in shopList" @click="navTo()">
  4. <view class="img">
  5. <image :src=item.img mode=""></image>
  6. </view>
  7. <view class="title">
  8. {{item.title}}
  9. </view>
  10. <view class="right">
  11. <image src="../../static/user/right01.png" mode=""></image>
  12. </view>
  13. </view>
  14. <uBottom class="uBottom"></uBottom>
  15. </view>
  16. </template>
  17. <script>
  18. import uBottom from '@/components/ubottom.vue'
  19. export default{
  20. components:{
  21. uBottom
  22. },
  23. data(){
  24. return{
  25. shopList:[
  26. {
  27. title:'商品1',
  28. img:'../../static/error/missing-face.png'
  29. },
  30. {
  31. title:'商品2',
  32. img:'../../static/error/missing-face.png'
  33. },
  34. {
  35. title:'商品3',
  36. img:'../../static/error/missing-face.png'
  37. },
  38. {
  39. title:'商品4',
  40. img:'../../static/error/missing-face.png'
  41. }
  42. ]
  43. }
  44. },
  45. methods:{
  46. navTo(){
  47. uni.navigateTo({
  48. url:'./classify'
  49. })
  50. }
  51. }
  52. }
  53. </script>
  54. <style lang="scss">
  55. page{
  56. margin: 0;
  57. padding: 0;
  58. }
  59. .content{
  60. color: #F8F8F8;
  61. // margin: 0 30rpx;
  62. margin: 0;
  63. padding: 0;
  64. }
  65. .box{
  66. background: #FFFFFF;
  67. box-shadow: 0px 0px 20px 0px rgba(50, 50, 52, 0.06);
  68. border-radius: 10px;
  69. display: flex;
  70. justify-content: space-around;
  71. align-items: center;
  72. margin: 20rpx 30rpx;
  73. padding: 20rpx 0;
  74. .img{
  75. width: 125rpx;
  76. height: 125rpx;
  77. border-radius: 10rpx;
  78. image{
  79. width: 100%;
  80. height: 100%;
  81. }
  82. }
  83. .title{
  84. font-size: 32rpx;
  85. font-family: PingFang SC;
  86. font-weight: bold;
  87. color: #333333;
  88. line-height: 42rpx;
  89. }
  90. .right{
  91. width: 21rpx;
  92. height: 36rpx;
  93. image{
  94. width: 100%;
  95. height: 100%;
  96. }
  97. }
  98. }
  99. </style>