m-store-pro.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <template>
  2. <!-- 门店商品图文 -->
  3. <view class="m-store-item">
  4. <view class="m-img">
  5. <image style="width: 100%;height: 100%;" :src="rowData.img" mode="aspectFit"></image>
  6. </view>
  7. <view class="m-text">
  8. <view class="m-title">
  9. {{rowData.name}}
  10. </view>
  11. <view class="m-descripe">
  12. {{rowData.descripe}}
  13. </view>
  14. <view class="m-price">
  15. {{rowData.price}}
  16. </view>
  17. <view class="m-old-price">
  18. 非会员价
  19. <view class="m-num">
  20. {{rowData.oldprice}}
  21. </view>
  22. </view>
  23. </view>
  24. <view class="m-distance">
  25. <image @tap="touchOnGoods($event,rowData)" style="width:40upx;height: 40upx;" src="../../static/img/icon/shop_icon_buy.png" mode="aspectFit"></image>
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. export default {
  31. name:"m-store-pro",
  32. props:{
  33. rowData:{
  34. type:Object,
  35. rowData:{}
  36. }
  37. },
  38. methods:{
  39. touchOnGoods(e,data){
  40. this.$emit("touchOnGoods",{
  41. element:e,
  42. data:data
  43. })
  44. }
  45. },
  46. data() {
  47. return {
  48. };
  49. }
  50. }
  51. </script>
  52. <style lang="scss">
  53. .m-store-item{
  54. display: flex;
  55. flex-direction: row;
  56. width: 100%;
  57. justify-content: space-between;
  58. align-items: flex-end;
  59. margin-top: 30upx;
  60. margin-bottom: 30upx;
  61. .m-img{
  62. flex: 0 0 170upx;
  63. height: 170upx;
  64. background: #eee;
  65. }
  66. .m-text{
  67. flex:1;
  68. padding: 0 20upx;
  69. .m-title{
  70. font-size: 32upx;
  71. color:#4c4c4c;
  72. }
  73. .m-descripe{
  74. font-size: 24upx;
  75. color:#999999;
  76. margin-top: 10upx;
  77. }
  78. .m-price{
  79. font-size: 28upx;
  80. color:#ff582b;
  81. font-weight: bold;
  82. margin-top: 5upx;
  83. }
  84. .m-old-price{
  85. display: flex;
  86. flex-direction: row;
  87. font-size: 18upx;
  88. color:#999999;
  89. margin-top: 5upx;
  90. .m-num{
  91. // font-size: 20upx;
  92. }
  93. }
  94. }
  95. .m-distance{
  96. flex: 0 1 30upx;
  97. color:#b2b2b2;
  98. font-size: 20upx;
  99. text-align: right
  100. }
  101. }
  102. </style>