Commit a0641e43 authored by weizhicheng's avatar weizhicheng
parents 877f73fa 92540fe6
......@@ -15,10 +15,11 @@ class zsb_api_model extends MY_Model{
'openReal'=>'/zsbapi/real-manage/open-real',//开通放心看
'realCheckPay'=>'/zsbapi/real-manage/real-check-pay',//支付检查
'realHouseRemit'=>'/zsbapi/real-manage/real-house-remit',//放心看提现
'setRealHouse'=>'/zsbapi/real-manage/set-real-house',//放心看设置
'cancleRealHouse'=>'/zsbapi/real-manage/cancle-real-house',//放心看设置
'reportRecord'=>'/zsbapi/house/report-record',//举报记录
'reportRecordAppeal'=>'/zsbapi/house/report-record-appeal',//申诉记录展示
'realHouseAppeal'=>'/zsbapi/house/real-house-appeal',//房源举报申诉
'setRealHouse'=>'/zsbapi/real-manage/set-real-house',//放心看提现
);
......
......@@ -4137,20 +4137,13 @@ class Sell extends MY_Controller {
if($this->_total_count > 0 )
{
if(GB_CITY=='nj') {
$select_fields = array('id', 'ownid', 'infotype', 'infofrom', 'agentcode', 'uid', 'esta', 'district', 'address',
'streetid', 'blockid', 'isreal', 'blockshowname', 'buildyear', 'buildarea',
'subfloor', 'floor', 'totalfloor', 'room', 'hall', 'toilet', 'kitchen', 'balcony',
'forward', 'price', 'averprice', 'priceterm', 'pricetype', 'fitment', 'contactor',
'telno', 'creattime', 'updatetime', 'expiretime', 'isstar', 'istag', 'nofee', 'is360', 'is_real_house','vr_model_id');
}else
{
$select_fields = array('id', 'ownid', 'infotype', 'infofrom', 'agentcode', 'uid', 'esta', 'district', 'address',
'streetid', 'blockid', 'isreal', 'blockshowname', 'buildyear', 'buildarea',
'subfloor', 'floor', 'totalfloor', 'room', 'hall', 'toilet', 'kitchen', 'balcony',
'forward', 'price', 'averprice', 'priceterm', 'pricetype', 'fitment', 'contactor',
'telno', 'creattime', 'updatetime', 'expiretime', 'isstar', 'istag', 'nofee', 'is360');
}
'telno', 'creattime', 'updatetime', 'expiretime', 'isstar', 'istag', 'nofee', 'is360', 'is_real_house');
$this->sell_model->set_select_fields($select_fields);
$data_info = $this->sell_model->find_all_by( $cond_where , $this->_offset ,
$this->_limit , $order_arr['order_key'] , $order_arr['order_by'] );
......@@ -7025,9 +7018,18 @@ class Sell extends MY_Controller {
$house_id = $this->input->post('house_id');
$this->load->model('zsb_api_model');
$re = $this->zsb_api_model->getRequrstData('setRealHouse',array('house_id'=>$house_id));
echo json_encode($re);die;
}
/*
* 取消放心看
*/
public function cancleRealHouse(){
$house_id = $this->input->post('house_id');
$this->load->model('zsb_api_model');
$re = $this->zsb_api_model->getRequrstData('cancleRealHouse',array('house_id'=>$house_id));
echo json_encode($re);die;
}
}
......
......@@ -463,7 +463,7 @@
<?php if(($realHouse==1) && ($value['infotype']==1 || $value['infotype']==2)) { ?>
<?php if($value['is_real_house']==1){?>
<div class="pic" onClick="change_real(<?php echo $value['id']; ?>, '<?php echo md5("HOUSE365_REAL_SET_".$value["id"]);?>')">
<div class="pic" onClick="set_real(<?php echo $value['id'];?>,0)">
<img alt="取消放心看设置" src="<?=STATIC_SOURCE_URL?>/zsb/images/v1.0/look.png" />
<em class="btn btnT" style="right: -16px;"></em>
<input type="hidden" name ="is_real_<?php echo $value['id']; ?>" id ="is_real_<?php echo $value['id']; ?>" value ='1' fors="<?php echo $value['vr_model_id']; ?>">
......@@ -473,7 +473,7 @@
<?php } else {?>
<div class="pic" onClick="change_real(<?php echo $value['id']; ?>)">
<div class="pic" onClick="set_real(<?php echo $value['id']; ?>,1)">
<img alt="设置放心看" src="<?=STATIC_SOURCE_URL?>/zsb/images/v1.0/look.png" />
<em class="btn" style="right: -16px;"></em>
<input type="hidden" name ="is_real_<?php echo $value['id']; ?>" id ="is_real_<?php echo $value['id']; ?>" value ='0'>
......@@ -1493,6 +1493,26 @@ function change_nofee( rowid , secret_key)
}
function set_real(rowid,type) {
if(type == 1){
layer.confirm('设置放心看?', {
btn: ['设置','取消'], //按钮
title:'放心看',
}, function(){
change_real(rowid);
});
return false;
}
layer.confirm('取消放心看?', {
btn: ['确定','取消'], //按钮
title:'放心看',
}, function(){
cancle_real(rowid);
});
}
//设置REAL房
function change_real(rowid)
{
......@@ -1500,17 +1520,39 @@ function change_real(rowid)
$.ajax({
type: 'POST',
url: '/sell/setRealHouse',
data: {},
data: {house_id:rowid},
dataType: 'JSON',
success: function (re) {
if(re.result != 1){
waringOpen(re.msg);
return false;
}
layer.msg(re.msg, {time: 1000, icon:1},function(){
window.location.href = '/sell/manage';
});
},
complete:function () {
layer.close(index);
}
});
}
function cancle_real(rowid) {
var index = layer.load(2, {shade: false});
$.ajax({
type: 'POST',
url: '/sell/cancleRealHouse',
data: {house_id:rowid},
dataType: 'JSON',
success: function (re) {
if(re.result != 1){
waringOpen(re.msg);
return false;
}
layer.msg(re.msg);
setTimeout(function () {
layer.msg(re.msg, {time: 1000, icon:1},function(){
window.location.href = '/sell/manage';
},1000);
});
},
complete:function () {
layer.close(index);
......@@ -1518,6 +1560,7 @@ function change_real(rowid)
});
}
function waringOpen(msg) {
layer.alert(msg, {
title:'放心看',
......
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