app-goods-recommend.vue 2.3 KB

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