recommendFloor.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <template>
  2. <view>
  3. <view class="page-content clearfix">
  4. <view class="tui-group-title">
  5. <view class="tui-group-name">为您推荐</view>
  6. <view class="tui-group-tabs">海量货源,实时推荐</view>
  7. </view>
  8. <templateR :list="recommendProducts" :userIdentity="userIdentity" />
  9. </view>
  10. </view>
  11. </template>
  12. <script>
  13. import templateR from './template-page/templateR.vue'
  14. export default {
  15. name: 'recommendFloor',
  16. components: {
  17. templateR
  18. },
  19. props: {
  20. recommendProducts: {
  21. type: Array
  22. },
  23. pageType: {
  24. type: Number
  25. },
  26. userIdentity: {
  27. type: Number
  28. }
  29. },
  30. data() {
  31. return {
  32. }
  33. },
  34. created() {},
  35. watch: {
  36. recommendProducts: {
  37. handler: function (el) {//监听对象的变换使用 function,箭头函数容易出现this指向不正确
  38. this.recommendProducts = el
  39. },
  40. deep: true
  41. }
  42. },
  43. methods: {
  44. NavToDetailPage(page) {
  45. //跳转
  46. this.$api.navigateTo(
  47. `/pages/goods/good-floorMore?pageType=${this.pageType}&floorId=${page.id}&title=${
  48. page.title
  49. }`
  50. )
  51. }
  52. }
  53. }
  54. </script>
  55. <style lang="scss">
  56. .page-content {
  57. background-color: #F7F7F7;
  58. width: 100%;
  59. height: auto;
  60. box-sizing: border-box;
  61. padding: 0 24rpx;
  62. }
  63. .tui-group-title {
  64. width: 100%;
  65. display: flex;
  66. justify-content: flex-start;
  67. align-items: center;
  68. height: 100rpx;
  69. box-sizing: border-box;
  70. .tui-group-name {
  71. font-size: $font-size-36;
  72. font-weight: bold;
  73. color: #333333;
  74. }
  75. .tui-group-tabs{
  76. height: 100rpx;
  77. display: flex;
  78. justify-content: space-between;
  79. align-items: center;
  80. margin-left: 30rpx;
  81. font-size: $font-size-24;
  82. line-height: 100rpx;
  83. color: #999999;
  84. }
  85. }
  86. </style>