exchange_record.vue 5.3 KB

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