my_share_result_order.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <template>
  2. <view>
  3. <view style="padding: 0px 30px;margin-top: 5px;">
  4. <!-- 顶部对方已读和未读按钮 -->
  5. <uni-segmented-control :current="current" :values="items" @clickItem="onClickItem"
  6. styleType="text" activeColor="#35b882"></uni-segmented-control>
  7. <!-- 发出的邀请列表 -->
  8. </view>
  9. <view v-show="current === 0">
  10. <view v-for="(Info,index) in OrderWithdraw" :key="index">
  11. <view class="invitationWrapper" @click="gotoDetail(Info.orderId)">
  12. <view class="invitationTitle">
  13. <view>
  14. <text>订单号</text>
  15. <text class="invitatinDetail">{{Info.orderId}}</text>
  16. </view>
  17. </view>
  18. <view class="invitationDateAndStatus">
  19. <text>日期</text>
  20. <text class="invitatinDetail">{{Info.datetime}}</text>
  21. <text class="invitatinStatus" >{{Info.recoStatus}}</text>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. <view v-show="current === 1">
  27. <view v-for="(Info,index) in OrderNotWithdraw" :key="index">
  28. <view class="invitationWrapper" @click="gotoDetail(Info.orderId)">
  29. <view class="invitationTitle">
  30. <view>
  31. <text>订单号</text>
  32. <text class="invitatinDetail">{{Info.orderId}}</text>
  33. </view>
  34. </view>
  35. <view class="invitationDateAndStatus">
  36. <text>日期</text>
  37. <text class="invitatinDetail">{{Info.datetime}}</text>
  38. <text class="invitatinStatus" >{{Info.recoStatus}}</text>
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. </template>
  45. <script>
  46. import {
  47. mapState,
  48. mapMutations
  49. } from 'vuex'
  50. export default {
  51. data() {
  52. return {
  53. current: 1,
  54. items: ['已提现', '未提现'],
  55. OrderWithdraw: [],
  56. OrderNotWithdraw: []
  57. };
  58. },
  59. created() {
  60. // this.readYes()
  61. this.NotWithdraw()
  62. },
  63. methods: {
  64. async Withdraw() {
  65. const {
  66. data: result
  67. } = await uni.$http.get('/payment/order-info/list/recommendUidWithdraw')
  68. this.OrderWithdraw = result.data.list
  69. //console.log(this.OrderNotWithdraw)
  70. },
  71. async NotWithdraw() {
  72. const {
  73. data: result
  74. } = await uni.$http.get('/payment/order-info/list/recommendUidNotWithdraw')
  75. this.OrderNotWithdraw = result.data.list
  76. //console.log(this.OrderNotWithdraw)
  77. },
  78. gotoDetail(id) {
  79. uni.navigateTo({
  80. url: '/subpkg/my/share/my_share_result_order_detail?orderId=' + id
  81. })
  82. },
  83. onClickItem(e) {
  84. if (this.current != e.currentIndex) {
  85. this.current = e.currentIndex
  86. }
  87. if (this.current === 1) {
  88. this.NotWithdraw()
  89. }
  90. if (this.current === 0) {
  91. this.Withdraw()
  92. }
  93. }
  94. }
  95. }
  96. </script>
  97. <!-- 设置页面背景 -->
  98. <style lang="scss">
  99. page{
  100. height: 100%;
  101. // background-color: #FFF;
  102. }
  103. </style>
  104. <style lang="scss" scoped>
  105. page {
  106. padding: 20rpx;
  107. height: 100%;
  108. //background-color: #E2F0D9;
  109. }
  110. /* 列表样式 */
  111. .invitationWrapper {
  112. padding: 30rpx;
  113. margin: 10rpx 30rpx;
  114. border-radius: 30rpx;
  115. background-color: #FFF;
  116. font-size: 30rpx;
  117. }
  118. /* 邀请号和对方身份、邀请日期和对方状态 */
  119. .invitationTitle {
  120. display: flex;
  121. position: relative;
  122. }
  123. /* 具体内容的样式 */
  124. .invitatinDetail {
  125. margin-left: 10rpx;
  126. font-weight: bold;
  127. }
  128. .invitatinStatus {
  129. margin-left: 60rpx;
  130. color: red;
  131. font-weight: bold;
  132. }
  133. </style>