Commit cb0a35fc authored by zw's avatar zw

Merge branch 'test' of https://gitee.com/zwyjjc/tl_estate into test

parents 103dc645 cf1410eb
...@@ -324,8 +324,6 @@ class Broker extends Basic ...@@ -324,8 +324,6 @@ class Broker extends Basic
$data['msg'] = 'phone is null'; $data['msg'] = 'phone is null';
} else { } else {
$m_agents = new AAgents(); $m_agents = new AAgents();
$redis = new VerifyRepetitionService();
$agents_data = $m_agents->getAgentInfo('id,update_time,call_number', '', ['phone'=>$this->params['phone']]); $agents_data = $m_agents->getAgentInfo('id,update_time,call_number', '', ['phone'=>$this->params['phone']]);
if (empty($agents_data['id'])) { if (empty($agents_data['id'])) {
...@@ -336,12 +334,13 @@ class Broker extends Basic ...@@ -336,12 +334,13 @@ class Broker extends Basic
$agent_id = $agents_data['id']; $agent_id = $agents_data['id'];
} }
$is = $redis->verifyStart(2, $agent_id, 0); if ($agent_id) {
if ($is) {
$agents_data = $m_agents->getAgentInfo('id,update_time,call_number', $agent_id); $agents_data = $m_agents->getAgentInfo('id,update_time,call_number', $agent_id);
$insert_data['update_time'] = $agents_data['update_time']; $insert_data['update_time'] = $agents_data['update_time'];
$insert_data['call_number'] = $agents_data['call_number'] + 1; $insert_data['call_number'] = $agents_data['call_number'] + 1;
$data['data'] = $m_agents->editData($insert_data, $agent_id); $data['data'] = $m_agents->editData($insert_data, $agent_id);
} else {
$data['msg'] = '没有该经纪人信息';
} }
} }
......
...@@ -256,6 +256,7 @@ ...@@ -256,6 +256,7 @@
$(".pbl_cha").click(function() { $(".pbl_cha").click(function() {
_fix_top.hide(); _fix_top.hide();
}); });
var _shangpuId = getUrlParam('id'); //从url获取的商铺id
var _name = getUrlParam('user_name'); var _name = getUrlParam('user_name');
var _name_img = getUrlParam('user_img'); var _name_img = getUrlParam('user_img');
var _tel = getUrlParam('user_tel'); var _tel = getUrlParam('user_tel');
...@@ -272,7 +273,9 @@ ...@@ -272,7 +273,9 @@
} }
//点击拨打 记录拨打次数 //点击拨打 记录拨打次数
$("#fix_tel").click(function() { $("#fix_tel").click(function() {
// if($.cookie("isCallShop") != 'yes'){ var time = localStorage.getItem(_shangpuId+"_"+_tel);
var nowTime = (new Date()).getTime();
if(!time || nowTime-time > 24*3600*1000){
$.ajax({ $.ajax({
url: '/api/recordCallNumShare', url: '/api/recordCallNumShare',
type: 'POST', type: 'POST',
...@@ -282,12 +285,10 @@ ...@@ -282,12 +285,10 @@
}, },
dataType: 'json', dataType: 'json',
success: function(data) { success: function(data) {
// $.cookie("isCallShop",'yes',{ expires: 1}); localStorage.setItem(_shangpuId+"_"+_tel,(new Date()).getTime());
} }
}); });
}
// }
}); });
$("#fix_area_bottom_btn").click(function() { $("#fix_area_bottom_btn").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