敢为人鲜小程序前端代码仓库
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.

153 lines
3.8 KiB

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.teamInfo.shopImage" mode="aspectFill" class="shop-image" />
  9. <!-- 团员数量 -->
  10. <view class="member-count">
  11. 我的团员<text class="count">{{ teamData.teamInfo.memberCount }}</text>
  12. </view>
  13. </view>
  14. <!-- 团员列表 -->
  15. <view class="member-list">
  16. <view class="member-item" v-for="member in teamData.memberList" :key="member.id">
  17. <!-- 状态点 -->
  18. <view class="status-dot"></view>
  19. <!-- 头像 -->
  20. <image :src="member.avatar" mode="aspectFill" class="member-avatar" />
  21. <!-- 团员信息 -->
  22. <view class="member-info">
  23. <view class="member-name">{{ member.nickname }}</view>
  24. <view class="join-time">注册时间: {{ member.joinTime }}</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', {} , res => {
  47. if (res.code === 200){
  48. teamData = res.result
  49. }
  50. })
  51. // 设置分享信息
  52. this.Gshare = {
  53. ...this.Gshare,
  54. title: '查看我的团队成员',
  55. path: '/pages_order/mine/myTeam',
  56. identity: 1 // 确保以团长身份分享
  57. }
  58. },
  59. methods: {
  60. // 可以添加查询团员、团员管理等方法
  61. }
  62. }
  63. </script>
  64. <style lang="scss" scoped>
  65. .my-team {
  66. min-height: 100vh;
  67. background-color: #fff;
  68. }
  69. .team-info-section {
  70. display: flex;
  71. flex-direction: column;
  72. align-items: center;
  73. padding: 30rpx 0;
  74. .shop-image {
  75. width: 140rpx;
  76. height: 140rpx;
  77. border-radius: 10rpx;
  78. margin-bottom: 20rpx;
  79. }
  80. .member-count {
  81. font-size: 30rpx;
  82. color: #333;
  83. .count {
  84. color: #019245;
  85. font-weight: bold;
  86. }
  87. }
  88. }
  89. .member-list {
  90. padding: 0 30rpx;
  91. .member-item {
  92. display: flex;
  93. align-items: center;
  94. padding: 24rpx 0;
  95. border-bottom: 1rpx solid #f0f0f0;
  96. position: relative;
  97. &:last-child {
  98. margin-bottom: 30rpx;
  99. }
  100. .status-dot {
  101. position: absolute;
  102. left: 0;
  103. top: 50%;
  104. transform: translateY(-50%);
  105. width: 12rpx;
  106. height: 12rpx;
  107. border-radius: 50%;
  108. background-color: #019245;
  109. }
  110. .member-avatar {
  111. width: 80rpx;
  112. height: 80rpx;
  113. // border-radius: 50%;
  114. margin-left: 20rpx;
  115. }
  116. .member-info {
  117. margin-left: 20rpx;
  118. flex: 1;
  119. .member-name {
  120. font-size: 28rpx;
  121. color: #333;
  122. margin-bottom: 6rpx;
  123. }
  124. .join-time {
  125. font-size: 24rpx;
  126. color: #999;
  127. }
  128. }
  129. }
  130. }
  131. </style>