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 2aedd429
authored
Apr 27, 2021
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
客户画像调试
1 parent
9a74d171
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
69 additions
and
48 deletions
linkwe-mobile/src/App.vue
linkwe-mobile/src/store/index.js
linkwe-mobile/src/views/portrait/index.vue
linkwe-mobile/src/App.vue
View file @
2aedd42
...
@@ -28,7 +28,7 @@ export default {
...
@@ -28,7 +28,7 @@ export default {
let
code
=
query
.
code
let
code
=
query
.
code
this
.
corpId
=
query
.
corpId
this
.
corpId
=
query
.
corpId
this
.
agentId
=
query
.
agentId
this
.
agentId
=
query
.
agentId
this
.
$toast
(
'agentId:'
+
this
.
agentId
)
//
this.$toast('agentId:' + this.agentId)
if
(
!
code
)
{
if
(
!
code
)
{
this
.
$toast
(
'未获得授权'
)
this
.
$toast
(
'未获得授权'
)
...
@@ -36,7 +36,7 @@ export default {
...
@@ -36,7 +36,7 @@ export default {
}
}
let
{
data
}
=
await
getUserInfo
(
code
,
this
.
agentId
)
let
{
data
}
=
await
getUserInfo
(
code
,
this
.
agentId
)
this
.
$store
.
state
.
userId
=
data
.
userId
this
.
$store
.
state
.
userId
=
data
.
userId
this
.
$toast
(
'userId:'
+
this
.
$store
.
state
.
userId
)
//
this.$toast('userId:' + this.$store.state.userId)
},
},
watch
:
{
watch
:
{
// 通过config接口注入权限验证配置
// 通过config接口注入权限验证配置
...
@@ -51,12 +51,16 @@ export default {
...
@@ -51,12 +51,16 @@ export default {
reload
()
{
reload
()
{
this
.
isRouterAlive
=
false
this
.
isRouterAlive
=
false
this
.
$nextTick
(
function
()
{
this
.
$nextTick
(
function
()
{
//
this.isRouterAlive = true
this
.
isRouterAlive
=
true
})
})
},
},
wxConfig
()
{
async
wxConfig
()
{
getAgentTicket
(
window
.
location
.
href
.
split
(
'#'
)[
0
],
this
.
agentId
).
then
(
this
.
$store
.
state
.
agentConfigStatus
=
false
({
data
})
=>
{
try
{
let
{
data
}
=
await
getAgentTicket
(
window
.
location
.
href
.
split
(
'#'
)[
0
],
this
.
agentId
)
let
{
timestamp
,
nonceStr
,
signature
}
=
data
let
{
timestamp
,
nonceStr
,
signature
}
=
data
wx
.
agentConfig
({
wx
.
agentConfig
({
beta
:
true
,
// 必须这么写,否则wx.invoke调用形式的jsapi会有问题
beta
:
true
,
// 必须这么写,否则wx.invoke调用形式的jsapi会有问题
...
@@ -76,7 +80,8 @@ export default {
...
@@ -76,7 +80,8 @@ export default {
],
//必填
],
//必填
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
// 回调
// 回调
// this.$toast('agentId成功:')
this
.
$toast
(
'agentId成功:'
)
this
.
$store
.
state
.
agentConfigStatus
=
true
},
},
fail
:
(
res
)
=>
{
fail
:
(
res
)
=>
{
this
.
$toast
(
'agentId失败:'
+
JSON
.
stringify
(
res
))
this
.
$toast
(
'agentId失败:'
+
JSON
.
stringify
(
res
))
...
@@ -85,8 +90,7 @@ export default {
...
@@ -85,8 +90,7 @@ export default {
}
}
},
},
})
})
}
}
catch
(
error
)
{}
)
},
},
// 丢弃
// 丢弃
// _wxConfig() {
// _wxConfig() {
...
...
linkwe-mobile/src/store/index.js
View file @
2aedd42
...
@@ -6,6 +6,7 @@ Vue.use(Vuex)
...
@@ -6,6 +6,7 @@ Vue.use(Vuex)
export
default
new
Vuex
.
Store
({
export
default
new
Vuex
.
Store
({
state
:
{
state
:
{
userId
:
''
,
userId
:
''
,
agentConfigStatus
:
false
,
},
},
mutations
:
{},
mutations
:
{},
actions
:
{},
actions
:
{},
...
...
linkwe-mobile/src/views/portrait/index.vue
View file @
2aedd42
...
@@ -387,7 +387,7 @@ export default {
...
@@ -387,7 +387,7 @@ export default {
// 接口开始
// 接口开始
// externalUserid: "wm2H-nDQAACG5x4XjsM1OoW8UVfpbn3A", // 客户Id
// externalUserid: "wm2H-nDQAACG5x4XjsM1OoW8UVfpbn3A", // 客户Id
// externalUserid: "wmiGuBCgAAgeijfvvpJ62cBfwrB-c4kw",
// externalUserid: "wmiGuBCgAAgeijfvvpJ62cBfwrB-c4kw",
externalUserid
:
'
FengJuZhuDeJieDao
'
,
externalUserid
:
''
,
userid
:
this
.
$store
.
state
.
userId
,
// 员工Id
userid
:
this
.
$store
.
state
.
userId
,
// 员工Id
form
:
{
form
:
{
name
:
''
,
// 昵称
name
:
''
,
// 昵称
...
@@ -431,6 +431,11 @@ export default {
...
@@ -431,6 +431,11 @@ export default {
flage
:
true
,
flage
:
true
,
}
}
},
},
watch
:
{
'$store.state.agentConfigStatus'
(
val
)
{
val
&&
this
.
init
()
},
},
computed
:
{
computed
:
{
// activeLabel : () => {
// activeLabel : () => {
// this.addTag.forEach((value) => {
// this.addTag.forEach((value) => {
...
@@ -440,6 +445,51 @@ export default {
...
@@ -440,6 +445,51 @@ export default {
// }
// }
},
},
methods
:
{
methods
:
{
init
()
{
let
_this
=
this
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
)
)
{
// _this.$toast.clear()
_this
.
$toast
(
'入口错误:'
+
entry
)
return
}
wx
.
invoke
(
'getCurExternalContact'
,
{},
(
res
)
=>
{
if
(
res
.
err_msg
==
'getCurExternalContact:ok'
)
{
_this
.
externalUserid
=
res
.
userId
//返回当前外部联系人userId
// 获取客户信息
_this
.
findAddaddEmployes
()
_this
.
findAddGroupNum
()
_this
.
getCustomerInfo
()
_this
.
findTrajectory
()
getAllTags
()
.
then
(({
data
})
=>
{
// console.log(data);
_this
.
alllabel
=
data
})
.
catch
((
err
)
=>
{
console
.
log
(
err
)
})
}
else
{
//错误处理
_this
.
$dialog
({
message
:
'进入失败:'
+
JSON
.
stringify
(
res
)
})
}
_this
.
$toast
.
clear
()
})
}
else
{
//错误处理
_this
.
$toast
.
clear
()
_this
.
$dialog
({
message
:
'进入失败:'
+
JSON
.
stringify
(
res
)
})
}
})
},
// 客户待办点击保存事件
// 客户待办点击保存事件
saveInfo2
()
{},
saveInfo2
()
{},
// 添加或编辑轨迹
// 添加或编辑轨迹
...
@@ -691,44 +741,10 @@ export default {
...
@@ -691,44 +741,10 @@ export default {
},
},
},
},
created
()
{
created
()
{
let
_this
=
this
this
.
$toast
.
loading
({
wx
.
invoke
(
'getContext'
,
{},
function
(
res
)
{
message
:
'loading...'
,
if
(
res
.
err_msg
==
'getContext:ok'
)
{
duration
:
0
,
entry
=
res
.
entry
//返回进入H5页面的入口类型,目前有normal、contact_profile、single_chat_tools、group_chat_tools
forbidClick
:
true
,
if
(
!
[
'single_chat_tools'
,
'group_chat_tools'
,
'contact_profile'
,
].
includes
(
entry
)
)
{
// _this.$toast.clear()
_this
.
$toast
(
'入口错误:'
+
entry
)
return
}
wx
.
invoke
(
'getCurExternalContact'
,
{},
(
res
)
=>
{
if
(
res
.
err_msg
==
'getCurExternalContact:ok'
)
{
_this
.
externalUserid
=
res
.
userId
//返回当前外部联系人userId
// 获取客户信息
_this
.
findAddaddEmployes
(),
_this
.
findAddGroupNum
(),
_this
.
getCustomerInfo
(),
_this
.
findTrajectory
(),
getAllTags
()
.
then
(({
data
})
=>
{
// console.log(data);
_this
.
alllabel
=
data
})
.
catch
((
err
)
=>
{
console
.
log
(
err
)
})
}
else
{
//错误处理
}
})
}
else
{
//错误处理
}
})
})
},
},
components
:
{
components
:
{
...
...
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