exchange_record.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  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. 兑换时间:{{item.add_time}}
  9. </view>
  10. <view class="status">
  11. {{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. 查看物流
  29. </view>
  30. <view class="bnt bg-color-red" @click="goDetail(item.order_id)">
  31. 查看详情
  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="暂无兑换记录~"></emptyPage>
  42. </block>
  43. <home v-if="navigation"></home>
  44. </view>
  45. </template>
  46. <script>
  47. import CountDown from "@/components/countDown";
  48. import emptyPage from '@/components/emptyPage.vue'
  49. import {
  50. getIntegralOrderList
  51. } from "@/api/activity";
  52. import Loading from "@/components/Loading";
  53. import home from '@/components/home';
  54. import colors from '@/mixins/color.js';
  55. export default {
  56. name: "BargainRecord",
  57. components: {
  58. CountDown,
  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. onShow(){
  79. uni.removeStorageSync('form_type_cart');
  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: 10rpx 30rpx;
  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 30upx;
  146. }
  147. .bargain-record .item .picTxt .pictrue {
  148. width: 120rpx;
  149. height: 120rpx;
  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. width: 470upx;
  158. font-size: 30upx;
  159. color: #282828;
  160. }
  161. .bargain-record .item .picTxt .text .time {
  162. font-size: 24upx;
  163. color: #868686;
  164. justify-content: left !important;
  165. }
  166. .bargain-record .item .picTxt .text .successTxt {
  167. font-size: 24rpx;
  168. }
  169. .bargain-record .item .picTxt .text .endTxt {
  170. font-size: 24rpx;
  171. color: #999;
  172. }
  173. .bargain-record .item .picTxt .text .money {
  174. font-size: 24upx;
  175. }
  176. .bargain-record .item .picTxt .text .money .num {
  177. font-size: 32upx;
  178. font-weight: bold;
  179. }
  180. .bargain-record .item .picTxt .text .money .symbol {
  181. font-weight: bold;
  182. }
  183. .bargain-record .item .bottom {
  184. height: 100upx;
  185. padding: 0 30upx;
  186. font-size: 27upx;
  187. }
  188. .bargain-record .item .bottom .purple {
  189. color: #f78513;
  190. }
  191. .bargain-record .item .bottom .end {
  192. color: #999;
  193. }
  194. .bargain-record .item .bottom .success {
  195. color: #e93323;
  196. }
  197. .bargain-record .item .bottom .bnt {
  198. font-size: 27upx;
  199. color: #fff;
  200. width: 176upx;
  201. height: 60upx;
  202. border-radius: 32upx;
  203. text-align: center;
  204. line-height: 60upx;
  205. }
  206. .bargain-record .item .bottom .bnt.cancel {
  207. color: #aaa;
  208. border: 1px solid #ddd;
  209. }
  210. .bargain-record .item .bottom .bnt~.bnt {
  211. margin-left: 18upx;
  212. }
  213. .gray-sty {
  214. width: 100%;
  215. font-size: 24rpx;
  216. color: #999999;
  217. }
  218. </style>