Commit af81717f authored by zw's avatar zw

Merge branch 'test'

parents cea87642 9aa48e68
...@@ -613,20 +613,10 @@ class AppChat extends Basic ...@@ -613,20 +613,10 @@ class AppChat extends Basic
} }
//todo 先获取是否有店铺或客户修改消息是否为0,大于0返回true,否则查询聊天消息是否有未读 //todo 先获取是否有店铺或客户修改消息是否为0,大于0返回true,否则查询聊天消息是否有未读
$param["addressee_id"] = $params["agent_id"]; $param["addressee_id"] = $params["agent_id"];
$param["type"] = 2;
$param["is_read"] = 0; $param["is_read"] = 0;
//TODO 获取未读个数 //TODO 获取未读个数
$msgModel = new MPushMessage(); $msgModel = new MPushMessage();
$user_count = $msgModel->getListCountByWhere($param); $param["type"] = array("in", "1,2,3,7");
if ($user_count > 0) {
return $this->response("200", "success", ["is_show_red" => true]);
}
$param["type"] = array("in", "1,3,7");
$shop_count = $msgModel->getListCountByWhere($param);
if ($shop_count > 0) {
return $this->response("200", "success", ["is_show_red" => true]);
}
$param["type"] = 8;
$shop_count = $msgModel->getListCountByWhere($param); $shop_count = $msgModel->getListCountByWhere($param);
if ($shop_count > 0) { if ($shop_count > 0) {
return $this->response("200", "success", ["is_show_red" => true]); return $this->response("200", "success", ["is_show_red" => true]);
......
{layout name="global/frame_tpl" /} {layout name="global/frame_two_tpl" /}
<input type="hidden" class="page-load" id="agentIndex" /> <input type="hidden" class="page-load" id="agentIndex" />
<div id="page-content-wrapper"> <div id="page-content-wrapper">
<div class="container"> <div class="container">
......
...@@ -24,10 +24,10 @@ define (['doT', 'text!temp/agentIndex_template_tpl.html', 'css!style/home.css',' ...@@ -24,10 +24,10 @@ define (['doT', 'text!temp/agentIndex_template_tpl.html', 'css!style/home.css','
var n = myDate.getMonth() var n = myDate.getMonth()
var day_start = y + '-' + (n < 10 ? ('0' + n) : n) + '-' + (d < 10 ? ('0' + d) : d); var day_start = y + '-' + (n < 10 ? ('0' + n) : n) + '-' + (d < 10 ? ('0' + d) : d);
var day_end = y + '-' + (m < 10 ? ('0' + m) : m) + '-' + (d < 10 ? ('0' + d) : d); var day_end = y + '-' + (m < 10 ? ('0' + m) : m) + '-' + (d < 10 ? ('0' + d) : d);
$('#start_date').val(day_start); $('#start_date').val(getBeforeDate(30));
$('#end_date').val(day_end);//客户跟进 添加 默认时间一天 $('#end_date').val(day_end);//客户跟进 添加 默认时间一天
agentIndex.getList (); agentIndex.getList ();
agentIndex.event (); agentIndex.event ($('#start_date').val());
}, },
event: function () { event: function () {
$("#search").click(function () { $("#search").click(function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment