exchange_record.vue 5.2 KB

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