Commit 1f2d5a11 authored by 梅玉龙's avatar 梅玉龙

增加字段

parent d0c8c00e
...@@ -34,6 +34,8 @@ class Editor extends MY_Controller ...@@ -34,6 +34,8 @@ class Editor extends MY_Controller
'hilitecolor', 'bold', 'italic', 'underline', 'removeformat', '|', 'hilitecolor', 'bold', 'italic', 'underline', 'removeformat', '|',
'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
'insertunorderedlist', '|', 'wordpaste', '|', 'image'"; 'insertunorderedlist', '|', 'wordpaste', '|', 'image'";
// 编辑器id
$edit_config['edit_id'] = $this->input->get('id') ? $this->input->get('id') : 'remark';
$this->load->view('/editor', $edit_config); $this->load->view('/editor', $edit_config);
} }
......
...@@ -996,7 +996,15 @@ class Sell extends MY_Controller { ...@@ -996,7 +996,15 @@ class Sell extends MY_Controller {
if ($house_id) if ($house_id)
{ {
// 插入房源扩展信息
$standRemark = check_word($this->input->post('stand_remark'),STATIC_BADWORD_URL);
$serviceRemark = check_word($this->input->post('service_remark'),STATIC_BADWORD_URL);
$this->load->model('sell_ext');
$this->sell_ext->dataModel($house_id, array(
'uid' => $uid,
'stand_remark' => $standRemark,
'service_remark' => $serviceRemark,
));
//判断房源价格是否在预警价格区间,仅对住宅类做判断 //判断房源价格是否在预警价格区间,仅对住宅类做判断
/*if ($fields_values['blockid'] && $fields_values['infotype']==1){ /*if ($fields_values['blockid'] && $fields_values['infotype']==1){
$_sell = $fields_values; $_sell = $fields_values;
...@@ -2253,7 +2261,11 @@ class Sell extends MY_Controller { ...@@ -2253,7 +2261,11 @@ class Sell extends MY_Controller {
$data_page['is_show_real'] = $is_show_real; $data_page['is_show_real'] = $is_show_real;
$this->load->model('real_house_model'); $this->load->model('real_house_model');
$data_page['balance']= $this->real_house_model->getBrokerRealHouseMoney($uid);//经纪人账号余额 $data_page['balance']= $this->real_house_model->getBrokerRealHouseMoney($uid);//经纪人账号余额
// 房源扩展信息
$this->load->model('sell_ext');
$sellExt = $this->sell_ext->getSellExt($id);
$data_page['house_detail']['stand_remark'] = isset($sellExt['stand_remark']) ? $sellExt['stand_remark'] : '';
$data_page['house_detail']['service_remark'] = isset($sellExt['service_remark']) ? $sellExt['service_remark'] : '';
$this->render_publish($data_page); $this->render_publish($data_page);
} }
......
<?php
/**
* Desc: 房源扩展信息
* User: mellon
* Date: 2023/5/11
* Time: 15:19
*/
class sell_ext extends MY_Model
{
public $table = 'sell_ext';
public function __construct()
{
parent::__construct(1, 1, 0);
}
/**
* 更新插入数据
* @param $houseId
* @param $data
* @author mellon
*/
public function dataModel($houseId, $data)
{
$standRemark = $data['stand_remark'] ? $data['stand_remark'] : '';
$serviceRemark = $data['service_remark'] ? $data['service_remark'] : '';
// 查询数据
$this->dbback->from($this->table)->where('house_id', $houseId);
$query = $this->dbback->get()->row();
if (!empty($query)) {
// 更新
$this->db->where('house_id', $houseId);
$this->db->update($this->table, array(
'stand_remark' => $standRemark,
'service_remark' => $serviceRemark,
));
} else {
// 插入
$insert_data['house_id'] = $houseId;
$insert_data['uid'] = $data['uid'] ? $data['uid'] : 0;
$insert_data['telno'] = $data['telno'] ? $data['telno'] : '';
$insert_data['create_time'] = date('Y-m-d H:i:s');
$insert_data['ip'] = get_ip();
$insert_data['stand_remark'] = $standRemark;
$insert_data['service_remark'] = $serviceRemark;
$this->db->insert($this->table, $insert_data);
}
}
/**
* 获取房源扩展信息
* @param $houseId
* @return mixed
* @author mellon
*/
public function getSellExt($houseId)
{
$this->dbback->from($this->table)->where('house_id', $houseId);
return $this->dbback->get()->row_array();
}
}
\ No newline at end of file
...@@ -7,13 +7,13 @@ ...@@ -7,13 +7,13 @@
<script charset='gbk' src='<?= STATIC_SOURCE_URL ?>/common/js/kindeditor-4.1.10/lang/zh_CN.js'></script> <script charset='gbk' src='<?= STATIC_SOURCE_URL ?>/common/js/kindeditor-4.1.10/lang/zh_CN.js'></script>
</head> </head>
<body style="backgroud:none;"> <body style="backgroud:none;">
<textarea name="remark" id="remark" cols="0" rows="0" style="width:835px;height:155px;display:none;"></textarea> <textarea name="remark" id="<?=$edit_id?>" cols="0" rows="0" style="width:835px;height:155px;display:none;"></textarea>
<script> <script>
document.getElementById('remark').value = window.parent.document.getElementById('remark').value; document.getElementById('<?=$edit_id?>').value = window.parent.document.getElementById('<?=$edit_id?>').value;
var editor; var editor;
KindEditor.ready(function(K) { KindEditor.ready(function(K) {
editor = K.create('#remark', { editor = K.create('#<?=$edit_id?>', {
width: '<?= $width ?>px', width: '<?= $width ?>px',
height: '<?= $height ?>px', height: '<?= $height ?>px',
resizeType: 0, resizeType: 0,
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
//下面这行代码,当失去焦点时执行 this.sync(); //下面这行代码,当失去焦点时执行 this.sync();
afterBlur: function() { afterBlur: function() {
this.sync(); this.sync();
window.parent.document.getElementById('remark').value = document.getElementById('remark').value; window.parent.document.getElementById('<?=$edit_id?>').value = document.getElementById('<?=$edit_id?>').value;
//$("#jsErrorBox").html(""); //$("#jsErrorBox").html("");
//$("#remark").blur(); //$("#remark").blur();
/*if($("#remark").val()!='<p> &nbsp;</p>' && $("#remark").val()!='<br />') /*if($("#remark").val()!='<p> &nbsp;</p>' && $("#remark").val()!='<br />')
......
...@@ -576,6 +576,29 @@ ...@@ -576,6 +576,29 @@
<textarea name="remark" id="remark" cols="0" rows="0" style="margin-top:5px; width:835px; height:155px; display:none;"><?=$house_detail['remark']?></textarea> <textarea name="remark" id="remark" cols="0" rows="0" style="margin-top:5px; width:835px; height:155px; display:none;"><?=$house_detail['remark']?></textarea>
<div class="editorBox" style="height: 400px;"> <iframe id="remark_iframe" frameborder="0" scrolling="no" src="/editor/house/" style="margin-top:5px; width:830px; height:400px;"></iframe></div> <div class="editorBox" style="height: 400px;"> <iframe id="remark_iframe" frameborder="0" scrolling="no" src="/editor/house/" style="margin-top:5px; width:830px; height:400px;"></iframe></div>
</dd> </dd>
<dd class="list_item clearfix clear">
<label class="label">业主心态:</label>
<div class="fields ">
<p class="textFg textFg6">业主的想法是购房人非常关注的信息之一,请介绍业主的卖房相关内容</p>
</div>
</dd>
<dd class="list_item list_item02 clearfix clear">
<textarea name="stand_remark" id="stand_remark" cols="0" rows="0" style="margin-top:5px; width:835px; height:155px; display:none;"><?=$house_detail['stand_remark']?></textarea>
<div class="editorBox" style="height: 400px;"> <iframe id="stand_remark_iframe" frameborder="0" scrolling="no" src="/editor/house/?id=stand_remark" style="margin-top:5px; width:830px; height:400px;"></iframe></div>
</dd>
<dd class="list_item clearfix clear">
<label class="label">服务优势:</label>
<div class="fields ">
<p class="textFg textFg6">好的服务可以吸引用户咨询,请介绍公司的优质服务内容</p>
</div>
</dd>
<dd class="list_item list_item02 clearfix clear">
<textarea name="service_remark" id="service_remark" cols="0" rows="0" style="margin-top:5px; width:835px; height:155px; display:none;"><?=$house_detail['service_remark']?></textarea>
<div class="editorBox" style="height: 400px;"> <iframe id="service_remark_iframe" frameborder="0" scrolling="no" src="/editor/house/?id=service_remark" style="margin-top:5px; width:830px; height:400px;"></iframe></div>
</dd>
<dd> <dd>
<?php <?php
if ($infotype == 1 || $infotype == 2 || $infotype == 3 || $infotype == 4) { if ($infotype == 1 || $infotype == 2 || $infotype == 3 || $infotype == 4) {
......
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