|
|
@ -27,7 +27,15 @@
|
|
|
|
<a>私聊信息</a> |
|
|
|
|
<a>私聊信息</a> |
|
|
|
|
<a>群聊信息</a>
|
|
|
|
<a>群聊信息</a>
|
|
|
|
</small></h4>
|
|
|
|
</small></h4>
|
|
|
|
<div class="list-group" id="externalcontact_list" style="overflow-y: scroll;max-height: 800px;">
|
|
|
|
<div class="well well-sm">
|
|
|
|
|
|
|
|
<form class="form-inline">
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
|
|
<input type="text" class="form-control" id="contact_search_username" placeholder="搜索客人">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<button type="button" class="btn btn-default" onclick="get_externalcontact_list(0,$('#contact_search_username').val());">搜索</button>
|
|
|
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="list-group" id="externalcontact_list" style="overflow-y: scroll;max-height: 680px;">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
@ -54,11 +62,11 @@
|
|
|
|
<div class="form-group">
|
|
|
|
<div class="form-group">
|
|
|
|
<input type="text" class="form-control" id="exampleInputName2" placeholder="搜索关键词">
|
|
|
|
<input type="text" class="form-control" id="exampleInputName2" placeholder="搜索关键词">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<button type="submit" class="btn btn-default">搜索</button>
|
|
|
|
<button type="button" class="btn btn-default">还不能用</button>
|
|
|
|
</form>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div id="chat_msg_list" class="row" style="overflow-y: scroll;max-height: 800px;">
|
|
|
|
<div id="chat_msg_list" class="row" style="overflow-y: scroll;max-height: 680px;">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<nav aria-label="Page navigation" class="text-center">
|
|
|
|
<nav aria-label="Page navigation" class="text-center">
|
|
|
@ -72,12 +80,11 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
|
|
let g_permit_user='';//当前选择的顾问
|
|
|
|
|
|
|
|
let g_externalcontact_user='';//当前选中的客人
|
|
|
|
|
|
|
|
|
|
|
|
$(document).ready(function () {
|
|
|
|
$(document).ready(function () {
|
|
|
|
|
|
|
|
|
|
|
|
<?php echo empty($userid)?'get_permit_user_list();':"get_chat_msg_list('{$userid}',0);" ?>
|
|
|
|
<?php echo empty($userid)?'get_permit_user_list();':"get_chat_msg_list('{$userid}',0);" ?>
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
//获取会话存档的用户列表
|
|
|
|
//获取会话存档的用户列表
|
|
|
@ -94,7 +101,7 @@
|
|
|
|
permit_user_list = '';
|
|
|
|
permit_user_list = '';
|
|
|
|
data.Result && data.errcode == '0' && data.Result.map(item => {
|
|
|
|
data.Result && data.errcode == '0' && data.Result.map(item => {
|
|
|
|
permit_user_list += `
|
|
|
|
permit_user_list += `
|
|
|
|
<a href="javascript:void(0);" onclick="get_externalcontact_list('${item.userid}')" class="list-group-item">
|
|
|
|
<a href="javascript:void(0);" onclick="get_externalcontact_list('${item.userid}');g_permit_user='${item.userid}';" class="list-group-item">
|
|
|
|
<div class="row">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-4" style="padding: 0 0 0 15px;">
|
|
|
|
<div class="col-md-4" style="padding: 0 0 0 15px;">
|
|
|
|
<img src="${item.avatar}" class="img-responsive">
|
|
|
|
<img src="${item.avatar}" class="img-responsive">
|
|
|
@ -118,13 +125,16 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//获取客户列表
|
|
|
|
//获取客户列表
|
|
|
|
function get_externalcontact_list(permit_user) {
|
|
|
|
function get_externalcontact_list(permit_user,username='') {
|
|
|
|
|
|
|
|
if(!permit_user && g_permit_user){
|
|
|
|
|
|
|
|
permit_user=g_permit_user;
|
|
|
|
|
|
|
|
}
|
|
|
|
$.ajax({
|
|
|
|
$.ajax({
|
|
|
|
type: "post",
|
|
|
|
type: "post",
|
|
|
|
dataType: "json",
|
|
|
|
dataType: "json",
|
|
|
|
url: "<?php echo site_url('weixinchat/show_me_the_data')?>",
|
|
|
|
url: "<?php echo site_url('weixinchat/show_me_the_data')?>",
|
|
|
|
data: {
|
|
|
|
data: {
|
|
|
|
"url": '/weixin/wxwork/get_externalcontact_list?userid=' + permit_user,
|
|
|
|
"url": '/weixin/wxwork/get_externalcontact_list?userid=' + permit_user+'&searchstr='+username,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
success: function (data, textStatus) {
|
|
|
|
success: function (data, textStatus) {
|
|
|
|
document.getElementById('chat_msg_list').innerHTML = '';
|
|
|
|
document.getElementById('chat_msg_list').innerHTML = '';
|
|
|
@ -132,7 +142,7 @@
|
|
|
|
externalcontact_list = '';
|
|
|
|
externalcontact_list = '';
|
|
|
|
data.Result && data.errcode == '0' && data.Result.map(item => {
|
|
|
|
data.Result && data.errcode == '0' && data.Result.map(item => {
|
|
|
|
externalcontact_list += `
|
|
|
|
externalcontact_list += `
|
|
|
|
<a href="javascript:void(0);" onclick="get_chat_msg_list('${item.userid}',0)" class="list-group-item">
|
|
|
|
<a href="javascript:void(0);" onclick="get_chat_msg_list('${item.userid}',0);g_externalcontact_user='${item.userid}';" class="list-group-item">
|
|
|
|
<div class="row">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-4" style="padding: 0 0 0 15px;">
|
|
|
|
<div class="col-md-4" style="padding: 0 0 0 15px;">
|
|
|
|
<img src="${item.avatar}" class="img-responsive">
|
|
|
|
<img src="${item.avatar}" class="img-responsive">
|
|
|
|