info.vue 5.5 KB

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