hot.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <template>
  2. <view class="content">
  3. <view class="box" v-for=" item in shopList" @click="navTo(item)">
  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:'商家推荐',
  28. img:'../../static/img/hot01.png',
  29. id:6
  30. },
  31. {
  32. title:'特优促销',
  33. img:'../../static/img/hot02.png',
  34. id:7
  35. },
  36. {
  37. title:'订单预售',
  38. img:'../../static/img/hot03.png',
  39. id:8
  40. },
  41. {
  42. title:'拼团抢购',
  43. img:'../../static/img/hot04.png',
  44. id:9
  45. }
  46. ]
  47. }
  48. },
  49. methods:{
  50. navTo(item){
  51. uni.navigateTo({
  52. url: '/pages/index/shopList?vip=0&tit=' + encodeURI(item.title)+'&cid='+item.id,
  53. });
  54. }
  55. }
  56. }
  57. </script>
  58. <style lang="scss">
  59. page{
  60. margin: 0;
  61. padding: 0;
  62. }
  63. .content{
  64. color: #F8F8F8;
  65. // margin: 0 30rpx;
  66. margin: 0;
  67. padding: 0;
  68. }
  69. .box{
  70. background: #FFFFFF;
  71. box-shadow: 0px 0px 20px 0px rgba(50, 50, 52, 0.06);
  72. border-radius: 10px;
  73. display: flex;
  74. justify-content: space-around;
  75. align-items: center;
  76. margin: 20rpx 30rpx;
  77. padding: 20rpx 0;
  78. .img{
  79. width: 125rpx;
  80. height: 125rpx;
  81. border-radius: 10rpx;
  82. image{
  83. width: 100%;
  84. height: 100%;
  85. }
  86. }
  87. .title{
  88. font-size: 32rpx;
  89. font-family: PingFang SC;
  90. font-weight: bold;
  91. color: #333333;
  92. line-height: 42rpx;
  93. }
  94. .right{
  95. width: 21rpx;
  96. height: 36rpx;
  97. image{
  98. width: 100%;
  99. height: 100%;
  100. }
  101. }
  102. }
  103. </style>