|
@@ -1,21 +1,35 @@
|
|
|
<template>
|
|
|
<view class="page">
|
|
|
+ <block v-if="have_chk > 0">
|
|
|
+ <view class="viewMore">
|
|
|
+ 申请待审核
|
|
|
+ <image src="../../static/me/arrow_down_gray.png" mode="widthFix" />
|
|
|
+ </view>
|
|
|
+ <view class="bcenter">
|
|
|
+ <view class="avator" v-for="(item, index) in list0" :key="index" @click="actMenuC(item.userID)">
|
|
|
+ <image :src="item.avator" mode="aspectFill" />
|
|
|
+ <text>{{item.nick}}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="line"></view>
|
|
|
+ <view class="line"></view>
|
|
|
+ <view class="line"></view>
|
|
|
+ </block>
|
|
|
<view class="bcenter">
|
|
|
- <view class="avator" v-for="(item, index) in list" :key="index">
|
|
|
+ <view class="avator" v-for="(item, index) in list" :key="index" @click="actMenu(item.userID)">
|
|
|
<image :src="item.avator" mode="aspectFill" />
|
|
|
<text>{{item.nick}}</text>
|
|
|
- <image v-if="is_del" class="delit" src="../../static/icon/del_mem.png"
|
|
|
- @click="actMem('del',item.userID)">
|
|
|
+ <image v-if="is_del" class="delit" src="../../static/icon/del_mem.png">
|
|
|
</image>
|
|
|
</view>
|
|
|
<view class="avator" @click="addMember">
|
|
|
<image src="../../static/icon/icon_add.png" mode="widthFix" />
|
|
|
<text></text>
|
|
|
</view>
|
|
|
- <view class="avator" @click="delMember">
|
|
|
+ <!-- <view class="avator" @click="delMember">
|
|
|
<image src="../../static/icon/icon_del.png" mode="widthFix" />
|
|
|
<text></text>
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
</view>
|
|
|
<view class="viewMore" @click="viewMore">
|
|
|
更多群成员
|
|
@@ -57,6 +71,8 @@
|
|
|
data() {
|
|
|
return {
|
|
|
page: 1,
|
|
|
+ have_chk: 0,
|
|
|
+ list0: [],
|
|
|
list: [],
|
|
|
num_total: 0,
|
|
|
groupId: '',
|
|
@@ -117,6 +133,13 @@
|
|
|
if (res.data.list == undefined || res.data.list == null) {
|
|
|
res.data.list = []
|
|
|
}
|
|
|
+ this.have_chk = 0;
|
|
|
+ if (res.data.list0 != undefined && res.data.list0 != null) {
|
|
|
+ if (res.data.list0.length > 0) {
|
|
|
+ this.list0 = res.data.list0;
|
|
|
+ this.have_chk = 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
this.isManage = res.data.isManage;
|
|
|
if (that.page > 1) {
|
|
|
that.list = that.list.concat(res.data.list)
|
|
@@ -232,6 +255,84 @@
|
|
|
});
|
|
|
})
|
|
|
},
|
|
|
+ actMenuC(uid) {
|
|
|
+ let that = this;
|
|
|
+ uni.showActionSheet({
|
|
|
+ title: '',
|
|
|
+ itemList: ['拒绝', '同意'],
|
|
|
+ success: function(res) {
|
|
|
+ if (res.tapIndex == 0) {
|
|
|
+ that.actMem('noagree', uid);
|
|
|
+ } else {
|
|
|
+ that.actMem('agree', uid);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ fail: function(res) {
|
|
|
+ console.log(res.errMsg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ actMenu(uid) {
|
|
|
+ let that = this;
|
|
|
+ uni.showActionSheet({
|
|
|
+ title: '',
|
|
|
+ itemList: ['禁言', '移除'],
|
|
|
+ success: function(res) {
|
|
|
+ if (res.tapIndex == 0) {
|
|
|
+ that.actMem('lock', uid);
|
|
|
+ } else {
|
|
|
+ that.actMem('del', uid);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ fail: function(res) {
|
|
|
+ console.log(res.errMsg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ actMem(act, uid) {
|
|
|
+ let tips = '确定禁言吗?';
|
|
|
+ if (act == 'del') {
|
|
|
+ tips = '您确认删除吗?';
|
|
|
+ }
|
|
|
+ let that = this;
|
|
|
+ this.$refs['DialogBox'].confirm({
|
|
|
+ title: '提示',
|
|
|
+ content: tips,
|
|
|
+ DialogType: 'inquiry',
|
|
|
+ btn1: '否',
|
|
|
+ btn2: '是',
|
|
|
+ animation: 0
|
|
|
+ }).then((res) => {
|
|
|
+ uni.showLoading({})
|
|
|
+ uni.request({
|
|
|
+ url: that.$apiHost2 + '/Chat/groupActMem', //仅为示例,并非真实接口地址。
|
|
|
+ data: {
|
|
|
+ uuid: getApp().globalData.uuid,
|
|
|
+ groupId: that.groupId,
|
|
|
+ userId: uid,
|
|
|
+ act: act
|
|
|
+ },
|
|
|
+ header: {
|
|
|
+ 'content-type': 'application/json' //自定义请求头信息
|
|
|
+ },
|
|
|
+ success: (res) => {
|
|
|
+ console.log("----", res.data);
|
|
|
+ that.$refs['ToastW3'].showToast({
|
|
|
+ title: res.data.str,
|
|
|
+ animation: 0
|
|
|
+ });
|
|
|
+ if (res.data.success == "yes") {
|
|
|
+ this.loadData();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ complete: (com) => {
|
|
|
+ uni.hideLoading();
|
|
|
+ },
|
|
|
+ });
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
</script>
|