Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
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 2d84416f
authored
Feb 26, 2022
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
--no commit message
1 parent
68155df3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
77 additions
and
65 deletions
linkwe-mobile/src/App.vue
linkwe-mobile/src/views/portrait/index.vue
linkwe-mobile/src/views/redPacket/index.vue
linkwe-mobile/src/views/redPacket/receive.vue
linkwe-mobile/src/App.vue
View file @
2d84416
...
...
@@ -81,6 +81,7 @@ export default {
'sendChatMessage'
,
'getContext'
,
'getCurExternalContact'
,
'getCurExternalChat'
,
'openEnterpriseChat'
,
'shareToExternalContact'
,
'shareToExternalChat'
,
...
...
linkwe-mobile/src/views/portrait/index.vue
View file @
2d84416
...
...
@@ -30,7 +30,7 @@
<span
:style=
"
{
color: form.customerType === 1 ? '#4bde03' : '#f9a90b',
'font-size': '12px'
'font-size': '12px'
,
}"
>
{{
{
1
:
'@微信'
,
2
:
'@企业微信'
}
[
form
.
customerType
]
}}
...
...
@@ -320,14 +320,14 @@ import {
findTrajectory
,
addOrEditWaitHandle
,
addOrUpdatePersonTags
,
sync
sync
,
}
from
'@/api/portrait'
// import
{
getUserInfo
}
from
"@/api/common"
;
import
StepList
from
'@/components/StepList.vue'
import
{
param2Obj
}
from
'@/utils/index'
export
default
{
components
:
{
StepList
StepList
,
}
,
data
()
{
return
{
...
...
@@ -374,7 +374,7 @@ export default {
remarkCorpName
:
''
,
// 公司
description
:
''
,
// 其他描述
tags
:
[],
// 企业标签合集
personTags
:
[]
// 个人标签合集
personTags
:
[]
,
// 个人标签合集
}
,
alllabel
:
[],
// 标签组
// 点击测试组标签获取的变量
...
...
@@ -394,7 +394,7 @@ export default {
// 客户轨迹
query
:
{
page
:
1
,
trajectoryType
:
null
trajectoryType
:
null
,
}
,
loading
:
false
,
...
...
@@ -407,22 +407,22 @@ export default {
2
:
{
name
:
'跟进中'
,
color
:
'info'
}
,
3
:
{
name
:
'已成交'
,
color
:
'primary'
}
,
4
:
{
name
:
'无意向'
,
color
:
'warning'
}
,
5
:
{
name
:
'已流失'
,
color
:
'danger'
}
5
:
{
name
:
'已流失'
,
color
:
'danger'
}
,
}
),
editLabelType
:
''
,
// 编辑标签类型
showAddTag
:
false
,
newPersonTag
:
''
newPersonTag
:
''
,
}
}
,
watch
:
{
'$store.state.agentConfigStatus'
(
val
)
{
val
&&
this
.
init
()
}
}
,
}
,
computed
:
{
userId
()
{
return
process
.
env
.
NODE_ENV
!==
'development'
?
this
.
$store
.
state
.
userId
:
'XuXueJun'
}
}
,
// activeLabel : () =>
{
// this.addTag.forEach((value) =>
{
// value.name == this.name
...
...
@@ -439,7 +439,7 @@ export default {
this
.
$toast
.
loading
({
message
:
'loading...'
,
duration
:
0
,
forbidClick
:
true
forbidClick
:
true
,
}
)
// 获取agentId
let
query
=
param2Obj
(
window
.
location
.
search
)
...
...
@@ -461,7 +461,7 @@ export default {
wx
.
invoke
(
'getContext'
,
{
}
,
function
(
res
)
{
if
(
res
.
err_msg
==
'getContext:ok'
)
{
let
entry
=
res
.
entry
//返回进入H5页面的入口类型,目前有normal、contact_profile、single_chat_tools、group_chat_tools
if
(
!
[
'single_chat_tools'
,
'
group_chat_tools'
,
'
contact_profile'
].
includes
(
entry
))
{
if
(
!
[
'single_chat_tools'
,
'contact_profile'
].
includes
(
entry
))
{
// _this.$toast.clear()
_this
.
$toast
(
'入口错误:'
+
entry
)
return
...
...
@@ -491,7 +491,7 @@ export default {
// this.$toast('userId:' + this.userId)
getCustomerInfo
({
externalUserid
:
this
.
externalUserid
,
userId
:
this
.
userId
userId
:
this
.
userId
,
}
)
.
then
(({
data
}
)
=>
{
if
(
data
.
tagIds
&&
data
.
tagNames
)
{
...
...
@@ -499,7 +499,7 @@ export default {
data
.
tagNames
=
data
.
tagNames
.
split
(
','
)
data
.
tags
=
data
.
tagIds
.
map
((
unit
,
index
)
=>
({
tagId
:
unit
,
name
:
data
.
tagNames
[
index
]
name
:
data
.
tagNames
[
index
]
,
}
))
}
...
...
@@ -508,7 +508,7 @@ export default {
data
.
personTagNames
=
data
.
personTagNames
.
split
(
','
)
data
.
personTags
=
data
.
personTagIds
.
map
((
unit
,
index
)
=>
({
tagId
:
unit
,
name
:
data
.
personTagNames
[
index
]
name
:
data
.
personTagNames
[
index
]
,
}
))
}
this
.
form
=
data
...
...
@@ -522,15 +522,15 @@ export default {
this
.
$toast
.
loading
({
message
:
'loading...'
,
duration
:
0
,
forbidClick
:
true
forbidClick
:
true
,
}
)
let
params
=
{
groupTagType
:
1
groupTagType
:
1
,
}
if
(
type
===
'person'
)
{
params
=
{
groupTagType
:
3
,
userId
:
this
.
userId
userId
:
this
.
userId
,
}
}
return
getAllTags
(
params
)
...
...
@@ -558,7 +558,7 @@ export default {
pageNum
:
page
,
pageSize
:
10
,
userId
:
this
.
userId
,
externalUserid
:
this
.
externalUserid
externalUserid
:
this
.
externalUserid
,
}
Object
.
assign
(
query
,
this
.
query
)
query
.
trajectoryType
==
0
&&
(
query
.
trajectoryType
=
null
)
...
...
@@ -584,7 +584,7 @@ export default {
userId
:
this
.
userId
,
externalUserid
:
this
.
externalUserid
,
content
:
this
.
conagency
,
trackState
:
this
.
trackState
//1:待跟进;2:跟进中;3:已成交;4:无意向;5:已流失
trackState
:
this
.
trackState
,
//1:待跟进;2:跟进中;3:已成交;4:无意向;5:已流失
}
addOrEditWaitHandle
(
form
)
.
then
((
data
)
=>
{
...
...
@@ -647,9 +647,9 @@ export default {
this.$router.push({
path,
query: {
customerId: this.externalUserid
customerId: this.externalUserid
,
// type
}
}
,
}
)
}
,
// 点击编辑按钮
...
...
@@ -698,7 +698,7 @@ export default {
this.addTag.push({
groupId: item.groupId,
name: item.name,
tagId: item.tagId
tagId: item.tagId
,
}
)
}
else {
// 数组里存在该对象,则删除
...
...
@@ -711,7 +711,7 @@ export default {
externalUserid: this.externalUserid,
userId: this.userId,
isCompanyTag: this.editLabelType !== 'person', //是否是企业标签true是;false:不是
addTag: this.addTag.map((e) => ({ tagId: e.tagId
}
))
addTag: this.addTag.map((e) => ({ tagId: e.tagId
}
))
,
}
)
.then((res) => {
// console.log(res);
...
...
@@ -743,7 +743,7 @@ export default {
// this.$toast('userId:' + this.userId)
findAddGroupNum({
externalUserid: this.externalUserid,
userId: this.userId
userId: this.userId
,
}
)
.then(({ data
}
) => {
// console.log(data);
...
...
@@ -762,7 +762,7 @@ export default {
// 添加个人标签
submitNewPersonTag() {
let params = {
weTags: [{ name: this.newPersonTag, owner: this.userId
}
]
weTags: [{ name: this.newPersonTag, owner: this.userId
}
]
,
}
addOrUpdatePersonTags(params)
.then((res) => {
...
...
@@ -778,15 +778,15 @@ export default {
this.$toast.loading({
message: 'loading...',
duration: 0,
forbidClick: true
forbidClick: true
,
}
)
sync(this.userId).then((res) => {
this.$toast.success('同步成功')
this.findTrajectory()
this.$toast.clear()
}
)
}
}
}
,
}
,
}
</script>
...
...
linkwe-mobile/src/views/redPacket/index.vue
View file @
2d84416
...
...
@@ -73,28 +73,30 @@ export default {
wx
.
invoke
(
'getContext'
,
{},
async
function
(
res
)
{
if
(
res
.
err_msg
==
'getContext:ok'
)
{
entry
=
res
.
entry
//返回进入H5页面的入口类型,目前 contact_profile、single_chat_tools、group_chat_tools
if
(
!
[
'single_chat_tools'
,
'group_chat_tools'
].
includes
(
entry
))
{
// _this.$toast.clear()
that
.
$toast
(
'入口错误:'
+
entry
)
return
}
try
{
if
([
'single_chat_tools'
,
'group_chat_tools'
].
includes
(
entry
))
{
// that.$toast.clear()
if
(
entry
===
'single_chat_tools'
)
{
that
.
sceneType
=
1
}
else
if
(
entry
===
'group_chat_tools'
)
{
that
.
sceneType
=
2
}
wx
.
invoke
(
'getCurExternalContact'
,
{},
(
res
)
=>
{
if
(
res
.
err_msg
==
'getCurExternalContact:ok'
)
{
that
.
form
.
externalUserid
=
res
.
userId
//返回当前外部联系人userId
that
.
form
.
chatId
=
res
.
chatId
//返回当前客户群的群聊ID
}
else
{
//错误处理
that
.
$dialog
({
message
:
'进入失败:'
+
JSON
.
stringify
(
res
)
})
}
that
.
$toast
.
clear
()
})
}
else
{
that
.
$toast
(
'入口错误:'
+
entry
)
let
invokeApi
=
'getCurExternalContact'
if
(
entry
===
'single_chat_tools'
)
{
that
.
sceneType
=
1
}
else
if
(
entry
===
'group_chat_tools'
)
{
that
.
sceneType
=
2
invokeApi
=
'getCurExternalChat'
}
wx
.
invoke
(
invokeApi
,
{},
(
res
)
=>
{
if
(
res
.
err_msg
==
invokeApi
+
':ok'
)
{
that
.
form
.
externalUserid
=
res
.
userId
//返回当前外部联系人userId
that
.
form
.
chatId
=
res
.
chatId
//返回当前客户群的群聊ID
}
else
{
//错误处理
that
.
$dialog
({
message
:
'进入失败:'
+
JSON
.
stringify
(
res
)
})
}
that
.
$toast
.
clear
()
})
}
catch
(
err
)
{
that
.
$dialog
({
message
:
'err'
+
JSON
.
stringify
(
err
.
message
)
})
}
...
...
@@ -131,12 +133,13 @@ export default {
})
},
showDialog
(
type
,
row
=
{})
{
this
.
form
=
{
Object
.
assign
(
this
.
form
,
{
redEnvelopeAmount
:
row
.
money
,
redenvelopesId
:
row
.
id
,
externalUserid
:
this
.
form
.
externalUserid
,
}
redEnvelopeName
:
row
.
name
,
}
)
this
.
redPacketType
=
type
this
.
$refs
.
form
.
resetValidation
()
this
.
visible
=
true
},
// transMoney(value) {
...
...
@@ -183,6 +186,11 @@ export default {
query
,
hash
)
for
(
const
key
in
form
)
{
if
(
form
.
hasOwnProperty
.
call
(
form
,
key
))
{
!
form
[
key
]
&&
delete
form
[
key
]
}
}
delete
form
.
code
let
formQueryString
=
obj2query
(
form
)
let
baseUrl
=
location
.
protocol
+
'//'
+
location
.
host
+
process
.
env
.
VUE_APP_BASE_URL
...
...
@@ -249,7 +257,7 @@ export default {
v-model=
"visible"
:description=
"(redPacketType.includes('personal') ? '个人' : '企业') + '红包'"
>
<van-form
colon
@
submit=
"sendRedPacket"
>
<van-form
ref=
"form"
colon
@
submit=
"sendRedPacket"
>
<!-- 企业红包相关字段 -->
<van-field
v-if=
"redPacketType.includes('enterprise')"
...
...
@@ -262,8 +270,8 @@ export default {
<van-field
v-if=
"sceneType == 2"
name=
"radio"
label=
"红包类型"
required
>
<template
#
input
>
<van-radio-group
v-model=
"form.redEnvelopesType"
direction=
"horizontal"
>
<van-radio
name=
"1"
>
拼手气红包
</van-radio>
<van-radio
name=
"2"
>
普通红包
</van-radio>
<van-radio
:
name=
"1"
>
拼手气红包
</van-radio>
<van-radio
:
name=
"2"
>
普通红包
</van-radio>
</van-radio-group>
</
template
>
</van-field>
...
...
linkwe-mobile/src/views/redPacket/receive.vue
View file @
2d84416
...
...
@@ -60,7 +60,12 @@ export default {
},
getRedPacketInfo
()
{
getRedPacketInfo
().
then
(({
data
})
=>
{
this
.
redPacket
=
data
let
query
=
param2Obj
(
window
.
location
.
search
)
let
hash
=
param2Obj
(
window
.
location
.
hash
)
Object
.
assign
(
query
,
hash
)
this
.
redPacket
=
query
Object
.
assign
(
this
.
redPacket
,
data
)
this
.
$toast
.
clear
()
})
},
...
...
@@ -72,15 +77,12 @@ export default {
duration
:
0
,
forbidClick
:
true
,
})
let
query
=
param2Obj
(
window
.
location
.
search
)
let
hash
=
param2Obj
(
window
.
location
.
hash
)
Object
.
assign
(
query
,
hash
)
Object
.
assign
(
this
.
redPacket
,
query
)
let
form
=
{
orderNo
:
query
.
orderId
,
// 订单id
orderNo
:
this
.
redPacket
.
orderId
,
// 订单id
openId
:
this
.
openId
,
// 客户公众号id
appId
:
window
.
CONFIG
.
appId
,
// 微信公众号id
externalUserid
:
query
.
externalUserid
,
// 客户企微id
externalUserid
:
this
.
redPacket
.
externalUserid
,
// 客户企微id
}
receiveRedPacket
(
form
)
.
catch
(({
data
})
=>
{
...
...
@@ -97,13 +99,13 @@ export default {
data
.
accpestCustomerList
.
forEach
((
element
)
=>
{
element
.
accpectMoney
/=
100
})
this
.
$toast
.
clear
()
this
.
$refs
.
audio
.
play
()
this
.
$toast
.
clear
()
this
.
animate
=
true
setTimeout
(()
=>
{
this
.
opened
=
true
Object
.
assign
(
this
.
redPacket
,
data
)
},
1
0
00
)
},
1
5
00
)
})
},
...
...
@@ -268,11 +270,12 @@ export default {
opacity
:
0
;
visibility
:
hidden
;
top
:
109
vw
;
transition
:
all
1
s
;
transition
:
all
1
.5
s
;
}
.
tarns
{
visibility
:
visible
;
transform
:
translate
(
-
50
%
,
-
30
vw
)
scale
(
3
)
rotateX
(
360
deg
);
transform
:
translate
(
-
50
%
,
-
30
vw
)
scale
(
2
)
rotateX
(
360
deg
);
-
webkit
-
transform
:
translate
(
-
50
%
,
-
30
vw
)
scale
(
2
)
rotateX
(
360
deg
);
opacity
:
0.8
;
}
<
/style
>
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