|
@@ -5,11 +5,14 @@
|
|
|
<text class="group-name">{{ groupInfo.name }}</text>
|
|
<text class="group-name">{{ groupInfo.name }}</text>
|
|
|
<text class="group-slogan" v-if="groupInfo.slogan">{{ groupInfo.slogan }}</text>
|
|
<text class="group-slogan" v-if="groupInfo.slogan">{{ groupInfo.slogan }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="section-title">成员列表</view>
|
|
|
|
|
|
|
+<view class="section-title">成员列表</view>
|
|
|
<view class="member-list">
|
|
<view class="member-list">
|
|
|
<view class="member-item" v-for="(m, idx) in (groupInfo.members || [])" :key="idx">
|
|
<view class="member-item" v-for="(m, idx) in (groupInfo.members || [])" :key="idx">
|
|
|
- <text class="member-name">{{ m.name || '未命名' }}</text>
|
|
|
|
|
- <text class="member-role">{{ m.uid === groupInfo.spokespersonUid ? '🏆 发言人' : '成员' }}</text>
|
|
|
|
|
|
|
+ <view class="member-info">
|
|
|
|
|
+ <text class="member-name">{{ m.name || '未命名' }}</text>
|
|
|
|
|
+ <text class="member-role">{{ m.uid === groupInfo.spokespersonUid ? '🏆 发言人' : '成员' }}</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <button class="speaker-btn" v-if="!groupInfo.spokespersonUid" @click="setSpeaker(m.uid)">设为发言人</button>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="section-title">分工认领</view>
|
|
<view class="section-title">分工认领</view>
|
|
@@ -31,7 +34,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import { getMyGroup, joinGroup } from '@/utils/api.js'
|
|
|
|
|
|
|
+import { getMyGroup, joinGroup, setSpokesperson } from '@/utils/api.js'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
data() {
|
|
data() {
|
|
@@ -70,9 +73,25 @@ export default {
|
|
|
self.loading = false
|
|
self.loading = false
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- bookTypeLabel(type) {
|
|
|
|
|
|
|
+bookTypeLabel(type) {
|
|
|
var map = { wealth: '财富账', health: '健康账', growth: '成长账', support: '通用支援' }
|
|
var map = { wealth: '财富账', health: '健康账', growth: '成长账', support: '通用支援' }
|
|
|
return map[type] || type
|
|
return map[type] || type
|
|
|
|
|
+ },
|
|
|
|
|
+ setSpeaker(uid) {
|
|
|
|
|
+ var self = this
|
|
|
|
|
+ uni.showModal({
|
|
|
|
|
+ title: '设为发言人',
|
|
|
|
|
+ content: '登记后不可更换,确认将该成员设为发言人?',
|
|
|
|
|
+ success: function(res) {
|
|
|
|
|
+ if (!res.confirm) return
|
|
|
|
|
+ setSpokesperson(uid).then(function() {
|
|
|
|
|
+ uni.showToast({ title: '已登记', icon: 'success' })
|
|
|
|
|
+ self.loadGroup()
|
|
|
|
|
+ }).catch(function(err) {
|
|
|
|
|
+ uni.showToast({ title: (err && err.message) || '设置失败', icon: 'none' })
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -86,9 +105,12 @@ export default {
|
|
|
.group-slogan { display: block; font-size: 26rpx; color: #F97316; }
|
|
.group-slogan { display: block; font-size: 26rpx; color: #F97316; }
|
|
|
.section-title { font-size: 30rpx; font-weight: 600; color: #1E293B; margin: 24rpx 0 16rpx; border-left: 8rpx solid #F97316; padding-left: 16rpx; }
|
|
.section-title { font-size: 30rpx; font-weight: 600; color: #1E293B; margin: 24rpx 0 16rpx; border-left: 8rpx solid #F97316; padding-left: 16rpx; }
|
|
|
.member-list { margin-bottom: 24rpx; }
|
|
.member-list { margin-bottom: 24rpx; }
|
|
|
-.member-item { display: flex; justify-content: space-between; padding: 16rpx 0; border-bottom: 1rpx solid #F1F5F9; }
|
|
|
|
|
|
|
+.member-item { display: flex; align-items: center; justify-content: space-between; padding: 16rpx 0; border-bottom: 1rpx solid #F1F5F9; }
|
|
|
|
|
+.member-info { display: flex; flex-direction: column; flex: 1; }
|
|
|
.member-name { font-size: 28rpx; color: #1E293B; }
|
|
.member-name { font-size: 28rpx; color: #1E293B; }
|
|
|
-.member-role { font-size: 24rpx; color: #64748B; }
|
|
|
|
|
|
|
+.member-role { font-size: 24rpx; color: #64748B; margin-top: 4rpx; }
|
|
|
|
|
+.speaker-btn { width: 160rpx; height: 56rpx; line-height: 56rpx; font-size: 24rpx; color: #F97316; background: #FFF0E6; border-radius: 28rpx; border: none; margin: 0 0 0 16rpx; }
|
|
|
|
|
+.speaker-btn:active { opacity: 0.85; }
|
|
|
.empty-text { font-size: 26rpx; color: #94A3B8; padding: 16rpx 0; }
|
|
.empty-text { font-size: 26rpx; color: #94A3B8; padding: 16rpx 0; }
|
|
|
.assign-list { margin-bottom: 24rpx; }
|
|
.assign-list { margin-bottom: 24rpx; }
|
|
|
.assign-item { display: flex; justify-content: space-between; padding: 16rpx 0; border-bottom: 1rpx solid #F1F5F9; }
|
|
.assign-item { display: flex; justify-content: space-between; padding: 16rpx 0; border-bottom: 1rpx solid #F1F5F9; }
|