mentioned.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. <template>
  2. <view :data-theme="theme">
  3. <view class="container">
  4. <!-- <view class="header">
  5. <text class="title">TA提到的宝贝</text>
  6. <image @click="closePopup" class="closeBnt" :src="urlDomain +'crmebimage/presets/close.png'" mode=""></image>
  7. </view> -->
  8. <view class="main_count flex" :class="isHome ? 'mb90' : ''">
  9. <view v-for="(item, index) in list" :key="index" @click="goDetail(item)" class="list">
  10. <view class="pro_list">
  11. <view class="picture">
  12. <image :src="item.productImage" class="image"></image>
  13. </view>
  14. <view class="info">
  15. <view class="name line1 text--w111-333 text-28rpx">{{item.productName}}</view>
  16. <text v-if="item.isPay == 1" class="isPay">作者买过</text>
  17. <view class="bottom">
  18. <view v-if="item.price" class="price"><text class="sm">¥</text><text
  19. class="text">{{item.price}}</text></view>
  20. <text class="buy-btn">立即购买</text>
  21. </view>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. import Cache from '@/utils/cache'
  31. import {
  32. goProductDetail
  33. } from '@/libs/order.js'
  34. import {
  35. mapGetters
  36. } from "vuex";
  37. let app = getApp();
  38. export default {
  39. computed: {},
  40. props: {
  41. list: {
  42. type: Array,
  43. default: function() {
  44. return [];
  45. }
  46. },
  47. uid: {
  48. type: Number,
  49. },
  50. isHome: {
  51. type: Boolean,
  52. default: false
  53. }
  54. },
  55. data() {
  56. return {
  57. urlDomain: Cache.get("imgHost"),
  58. theme: app.globalData.theme,
  59. popup: {
  60. show: false
  61. },
  62. };
  63. },
  64. methods: {
  65. // 点击关闭按钮
  66. closePopup() {
  67. this.$emit('close');
  68. },
  69. // 去详情页
  70. goDetail(item) {
  71. goProductDetail(item.productId, 0, '');
  72. }
  73. }
  74. }
  75. </script>
  76. <style lang="scss" scoped>
  77. .isPay {
  78. padding: 3rpx 5rpx;
  79. @include main_color(theme);
  80. @include coupons_border_color(theme);
  81. font-size: 20rpx;
  82. border-radius: 3px 3px 3px 3px;
  83. margin-top: 12rpx;
  84. display: inline-block;
  85. }
  86. .container {
  87. background-color: #ffffff;
  88. border-radius: 16rpx 16rpx 0 0;
  89. padding-bottom: constant(safe-area-inset-bottom); ///兼容 IOS<11.2/
  90. padding-bottom: env(safe-area-inset-bottom); ///兼容 IOS>11.2/
  91. .header {
  92. position: relative;
  93. padding: 45rpx 24rpx;
  94. .title {
  95. color: #282828;
  96. font-size: 30rpx;
  97. }
  98. .closeBnt {
  99. position: absolute;
  100. right: 30rpx;
  101. top: 45rpx;
  102. width: 30rpx;
  103. height: 30rpx;
  104. font-size: 28rpx;
  105. }
  106. }
  107. .scroll-view {
  108. //max-height: 1100rpx;
  109. }
  110. .main_count {
  111. padding: 0 24rpx 0 0;
  112. //max-height: 1100rpx;
  113. overflow-y: scroll;
  114. .list {
  115. width: 578rpx;
  116. height: 192rpx;
  117. background: #FAFAFA;
  118. border-radius: 16rpx 16rpx 16rpx 16rpx;
  119. padding: 20rpx;
  120. flex-direction: row;
  121. margin-right: 30rpx;
  122. &:last-child {
  123. margin-bottom: 0;
  124. }
  125. }
  126. .pro_list {
  127. display: flex;
  128. flex-direction: row;
  129. .picture,
  130. .image {
  131. width: 150rpx;
  132. height: 150rpx;
  133. border-radius: 16rpx;
  134. }
  135. .info {
  136. margin-left: 16rpx;
  137. position: relative;
  138. .name {
  139. width: 390rpx;
  140. lines: 1;
  141. text-overflow: ellipsis;
  142. }
  143. .bottom {
  144. display: flex;
  145. justify-content: space-between;
  146. align-items: center;
  147. width: 370rpx;
  148. position: absolute;
  149. left: 0;
  150. bottom: 0;
  151. flex-direction: row;
  152. }
  153. .price {
  154. flex-direction: row;
  155. align-items: flex-end;
  156. .sm {
  157. font-weight: bold;
  158. color: #E93323;
  159. font-size: 26rpx;
  160. }
  161. .text {
  162. font-weight: bold;
  163. color: #E93323;
  164. font-size: 34rpx;
  165. }
  166. }
  167. .buy-btn {
  168. border-radius: 26rpx;
  169. padding: 10rpx 20rpx;
  170. text-align: center;
  171. align-items: center;
  172. justify-content: center;
  173. font-size: 24rpx;
  174. color: #fff;
  175. background: #E93323;
  176. }
  177. }
  178. }
  179. }
  180. }
  181. </style>