商城类、订单类uniapp模板,多角色
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

111 lines
1.9 KiB

5 months ago
  1. <template>
  2. <view class="list">
  3. <view class="item"
  4. v-for="(item, index) in 10"
  5. @click="$utils.navigateTo('/pages_order/product/productDetail?id=123')"
  6. :key="index">
  7. <image
  8. class="image"
  9. src="https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg" mode=""></image>
  10. <view class="info">
  11. <view class="title">
  12. 桌布租赁
  13. </view>
  14. <view class="price">
  15. <text>58</text>/
  16. </view>
  17. <view class="favorable">
  18. <view class="t">
  19. 限时优惠
  20. </view>
  21. <view class="p">
  22. 48
  23. </view>
  24. </view>
  25. <view class="num">
  26. 已售卖5000+
  27. </view>
  28. </view>
  29. <view class="btn">
  30. <uv-icon name="shopping-cart"
  31. color="#fff"></uv-icon>
  32. </view>
  33. </view>
  34. </view>
  35. </template>
  36. <script>
  37. export default {
  38. name:"productList",
  39. data() {
  40. return {
  41. };
  42. },
  43. methods : {
  44. },
  45. }
  46. </script>
  47. <style scoped lang="scss">
  48. .list{
  49. display: flex;
  50. flex-wrap: wrap;
  51. .item{
  52. position: relative;
  53. width: 300rpx;
  54. padding: 20rpx;
  55. background-color: #fff;
  56. border-radius: 20rpx;
  57. margin-top: 20rpx;
  58. &:nth-child(odd){
  59. margin-right: 20rpx;
  60. }
  61. .image{
  62. width: 300rpx;
  63. height: 250rpx;
  64. border-radius: 20rpx;
  65. }
  66. .info{
  67. font-size: 26rpx;
  68. .title{
  69. font-size: 30rpx;
  70. }
  71. .price{
  72. color: #D03F25;
  73. margin-top: 6rpx;
  74. text{
  75. font-size: 34rpx;
  76. font-weight: 900;
  77. }
  78. }
  79. .favorable{
  80. display: flex;
  81. background-image: url(/static/image/product/favorable.png);
  82. background-size: 100% 100%;
  83. width: fit-content;
  84. padding: 5rpx 10rpx;
  85. font-size: 18rpx;
  86. margin-top: 6rpx;
  87. .p{
  88. color: #fff;
  89. margin-left: 10rpx;
  90. }
  91. }
  92. .num{
  93. margin-top: 6rpx;
  94. font-size: 22rpx;
  95. color: #888;
  96. }
  97. }
  98. .btn{
  99. position: absolute;
  100. right: 20rpx;
  101. bottom: 20rpx;
  102. padding: 10rpx;
  103. border-radius: 50%;
  104. background-color: $uni-color;
  105. }
  106. }
  107. }
  108. </style>