myTeam.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <template>
  2. <view class="center">
  3. <view>
  4. <u-search placeholder="输入车队名称" v-model="searchKeyWord" @change="getList" maxlength="15"></u-search>
  5. </view>
  6. <view class="" @click="inTeam">
  7. 入队申请
  8. </view>
  9. <view class="" @click="fleetInvitation">
  10. 车队邀请
  11. </view>
  12. <view v-for="(item,index) in formData" class="flex fleet" @click="fleetInfo(item)">
  13. <view class="fleet_img">
  14. <u--image class="flex-end" :showLoading="true" :src="item.coverUrl" width="60px" height="60px" shape='circle'>
  15. </u--image>
  16. </view>
  17. <view class="fleet_right">
  18. <view class="flex">
  19. <view class="fleet_name">
  20. {{item.fleetName}}({{item.fleetMemberNum}})
  21. </view>
  22. <!-- “审核中”和“已驳回”只有队长本人可见 -->
  23. <view class="fleet_invite" v-if="item.captainFlag == 1 && (item.fleetStatus =='审核中' || item.fleetStatus =='已驳回') ">{{item.fleetStatus}}</view>
  24. <view class="fleet_invite" v-else-if="item.fleetStatus != '已通过'">{{item.fleetStatus}}</view>
  25. <!-- <view class="fleet_invite" v-if="item.captainFlag == 1">{{item.fleetStatus}}</view> -->
  26. </view>
  27. <view>
  28. {{item.province}}{{item.city}}{{item.area}}
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. </template>
  34. <script>
  35. export default {
  36. data() {
  37. return {
  38. formData:[],
  39. searchKeyWord:""
  40. }
  41. },
  42. onShow() {
  43. },
  44. onLoad() {
  45. this.commonId = uni.getStorageSync("firstAuthentication").commonId
  46. this.getList()
  47. },
  48. onNavigationBarButtonTap(e) {
  49. this.$u.route("/pages/riders/addFleet")
  50. },
  51. methods: {
  52. getList() {
  53. this.$request.baseRequest('get', '/fleetMemberInfo/selectMyFleetInfo', {
  54. commonId: this.commonId,
  55. searchKeyWord:this.searchKeyWord,
  56. pageSize: 10,
  57. currentPage: 1
  58. }).then(res => {
  59. // if (res.code == 200) {
  60. // this.$refs.uToast.show({
  61. // type: 'success',
  62. // message: "车队添加成功!",
  63. // complete() {
  64. // uni.$u.route("pages/riders/myTeam")
  65. // }
  66. // })
  67. // }
  68. this.formData = res.data.records
  69. })
  70. .catch(res => {
  71. uni.$u.toast(res.message);
  72. });
  73. },
  74. fleetInfo(item){
  75. this.$u.route("/pages/riders/fleetSee",{
  76. id:item.fleetId,
  77. type:item.captainFlag
  78. })
  79. },
  80. inTeam() {
  81. this.$u.route("/pages/riders/inTeam")
  82. },
  83. fleetInvitation() {
  84. this.$u.route("/pages/riders/fleetInvitation")
  85. },
  86. }
  87. }
  88. </script>
  89. <style lang="scss" scoped>
  90. .center {
  91. padding: 30rpx;
  92. .row1 {
  93. display: flex;
  94. justify-content: flex-end;
  95. margin-top: 46rpx;
  96. margin: 40rpx 30rpx 0 0;
  97. }
  98. }
  99. .fleet{
  100. margin: 30rpx 0;
  101. .fleet_img{
  102. width: 20%;
  103. }
  104. .fleet_right{
  105. width: 80%;
  106. .fleet_name{
  107. width: 80%;
  108. }
  109. .fleet_invite{
  110. background-color: #5878e8;
  111. color: #fff;
  112. }
  113. }
  114. }
  115. </style>