my_share_result_order.vue 3.9 KB

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