Commit 88cd0e24 by zhouzy

2

1 parent 6b6aa482
......@@ -30,5 +30,15 @@ export default {
data,
returnAll
})
}
},
/** 获取群后缀 */
getSuffix(data) {
data.method = 'entmicro.api.group.template.timstamp.get'
return window.$HTTP({
url,
data,
returnAll
})
},
}
<template>
<div class="container">
<div class="container-top">
......@@ -19,7 +18,7 @@
<div class="container-bottom">
<div class="container-bottom-ttile">邀入并创建新群聊</div>
<div class="groups-list">
<div class="groups-item" v-for="item in groupList" :key="item.index">
<div class="groups-item" v-for="(item, index) in groupList" :key="item.index">
<div class="groups-item-top">
<div class="imgBox">
<div class="itemsBox">
......@@ -28,7 +27,7 @@
<!-- <div :class="[item.userList.length > 4 ? 'head-img-five' : item.userList.length > 1 ? 'head-img-two' : 'head-img-one', 'head-img']" v-for="user in item.userList" :key="user.id"> -->
<div
:class="[item.userList.length > 4 ? 'head-img-five' : item.userList.length > 1 ? 'head-img-two' : 'head-img-one', 'head-img']"
v-for="(index) in (item.userList.length > 9 ? item.userList.slice(0, 9) : item.userList)"
v-for="index in item.userList.length > 9 ? item.userList.slice(0, 9) : item.userList"
:key="index"
>
<img src="@/assets/images/user.png" alt="" />
......@@ -37,7 +36,7 @@
</div>
</div>
<div class="textBox">
<div class="title">{{ item.groupName }}{{ '(' + item.userList.length + ')' }}</div>
<div class="title">{{ item.groupName }}{{ '(' + item.userList.length + ')' + suffix[index]}}</div>
<div class="nameBox wechatNumber text-two-line">
<span v-for="user in item.userList" :key="user.id">{{ '@' + user.staffName }}</span>
</div>
......@@ -74,6 +73,7 @@ export default {
name: 'index',
data() {
return {
suffix: [],
welcome: '',
templateId: '',
userId: '',
......@@ -188,6 +188,14 @@ export default {
console.log(res, '444')
// this.groupList = res
this.groupList = res.data
let suffixList = []
for (var a = 0; a < this.groupList.length; a++) {
suffixList.push(this.groupList[a].id)
groupChat.getSuffix({ id: suffixList[a] }).then(res => {
this.suffix.push(res.data)
console.log(this.suffix, 'suffix')
})
}
})
})
})
......@@ -231,6 +239,15 @@ export default {
height: 44.01px;
background: #e1e1e1;
}
.dialogImgBox {
display: flex;
justify-content: center;
align-items: center;
width: 132px;
height: 132px;
background: #e1e1e1;
margin: 16px 96px 34px 93px;
}
.itemsBox {
display: flex;
justify-content: center;
......@@ -402,5 +419,4 @@ export default {
display: -webkit-box;
-webkit-box-orient: vertical;
}
</style>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!