Commit 2069bb0f by xinla

H5获取客户id等

1 parent 70d724b9
...@@ -383,6 +383,7 @@ export default { ...@@ -383,6 +383,7 @@ export default {
}) })
let entry = undefined let entry = undefined
let _this = this let _this = this
try {
wx.invoke('getContext', {}, function(res) { wx.invoke('getContext', {}, function(res) {
if (res.err_msg == 'getContext:ok') { if (res.err_msg == 'getContext:ok') {
entry = res.entry //返回进入H5页面的入口类型,目前有normal、contact_profile、single_chat_tools、group_chat_tools entry = res.entry //返回进入H5页面的入口类型,目前有normal、contact_profile、single_chat_tools、group_chat_tools
...@@ -400,22 +401,20 @@ export default { ...@@ -400,22 +401,20 @@ export default {
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 }) => { .then(({ data }) => {
_this.$toast.clear() _this.$toast.clear()
console.log(data)
_this.$dialog({ _this.$dialog({
message: '获取客户失败:' + JSON.stringify(data), message: '获取客户成功:' + JSON.stringify(data),
}) })
}) })
.catch((err) => { .catch((err) => {
_this.$toast.clear() _this.$toast.clear()
console.log(err)
_this.$dialog({ _this.$dialog({
message: '获取客户失败:' + JSON.stringify(err), message: '获取客户失败:' + JSON.stringify(err),
}) })
...@@ -434,6 +433,9 @@ export default { ...@@ -434,6 +433,9 @@ export default {
_this.$dialog({ message: '进入失败:' + JSON.stringify(res) }) _this.$dialog({ message: '进入失败:' + JSON.stringify(res) })
} }
}) })
} catch (err) {
_this.$dialog({ message: 'err' + JSON.stringify(err) })
}
}, },
// 添加代办 // 添加代办
// 表单提交 // 表单提交
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!