Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
fenzhan_zsb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esf
fenzhan_zsb
Commits
c332c448
Commit
c332c448
authored
May 12, 2023
by
梅玉龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加字段
parent
1f2d5a11
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
144 additions
and
45 deletions
+144
-45
ajax.php
new_admincp/applications/zsb/controllers/ajax.php
+6
-0
sell.php
new_admincp/applications/zsb/controllers/sell.php
+21
-5
editor.php
new_admincp/applications/zsb/views/nj/editor.php
+101
-38
house.js
new_admincp/source/zsb/js/v1.0/house.js
+16
-2
No files found.
new_admincp/applications/zsb/controllers/ajax.php
View file @
c332c448
...
@@ -1358,6 +1358,8 @@ class Ajax extends MY_Controller {
...
@@ -1358,6 +1358,8 @@ class Ajax extends MY_Controller {
public
function
banwords
()
{
public
function
banwords
()
{
$address
=
urldecode
(
$this
->
input
->
get
(
'address'
,
TRUE
));
$address
=
urldecode
(
$this
->
input
->
get
(
'address'
,
TRUE
));
$remark
=
urldecode
(
$this
->
input
->
get
(
'remark'
,
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'
);
$this
->
load
->
helper
(
'common_house_helper'
);
$filename
=
STATIC_SOURCE_URL
.
'/common/banwords/banwords.txt'
;
$filename
=
STATIC_SOURCE_URL
.
'/common/banwords/banwords.txt'
;
$result
=
array
(
'status'
=>
1
);
$result
=
array
(
'status'
=>
1
);
...
@@ -1365,6 +1367,10 @@ class Ajax extends MY_Controller {
...
@@ -1365,6 +1367,10 @@ class Ajax extends MY_Controller {
$result
[
'status'
]
=
2
;
$result
[
'status'
]
=
2
;
}
else
if
(
publish_banwordCheck
(
$remark
,
$filename
))
{
}
else
if
(
publish_banwordCheck
(
$remark
,
$filename
))
{
$result
[
'status'
]
=
3
;
$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
);
echo
$this
->
ajax_model
->
array_to_json
(
$result
);
}
}
...
...
new_admincp/applications/zsb/controllers/sell.php
View file @
c332c448
...
@@ -67,7 +67,10 @@ class Sell extends MY_Controller {
...
@@ -67,7 +67,10 @@ class Sell extends MY_Controller {
* @var int
* @var int
*/
*/
private
$_total_count
=
0
;
private
$_total_count
=
0
;
const
STAND_REMARK_DEFAULT
=
'请输入业主心态,可从卖房原因、卖房紧迫度,是否可议价等方面进行描述'
;
const
SERVICE_REMARK_DEFAULT
=
'请输入服务优势,可从行业经验、服务内容等方面进行描述'
;
const
DEFAULT_REMARK
=
'请输入房源核心优势,可从【小区】、【户型】、【核心卖点】、【周边配套】等方面进行描述'
;
/**
/**
* 解析函数
* 解析函数
...
@@ -506,6 +509,7 @@ class Sell extends MY_Controller {
...
@@ -506,6 +509,7 @@ class Sell extends MY_Controller {
//360全景房源标签规则
//360全景房源标签规则
$address
=
$this
->
input
->
post
(
'address'
,
true
);
$address
=
$this
->
input
->
post
(
'address'
,
true
);
$remark
=
$this
->
input
->
post
(
'remark'
);
$remark
=
$this
->
input
->
post
(
'remark'
);
$remark
=
$remark
===
self
::
DEFAULT_REMARK
?
''
:
$remark
;
$p_sort_arr
=
$this
->
input
->
post
(
'p_sort'
,
true
);
$p_sort_arr
=
$this
->
input
->
post
(
'p_sort'
,
true
);
$is360
=
0
;
$is360
=
0
;
...
@@ -937,7 +941,7 @@ class Sell extends MY_Controller {
...
@@ -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'
]
=
''
;
$fields_values
[
'feature'
]
=
''
;
$feature
=
$this
->
input
->
post
(
'feature'
,
true
);
$feature
=
$this
->
input
->
post
(
'feature'
,
true
);
...
@@ -998,7 +1002,9 @@ class Sell extends MY_Controller {
...
@@ -998,7 +1002,9 @@ class Sell extends MY_Controller {
{
{
// 插入房源扩展信息
// 插入房源扩展信息
$standRemark
=
check_word
(
$this
->
input
->
post
(
'stand_remark'
),
STATIC_BADWORD_URL
);
$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
->
load
->
model
(
'sell_ext'
);
$this
->
sell_ext
->
dataModel
(
$house_id
,
array
(
$this
->
sell_ext
->
dataModel
(
$house_id
,
array
(
'uid'
=>
$uid
,
'uid'
=>
$uid
,
...
@@ -2293,6 +2299,7 @@ class Sell extends MY_Controller {
...
@@ -2293,6 +2299,7 @@ class Sell extends MY_Controller {
//360全景房源标签规则
//360全景房源标签规则
$address
=
$this
->
input
->
post
(
'address'
,
true
);
$address
=
$this
->
input
->
post
(
'address'
,
true
);
$remark
=
$this
->
input
->
post
(
'remark'
);
$remark
=
$this
->
input
->
post
(
'remark'
);
$remark
=
$remark
===
self
::
DEFAULT_REMARK
?
''
:
$remark
;
$p_sort_arr
=
$this
->
input
->
post
(
'p_sort'
,
true
);
$p_sort_arr
=
$this
->
input
->
post
(
'p_sort'
,
true
);
$is360
=
0
;
$is360
=
0
;
...
@@ -2735,7 +2742,7 @@ class Sell extends MY_Controller {
...
@@ -2735,7 +2742,7 @@ class Sell extends MY_Controller {
}
}
//$fields_values['remark'] = $this->input->post('remark');
//$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'
]
=
''
;
$fields_values
[
'feature'
]
=
''
;
...
@@ -3011,7 +3018,16 @@ class Sell extends MY_Controller {
...
@@ -3011,7 +3018,16 @@ class Sell extends MY_Controller {
//更新房源信息
//更新房源信息
//update sell set esta = 5 where id in(33899521, 37700775) and uid = 10000040;
//update sell set esta = 5 where id in(33899521, 37700775) and uid = 10000040;
$affected_rows
=
$this
->
sell_model
->
update
(
$fields_values
,
$house_id
,
$uid
);
$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'
);
$this
->
load
->
model
(
'house_publish_rule_log_model'
);
$housePublishRuleLogData
=
$this
->
house_publish_rule_log_model
->
getRow
(
$house_id
,
1
,
3
,
$uid
);
$housePublishRuleLogData
=
$this
->
house_publish_rule_log_model
->
getRow
(
$house_id
,
1
,
3
,
$uid
);
...
...
new_admincp/applications/zsb/views/nj/editor.php
View file @
c332c448
<?php
// 默认文字
switch
(
$edit_id
)
{
case
'stand_remark'
:
$defaultText
=
'请输入业主心态,可从卖房原因、卖房紧迫度,是否可议价等方面进行描述'
;
break
;
case
'service_remark'
:
$defaultText
=
'请输入服务优势,可从行业经验、服务内容等方面进行描述'
;
break
;
case
'remark'
:
default
:
$defaultText
=
'请输入房源核心优势,可从【小区】、【户型】、【核心卖点】、【周边配套】等方面进行描述'
;
break
;
}
?>
<html>
<html>
<head>
<head>
<style>
<style>
*
{
margin
:
0
;
padding
:
0
;}
*
{
</style>
margin
:
0
;
<script
charset=
'utf-8'
src=
'
<?=
STATIC_SOURCE_URL
?>
/common/js/kindeditor-4.1.10/kindeditor-min.js'
></script>
padding
:
0
;
<script
charset=
'gbk'
src=
'
<?=
STATIC_SOURCE_URL
?>
/common/js/kindeditor-4.1.10/lang/zh_CN.js'
></script>
}
</head>
</style>
<body
style=
"backgroud:none;"
>
<script
charset=
'gbk'
src=
'
<?=
STATIC_SOURCE_URL
?>
/common/js/jquery-1.8.3.min.js'
></script>
<textarea
name=
"remark"
id=
"
<?=
$edit_id
?>
"
cols=
"0"
rows=
"0"
style=
"width:835px;height:155px;display:none;"
></textarea>
<script
charset=
'utf-8'
src=
'
<?=
STATIC_SOURCE_URL
?>
/common/js/kindeditor-4.1.10/kindeditor-min.js'
></script>
<script>
<script
charset=
'gbk'
src=
'
<?=
STATIC_SOURCE_URL
?>
/common/js/kindeditor-4.1.10/lang/zh_CN.js'
></script>
document
.
getElementById
(
'
<?=
$edit_id
?>
'
).
value
=
window
.
parent
.
document
.
getElementById
(
'
<?=
$edit_id
?>
'
).
value
;
</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
)
{
$
(
"#
<?=
$edit_id
?>
"
).
val
(
currText
);
editor
=
K
.
create
(
'#
<?=
$edit_id
?>
'
,
{
width
:
'
<?=
$width
?>
px'
,
KindEditor
.
ready
(
function
(
K
)
{
height
:
'
<?=
$height
?>
px'
,
editor
=
K
.
create
(
'#
<?=
$edit_id
?>
'
,
{
resizeType
:
0
,
width
:
'
<?=
$width
?>
px'
,
allowPreviewEmoticons
:
false
,
height
:
'
<?=
$height
?>
px'
,
allowImageUpload
:
false
,
resizeType
:
0
,
items
:
[
<?=
$items
?>
],
allowPreviewEmoticons
:
false
,
//下面这行代码,当失去焦点时执行 this.sync();
allowImageUpload
:
false
,
afterBlur
:
function
()
{
items
:
[
<?=
$items
?>
],
this
.
sync
();
//下面这行代码,当失去焦点时执行 this.sync();
window
.
parent
.
document
.
getElementById
(
'
<?=
$edit_id
?>
'
).
value
=
document
.
getElementById
(
'
<?=
$edit_id
?>
'
).
value
;
afterBlur
:
function
()
{
//$("#jsErrorBox").html("");
this
.
sync
();
//$("#remark").blur();
if
(
editor
.
html
()
===
''
)
{
/*if($("#remark").val()!='<p> </p>' && $("#remark").val()!='<br />')
editor
.
html
(
defaultText
);
{
$
(
".ke-edit-iframe"
).
contents
().
find
(
".ke-content"
).
css
(
"color"
,
"#777"
);
alert("1")
//document.getElementsByClassName('ke-content')[0].style.color = '#777';
$("#remark2").val($("#remark").val());
//console.log(document.getElementsByClassName('ke-content'))
}else{
}
$("#remark2").val("");
//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("");
</script>
//$("#remark").blur();
</body>
/*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>
</html>
\ No newline at end of file
new_admincp/source/zsb/js/v1.0/house.js
View file @
c332c448
...
@@ -1294,8 +1294,12 @@ $(function() {
...
@@ -1294,8 +1294,12 @@ $(function() {
$
.
ajax
({
$
.
ajax
({
type
:
'post'
,
type
:
'post'
,
url
:
'/ajax/banwords/'
,
url
:
'/ajax/banwords/'
,
data
:
{
address
:
encodeURI
(
encodeURI
(
$
(
'#address'
).
val
())),
data
:
{
remark
:
encodeURI
(
encodeURI
(
$
(
'#remark'
).
val
()))},
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'
,
dataType
:
'json'
,
success
:
function
(
data
){
success
:
function
(
data
){
if
(
data
.
errorCode
==
'401'
)
if
(
data
.
errorCode
==
'401'
)
...
@@ -1313,6 +1317,16 @@ $(function() {
...
@@ -1313,6 +1317,16 @@ $(function() {
$
(
'#remark'
).
focus
();
$
(
'#remark'
).
focus
();
openWin
(
'JS_noteHouse4'
);
openWin
(
'JS_noteHouse4'
);
return
false
;
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
{
}
else
{
//均价不能小于小区价格的65%
//均价不能小于小区价格的65%
if
(
$
(
'#price'
).
val
()
!=
''
&&
$
(
'#buildarea'
).
val
()
!=
''
if
(
$
(
'#price'
).
val
()
!=
''
&&
$
(
'#buildarea'
).
val
()
!=
''
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment