info.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. <template>
  2. <mobile-frame>
  3. <view class="main">
  4. <view class="info" v-if="type=='0'">
  5. <view class="one">
  6. <view class="left">返现金额</view>
  7. <view class="right">+{{info.money||0}}</view>
  8. </view>
  9. <view class="two">
  10. <view class="left">状态</view>
  11. <view class="right">{{info.zhStatus||'暂无'}}</view>
  12. </view>
  13. <view class="two">
  14. <view class="left">返现时间</view>
  15. <view class="right">{{info.time||'暂无'}}</view>
  16. </view>
  17. <view class="two">
  18. <view class="left">推荐人</view>
  19. <view class="right">{{info.inviter_name||'暂无'}}</view>
  20. </view>
  21. <view class="two">
  22. <view class="left">来源</view>
  23. <view class="right">{{info.zhSource||'暂无'}}</view>
  24. </view>
  25. </view>
  26. <view class="info" v-else>
  27. <view class="one">
  28. <view class="left">提现金额</view>
  29. <view class="right">-{{info.money||0}}</view>
  30. </view>
  31. <view class="two">
  32. <view class="left">真实姓名</view>
  33. <view class="right">{{info.card_name||'暂无'}}</view>
  34. </view>
  35. <view class="two">
  36. <view class="left">所属银行</view>
  37. <view class="right">{{info.card_bank||'暂无'}}</view>
  38. </view>
  39. <view class="two">
  40. <view class="left">银行卡号</view>
  41. <view class="right">{{info.card||'暂无'}}</view>
  42. </view>
  43. <view class="two">
  44. <view class="left">审核处理人</view>
  45. <view class="right">{{info.person_name||'暂无'}}</view>
  46. </view>
  47. <view class="two">
  48. <view class="left">申请时间</view>
  49. <view class="right">{{info.apply_time||'暂无'}}</view>
  50. </view>
  51. <view class="two">
  52. <view class="left">审核时间</view>
  53. <view class="right">{{info.exam_time||'暂无'}}</view>
  54. </view>
  55. <view class="two">
  56. <view class="left">申请理由</view>
  57. <view class="right">{{info.apply_reason||'暂无'}}</view>
  58. </view>
  59. <view class="two">
  60. <view class="left">审核理由</view>
  61. <view class="right">{{info.exam_reason||'暂无'}}</view>
  62. </view>
  63. <view class="two">
  64. <view class="left">审核状态</view>
  65. <view class="right">{{info.zhStatus||'暂无'}}</view>
  66. </view>
  67. </view>
  68. </view>
  69. </mobile-frame>
  70. </template>
  71. <script>
  72. export default {
  73. data() {
  74. return {
  75. id: '',
  76. // 类型
  77. type: '',
  78. user: {},
  79. info: {},
  80. // 收益状态
  81. statusList: [],
  82. // 提现状态
  83. cashstatusList: [],
  84. // 来源
  85. sourceList: [],
  86. };
  87. },
  88. onLoad: async function(e) {
  89. const that = this;
  90. that.$set(that, `id`, e.id || '');
  91. that.$set(that, `type`, e.type || '');
  92. await that.searchOther();
  93. await that.watchLogin();
  94. },
  95. methods: {
  96. // 查询其他信息
  97. async searchOther() {
  98. const that = this;
  99. let res;
  100. res = await that.$api(`/dictData`, 'GET', {
  101. code: "cashBack_status"
  102. });
  103. if (res.errcode == '0') {
  104. that.$set(that, `statusList`, res.data)
  105. }
  106. res = await that.$api(`/dictData`, 'GET', {
  107. code: "cashBack_source"
  108. });
  109. if (res.errcode == '0') {
  110. that.$set(that, `sourceList`, res.data)
  111. }
  112. res = await that.$api(`/dictData`, 'GET', {
  113. code: "withdrawal_exam_status"
  114. });
  115. if (res.errcode == '0') {
  116. that.$set(that, `cashstatusList`, res.data)
  117. }
  118. },
  119. // 监听用户是否登录
  120. watchLogin() {
  121. const that = this;
  122. uni.getStorage({
  123. key: 'token',
  124. success: async function(res) {
  125. let user = that.$jwt(res.data);
  126. if (user) {
  127. that.$set(that, `user`, user);
  128. if (that.id) {
  129. if (that.type == '0') {
  130. // 收益记录
  131. let arr = await that.$api(`/cashBack/${that.id}`, 'GET')
  132. if (arr.errcode == '0') {
  133. let status = that.statusList.find(i => i.value == arr.data.status)
  134. if (status) arr.data.zhStatus = status.label;
  135. let source = that.sourceList.find(i => i.value == arr.data.source)
  136. if (source) arr.data.zhSource = source.label;
  137. // 查询推荐人信息
  138. let res = await that.$api(`/user/${arr.data.inviter}`, 'GET');
  139. if (res.errcode == '0') arr.data.inviter_name = res.data.name
  140. that.$set(that, `info`, arr.data)
  141. }
  142. } else {
  143. // 提现记录
  144. let arr = await that.$api(`/cashOut/${that.id}`, 'GET')
  145. if (arr.errcode == '0') {
  146. let status = that.cashstatusList.find(i => i.value == arr.data.status)
  147. if (status) arr.data.zhStatus = status.label;
  148. // 审核处理人信息
  149. let res = await that.$api(`/admin/${arr.data.deal_person}`, 'GET');
  150. if (res.errcode == '0') arr.data.person_name = res?.data?.name
  151. that.$set(that, `info`, arr.data)
  152. }
  153. }
  154. }
  155. }
  156. },
  157. fail: function(err) {
  158. uni.navigateTo({
  159. url: `/pages/login/index`
  160. })
  161. }
  162. });
  163. }
  164. }
  165. }
  166. </script>
  167. <style lang="scss">
  168. .main {
  169. display: flex;
  170. flex-direction: column;
  171. width: 100vw;
  172. height: 100vh;
  173. .info {
  174. padding: 2vw;
  175. .one {
  176. display: flex;
  177. justify-content: space-between;
  178. padding: 10vw 2vw;
  179. border-bottom: 0.5vw solid var(--f1Color);
  180. .left {
  181. color: #696969;
  182. font-size: var(--font14Size);
  183. }
  184. .right {
  185. font-size: var(--font16Size);
  186. font-weight: bold;
  187. }
  188. }
  189. .two {
  190. display: flex;
  191. justify-content: space-between;
  192. padding: 2vw;
  193. .left {
  194. color: #696969;
  195. font-size: var(--font14Size);
  196. }
  197. .right {
  198. color: #A9A9A9;
  199. font-size: var(--font14Size);
  200. }
  201. }
  202. }
  203. }
  204. </style>