myTeam.vue 2.5 KB

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