withdraw.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. <template>
  2. <view class="container">
  3. <!-- 明细列表 -->
  4. <view class="list" v-for="(item,index) in list" :key="index">
  5. <view class="list_con flex_r flex_ac">
  6. <view class="list_name flex_r flex_ac flex_jb"><text>提</text><text>现</text><text>订</text><text>单</text><text>号</text><text>:</text></view>
  7. <view class="list_text">{{item.order_sn}}</view>
  8. </view>
  9. <view class="list_con flex_r flex_ac">
  10. <view class="list_name flex_r flex_ac flex_jb"><text>结</text><text>算</text><text>状</text><text>态</text><text>:</text></view>
  11. <!-- <view class="list_text" :class="item.status == 3 ? 'r_color' : 'g_color'">{{item.status == 0 ? '审核中' : item.status == 2 ? '审核成功' : '审核失败'}}</view> -->
  12. <view class="list_text g_color" v-if="item.status ==0">审核中</view>
  13. <view class="list_text g_color" v-else-if="item.status ==1">审核通过</view>
  14. <view class="list_text g_color" v-else-if="item.status ==2">付款通过</view>
  15. <view class="list_text r_color" v-else-if="item.status ==3">付款失败</view>
  16. <view class="list_text r_color" v-else-if="item.status ==4">审核失败</view>
  17. <view class="list_text r_color" v-else-if="item.status ==5">删除作废</view>
  18. </view>
  19. <!-- <view class="list_con flex_r flex_ac">
  20. <view class="list_name flex_r flex_ac flex_jb"><text>申</text><text>请</text><text>人</text><text>:</text></view>
  21. <view class="list_text">{{userinfo.nickname}}</view>
  22. </view> -->
  23. <view class="list_con flex_r flex_ac">
  24. <view class="list_name flex_r flex_ac flex_jb"><text>提</text><text>现</text><text>金</text><text>额</text>:</text></view>
  25. <view class="list_text y_color">¥{{item.money}}</view>
  26. </view>
  27. <view class="list_con flex_r flex_ac">
  28. <view class="list_name flex_r flex_ac flex_jb"><text>提</text><text>现</text><text>类</text><text>型</text>:</text></view>
  29. <view class="list_text y_color">余额提现</view>
  30. </view>
  31. <view class="list_con flex_r flex_ac">
  32. <view class="list_name flex_r flex_ac flex_jb"><text>申</text><text>请</text><text>时</text><text>间</text>:</text></view>
  33. <view class="list_text">{{item.create_time}}</view>
  34. </view>
  35. <view class="list_con flex_r flex_ac">
  36. <view class="list_name flex_r flex_ac flex_jb"><text>处</text><text>理</text><text>时</text><text>间</text>:</text></view>
  37. <view class="list_text" v-if="item.status != 0">{{item.check_time}}</view>
  38. </view>
  39. <view class="list_hint flex_r flex_ac">
  40. <image class="hint_img" src="/static/notice.png" mode=""></image>
  41. <view class="hint_msg r_color">{{item.remark}}</view>
  42. </view>
  43. </view>
  44. <!-- 明细列表-end -->
  45. <not-goods v-if="haveGoods" textStr="暂无提现信息"></not-goods>
  46. </view>
  47. </template>
  48. <script>
  49. let page = 1;
  50. let app = getApp();
  51. var appEv = app.$vm.$options;
  52. import { post } from "@/request/api.js";
  53. import notGoods from "@/components/not-goods/index.vue";
  54. export default {
  55. components: {
  56. notGoods,
  57. },
  58. data() {
  59. return {
  60. haveGoods: false,
  61. status: 0,
  62. list: [],
  63. rows: 20,
  64. page: 1,
  65. userinfo:undefined
  66. };
  67. },
  68. onShow: function () {
  69. this.userinfo = uni.getStorageSync("userinfo");
  70. this.page = 1;
  71. this.loadData();
  72. },
  73. methods: {
  74. loadData() {
  75. let data = {
  76. page: this.page,
  77. rows: this.rows,
  78. };
  79. uni.showLoading({ mask: true });
  80. post("/my/withdraw", data).then((res) => {
  81. uni.hideLoading();
  82. if (res.code === 0) {
  83. if (res.data.data.data.length > 0) {
  84. this.list = this.list.concat(res.data.data.data);
  85. } else {
  86. if (this.page == 1) {
  87. this.haveGoods = true;
  88. this.page = -1;
  89. } else {
  90. this.page = -1;
  91. appEv.errTips("暂无更多");
  92. }
  93. }
  94. } else {
  95. if (page == 1) {
  96. this.haveGoods = true;
  97. this.page = -1;
  98. } else {
  99. this.page = -1;
  100. appEv.errTips("暂无更多");
  101. }
  102. }
  103. });
  104. },
  105. },
  106. /**
  107. * 页面上拉触底事件的处理函数
  108. */
  109. onReachBottom() {
  110. if (this.page != -1) {
  111. setTimeout(function () {
  112. ++this.page;
  113. this.loadData();
  114. }, 800);
  115. }
  116. },
  117. };
  118. </script>
  119. <style lang="scss">
  120. // 页面配置
  121. page {
  122. background: #f4f4f4;
  123. }
  124. .container {
  125. padding-top: 16rpx;
  126. }
  127. // 页面配置-end
  128. // 明细列表
  129. .hint_msg {
  130. font-size: 22rpx;
  131. }
  132. .list_name {
  133. width: 180rpx;
  134. overflow: hidden;
  135. }
  136. .hint_img {
  137. width: 24rpx;
  138. height: 25rpx;
  139. margin-right: 36rpx;
  140. }
  141. .list_hint {
  142. width: 100%;
  143. overflow: hidden;
  144. margin-top: 12rpx;
  145. }
  146. .list_text {
  147. color: #7c7c7c;
  148. font-size: 26rpx;
  149. font-family: "SourceHanSansCN-Medium";
  150. }
  151. .list_name text {
  152. font-size: 30rpx;
  153. color: #404142;
  154. font-family: "SourceHanSansCN-Medium";
  155. }
  156. .list {
  157. width: 100%;
  158. overflow: hidden;
  159. padding: 30rpx 60rpx;
  160. box-sizing: border-box;
  161. background: #fff;
  162. margin-bottom: 20rpx;
  163. }
  164. // 明细列表-end
  165. // 状态颜色
  166. .g_color {
  167. color: #1bbd89;
  168. }
  169. .y_color {
  170. color: #fd9f33;
  171. }
  172. .r_color {
  173. color: #ec421a;
  174. }
  175. // 状态颜色-end
  176. </style>