Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
dj-scrm-wx-work-attachment-customer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 5113b2b5
authored
May 05, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'develop' into 'master'
v2.1.0代码合并 See merge request
!12
2 parents
d24c1a22
f2685efd
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
20 deletions
src/store/modules/app.js
src/views/customer/detail.vue
src/views/customerGroup/index.vue
src/store/modules/app.js
View file @
5113b2b
...
@@ -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
...
...
src/views/customer/detail.vue
View file @
5113b2b
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
<template
v-if=
"(merchantModel == 2 && label.labelGroupType != '自店标签') || merchantModel == 1"
>
<template
v-if=
"(merchantModel == 2 && label.labelGroupType != '自店标签') || merchantModel == 1"
>
<div
class=
"detail-bg detail-third"
:key=
"ids"
>
<div
class=
"detail-bg detail-third"
:key=
"ids"
>
<div
class=
"title"
>
<div
class=
"title"
>
{{
label
.
labelGroupType
}}
{{
merchantModel
==
1
&&
label
.
labelGroupType
==
'企业标签'
?
'集团标签'
:
label
.
labelGroupType
}}
<span
v-if=
"label.labelGroupType == '系统标签'"
class=
"prompt-text"
>
系统标签不支持手动修改
</span>
<span
v-if=
"label.labelGroupType == '系统标签'"
class=
"prompt-text"
>
系统标签不支持手动修改
</span>
</div>
</div>
<div
class=
"detail-label"
>
<div
class=
"detail-label"
>
...
@@ -258,6 +258,9 @@ export default {
...
@@ -258,6 +258,9 @@ export default {
isTrue
:
false
isTrue
:
false
}
}
},
},
created
()
{
this
.
merchantModel
=
this
.
getLocalStorage
(
'dj_scrm_userInfo'
).
merchantModel
?
this
.
getLocalStorage
(
'dj_scrm_userInfo'
).
merchantModel
:
''
},
activated
()
{
activated
()
{
this
.
watchPageBack
().
then
(()
=>
{
this
.
watchPageBack
().
then
(()
=>
{
console
.
log
(
this
.
id
)
console
.
log
(
this
.
id
)
...
@@ -268,14 +271,10 @@ export default {
...
@@ -268,14 +271,10 @@ export default {
})
})
},
},
mounted
()
{
mounted
()
{
this
.
merchantModel
=
this
.
getLocalStorage
(
'dj_scrm_userInfo'
).
merchantModel
?
this
.
getLocalStorage
(
'dj_scrm_userInfo'
).
merchantModel
:
''
this
.
userAgent
=
this
.
isMobile
()
this
.
userAgent
=
this
.
isMobile
()
this
.
showLoading
()
this
.
showLoading
()
let
{
id
,
customerId
,
isTrue
}
=
this
.
getQuery
()
let
{
id
,
customerId
,
isTrue
,
sessionId
}
=
this
.
getQuery
()
if
(
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'dj_id'
)))
{
if
(
sessionId
)
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'
if
(
id
||
isTrue
)
{
if
(
id
||
isTrue
)
{
...
...
src/views/customerGroup/index.vue
View file @
5113b2b
...
@@ -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,6 @@ export default {
...
@@ -128,7 +128,6 @@ export default {
},
},
// 创建群聊or进入群聊
// 创建群聊or进入群聊
addGroup
()
{
addGroup
()
{
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'
)
...
@@ -149,12 +148,10 @@ export default {
...
@@ -149,12 +148,10 @@ export default {
})
})
}
else
{
}
else
{
wxConfig
.
openExistedChatWithMsg
({
chatId
:
this
.
addGroupParams
.
chatId
}).
then
(
res
=>
{
wxConfig
.
openExistedChatWithMsg
({
chatId
:
this
.
addGroupParams
.
chatId
}).
then
(
res
=>
{
console
.
log
(
this
.
addGroupParams
.
chatId
,
'55555'
)
})
})
}
}
},
},
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 +160,6 @@ export default {
...
@@ -163,7 +160,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,14 +167,13 @@ export default {
...
@@ -171,14 +167,13 @@ 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
=
''
this
.
show
=
true
this
.
show
=
true
}
else
{
}
else
{
this
.
addGroupParams
.
chatId
=
item
.
chatId
this
.
addGroupParams
.
chatId
=
item
.
chatId
console
.
log
(
this
.
addGroupParams
.
chatId
,
' this.addGroupParams.chatId'
)
wxConfig
.
openExistedChatWithMsg
({
chatId
:
this
.
addGroupParams
.
chatId
}).
then
(
res
=>
{})
wxConfig
.
openExistedChatWithMsg
({
chatId
:
this
.
addGroupParams
.
chatId
}).
then
(
res
=>
{})
}
}
// console.log(this.addGroupParams)
// console.log(this.addGroupParams)
...
@@ -186,7 +181,6 @@ export default {
...
@@ -186,7 +181,6 @@ export default {
getCustomerInfo
(
externalUserId
)
{
getCustomerInfo
(
externalUserId
)
{
//获取客户信息
//获取客户信息
groupChat
.
getDetail
({
userId
:
externalUserId
}).
then
(
res
=>
{
groupChat
.
getDetail
({
userId
:
externalUserId
}).
then
(
res
=>
{
console
.
log
(
res
,
'data'
)
this
.
hideLoading
()
this
.
hideLoading
()
this
.
flag
=
true
this
.
flag
=
true
this
.
businessCard
=
res
.
info
this
.
businessCard
=
res
.
info
...
@@ -198,7 +192,6 @@ export default {
...
@@ -198,7 +192,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
)
{
...
@@ -246,7 +239,6 @@ export default {
...
@@ -246,7 +239,6 @@ export default {
},
},
initData
()
{
initData
()
{
let
{
id
}
=
this
.
getQuery
()
let
{
id
}
=
this
.
getQuery
()
console
.
log
(
id
)
this
.
showLoading
()
this
.
showLoading
()
if
(
id
)
{
if
(
id
)
{
this
.
userId
=
id
this
.
userId
=
id
...
@@ -259,7 +251,6 @@ export default {
...
@@ -259,7 +251,6 @@ export default {
wxConfig
wxConfig
.
getCurExternalContact
()
.
getCurExternalContact
()
.
then
(
userId
=>
{
.
then
(
userId
=>
{
console
.
log
(
userId
,
'11111'
)
this
.
userId
=
userId
this
.
userId
=
userId
let
externalUserId
=
userId
let
externalUserId
=
userId
this
.
addGroupParams
.
externalUserIds
.
push
(
userId
)
this
.
addGroupParams
.
externalUserIds
.
push
(
userId
)
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment