skillList.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <template>
  2. <view class="box">
  3. <view v-if="flag == 1" class="boxlist">
  4. <view @click="nextTo(item)" class="bb vidLi dfsb" v-for="(item, ind) in list" :key="ind">
  5. <view class="imgbox">
  6. <image :src="item.goods_img" mode=""></image>
  7. <!-- <text class="left-img" v-if="ind < 3">第{{ ind + 1 }}名</text> -->
  8. </view>
  9. <view class="dffd flex1">
  10. <view class="title elli">{{item.goods_name}}</view>
  11. <view class="price dfsb">
  12. <view class="textgrey">单独购买: <text class="del">¥{{item.goods_price}}</text></view>
  13. <!-- <text class="textgrey">{{item.count}}人已秒杀成功</text> -->
  14. </view>
  15. <view class="auth dfsb">
  16. <view class="prosecond">秒杀价: <text class="priceDan">{{item.seckill_price}}</text></view>
  17. <text class="btn">去秒杀</text>
  18. </view>
  19. </view>
  20. </view>
  21. <u-empty v-if="list.length<1" text="还没有商品哦" mode="list"></u-empty>
  22. </view>
  23. </view>
  24. </template>
  25. <script>
  26. export default {
  27. data() {
  28. return {};
  29. },
  30. props: {
  31. list: {
  32. type: Array,
  33. default: []
  34. },
  35. flag: {
  36. type: [String, Number],
  37. default: 1
  38. }
  39. },
  40. methods: {
  41. nextTo(item) {
  42. uni.navigateTo({
  43. url: '/pagesA/mall/skillInfo?flag=3&id='+item.id
  44. });
  45. }
  46. }
  47. };
  48. </script>
  49. <style scoped lang="scss">
  50. .boxlist {
  51. .vidLi {
  52. width: 100%;
  53. padding: 15rpx;
  54. background-color: #fff;
  55. margin-bottom: 20rpx;
  56. .imgbox {
  57. position: relative;
  58. width: 200rpx;
  59. height: 200rpx;
  60. margin-right: 28rpx;
  61. // .left-img {
  62. // position: absolute;
  63. // top: 0;
  64. // left: 0;
  65. // height: 33rpx;
  66. // line-height: 33rpx;
  67. // font-size: 18rpx;
  68. // color: #fff;
  69. // padding: 0 5rpx;
  70. // background: #e84325;
  71. // border-radius: 7rpx;
  72. // }
  73. image {
  74. width: 100%;
  75. height: 100%;
  76. }
  77. }
  78. .title {
  79. font-size: 26rpx;
  80. line-height: 40rpx;
  81. margin-bottom: 12rpx;
  82. }
  83. .price{
  84. width: 100%;
  85. .textgrey,text{
  86. font-size: 20rpx;
  87. }
  88. }
  89. .auth {
  90. margin-top: 15rpx;
  91. width: 100%;
  92. .prosecond{
  93. font-size: 20rpx;
  94. }
  95. .btn{
  96. width: 120rpx;
  97. height: 44rpx;
  98. line-height: 44rpx;
  99. text-align: center;
  100. background: #ED742F;
  101. border-radius: 22rpx;
  102. color: #fff;
  103. font-size: 20rpx;
  104. }
  105. }
  106. }
  107. }
  108. </style>