index.vue 3.7 KB

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