Commit c332c448 authored by 梅玉龙's avatar 梅玉龙

增加字段

parent 1f2d5a11
......@@ -1358,6 +1358,8 @@ class Ajax extends MY_Controller {
public function banwords() {
$address = urldecode($this->input->get('address',TRUE));
$remark = urldecode($this->input->get('remark',TRUE));
$stand_remark = urldecode($this->input->get('stand_remark',TRUE));
$service_remark = urldecode($this->input->get('service_remark',TRUE));
$this->load->helper('common_house_helper');
$filename = STATIC_SOURCE_URL . '/common/banwords/banwords.txt';
$result = array('status' => 1);
......@@ -1365,6 +1367,10 @@ class Ajax extends MY_Controller {
$result['status'] = 2;
} else if (publish_banwordCheck($remark, $filename)) {
$result['status'] = 3;
} else if (publish_banwordCheck($stand_remark, $filename)) {
$result['status'] = 4;
} else if (publish_banwordCheck($service_remark, $filename)) {
$result['status'] = 5;
}
echo $this->ajax_model->array_to_json($result);
}
......
......@@ -67,7 +67,10 @@ class Sell extends MY_Controller {
* @var int
*/
private $_total_count = 0;
const STAND_REMARK_DEFAULT = '请输入业主心态,可从卖房原因、卖房紧迫度,是否可议价等方面进行描述';
const SERVICE_REMARK_DEFAULT = '请输入服务优势,可从行业经验、服务内容等方面进行描述';
const DEFAULT_REMARK = '请输入房源核心优势,可从【小区】、【户型】、【核心卖点】、【周边配套】等方面进行描述';
/**
* 解析函数
......@@ -506,6 +509,7 @@ class Sell extends MY_Controller {
//360全景房源标签规则
$address = $this->input->post('address', true);
$remark = $this->input->post('remark');
$remark = $remark === self::DEFAULT_REMARK ? '' : $remark;
$p_sort_arr = $this->input->post('p_sort', true);
$is360 = 0;
......@@ -937,7 +941,7 @@ class Sell extends MY_Controller {
}
}
$fields_values['remark'] = check_word($this->input->post('remark'),STATIC_BADWORD_URL);
$fields_values['remark'] = check_word($remark,STATIC_BADWORD_URL);
//房源特色
$fields_values['feature'] = '';
$feature = $this->input->post('feature', true);
......@@ -998,7 +1002,9 @@ class Sell extends MY_Controller {
{
// 插入房源扩展信息
$standRemark = check_word($this->input->post('stand_remark'),STATIC_BADWORD_URL);
$serviceRemark = check_word($this->input->post('service_remark'),STATIC_BADWORD_URL);
$standRemark = $standRemark === self::STAND_REMARK_DEFAULT ? '' : $standRemark;
$serviceRemark = check_word($this->input->post('service_remark'), STATIC_BADWORD_URL);
$serviceRemark = $serviceRemark === self::SERVICE_REMARK_DEFAULT ? '' : $serviceRemark;
$this->load->model('sell_ext');
$this->sell_ext->dataModel($house_id, array(
'uid' => $uid,
......@@ -2293,6 +2299,7 @@ class Sell extends MY_Controller {
//360全景房源标签规则
$address = $this->input->post('address', true);
$remark = $this->input->post('remark');
$remark = $remark === self::DEFAULT_REMARK ? '' : $remark;
$p_sort_arr = $this->input->post('p_sort', true);
$is360 = 0;
......@@ -2735,7 +2742,7 @@ class Sell extends MY_Controller {
}
//$fields_values['remark'] = $this->input->post('remark');
$fields_values['remark'] = check_word($this->input->post('remark'),STATIC_BADWORD_URL);
$fields_values['remark'] = check_word($remark,STATIC_BADWORD_URL);
//房源特色
$fields_values['feature'] = '';
......@@ -3011,7 +3018,16 @@ class Sell extends MY_Controller {
//更新房源信息
//update sell set esta = 5 where id in(33899521, 37700775) and uid = 10000040;
$affected_rows = $this->sell_model->update($fields_values, $house_id, $uid);
// 插入房源扩展信息
$standRemark = check_word($this->input->post('stand_remark'), STATIC_BADWORD_URL);
$standRemark = $standRemark === self::STAND_REMARK_DEFAULT ? '' : $standRemark;
$serviceRemark = check_word($this->input->post('service_remark'), STATIC_BADWORD_URL);
$serviceRemark = $serviceRemark === self::SERVICE_REMARK_DEFAULT ? '' : $serviceRemark;
$this->load->model('sell_ext');
$this->sell_ext->dataModel($house_id, array(
'stand_remark' => $standRemark,
'service_remark' => $serviceRemark,
));
//添加房源发布价格日志信息
$this->load->model('house_publish_rule_log_model');
$housePublishRuleLogData = $this->house_publish_rule_log_model->getRow($house_id,1,3,$uid);
......
<?php
// 默认文字
switch ($edit_id) {
case 'stand_remark':
$defaultText = '请输入业主心态,可从卖房原因、卖房紧迫度,是否可议价等方面进行描述';
break;
case 'service_remark':
$defaultText = '请输入服务优势,可从行业经验、服务内容等方面进行描述';
break;
case 'remark':
default:
$defaultText = '请输入房源核心优势,可从【小区】、【户型】、【核心卖点】、【周边配套】等方面进行描述';
break;
}
?>
<html>
<head>
<style>
*{margin:0;padding:0;}
</style>
<script charset='utf-8' src='<?= STATIC_SOURCE_URL ?>/common/js/kindeditor-4.1.10/kindeditor-min.js'></script>
<script charset='gbk' src='<?= STATIC_SOURCE_URL ?>/common/js/kindeditor-4.1.10/lang/zh_CN.js'></script>
</head>
<body style="backgroud:none;">
<textarea name="remark" id="<?=$edit_id?>" cols="0" rows="0" style="width:835px;height:155px;display:none;"></textarea>
<script>
document.getElementById('<?=$edit_id?>').value = window.parent.document.getElementById('<?=$edit_id?>').value;
<head>
<style>
* {
margin: 0;
padding: 0;
}
</style>
<script charset='gbk' src='<?= STATIC_SOURCE_URL ?>/common/js/jquery-1.8.3.min.js'></script>
<script charset='utf-8' src='<?= STATIC_SOURCE_URL ?>/common/js/kindeditor-4.1.10/kindeditor-min.js'></script>
<script charset='gbk' src='<?= STATIC_SOURCE_URL ?>/common/js/kindeditor-4.1.10/lang/zh_CN.js'></script>
</head>
<body style="backgroud:none;">
<textarea name="remark" id="<?= $edit_id ?>" cols="0" rows="0"
style="width:835px;height:155px;display:none;"></textarea>
<script>
document.getElementById('<?=$edit_id?>').value = window.parent.document.getElementById('<?=$edit_id?>').value;
var currText = $("#<?=$edit_id?>", window.parent.document).val();
var editor;
var defaultText = '<?=$defaultText?>';
var editor;
KindEditor.ready(function(K) {
editor = K.create('#<?=$edit_id?>', {
width: '<?= $width ?>px',
height: '<?= $height ?>px',
resizeType: 0,
allowPreviewEmoticons: false,
allowImageUpload: false,
items: [<?=$items?>],
//下面这行代码,当失去焦点时执行 this.sync();
afterBlur: function() {
this.sync();
window.parent.document.getElementById('<?=$edit_id?>').value = document.getElementById('<?=$edit_id?>').value;
//$("#jsErrorBox").html("");
//$("#remark").blur();
/*if($("#remark").val()!='<p> &nbsp;</p>' && $("#remark").val()!='<br />')
{
alert("1")
$("#remark2").val($("#remark").val());
}else{
$("#remark2").val("");
}*/
}
});
});
</script>
</body>
// 默认赋值
$("#<?=$edit_id?>").val(currText);
KindEditor.ready(function (K) {
editor = K.create('#<?=$edit_id?>', {
width: '<?= $width ?>px',
height: '<?= $height ?>px',
resizeType: 0,
allowPreviewEmoticons: false,
allowImageUpload: false,
items: [<?=$items?>],
//下面这行代码,当失去焦点时执行 this.sync();
afterBlur: function () {
this.sync();
if (editor.html() === '') {
editor.html(defaultText);
$(".ke-edit-iframe").contents().find(".ke-content").css("color", "#777");
//document.getElementsByClassName('ke-content')[0].style.color = '#777';
//console.log(document.getElementsByClassName('ke-content'))
}
//window.parent.document.getElementById('<?=$edit_id?>').value = document.getElementById('<?=$edit_id?>').value;
window.parent.document.getElementById('<?=$edit_id?>').value = currText;
// 赋值到父元素
//$("#<?=$edit_id?>", window.parent.document).val = currText;
//$("#jsErrorBox").html("");
//$("#remark").blur();
/*if($("#remark").val()!='<p> &nbsp;</p>' && $("#remark").val()!='<br />')
{
alert("1")
$("#remark2").val($("#remark").val());
}else{
$("#remark2").val("");
}*/
},
afterFocus: function () {
if (editor.html() === defaultText) {
editor.html('');
$(".ke-edit-iframe").contents().find(".ke-content").css("color", "black");
}
},
afterCreate:function () {
//为编辑框赋值
setTimeout(function () {
var default_text = currText;
if(editor && default_text){
editor.html(default_text)
}
if(default_text === ''){
editor.html(defaultText);
$(".ke-edit-iframe").contents().find(".ke-content").css("color","#777");
}
},1000)
},
afterChange:function () {
if(editor){
this.sync();
currText = $.trim(editor.html());
//$("#<?=$edit_id?>", window.parent.document).val = currText;
//$("#<?=$edit_id?>", window.parent.document).css({"height":"333px;"});
window.parent.document.getElementById('<?=$edit_id?>').value = currText;
}
}
});
});
</script>
</body>
</html>
\ No newline at end of file
......@@ -1294,8 +1294,12 @@ $(function() {
$.ajax({
type: 'post',
url : '/ajax/banwords/',
data: {address:encodeURI(encodeURI($('#address').val())),
remark:encodeURI(encodeURI($('#remark').val()))},
data: {
address: encodeURI(encodeURI($('#address').val())),
remark: encodeURI(encodeURI($('#remark').val())),
stand_remark: encodeURI(encodeURI($('#stand_remark').val())),
service_remark: encodeURI(encodeURI($('#service_remark').val())),
},
dataType:'json',
success: function(data){
if(data.errorCode == '401')
......@@ -1313,6 +1317,16 @@ $(function() {
$('#remark').focus();
openWin('JS_noteHouse4');
return false;
} else if (data.status == 4) {
$('#banwords').html('您输入的业主心态描述中含有敏感词,请重新输入!');
$('#stand_remark').focus();
openWin('JS_noteHouse4');
return false;
} else if (data.status == 5) {
$('#banwords').html('您输入的服务优势描述中含有敏感词,请重新输入!');
$('#service_remark').focus();
openWin('JS_noteHouse4');
return false;
} else {
//均价不能小于小区价格的65%
if ($('#price').val() != '' && $('#buildarea').val() != ''
......
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