discounts_goods.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. <template>
  2. <view class="dt-page">
  3. <view v-if="emptyType==0" >
  4. <view v-for="item in dataList" class="goods-item" @tap="handleClick(item.id)">
  5. <image :src="item.thumbnail?item.thumbnail:''" class="goods-img" mode="aspectFit"></image>
  6. <view class="goods-right">
  7. <view class="goods-name dt-text-row-two">
  8. {{item.name}}
  9. </view>
  10. <view v-if="item.coupon" class="goods-coupon">
  11. <text class="first">券</text>
  12. <text>{{item.coupon.amt}}</text>
  13. </view>
  14. <view class="goods-bottom">
  15. <view>
  16. <view class="goods-sum">
  17. <text>券后:</text>
  18. <text class="sum">{{item.couponLaterPrice}}</text>
  19. </view>
  20. <view class="gray-sum">¥ {{item.price}}</view>
  21. </view>
  22. <view class="bottom-right">
  23. <image src="http://139.9.103.171:1888/img/image/discounts_share.png" mode="aspectFit"></image>
  24. <view>赚:{{item.commissionAmt}}</view>
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. <DtNoMore v-if="isNoMore" />
  31. <DtEmpty :type="emptyType" />
  32. </view>
  33. </template>
  34. <script>
  35. import DtNoMore from "../comps/dt_no_more.vue";
  36. import DtEmpty from '../comps/dt_empty.vue'
  37. export default {
  38. components: {
  39. DtNoMore,
  40. DtEmpty
  41. },
  42. data() {
  43. return {
  44. memberId:'',
  45. dataList:[]
  46. };
  47. },
  48. methods:{
  49. onLoadPage() {
  50. this.memberId = this.$auth.getMemberId();
  51. this.getData()
  52. },
  53. async getData(){
  54. let resp = await this.$api.getDistributorCouponProducts({
  55. _isShowLoading: true,
  56. memberId:this.memberId,
  57. pageNo:this.pageIndex,
  58. pageSize:this.pageSize,
  59. })
  60. let list = this.getDataList(resp)
  61. this.dataList = this.dataList.concat(list)
  62. },
  63. handleClick(id){
  64. uni.navigateTo({
  65. url:"/pagesM/pages/goods_des?id="+id
  66. })
  67. }
  68. },
  69. onReachBottom() {
  70. this.onReachBottomPage()
  71. }
  72. }
  73. </script>
  74. <style lang="scss" scoped>
  75. .dt-page{
  76. padding: 0 24upx;
  77. height: 100vh;
  78. .goods-item{
  79. background:#fff;
  80. border-radius:15upx;
  81. padding: 24upx;
  82. display: flex;
  83. margin-top: 20upx;
  84. .goods-img{
  85. width:170upx;
  86. height:170upx;
  87. background:#f7f7f7;
  88. border-radius:10upx;
  89. display: block;
  90. }
  91. .goods-right{
  92. flex:1;
  93. margin-left: 24upx;
  94. .goods-name{
  95. height:80upx;
  96. font-size:30upx;
  97. color:rgba(51,51,51,1);
  98. }
  99. .goods-coupon{
  100. height:30upx;
  101. line-height: 30upx;
  102. border:1px solid rgba(232,46,46,1);
  103. border-radius:5upx;
  104. margin-top:15upx;
  105. margin-bottom: 30upx;
  106. display: inline-block;
  107. text{
  108. font-size:24upx;
  109. text-align: center;
  110. color:rgba(232,46,46,1);
  111. padding:0 5upx;
  112. float: left;
  113. }
  114. .first{
  115. background-color: rgba(232,46,46,1);
  116. color: #fff;
  117. height: 30upx;
  118. display: block;
  119. float: left;
  120. }
  121. }
  122. .goods-bottom{
  123. display: flex;
  124. justify-content: space-between;
  125. align-items: center;
  126. .goods-sum{
  127. height:30upx;
  128. font-size:24upx;
  129. color:rgba(232,46,46,1);
  130. text-align: end;
  131. .sum{
  132. font-size:32upx;
  133. font-weight: bold;
  134. margin-left: 10upx;
  135. }
  136. }
  137. .gray-sum{
  138. margin-top: 10upx;
  139. font-size:24upx;
  140. text-decoration:line-through;
  141. color:rgba(153,153,153,1);
  142. }
  143. .bottom-right{
  144. border-top-left-radius: 25px;
  145. border-bottom-left-radius: 25px;
  146. height:55upx;
  147. background:$dt-color-primary;
  148. padding: 0 24upx;
  149. display: flex;
  150. align-items: center;
  151. image{
  152. width: 28upx;
  153. height: 28upx;
  154. background-color: transparent;
  155. display: block;
  156. }
  157. view{
  158. margin-left: 17upx;
  159. font-size:24upx;
  160. color:rgba(255,255,255,1);
  161. }
  162. }
  163. }
  164. }
  165. }
  166. }
  167. </style>