exchange_record.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. <template>
  2. <view :style="colorStyle">
  3. <block v-if="bargain.length>0" >
  4. <view class="bargain-record" ref="container">
  5. <view class="item" v-for="(item, index) in bargain" :key="index">
  6. <view class="exchange_record-time">
  7. <view class="">
  8. {{$t(`兑换时间`)}}:{{item.add_time}}
  9. </view>
  10. <view class="status">
  11. {{$t(item.status_name)}}
  12. </view>
  13. </view>
  14. <view class="picTxt acea-row row-between-wrapper">
  15. <view class="pictrue">
  16. <image :src="item.image" />
  17. </view>
  18. <view class="text acea-row row-column-around">
  19. <view class="line1" style="width: 100%;">{{ item.store_name }}</view>
  20. <view class="line1 gray-sty">{{item.suk}}</view>
  21. <view class="line1 gray-sty">{{$t(`积分`)}}:{{item.total_price}}</view>
  22. </view>
  23. </view>
  24. <view class="bottom acea-row row-between-wrapper">
  25. <view class="end"></view>
  26. <view class="acea-row row-middle row-right">
  27. <view class="bnt cancel" v-if="item.status === 2 && item.delivery_type === 'express'"
  28. @click="getLogistics(item.order_id)">
  29. {{$t(`查看物流`)}}
  30. </view>
  31. <view class="bnt bg-color-red" @click="goDetail(item.order_id)">
  32. {{$t(`查看详情`)}}
  33. </view>
  34. <!-- <view class="bnt bg-color-red" v-else @click="goList">重开一个</view> -->
  35. </view>
  36. </view>
  37. </view>
  38. <Loading :loaded="status" :loading="loadingList"></Loading>
  39. </view>
  40. </block>
  41. <block v-if="bargain.length == 0">
  42. <emptyPage :title="$t(`暂无兑换记录~`)"></emptyPage>
  43. </block>
  44. <!-- #ifndef MP -->
  45. <home></home>
  46. <!-- #endif -->
  47. </view>
  48. </template>
  49. <script>
  50. import CountDown from "@/components/countDown";
  51. import emptyPage from '@/components/emptyPage.vue'
  52. import {
  53. getIntegralOrderList
  54. } from "@/api/activity";
  55. import Loading from "@/components/Loading";
  56. import home from '@/components/home';
  57. import colors from '@/mixins/color.js';
  58. export default {
  59. name: "BargainRecord",
  60. components: {
  61. CountDown,
  62. Loading,
  63. emptyPage,
  64. home
  65. },
  66. props: {},
  67. mixins:[colors],
  68. data: function() {
  69. return {
  70. bargain: [],
  71. status: false, //砍价列表是否获取完成 false 未完成 true 完成
  72. loadingList: false, //当前接口是否请求完成 false 完成 true 未完成
  73. page: 1, //页码
  74. limit: 20, //数量
  75. userInfo: {}
  76. };
  77. },
  78. onLoad: function() {
  79. this.getIntegralOrderList();
  80. },
  81. methods: {
  82. goDetail: function(id) {
  83. uni.navigateTo({
  84. url: `/pages/points_mall/integral_order_details?order_id=${id}`
  85. })
  86. },
  87. getIntegralOrderList: function() {
  88. var that = this;
  89. if (that.loadingList) return;
  90. if (that.status) return;
  91. getIntegralOrderList({
  92. page: that.page,
  93. limit: that.limit
  94. })
  95. .then(res => {
  96. that.status = res.data.length < that.limit;
  97. that.bargain.push.apply(that.bargain, res.data);
  98. that.page++;
  99. that.loadingList = false;
  100. })
  101. .catch(res => {
  102. that.$util.Tips({
  103. title: res
  104. })
  105. });
  106. },
  107. getLogistics(order_id) {
  108. uni.navigateTo({
  109. url: `/pages/points_mall/logistics_details?order_id=${order_id}`
  110. })
  111. },
  112. },
  113. onReachBottom() {
  114. this.getIntegralOrderList();
  115. }
  116. };
  117. </script>
  118. <style lang="scss">
  119. /*砍价记录*/
  120. .bargain-record .item .picTxt .text .time .styleAll {
  121. color: #fc4141;
  122. font-size: 24rpx;
  123. }
  124. .bargain-record .item .picTxt .text .time .red {
  125. color: #999;
  126. font-size: 24rpx;
  127. }
  128. .bargain-record .item {
  129. background-color: #fff;
  130. margin: 15rpx 15rpx;
  131. border-radius: 6rpx;
  132. .exchange_record-time {
  133. color: #333333;
  134. border-bottom: 1px solid #EEEEEE;
  135. padding: 22rpx 30rpx;
  136. display: flex;
  137. justify-content: space-between;
  138. .status {
  139. color: var(--view-theme);
  140. }
  141. }
  142. }
  143. .bargain-record .item .picTxt {
  144. border-bottom: 1px solid #f0f0f0;
  145. padding: 30rpx 30rpx;
  146. }
  147. .bargain-record .item .picTxt .pictrue {
  148. width: 120rpx;
  149. height: 120rpx;
  150. margin-right: 30rpx;
  151. }
  152. .bargain-record .item .picTxt .pictrue image {
  153. width: 100%;
  154. height: 100%;
  155. border-radius: 6upx;
  156. }
  157. .bargain-record .item .picTxt .text {
  158. // flex:1;
  159. width: 77%;
  160. font-size: 30upx;
  161. color: #282828;
  162. }
  163. .bargain-record .item .picTxt .text .time {
  164. font-size: 24upx;
  165. color: #868686;
  166. justify-content: left !important;
  167. }
  168. .bargain-record .item .picTxt .text .successTxt {
  169. font-size: 24rpx;
  170. }
  171. .bargain-record .item .picTxt .text .endTxt {
  172. font-size: 24rpx;
  173. color: #999;
  174. }
  175. .bargain-record .item .picTxt .text .money {
  176. font-size: 24upx;
  177. }
  178. .bargain-record .item .picTxt .text .money .num {
  179. font-size: 32upx;
  180. font-weight: bold;
  181. }
  182. .bargain-record .item .picTxt .text .money .symbol {
  183. font-weight: bold;
  184. }
  185. .bargain-record .item .bottom {
  186. height: 100upx;
  187. padding: 0 30upx;
  188. font-size: 27upx;
  189. }
  190. .bargain-record .item .bottom .purple {
  191. color: #f78513;
  192. }
  193. .bargain-record .item .bottom .end {
  194. color: #999;
  195. }
  196. .bargain-record .item .bottom .success {
  197. color: #e93323;
  198. }
  199. .bargain-record .item .bottom .bnt {
  200. font-size: 27upx;
  201. color: #fff;
  202. width: 176upx;
  203. height: 60upx;
  204. border-radius: 32upx;
  205. text-align: center;
  206. line-height: 60upx;
  207. }
  208. .bargain-record .item .bottom .bnt.cancel {
  209. color: #aaa;
  210. border: 1px solid #ddd;
  211. }
  212. .bargain-record .item .bottom .bnt~.bnt {
  213. margin-left: 18upx;
  214. }
  215. .gray-sty {
  216. width: 100%;
  217. font-size: 24rpx;
  218. color: #999999;
  219. }
  220. </style>