myTeam.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. <template>
  2. <view class="center">
  3. <view class="center_top">
  4. <u-search placeholder="输入车队名称" v-model="searchKeyWord" @change="getList" maxlength="15"></u-search>
  5. <view class="flex top_inTeam" @click="inTeam">
  6. <view class="img_sign">
  7. <image src="../../static/images/riders/inTeam.png" mode="" class="topImg_css"></image>
  8. <span class="info_sign" v-if="inTeamShow"></span>
  9. </view>
  10. <view class="text_css">
  11. 入队申请
  12. </view>
  13. </view>
  14. <view class="flex top_fleetInvite" @click="fleetInvitation">
  15. <view class="img_sign">
  16. <image src="../../static/images/riders/fleetInvite.png" mode="" class="topImg_css"></image>
  17. <span class="info_sign" v-if="fleetInviteShow"></span>
  18. </view>
  19. <view class="text_css">
  20. 车队邀请
  21. </view>
  22. </view>
  23. </view>
  24. <view class="fleet">
  25. <view v-for="(item,index) in formData" class="flex fleet_item" @click="fleetInfo(item)">
  26. <view class="fleet_img">
  27. <u--image class="flex-end" :showLoading="true" :src="item.coverUrl" width="45px" height="45px"
  28. shape='circle'>
  29. </u--image>
  30. <span class="info_sign" v-if="item.announcement == 0"></span>
  31. <image src="../../static/images/riders/captain.png" mode="" v-if="item.captainFlag == 1" class="captain_sign"></image>
  32. </view>
  33. <view class="fleet_right">
  34. <view class="flex">
  35. <view class="fleet_name">
  36. {{item.fleetName}}({{item.fleetMemberNum}})
  37. </view>
  38. <!-- “审核中”和“已驳回”只有队长本人可见 -->
  39. <view class="fleet_invite audit" v-if="item.captainFlag == 1 && item.fleetStatus =='审核中'">{{item.fleetStatus}}</view>
  40. <view class="fleet_invite rebut" v-if="item.captainFlag == 1 && item.fleetStatus =='已驳回'">{{item.fleetStatus}}</view>
  41. <!-- 审核通过的不显示状态 -->
  42. <!-- <view class="fleet_invite adopt">已通过</view> -->
  43. <!-- <view class="fleet_invite"
  44. v-if="item.captainFlag == 1 && (item.fleetStatus =='审核中' || item.fleetStatus =='已驳回') ">
  45. {{item.fleetStatus}}</view>
  46. <view class="fleet_invite" v-else-if="item.fleetStatus != '已通过'">{{item.fleetStatus}}</view> -->
  47. <!-- <view class="fleet_invite" v-if="item.captainFlag == 1">{{item.fleetStatus}}</view> -->
  48. </view>
  49. <view class="fleet_address">
  50. {{item.province}} {{item.city}} {{item.area}}
  51. </view>
  52. </view>
  53. </view>
  54. </view>
  55. </view>
  56. </template>
  57. <script>
  58. export default {
  59. data() {
  60. return {
  61. formData: [],
  62. searchKeyWord: "",
  63. fleetInviteShow:false,
  64. inTeamShow:false
  65. }
  66. },
  67. onShow() {
  68. this.commonId = uni.getStorageSync("firstAuthentication").commonId
  69. this.checkInfo()//检查是否有未读信息
  70. this.getList()
  71. },
  72. onLoad() {
  73. },
  74. onNavigationBarButtonTap(e) {
  75. this.$u.route("/pages/riders/addFleet")
  76. },
  77. methods: {
  78. checkInfo(){
  79. this.$request.baseRequest('get', '/fleetMemberInfo/redDot', {
  80. commonId: this.commonId
  81. }).then(res => {
  82. if(res.data.teamApplication == 0){
  83. this.inTeamShow = true
  84. }
  85. if(res.data.fleetInvitation == 0){
  86. this.fleetInviteShow = true
  87. }
  88. })
  89. .catch(res => {
  90. uni.$u.toast(res.message);
  91. });
  92. },
  93. getList() {
  94. this.$request.baseRequest('get', '/fleetMemberInfo/selectMyFleetInfo', {
  95. commonId: this.commonId,
  96. searchKeyWord: this.searchKeyWord,
  97. pageSize: 10,
  98. currentPage: 1
  99. }).then(res => {
  100. this.formData = res.data.records
  101. })
  102. .catch(res => {
  103. uni.$u.toast(res.message);
  104. });
  105. },
  106. fleetInfo(item) {
  107. this.$u.route("/pages/riders/fleetSee", {
  108. fleetId: item.fleetId,
  109. id: item.id,
  110. type: item.captainFlag
  111. })
  112. },
  113. inTeam() {
  114. this.$u.route("/pages/riders/inTeam")
  115. },
  116. fleetInvitation() {
  117. this.$u.route("/pages/riders/fleetInvitation")
  118. },
  119. }
  120. }
  121. </script>
  122. <style lang="scss" scoped>
  123. .center {
  124. // padding: 30rpx;
  125. background: #F2F4F7;
  126. .row1 {
  127. display: flex;
  128. justify-content: flex-end;
  129. margin-top: 46rpx;
  130. margin: 40rpx 30rpx 0 0;
  131. }
  132. .center_top{
  133. padding: 30rpx;
  134. background: #FFFFFF;
  135. margin-bottom: 30rpx;
  136. }
  137. .topImg_css{
  138. width: 64rpx;
  139. height: 64rpx;
  140. margin-top: 38rpx;
  141. }
  142. .top_fleetInvite,.top_inTeam{
  143. height: 120rpx;
  144. line-height: 140rpx;
  145. }
  146. .text_css{
  147. margin-left: 30rpx;
  148. }
  149. .img_sign{
  150. position: relative;
  151. .info_sign{
  152. position: absolute;
  153. display: inline-block;
  154. width: 20rpx;
  155. height: 20rpx;
  156. border-radius: 10rpx;
  157. background: #FE5C5C;
  158. top: 30rpx;
  159. right: -3px;
  160. }
  161. }
  162. }
  163. .fleet {
  164. margin-top: 30rpx;
  165. background: #FFFFFF;
  166. padding: 30rpx;
  167. .fleet_item{
  168. margin-bottom: 50rpx;
  169. }
  170. .fleet_img {
  171. width: 20%;
  172. position: relative;
  173. .captain_sign{
  174. position: absolute;
  175. width: 28rpx;
  176. height: 28rpx;
  177. bottom: 0rpx;
  178. left: 64rpx;
  179. }
  180. .info_sign{
  181. position: absolute;
  182. display: inline-block;
  183. width: 20rpx;
  184. height: 20rpx;
  185. border-radius: 10rpx;
  186. background: #FE5C5C;
  187. top: 0rpx;
  188. left: 70rpx;
  189. // right: -3px;
  190. }
  191. }
  192. .fleet_right {
  193. width: 80%;
  194. .fleet_name {
  195. width: 80%;
  196. color: #333333;
  197. font-weight: 600;
  198. font-size: 34rpx;
  199. }
  200. // .fleet_invite {
  201. // background-color: #5878e8;
  202. // color: #fff;
  203. // }
  204. .audit{
  205. color: #FE6300;
  206. }
  207. .rebut{
  208. color: #FB1E1E;
  209. }
  210. .fleet_address{
  211. color: #BABABA ;
  212. font-size: 26rpx;
  213. }
  214. }
  215. }
  216. </style>