tuanDui.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <template>
  2. <view class="box">
  3. <u-navbar :autoBack="true" title="我的团队" bgColor="rgba(255,255,255,0)" :placeholder="true" titleStyle="font-weight:bold;color:#000000"></u-navbar>
  4. <view class="map_tit">
  5. <image style="width: 186rpx; height: 40rpx" src="/static/img/right_img.png"></image>
  6. <view class="">{{ list.title }}</view>
  7. <image style="width: 186rpx; height: 40rpx" src="/static/img/left_img.png"></image>
  8. </view>
  9. <view class="ban_box" v-if="mamber_list.length > 0">
  10. <view class="ban_item" v-for="item in mamber_list" :key="item.id">
  11. <view class="">
  12. <image style="width: 100rpx; height: 100rpx; border-radius: 50%" src="https://huli-app.wenlvti.net/app_static/WenWuGuanJia/image/bm_top.png"></image>
  13. </view>
  14. <view class="" :style="{ marginRight: item.role == 'captain' ? '165rpx' : '' }">{{ item.nickname }}</view>
  15. <view v-if="item.role == 'member'" @click="removeMemberm(item.id)" class="sc">删除</view>
  16. </view>
  17. </view>
  18. <view v-else class="zwrw"><u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" text="暂无团队成员"></u-empty></view>
  19. <view style="position: relative; top: 480rpx">
  20. <button open-type="share" class="star"><view class="tit">邀请成员</view></button>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. let that;
  26. export default {
  27. data() {
  28. return {
  29. volunteer_id: '' /* 志愿者id */,
  30. mamber_list: [],
  31. list: {} /* 团队成员列表 */
  32. };
  33. },
  34. onLoad(o) {
  35. that = this;
  36. this.volunteer_id = o.id;
  37. this.getTeamMember();
  38. },
  39. methods: {
  40. onShareAppMessage(e) {
  41. if (e.from === 'button') {
  42. return {
  43. title: '团队分享', //弹出框提示标题
  44. path: '/shouhu_fenbao/shouHu/yaoQing?team_id=' + that.list.id + '&title=' + that.list.title,
  45. imageUrl: 'https://huli-app.wenlvti.net/app_static/WenWuGuanJia/image/search.png' //设置弹出框显示页面图片(可自定义)
  46. };
  47. } else {
  48. return {
  49. title: '我是右上角转发的',
  50. path: '/shouhu_fenbao/shouHu/yaoQing?team_id=' + that.list.id + '&title=' + that.list.title
  51. };
  52. }
  53. },
  54. // 获取团队成员列表
  55. getTeamMember() {
  56. this.$api.getTeamMember({ main_body_id: 1, volunteer_id: this.volunteer_id }, function (res) {
  57. // console.log(res, '成员列表');
  58. that.mamber_list = res.data.mamber_list;
  59. that.list = res.data;
  60. });
  61. },
  62. // 删除成员
  63. removeMemberm(id) {
  64. this.$api.removeMemberm({ main_body_id: 1, team_member_id: id }, function (res) {
  65. if (res.code == 1) {
  66. that.$common.successToShow(res.msg);
  67. setTimeout(() => {
  68. that.getTeamMember();
  69. }, 2000);
  70. } else {
  71. that.$common.successToShow(res.msg);
  72. }
  73. });
  74. }
  75. }
  76. };
  77. </script>
  78. <style>
  79. .box {
  80. height: 100%;
  81. width: 100%;
  82. padding-bottom: 50rpx;
  83. background-image: url('https://huli-app.wenlvti.net/app_static/WenWuGuanJia/image/xy_bgt.png');
  84. background-repeat: repeat-y;
  85. background-attachment: fixed;
  86. background-size: 100% 100%;
  87. }
  88. .map_tit {
  89. display: flex;
  90. align-items: center;
  91. justify-content: center;
  92. margin-top: 50rpx;
  93. font-size: 32rpx;
  94. font-family: Songti SC, Songti SC;
  95. font-weight: 900;
  96. line-height: 52rpx;
  97. color: #444444;
  98. }
  99. .ban_box {
  100. width: 90%;
  101. margin: auto;
  102. overflow: scroll;
  103. }
  104. .ban_item {
  105. font-size: 30rpx;
  106. margin-top: 40rpx;
  107. display: flex;
  108. align-items: center;
  109. justify-content: space-between;
  110. }
  111. .sc {
  112. width: 100rpx;
  113. height: 50rpx;
  114. text-align: center;
  115. line-height: 50rpx;
  116. border: 2rpx solid #f9dcc1;
  117. }
  118. .tit {
  119. width: 90%;
  120. height: 100%;
  121. margin: auto;
  122. font-size: 32rpx;
  123. letter-spacing: 6rpx;
  124. text-align: center;
  125. font-weight: 700;
  126. background: linear-gradient(180deg, #af7e44 0%, #934b36 100%);
  127. -webkit-background-clip: text;
  128. -webkit-text-fill-color: transparent;
  129. }
  130. .star {
  131. width: 300rpx;
  132. height: 76rpx;
  133. margin: auto;
  134. margin-top: 80rpx;
  135. text-align: center;
  136. line-height: 76rpx;
  137. background: url('/static/img/dt_bg2.png') no-repeat;
  138. background-size: 100% 100%;
  139. }
  140. </style>