index.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <template>
  2. <view class="inspage-content" :style="{'--status-bar-': statusBarHeight}">
  3. <u-navbar title="提现详情" :placeholder="true" @leftClick="leftClick" :autoBack="false" :safeAreaInsetTop="true" />
  4. <view class="inspage-content-info">
  5. <!-- 头部主要内容 开始 -->
  6. <!-- <view class="inspage-content-header">
  7. <customNavbar
  8. title="提示"
  9. bgColor="var(--gd-bgm-color)"
  10. :contentStyle="{ color: '#fff' }"
  11. :left-style="{ color: '#fff' }"
  12. ></customNavbar>
  13. </view> -->
  14. <!-- 头部主要内容 结束 -->
  15. <!-- userInfo内容 开始 -->
  16. <view class="inspage-content-userinfo">
  17. <text>{{ withdrawStatus(retailStatistics.status) }}</text>
  18. <text>¥{{retailStatistics.withdrawPrice}}</text>
  19. <view>
  20. <view>
  21. <text>服务费</text>
  22. <text>¥{{ retailStatistics && retailStatistics.servicePrice }}</text>
  23. </view>
  24. <view>
  25. <text>到账账户</text>
  26. <text>{{ withdrawType(retailStatistics.withdrawType) }}</text>
  27. </view>
  28. </view>
  29. </view>
  30. <!-- userInfo内容 结束 -->
  31. </view>
  32. </view>
  33. </template>
  34. <script>
  35. import { navigateTo } from "@/utils/util.js"
  36. export default {
  37. data() {
  38. return {
  39. title: '提示',
  40. statusBarHeight: 0, // 状态栏安全距离
  41. tool: [ // 我的工具
  42. { title: "邀请总人数",num: 0,decimals:0 },
  43. { title: "待核销",num: 0,decimals:2 },
  44. { title: "已核销",num: 0,decimals:2 },
  45. ],
  46. retailStatistics: {}, // 统计信息
  47. params: {}
  48. }
  49. },
  50. onLoad(e) {
  51. this.params = e
  52. },
  53. onShow() {
  54. this.statusBarHeight = getApp().globalData.statusBarHeight
  55. this.orderWithdrawSelectById()
  56. },
  57. methods: {
  58. leftClick(e) {
  59. uni.reLaunch({
  60. url: '/pages/distributor/index'
  61. });
  62. console.log('leftClick', e);
  63. },
  64. /**
  65. * @author ygh
  66. * @data 2023-12-20
  67. */
  68. navigateToFun(item){
  69. navigateTo(item.url)
  70. },
  71. /**
  72. * 数字显示格式化
  73. *
  74. */
  75. numFormat(num=0) {
  76. if(num<100000) {
  77. return num
  78. }else if(num>100000){
  79. return (num/10000).toFixed(2)
  80. }
  81. },
  82. /** 获取数据 */
  83. async orderWithdrawSelectById(){
  84. try{
  85. let res = await this.$u.api.orderWithdrawSelectById({
  86. noSign: 1,
  87. userid: this.distribution_user_info.userId,
  88. id: this.params.id
  89. })
  90. if(res && res.code ===200) {
  91. this.retailStatistics = res.data
  92. }
  93. }catch(e){
  94. //TODO handle the exception
  95. console.error("e===",e)
  96. }
  97. },
  98. withdrawType(type){
  99. let src = ''
  100. switch(type) {
  101. case 'wechat': src="微信零钱"; break;
  102. case 'bank': src="银行卡"; break;
  103. }
  104. return src
  105. },
  106. /**
  107. * 申请状态
  108. */
  109. withdrawStatus(type){
  110. let src = ''
  111. switch(type) {
  112. case 0: src="正在提现,请耐心等待!"; break;
  113. case 1: src="提现成功!"; break;
  114. case 2: src="提现失败!"; break;
  115. }
  116. return src
  117. },
  118. }
  119. }
  120. </script>
  121. <style lang="scss" scoped>
  122. .inspage-content {
  123. display: flex;
  124. flex-direction: column;
  125. align-items: center;
  126. justify-content: center;
  127. --header-h: 90rpx;
  128. .inspage-content-info {
  129. width: 100%;
  130. box-sizing: border-box;
  131. }
  132. }
  133. /** 头部主要内容 开始 */
  134. .inspage-content-header {
  135. width: 100%;
  136. height: var(--header-h);
  137. box-sizing: border-box;
  138. ::v-deep .u-search {
  139. padding: 0 30rpx !important;
  140. }
  141. ::v-deep .u-search__action {
  142. color: #fff !important;
  143. }
  144. }
  145. /** 头部主要内容 结束 **/
  146. /** userInfo内容 开始 */
  147. .inspage-content-userinfo {
  148. width: 100%;
  149. padding: 24rpx 40rpx 0;
  150. box-sizing: border-box;
  151. >text {
  152. width: 100%;
  153. display: flex;
  154. justify-content: center;
  155. }
  156. >text:nth-child(1) {
  157. padding: 50rpx 0 100rpx;
  158. font-size: 32rpx;
  159. }
  160. >text:nth-child(2) {
  161. padding: 50rpx 0 100rpx;
  162. color: var(--gd-bgm-color);
  163. font-size: 52rpx;
  164. }
  165. >view {
  166. padding-top: 50rpx;
  167. color: #606060;
  168. font-size: 24rpx;
  169. >view {
  170. padding-bottom: 20rpx;
  171. width: 100%;
  172. display: flex;
  173. justify-content: space-between;
  174. }
  175. }
  176. }
  177. /** userInfo内容 结束 **/
  178. </style>