Commit d2961911 by zhouzy

3

1 parent a430e983
...@@ -23,17 +23,19 @@ ...@@ -23,17 +23,19 @@
<div class="groups-item-top"> <div class="groups-item-top">
<div class="imgBox"> <div class="imgBox">
<div class="itemsBox"> <div class="itemsBox">
<!-- <div :style="{ 'width': item.imgs.length > 4 ? 14.67 : (item.imgs.length > 1 ? 22 : 44) + 'px', 'height': item.imgs.length > 4 ? 14.67 : (item.imgs.length > 1 ? 22 : 44) + 'px' }" v-for="img in item.imgs" :key='img.id'> --> <template v-if="item.imgs">
<div :class="[item.imgs.length > 4 ? 'head-img-five' : item.imgs.length > 1 ? 'head-img-two' : 'head-img-one', 'head-img']" v-for="img in item.imgs" :key="img.id"> <!-- <div :style="{ 'width': item.imgs.length > 4 ? 14.67 : (item.imgs.length > 1 ? 22 : 44) + 'px', 'height': item.imgs.length > 4 ? 14.67 : (item.imgs.length > 1 ? 22 : 44) + 'px' }" v-for="img in item.imgs" :key='img.id'> -->
<img :src="img.url" alt="" /> <div :class="[item.imgs.length > 4 ? 'head-img-five' : item.imgs.length > 1 ? 'head-img-two' : 'head-img-one', 'head-img']" v-for="img in item.imgs" :key="img.id">
</div> <img :src="img.url" alt="" />
</div>
</template>
</div> </div>
</div> </div>
<div class="textBox"> <div class="textBox">
<div class="title">{{ item.orgName }}</div> <div class="title">{{ item.orgName }}</div>
<div class="wechatNumber">{{ item.groupName }}</div> <div class="wechatNumber">{{ item.groupName }}</div>
</div> </div>
<van-button @click="showDialog" style="margin-left: auto" size="small" color="#5850FF">{{ item.chatId ? '加入群聊' : '创建群聊' }}</van-button> <van-button @click="showDialog(item.imgs)" style="margin-left: auto" size="small" color="#5850FF">{{ item.chatId ? '加入群聊' : '创建群聊' }}</van-button>
</div> </div>
<div class="groups-item-bottom"> <div class="groups-item-bottom">
<div class="welcomeTitle">入群欢迎语</div> <div class="welcomeTitle">入群欢迎语</div>
...@@ -49,12 +51,11 @@ ...@@ -49,12 +51,11 @@
并新建一个 并新建一个
</div> </div>
<div>外部客户群聊</div> <div>外部客户群聊</div>
<div class="imgBox"> <div class="imgBox" style="margin-left:93px;width:132px;height:132px;">
<div class="itemsBox"> <div class="itemsBox">
<!-- <div :style="{ 'width': item.imgs.length > 4 ? 14.67 : (item.imgs.length > 1 ? 22 : 44) + 'px', 'height': item.imgs.length > 4 ? 14.67 : (item.imgs.length > 1 ? 22 : 44) + 'px' }" v-for="img in item.imgs" :key='img.id'> --> <div :class="[dialogImgs.length > 4 ? 'head-img-five' : dialogImgs.length > 1 ? 'head-img-two' : 'head-img-one', 'head-img']" v-for="img in dialogImgs" :key="img.id">
<div :class="[item.imgs.length > 4 ? 'head-img-five' : item.imgs.length > 1 ? 'head-img-two' : 'head-img-one', 'head-img']" v-for="img in item.imgs" :key="img.id"> <img :src="img.url" alt="" />
<img :src="img.url" alt="" /> </div>
</div>
</div> </div>
</div> </div>
</van-dialog> </van-dialog>
...@@ -63,8 +64,8 @@ ...@@ -63,8 +64,8 @@
</div> </div>
</div> </div>
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import { groupChat, wx_config } from '@/api'
export default { export default {
name: '', name: '',
data() { data() {
...@@ -81,6 +82,14 @@ export default { ...@@ -81,6 +82,14 @@ export default {
// 8: 14.67, // 8: 14.67,
// 9: 14.67, // 9: 14.67,
// }, // },
dialogImgs: [],
selectListParams: {
id: '',
status: '',
orgName: '',
pageSize: '',
pageNum: ''
},
businessCard: { businessCard: {
name: 'songshu', name: 'songshu',
wechatNumber: '18207493352', wechatNumber: '18207493352',
...@@ -102,7 +111,7 @@ export default { ...@@ -102,7 +111,7 @@ export default {
hasgroup: '1' hasgroup: '1'
}, },
{ {
id: '0', id: '1',
orgName: 'songshu1', orgName: 'songshu1',
groupName: '@songshu1', groupName: '@songshu1',
welcome: '欢迎songshu2', welcome: '欢迎songshu2',
...@@ -116,7 +125,7 @@ export default { ...@@ -116,7 +125,7 @@ export default {
hasgroup: '1' hasgroup: '1'
}, },
{ {
id: '0', id: '2',
orgName: 'songshu1', orgName: 'songshu1',
groupName: '@songshu1', groupName: '@songshu1',
welcome: '欢迎songshu2', welcome: '欢迎songshu2',
...@@ -130,7 +139,7 @@ export default { ...@@ -130,7 +139,7 @@ export default {
hasgroup: '1' hasgroup: '1'
}, },
{ {
id: '0', id: '3',
orgName: 'songshu1', orgName: 'songshu1',
groupName: '@songshu1', groupName: '@songshu1',
welcome: '欢迎songshu2', welcome: '欢迎songshu2',
...@@ -144,7 +153,7 @@ export default { ...@@ -144,7 +153,7 @@ export default {
hasgroup: '1' hasgroup: '1'
}, },
{ {
id: '0', id: '4',
orgName: 'songshu1', orgName: 'songshu1',
groupName: '@songshu1', groupName: '@songshu1',
welcome: '欢迎songshu2', welcome: '欢迎songshu2',
...@@ -158,7 +167,7 @@ export default { ...@@ -158,7 +167,7 @@ export default {
hasgroup: '1' hasgroup: '1'
}, },
{ {
id: '0', id: '5',
orgName: 'songshu1', orgName: 'songshu1',
groupName: '@songshu1', groupName: '@songshu1',
welcome: '欢迎songshu2', welcome: '欢迎songshu2',
...@@ -168,10 +177,10 @@ export default { ...@@ -168,10 +177,10 @@ export default {
{ id: 2, url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg' }, { id: 2, url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg' },
{ id: 3, url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg' }, { id: 3, url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg' },
{ id: 4, url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg' }, { id: 4, url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg' },
{ id: 4, url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg' }, { id: 5, url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg' },
{ id: 4, url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg' }, { id: 6, url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg' },
{ id: 4, url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg' }, { id: 7, url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg' },
{ id: 4, url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg' } { id: 8, url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg' }
], ],
hasgroup: '1' hasgroup: '1'
} }
...@@ -189,42 +198,49 @@ export default { ...@@ -189,42 +198,49 @@ export default {
activated() {}, activated() {},
deactivated() {}, deactivated() {},
mounted() { mounted() {
//获取userId //配置wx接口
wx.invoke('getCurExternalContact', { window.$wx = new wx_config(['getCurExternalContact'])
}, function(res){ console.log(window.$wx,'111111');
if(res.err_msg == "getCurExternalContact:ok"){ // 获取userId
userId = res.userId ; //返回当前外部联系人userId // window.$wx.getCurExternalContact({}).then(res => {
//获取列表信息 // console.log(res);
// if (res.data.userId) {
}else { // let userId = res.data.userId
//错误处理 // //获取列表信息
} // groupChat.getDetail({ userId }).then(res => {
}); // if (res.data.chatId) {
//获取列表信息 // //跳转到会话界面
chatApi // wx_config.getList(this.selectListParams).then(res => {
.getList({ // this.groupList = res.data
// })
}) // } else {
.then(res => { // //渲染名片
// this.businessCard = res.data
}) // this.selectListParams = res.data
// //加载群列表
// groupChat.getList(this.selectListParams).then(res => {
// this.groupList = res.data
// })
// }
// })
// } else {
// console.log('用户id不存在')
// }
// })
}, },
methods: { methods: {
showDialog() { showDialog(imgs) {
this.dialogImgs = imgs
this.show = true this.show = true
console.log(this.dialogImgs, '111111')
}, },
// 加入会话 // 加入会话
joinCaht(){ joinCaht() {},
},
//创建群聊 //创建群聊
addChat(){ addChat() {}
}
} }
} }
</script> </script>
<style scoped lang='scss'> <style scoped lang='scss'>
</style> </style>
<style> <style>
...@@ -264,8 +280,8 @@ export default { ...@@ -264,8 +280,8 @@ export default {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
width: 44px; width: 44.01px;
height: 44px; height: 44.01px;
text-align: center; text-align: center;
background: #e1e1e1; background: #e1e1e1;
} }
...@@ -273,6 +289,7 @@ export default { ...@@ -273,6 +289,7 @@ export default {
display: flex; display: flex;
justify-content: center; justify-content: center;
flex-wrap: wrap-reverse; flex-wrap: wrap-reverse;
text-align: center;
} }
.head-img { .head-img {
display: inline-block; display: inline-block;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!