敢为人鲜小程序前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

156 lines
3.8 KiB

1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
  1. <template>
  2. <view class="my-team">
  3. <!-- 导航栏 -->
  4. <navbar title="我的团员" leftClick @leftClick="$utils.navigateBack" bgColor="#019245" color="#fff" />
  5. <!-- 团队信息展示 -->
  6. <view class="team-info-section">
  7. <!-- 店铺图片 -->
  8. <image :src="teamData[0].teamLeader.spotImage" mode="aspectFill" class="shop-image" />
  9. <!-- 团员数量 -->
  10. <view class="member-count">
  11. 我的团员<text class="count">{{ teamData.length }}</text>
  12. </view>
  13. </view>
  14. <!-- 团员列表 -->
  15. <view class="member-list">
  16. <view class="member-item" v-for="member in teamData" :key="member.id">
  17. <!-- 状态点 -->
  18. <view class="status-dot"></view>
  19. <!-- 头像 -->
  20. <image :src="member.member.headImage" mode="aspectFill" class="member-avatar" />
  21. <!-- 团员信息 -->
  22. <view class="member-info">
  23. <view class="member-name">{{ member.memberId_dictText }}</view>
  24. <view class="join-time">注册时间: {{ member.createTime }}</view>
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. </template>
  30. <script>
  31. import navbar from '@/components/base/navbar.vue'
  32. // import { teamData } from '@/static/js/mockTeamData.js'
  33. import shareConfig from '@/mixins/configList.js'
  34. export default {
  35. components: {
  36. navbar
  37. },
  38. mixins: [shareConfig],
  39. data() {
  40. return {
  41. teamData: null
  42. }
  43. },
  44. onLoad() {
  45. // this.teamData = teamData
  46. this.$api('queryMemberList', {
  47. pageNo: 1,
  48. pageSize: 10000
  49. } , res => {
  50. if (res.code === 200){
  51. this.teamData = res.result.records
  52. }
  53. })
  54. // 设置分享信息
  55. this.Gshare = {
  56. ...this.Gshare,
  57. title: '查看我的团队成员',
  58. path: '/pages_order/mine/myTeam',
  59. identity: 1 // 确保以团长身份分享
  60. }
  61. },
  62. methods: {
  63. // 可以添加查询团员、团员管理等方法
  64. }
  65. }
  66. </script>
  67. <style lang="scss" scoped>
  68. .my-team {
  69. min-height: 100vh;
  70. background-color: #fff;
  71. }
  72. .team-info-section {
  73. display: flex;
  74. flex-direction: column;
  75. align-items: center;
  76. padding: 30rpx 0;
  77. .shop-image {
  78. width: 140rpx;
  79. height: 140rpx;
  80. border-radius: 10rpx;
  81. margin-bottom: 20rpx;
  82. }
  83. .member-count {
  84. font-size: 30rpx;
  85. color: #333;
  86. .count {
  87. color: #019245;
  88. font-weight: bold;
  89. }
  90. }
  91. }
  92. .member-list {
  93. padding: 0 30rpx;
  94. .member-item {
  95. display: flex;
  96. align-items: center;
  97. padding: 24rpx 0;
  98. border-bottom: 1rpx solid #f0f0f0;
  99. position: relative;
  100. &:last-child {
  101. margin-bottom: 30rpx;
  102. }
  103. .status-dot {
  104. position: absolute;
  105. left: 0;
  106. top: 50%;
  107. transform: translateY(-50%);
  108. width: 12rpx;
  109. height: 12rpx;
  110. border-radius: 50%;
  111. background-color: #019245;
  112. }
  113. .member-avatar {
  114. width: 80rpx;
  115. height: 80rpx;
  116. // border-radius: 50%;
  117. margin-left: 20rpx;
  118. }
  119. .member-info {
  120. margin-left: 20rpx;
  121. flex: 1;
  122. .member-name {
  123. font-size: 28rpx;
  124. color: #333;
  125. margin-bottom: 6rpx;
  126. }
  127. .join-time {
  128. font-size: 24rpx;
  129. color: #999;
  130. }
  131. }
  132. }
  133. }
  134. </style>