hot.vue 1.6 KB

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