bid_record.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <template>
  2. <view>
  3. <scroll-view class="wrapper" :style="{top: top + 'px'}" scroll-y refresher-enabled refresher-default-style="white"
  4. @refresherrefresh="pullRefresh" :refresher-triggered="refreshing" @scrolltolower="loadMore">
  5. <view v-if="tableData" class="paddingX14">
  6. <view v-for="(item, index) in tableData" :key="item.tradeGoodsId" class="cell marginB12 paddingX15 relative"
  7. @click="showDetail(item)">
  8. <view class="paddingT15 paddingB10 flex-align">
  9. <image :src="item.cover" class="image flex-shrink0" mode="aspectFit" />
  10. <view class="flex1 self-stretch paddingY5 flex-column-between paddingL12 color-white">
  11. <view class="flex-align">
  12. <view class="font4 line-ellipsis flex1 bold" style="width: 0">{{item.name}}</view>
  13. </view>
  14. <view class="flex-align font4">
  15. <view>售价:¥</view>
  16. <view class="bold flex1">{{item.price}}</view>
  17. <image v-if="item.level" style="width: 110rpx; height: 32rpx" :src="LEVEL_MAP[item.level].titleText" />
  18. </view>
  19. <view class="flex-align font4">
  20. <view>我的出价:¥</view>
  21. <view class="bold flex1">{{item.bidPrice}}</view>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. <empty v-if="isEmpty" :top="200" light />
  28. </scroll-view>
  29. <change-price ref="changeRef" @success="onChangeSuccess"/>
  30. </view>
  31. </template>
  32. <script>
  33. import { LEVEL_MAP } from '@/utils/config'
  34. import tabbar2 from '@/components/tabbar2'
  35. import empty from '@/components/empty'
  36. import pageMixin from './../../mixin/page'
  37. import resource from '@/utils/resource'
  38. import changePrice from './change_price'
  39. export default {
  40. mixins: [pageMixin],
  41. components: { empty, tabbar2, changePrice },
  42. data() {
  43. return {
  44. resource,
  45. LEVEL_MAP,
  46. refreshing: false
  47. }
  48. },
  49. computed: {
  50. top() {
  51. let height = this.$store.state.systemInfo.statusBarHeight + 36 + 50 + 5
  52. return height
  53. }
  54. },
  55. mounted() {
  56. this.refresh(true)
  57. },
  58. methods: {
  59. pullRefresh() {
  60. this.refreshing = true
  61. this.refresh()
  62. },
  63. async loadData(loading) {
  64. const res = await this.$service.sell.listBidMy(
  65. this.pageNum,
  66. this.pageSize,
  67. loading
  68. )
  69. setTimeout(() => {
  70. this.refreshing = false
  71. }, 1000)
  72. return res
  73. },
  74. showDetail(item) {
  75. if (item.status !== 1) return
  76. this.$router.push('sell_detail', { id: item.tradeGoodsId })
  77. }
  78. }
  79. }
  80. </script>
  81. <style lang="scss" scoped>
  82. .wrapper {
  83. position: fixed;
  84. left: 0;
  85. right: 0;
  86. bottom: 0;
  87. }
  88. .cell {
  89. background: rgba(0, 0, 0, 0.5);
  90. box-shadow: 0px 0px 5px 0px rgba(167, 110, 244, 0.5);
  91. border-radius: 8px;
  92. border: 1px solid rgba(255, 255, 255, 0.2);
  93. overflow: hidden;
  94. .line {
  95. height: 1px;
  96. opacity: 0.2;
  97. background: #e9d9ff;
  98. }
  99. .image {
  100. box-shadow: 0px 0px 5px 0px rgba(167, 110, 244, 0.5);
  101. border-radius: 8px;
  102. width: 180rpx;
  103. height: 180rpx;
  104. }
  105. .mask {
  106. position: absolute;
  107. left: 0;
  108. right: 0;
  109. top: 0;
  110. bottom: 0;
  111. background: rgba($color: #222335, $alpha: 0.6);
  112. .btn-delete {
  113. width: 88px;
  114. height: 30px;
  115. background: rgba(0, 0, 0, 0.5);
  116. border-radius: 15px;
  117. border: 1px solid #a66ef4;
  118. color: #fff;
  119. font-size: 14px;
  120. }
  121. .btn-cm {
  122. width: 88px;
  123. height: 30px;
  124. background: linear-gradient(270deg, #d070ff 0%, #8b3dff 100%);
  125. border-radius: 15px;
  126. color: #fff;
  127. font-size: 14px;
  128. }
  129. }
  130. .status {
  131. width: 100rpx;
  132. height: 36rpx;
  133. position: absolute;
  134. right: 0;
  135. top: 0;
  136. z-index: 100;
  137. }
  138. .btn {
  139. height: 48rpx;
  140. line-height: 48rpx;
  141. text-align: center;
  142. padding: 0 20rpx;
  143. color: #fff;
  144. font-size: 28rpx;
  145. background: linear-gradient(270deg, #d070ff 0%, #8b3dff 100%);
  146. border-radius: 24rpx;
  147. }
  148. }
  149. </style>