goods.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <template>
  2. <view class="goods ss-flex">
  3. <image class="image" :src="sheep.$url.cdn(goodsData.picUrl)" mode="aspectFill"> </image>
  4. <view class="ss-flex-1">
  5. <view class="title ss-line-2">
  6. {{ goodsData.spuName }}
  7. </view>
  8. <view v-if="goodsData.introduction" class="subtitle ss-line-1">
  9. {{ goodsData.introduction }}
  10. </view>
  11. <view class="price ss-m-t-8">
  12. ¥{{ goodsData.price }}
  13. </view>
  14. </view>
  15. </view>
  16. </template>
  17. <script setup>
  18. import sheep from '@/sheep';
  19. const props = defineProps({
  20. goodsData: {
  21. type: Object,
  22. default: {},
  23. },
  24. });
  25. </script>
  26. <style lang="scss" scoped>
  27. .goods {
  28. background: #fff;
  29. padding: 20rpx;
  30. border-radius: 12rpx;
  31. .image {
  32. width: 116rpx;
  33. height: 116rpx;
  34. flex-shrink: 0;
  35. margin-right: 20rpx;
  36. }
  37. .title {
  38. height: 64rpx;
  39. line-height: 32rpx;
  40. font-size: 26rpx;
  41. font-weight: 500;
  42. color: #333;
  43. }
  44. .subtitle {
  45. font-size: 24rpx;
  46. font-weight: 400;
  47. color: #999;
  48. }
  49. .price {
  50. font-size: 26rpx;
  51. font-weight: 500;
  52. color: #ff3000;
  53. }
  54. }
  55. </style>