app-goods-recommend.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <template>
  2. <view class="app-goods-recommend" v-if="goodsList.length > 0">
  3. <view class="recommend-title dir-left-nowrap main-center">
  4. <view class="dir-left-nowrap cross-center">
  5. <view class="border"></view>
  6. <image src="../../../static/image/icon/icon-favorite.png"></image>
  7. <view class="text">您或许喜欢</view>
  8. <view class="border"></view>
  9. </view>
  10. </view>
  11. <view class="recommend-list">
  12. <u-ordinary-list :theme-object="themeObject" :showBuyBtn="sureCart ? 1 : 0" :isShowAttr="sureCart" :list="goodsList" :theme="theme" :list-style="2"></u-ordinary-list>
  13. </view>
  14. </view>
  15. </template>
  16. <script>
  17. import uOrdinaryList from '../../page-component/u-goods-list/u-ordinary-list.vue';
  18. export default {
  19. name: "app-goods-recommend",
  20. components: {
  21. uOrdinaryList
  22. },
  23. props: {
  24. goodsList: Array,
  25. theme: String,
  26. sureCart: Boolean,
  27. activity: Object,
  28. is_show_member: {
  29. type: Boolean,
  30. default() {
  31. return true;
  32. }
  33. },
  34. sign: String,
  35. detail: Object
  36. },
  37. computed: {
  38. themeObject:function() {
  39. return {
  40. back: this.theme + '-m-back ' + this.theme,
  41. theme: this.theme,
  42. color: this.theme + '-m-text ' + this.theme,
  43. sBack: this.theme + '-s-back ' + this.theme
  44. }
  45. }
  46. },
  47. }
  48. </script>
  49. <style scoped lang="scss">
  50. .app-goods-recommend {
  51. .recommend-title {
  52. margin: #{40rpx} 0 #{32rpx} 0;
  53. font-size: $uni-font-size-weak-one;
  54. color: $uni-general-color-two;
  55. .text {
  56. color: #999;
  57. }
  58. .border {
  59. border-top: #{1rpx} solid #bbbbbb;
  60. height: 0;
  61. width: #{40rpx};
  62. margin: 0 #{24rpx};
  63. }
  64. image {
  65. width: #{24rpx};
  66. height: #{24rpx};
  67. display: block;
  68. margin-right: #{12rpx};
  69. }
  70. }
  71. }
  72. </style>