lichene_328_6

This commit is contained in:
dengbw
2022-03-28 16:49:57 +08:00
parent a544a1f8d5
commit 049f5ad51f
2 changed files with 35 additions and 0 deletions
+31
View File
@@ -260,6 +260,37 @@ class Lichene extends CI_Controller
$this->mdCustomerTagdata->add_batch($add_tag);
}
}
if (!$re_cus) {//新增客户 更新企微信息
$this->load->library('wx_qyapi', ['app' => 'lichene']);
$remark_mobiles = $userInfo['mobile'] ? [$userInfo['mobile']] : '';
$description = $params['of_title'] ? $params['of_title'] : '';
if ($description && $params['of2_title']) {
$description .= '-' . $params['of2_title'];
}
//企微备注操作
$this->wx_qyapi->get_external_contact(['url' => 'remark', 'userid' => $userInfo['userid']
, 'external_userid' => $userInfo['external_userid'], 'remark_mobiles' => $remark_mobiles, 'description' => $description]);
$tags_name = $userInfo['tags_name'];
$add_tag = $remove_tag = '';
if ($params['taglList']) {
foreach ($params['taglList'] as $key => $val) {
foreach ($val['list'] as $key2 => $val2) {
if ($val2['checked'] == 'true') {
if (!$tags_name || !in_array($val2['name'], $tags_name)) {//未加标签,新增
$add_tag[] = $val2['qy_id'];
}
} else {
if ($tags_name && in_array($val2['name'], $tags_name)) {//删除标签
$remove_tag[] = $val2['qy_id'];
}
}
}
}
}
//企微标签操作
$this->wx_qyapi->get_external_contact(['url' => 'mark_tag', 'userid' => $userInfo['userid'],
'external_userid' => $userInfo['external_userid'], 'add_tag' => $add_tag, 'remove_tag' => $remove_tag]);
}
$this->show_json(200, '操作成功');
}
+4
View File
@@ -165,6 +165,8 @@
mDialog.msg({content: "请输入手机号"});
return
}
var of_title = that.of_id ? $("#id-of_id").find("option:selected").text() : '';
var of2_title = that.of2_id ? $("#id-of2_id").find("option:selected").text() : '';
$.ajax({
url: '/h5/lichene/post_to_biz',
type: 'post',
@@ -174,6 +176,8 @@
taglList: that.taglList,
of_id: that.of_id,
of2_id: that.of2_id,
of_title: of_title,
of2_title: of2_title,
},
beforeSend: function () {
loading = mDialog.load({shade: false, text: "",});