Commit b39c6b59 by 王志慧

feat:一客一群群名字数限制;清楚缓存id

1 parent d24c1a22
......@@ -138,7 +138,7 @@ const actions = {
}
}
util.setLocalStorage('dj_scrm_corpId', { corpId })
if (id) util.setLocalStorage('dj_id', { id })
if (id) util.setLocalStorage('dj_scrm_id', { id })
const storage_sessionId = util.getSessionId()
if (sessionId || storage_sessionId) {
state.showWindow = true
......
......@@ -272,9 +272,7 @@ export default {
this.userAgent = this.isMobile()
this.showLoading()
let { id, customerId, isTrue } = this.getQuery()
if (JSON.parse(window.localStorage.getItem('dj_id'))) {
id = JSON.parse(window.localStorage.getItem('dj_id')).id
}
id = id ? id : window.localStorage.getItem('dj_scrm_id') && JSON.parse(window.localStorage.getItem('dj_scrm_id')).id
// console.log(id,'测试测试')
// id = 'wo_pmOEQAAr93aXGLTNtAjLGZZxpwXuQ'
......@@ -353,7 +351,7 @@ export default {
console.log('this.userInfo.labelInfos', this.userInfo.labelInfos)
let labelArray = [
{
labelGroupType: '企业标签',
labelGroupType: this.merchantModel == 1 ? '集团标签' : '企业标签',
children: [],
isShow: false
},
......
......@@ -35,7 +35,7 @@
</div>
</div>
<div class="textBox">
<div class="title text-two-line">{{ item.groupName }}</div>
<div class="title">{{ item.groupName.slice(0, 20) }}</div>
<div class="nameBox wechatNumber text-two-line">
<span v-for="user in item.userList" :key="user.id">{{ '@' + user.staffName }}</span>
</div>
......@@ -78,7 +78,7 @@
</van-dialog>
</div>
</template>
<script type='text/ecmascript-6'>
<script type="text/ecmascript-6">
import { groupChat, wxConfig } from '@/api'
import { Dialog } from 'vant'
export default {
......@@ -128,7 +128,7 @@ export default {
},
// 创建群聊or进入群聊
addGroup() {
console.log(this.addGroupParams, '-----')
console.log(this.addGroupParams, '----------------')
if (this.addGroupParams.chatId == '') {
wxConfig.openEnterpriseChat(this.addGroupParams).then(res => {
console.log(res, 'res')
......@@ -154,7 +154,6 @@ export default {
}
},
showDialog(item) {
console.log(item, 'item')
//判断是否保存欢迎语
if (item.attachmentList !== null) {
if (item.attachmentList[0].attType == 1) {
......@@ -163,7 +162,6 @@ export default {
} else {
this.welcome = ''
}
console.log(this.welcome, 'welcome')
this.dialogMessage = item.userList
let arr = []
//获取员工id列表
......@@ -171,7 +169,7 @@ export default {
arr.push(item.userList[i].userId)
}
this.addGroupParams.userIds = arr
this.addGroupParams.groupName = item.groupName
this.addGroupParams.groupName = item.groupName.slice(0, 20)
this.templateId = item.id
if (item.chatId == null) {
this.addGroupParams.chatId = ''
......@@ -198,7 +196,6 @@ export default {
this.groupList = res || []
this.showRemark = res && res.length ? false : true
if (res) {
for (var a = 0; a < this.groupList.length; a++) {
if (!this.vehicleInfoList) {
if (this.groupList[a].groupNameRule == 1) {
......@@ -635,4 +632,4 @@ export default {
color: #666666;
line-height: 14px;
}
</style>
\ No newline at end of file
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!