Commit eb3e5c74 by zhouzy

修改bug

1 parent 79522d13
......@@ -55,7 +55,7 @@
<div class="dialogMessage">
邀请客户
<span class="name">@{{ businessCard.customerName }}</span>
并新建一个外部客户群聊
并{{dialogContent}}一个外部客户群聊
</div>
<!-- <div class="dialogImgBox">
<div class="itemsBox">
......@@ -81,6 +81,7 @@ export default {
name: 'index',
data() {
return {
dialogContent:'',
groupNames: '',
showRemark: false,
suffix: [],
......@@ -115,40 +116,6 @@ export default {
deactivated() {},
mounted() {
this.initWx()
// groupChat.getDetail({ userId: 'wmdMreDgAAvkJ7PZmeph-HYoSLmkMUFQ' }).then(res => {
// console.log(res, 'data')
// this.businessCard = res.info
// groupChat.getList({ userId: 'wmdMreDgAAvkJ7PZmeph-HYoSLmkMUFQ' }).then(res => {
// console.log(res, '444')
// this.groupList = res || []
// this.showRemark = res && res.length ? false : true
// for (var a = 0; a < this.groupList.length; a++) {
// if (!this.businessCard.vehicleInfoList) {
// this.groupList[a].groupNames = this.groupList[a].groupName
// } else {
// if (this.groupList[a].groupNameRule == 0) {
// this.groupList[a].groupNames = this.groupList[a].groupName
// }
// if (this.groupList[a].groupNameRule == 1) {
// if (this.businessCard.vehicleInfoList[0].vehicleTrain) {
// this.groupList[a].groupNames = this.businessCard.vehicleInfoList[0].vehicleTrain + this.businessCard.customerName + this.groupList[a].groupName
// } else {
// this.groupList[a].groupNames = this.businessCard.customerName + this.groupList[a].groupName
// }
// }
// if (this.groupList[a].groupNameRule == 2) {
// if (!this.businessCard.vehicleInfoList[0].vehicleTrain) {
// this.businessCard.vehicleInfoList[0].vehicleTrain = ''
// }
// if (!this.businessCard.vehicleInfoList[0].vehicleNo) {
// this.businessCard.vehicleInfoList[0].vehicleTrain = ''
// }
// this.groupList[a].groupNames = this.businessCard.vehicleInfoList[0].vehicleTrain + this.businessCard.vehicleInfoList[0].vehicleNo + this.groupList[a].groupName
// }
// }
// }
// })
// })
},
methods: {
// 创建群聊or进入群聊
......@@ -161,11 +128,14 @@ export default {
this.insertParams.templateId = this.templateId
//保存新群
groupChat.addChat(this.insertParams).then(res => {
console.log(res, '???')
//打开刚创建的群聊
let chatId = this.insertParams.chatId
wxConfig.openExistedChatWithMsg({ chatId }).then(res => {
console.log(this.addGroupParams.chatId, '55555')
// 刷新列表
groupChat.getList({ externalUserId: this.userId }).then(res => {
this.groupList = res || []
this.showRemark = res && res.length ? false : true
//打开刚创建的群聊
let chatId = this.insertParams.chatId
wxConfig.openExistedChatWithMsg({ chatId }).then(res => {
})
})
})
})
......@@ -187,7 +157,6 @@ export default {
}
console.log(this.welcome, 'welcome')
this.dialogMessage = item.userList
this.show = true
let arr = []
//获取员工id列表
for (var i = 0; i < item.userList.length; i++) {
......@@ -197,10 +166,14 @@ export default {
this.addGroupParams.groupName = item.groupName
if (item.chatId == null) {
this.addGroupParams.chatId = ''
this.dialogContent = '新建'
} else {
this.addGroupParams.chatId = item.chatId
this.dialogContent = '进入'
}
this.templateId = item.id
this.show = true
// console.log(this.addGroupParams)
},
//初始化微信接口
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!