Commit b39c6b59 by 王志慧

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

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