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 2069bb0f
authored
Mar 11, 2021
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
H5获取客户id等
1 parent
70d724b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
47 deletions
linkwe-mobile/src/views/portrait/index.vue
linkwe-mobile/src/views/portrait/index.vue
View file @
2069bb0
...
@@ -383,57 +383,59 @@ export default {
...
@@ -383,57 +383,59 @@ export default {
})
})
let
entry
=
undefined
let
entry
=
undefined
let
_this
=
this
let
_this
=
this
wx
.
invoke
(
'getContext'
,
{},
function
(
res
)
{
try
{
if
(
res
.
err_msg
==
'getContext:ok'
)
{
wx
.
invoke
(
'getContext'
,
{},
function
(
res
)
{
entry
=
res
.
entry
//返回进入H5页面的入口类型,目前有normal、contact_profile、single_chat_tools、group_chat_tools
if
(
res
.
err_msg
==
'getContext:ok'
)
{
if
(
entry
=
res
.
entry
//返回进入H5页面的入口类型,目前有normal、contact_profile、single_chat_tools、group_chat_tools
!
[
if
(
'single_chat_tools'
,
!
[
'group_chat_tools'
,
'single_chat_tools'
,
'contact_profile'
,
'group_chat_tools'
,
].
includes
(
entry
)
'contact_profile'
,
)
{
].
includes
(
entry
)
// _this.$toast.clear()
)
{
_this
.
$toast
(
'入口错误:'
+
entry
)
// _this.$toast.clear()
return
_this
.
$toast
(
'入口错误:'
+
entry
)
}
return
}
wx
.
invoke
(
'getCurExternalContact'
,
{},
function
(
resContact
)
{
wx
.
invoke
(
'getCurExternalContact'
,
{},
function
(
resContact
)
{
if
(
resContact
.
err_msg
==
'getCurExternalContact:ok'
)
{
if
(
resContact
.
err_msg
==
'getCurExternalContact:ok'
)
{
this
.
externalUserid
=
resContact
.
userId
//返回当前外部联系人userId
_this
.
externalUserid
=
resContact
.
userId
//返回当前外部联系人userId
// 获取客户详细信息
// 获取客户详细信息
getCustomerInfo
({
getCustomerInfo
({
externalUserid
:
this
.
externalUserid
,
externalUserid
:
_this
.
externalUserid
,
userid
:
this
.
userId
,
userid
:
_this
.
userId
,
})
.
then
(({
data
})
=>
{
_this
.
$toast
.
clear
()
console
.
log
(
data
)
_this
.
$dialog
({
message
:
'获取客户失败:'
+
JSON
.
stringify
(
data
),
})
})
})
.
catch
((
err
)
=>
{
.
then
(({
data
})
=>
{
_this
.
$toast
.
clear
()
_this
.
$toast
.
clear
()
console
.
log
(
err
)
_this
.
$dialog
({
_this
.
$dialog
({
message
:
'获取客户成功:'
+
JSON
.
stringify
(
data
),
message
:
'获取客户失败:'
+
JSON
.
stringify
(
err
),
})
})
.
catch
((
err
)
=>
{
_this
.
$toast
.
clear
()
_this
.
$dialog
({
message
:
'获取客户失败:'
+
JSON
.
stringify
(
err
),
})
})
})
}
else
{
_this
.
$toast
.
clear
()
//错误处理
_this
.
$dialog
({
message
:
'获取客户id失败:'
+
JSON
.
stringify
(
resContact
),
})
})
}
else
{
}
_this
.
$toast
.
clear
()
})
//错误处理
}
else
{
_this
.
$dialog
({
_this
.
$toast
.
clear
()
message
:
'获取客户id失败:'
+
JSON
.
stringify
(
resContact
),
//错误处理
})
_this
.
$dialog
({
message
:
'进入失败:'
+
JSON
.
stringify
(
res
)
})
}
}
})
})
}
else
{
}
catch
(
err
)
{
_this
.
$toast
.
clear
()
_this
.
$dialog
({
message
:
'err'
+
JSON
.
stringify
(
err
)
})
//错误处理
}
_this
.
$dialog
({
message
:
'进入失败:'
+
JSON
.
stringify
(
res
)
})
}
})
},
},
// 添加代办
// 添加代办
// 表单提交
// 表单提交
...
...
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