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
41b3df8a
Commit
41b3df8a
authored
Jun 30, 2020
by
zhangkuanguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VR申请
parent
d26c99be
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
204 additions
and
94 deletions
+204
-94
new_base_model.php
new_admincp/applications/models/new_base_model.php
+97
-0
zsb_api_model.php
new_admincp/applications/models/zsb_api_model.php
+3
-1
config.php
new_admincp/applications/zsb/config/config.php
+3
-2
config_hf.php
new_admincp/applications/zsb/config/config_hf.php
+2
-0
sell.php
new_admincp/applications/zsb/controllers/sell.php
+26
-17
vr_model.php
new_admincp/applications/zsb/models/vr_model.php
+0
-0
sell_manage.php
new_admincp/applications/zsb/views/nj/sell_manage.php
+73
-74
No files found.
new_admincp/applications/models/new_base_model.php
0 → 100644
View file @
41b3df8a
<?php
class
new_base_model
extends
MY_Model
{
public
$userSession
;
public
$CI
;
public
$broker_account_id
;
public
$uid
;
public
$username
;
public
$agentcode
;
public
$truename
;
public
$package_id
;
public
function
__construct
()
{
parent
::
__construct
(
1
,
1
,
1
);
$this
->
CI
=
&
get_instance
();
$this
->
CI
->
load
->
library
(
'session'
);
$this
->
userSession
=
$this
->
CI
->
session
->
userdata
(
USER_SESSION_KEY
);
$this
->
broker_account_id
=
$this
->
userSession
[
'broker_account_id'
];
$this
->
uid
=
$this
->
userSession
[
'uid'
];
$this
->
username
=
$this
->
userSession
[
'username'
];
$this
->
truename
=
$this
->
userSession
[
'truename'
];
$this
->
agentcode
=
$this
->
userSession
[
'agentcode'
];
$this
->
package_id
=
$this
->
userSession
[
'package_id'
];
}
public
function
newException
(
$msg
=
''
,
$state
=
0
,
$data
=
array
(),
$return_array
=
false
){
try
{
throw
new
Exception
(
$msg
,
$state
);
}
catch
(
Exception
$e
){
return
$this
->
asJson
(
$data
,
$e
->
getMessage
(),
$e
->
getCode
(),
$return_array
);
}
}
public
function
asJson
(
$data
,
$msg
,
$state
,
$return_array
){
$return
=
array
(
'code'
=>
$state
,
'msg'
=>
iconv
(
'gbk'
,
'utf-8'
,
$msg
),
'data'
=>
$data
);
if
(
$return_array
){
return
$return
;
}
echo
json_encode
(
$return
);
die
;
}
function
gbk2utf8
(
$data
){
foreach
(
$data
as
$k
=>
$v
){
$data
[
$k
]
=
iconv
(
'gbk'
,
'utf-8'
,
$v
);
}
return
$data
;
}
function
stringUncode
(
$msg
,
$incode
=
'GBK'
,
$outcode
=
'UTF-8'
){
if
(
!
$msg
){
return
''
;
}
$msg
=
iconv
(
$incode
,
$outcode
,
$msg
);
return
$msg
;
}
public
function
checkParam
(
$param
=
array
(),
$filed
=
array
()){
foreach
(
$filed
as
$v
){
if
(
!
array_key_exists
(
$v
,
$param
)
||
strlen
(
$param
[
$v
])
<=
0
){
$this
->
newException
(
$v
.
'Ϊ'
);
}
}
}
public
function
getClientIp
(){
$ip
=
$_SERVER
[
"REMOTE_ADDR"
];
if
(
!
empty
(
$_SERVER
[
"HTTP_X_FORWARDED_FOR"
]))
{
$tip
=
explode
(
","
,
$_SERVER
[
"HTTP_X_FORWARDED_FOR"
]);
$ip
=
$tip
[
0
];
}
return
(
trim
(
$ip
));
}
public
function
kefuTel
(){
}
}
\ No newline at end of file
new_admincp/applications/models/zsb_api_model.php
View file @
41b3df8a
...
...
@@ -20,6 +20,8 @@ class zsb_api_model extends MY_Model{
'reportRecord'
=>
'/zsbapi/house/report-record'
,
//举报记录
'reportRecordAppeal'
=>
'/zsbapi/house/report-record-appeal'
,
//申诉记录展示
'realHouseAppeal'
=>
'/zsbapi/house/real-house-appeal'
,
//房源举报申诉
'vr_check'
=>
'/zsbapi/broker/vr-add-before'
,
//VR申请校验
'vr_add'
=>
'/zsbapi/broker/vr-add'
,
//VR申请提交
);
...
...
@@ -56,7 +58,7 @@ class zsb_api_model extends MY_Model{
$url
=
$this
->
getApiFullUrl
(
$key
);
$token
=
$this
->
getToken
();
$aHeader
=
array
(
'token:'
.
$token
);
$response
=
$this
->
httpRequest
(
$url
,
$aHeader
,
$param
);
$response
=
$this
->
httpRequest
(
$url
,
$aHeader
,
$param
);
$response
=
json_decode
(
$response
,
true
);
return
$response
;
}
...
...
new_admincp/applications/zsb/config/config.php
View file @
41b3df8a
...
...
@@ -595,4 +595,6 @@ $config['imageType'] = array(
'6'
=>
'其他'
);
//开通放心看权限 0关闭,1开通
$config
[
'is_open_real_house'
]
=
0
;
\ No newline at end of file
$config
[
'is_open_real_house'
]
=
0
;
//申请VR开放
$config
[
'vr_applay'
]
=
0
;
new_admincp/applications/zsb/config/config_hf.php
View file @
41b3df8a
...
...
@@ -691,3 +691,5 @@ $config['housebeanExpirationTimeType'] = array(
//核验码需要验证的区属
$config
[
'rentCheckCode'
]
=
array
(
'新站区'
,
'蜀山区'
,
'高新区'
,
'包河区'
,
'庐阳区'
,
'瑶海区'
,
'政务区'
,
'经开区'
,
'滨湖区'
);
//申请VR开放
$config
[
'vr_applay'
]
=
1
;
new_admincp/applications/zsb/controllers/sell.php
View file @
41b3df8a
...
...
@@ -4026,6 +4026,8 @@ class Sell extends MY_Controller {
public
function
manage
(
$house_esta
=
'active'
,
$page
=
1
)
{
$realHouse
=
$this
->
config
->
item
(
'is_open_real_house'
);
//VR申请按钮
$vr_applay
=
$this
->
config
->
item
(
'vr_applay'
);
//post参数
$post_param
=
$this
->
input
->
post
(
NULL
,
TRUE
);
...
...
@@ -4067,12 +4069,7 @@ class Sell extends MY_Controller {
//加载房源类
$this
->
load
->
model
(
'sell_model'
);
//VR申请是否达到上线
$svrshow
=
$this
->
sell_model
->
checkBrokerApplay
(
$uid
);
//当前经纪人是否放心看经纪人
$isreal
=
$this
->
sell_model
->
checkisreal
(
$uid
);
...
...
@@ -4207,12 +4204,6 @@ class Sell extends MY_Controller {
$data_info
[
$key
][
'vr_status'
]
=
$applay
[
'shot_status'
];
$data_info
[
$key
][
'shot_name'
]
=
$applay
[
'shot_name'
];
$data_info
[
$key
][
'shot_telno'
]
=
$applay
[
'telno'
];
//房源位置
$data_info
[
$key
][
'vr_applay_show'
]
=
0
;
if
(
in_array
(
$value
[
'district'
],
$vr_show_district
)){
$data_info
[
$key
][
'vr_applay_show'
]
=
1
;
}
$infotype
=
$value
[
'infotype'
];
$is_show_real
=
0
;
...
...
@@ -4649,7 +4640,7 @@ class Sell extends MY_Controller {
$data
[
'page'
]
=
$this
->
_current_page
;
$data
[
'pagination'
]
=
$pagination
;
$data
[
'total_count'
]
=
$this
->
_total_count
;
$data
[
'vr_applay'
]
=
$vr_applay
;
switch
(
$house_esta
){
case
'active'
:
$ga_title
=
'激活房源'
;
...
...
@@ -4812,7 +4803,6 @@ class Sell extends MY_Controller {
$data
[
'tishi'
]
=
$this
->
guojie
();
$data
[
'svrshow'
]
=
$svrshow
;
$data
[
'isreal'
]
=
$isreal
;
//加载模板
...
...
@@ -6871,14 +6861,13 @@ class Sell extends MY_Controller {
}
function
vrapplay
(){
$rowid
=
$this
->
input
->
post
(
'
row
id'
,
TRUE
);
$rowid
=
$this
->
input
->
post
(
'
h
id'
,
TRUE
);
$data
=
$this
->
input
->
post
();
//验证房源编号和提交验证码
if
(
intval
(
$rowid
)
>
0
)
{
//初始化房源操作类
$this
->
load
->
model
(
'sell_model'
);
$vra
=
$this
->
sell_model
->
vrApplay
(
$data
);
$vra
=
$this
->
gbk2utf8
(
$vra
);
$this
->
load
->
model
(
'vr_model'
);
$vra
=
$this
->
vr_model
->
vr_applay
(
$data
);
echo
json_encode
(
$vra
);
die
;
...
...
@@ -6952,7 +6941,27 @@ class Sell extends MY_Controller {
die
;
}
/*
* vr绑定前验证
*/
public
function
check_vr_new
(){
$rowid
=
$this
->
input
->
post
(
'hid'
,
TRUE
);
if
(
intval
(
$rowid
)
>
0
)
{
$post
=
$this
->
input
->
post
();
//初始化房源操作类
$this
->
load
->
model
(
'vr_model'
);
$vra
=
$this
->
vr_model
->
check_vr_new
(
$post
);
echo
json_encode
(
$vra
);
die
;
}
$result
[
'result'
]
=
0
;
$result
[
'msg'
]
=
'参数错误'
;
$result
=
$this
->
gbk2utf8
(
$result
);
echo
json_encode
(
$result
);
die
;
}
/**
* 中文 转码
* @param $data
...
...
new_admincp/applications/zsb/models/vr_model.php
0 → 100644
View file @
41b3df8a
This diff is collapsed.
Click to expand it.
new_admincp/applications/zsb/views/nj/sell_manage.php
View file @
41b3df8a
...
...
@@ -497,37 +497,20 @@
?>
<?php
if
(
!
$isreal
&&
GB_CITY
==
'nj'
)
:
?>
<?php
if
(
$vr_applay
)
:
?>
<!--2018-6-28 VR-->
<?php
if
(
in_array
(
$value
[
'vr_status'
],
array
(
0
,
5
,
6
,
9
))
&&
$value
[
'vr_applay_show'
]
)
:
?>
<?php
if
(
in_array
(
$value
[
'vr_status'
],
array
(
0
,
5
,
6
,
9
)))
:
?>
<div
class=
"vr-apply"
onclick=
"applay_vr(
<?php
echo
$value
[
'id'
];
?>
,0,
<?php
echo
$vrs
;
?>
)"
>
申请VR
</div>
<?php
elseif
(
in_array
(
$value
[
'vr_status'
],
array
(
1
,
2
)))
:
?>
<div
class=
"vr-apply"
id=
"vr_id_
<?php
echo
$value
[
'id'
];
?>
"
onclick=
"applay_cancle_vr(
<?php
echo
$value
[
'id'
];
?>
,
<?php
echo
$value
[
'vr_status'
];
?>
)"
>
<div
class=
"vr-apply"
style=
"background: #F57D3A"
id=
"vr_id_
<?php
echo
$value
[
'id'
];
?>
"
onclick=
"applay_cancle_vr(
<?php
echo
$value
[
'id'
];
?>
,
<?php
echo
$value
[
'vr_status'
];
?>
)"
>
取消预约
</div>
<?php
endif
;
?>
<?php
endif
;
?>
<?php
if
(
$isreal
&&
$value
[
'is_real_house'
]
&&
GB_CITY
==
'nj'
)
:
?>
<!--2018-6-28 VR-->
<?php
if
(
in_array
(
$value
[
'vr_status'
],
array
(
0
,
5
,
6
,
9
))
&&
$svrshow
&&
$value
[
'vr_applay_show'
])
:
?>
<div
class=
"vr-apply"
onclick=
"applay_vr(
<?php
echo
$value
[
'id'
];
?>
,1,
<?php
echo
$vrs
;
?>
)"
>
申请VR
</div>
<?php
elseif
(
in_array
(
$value
[
'vr_status'
],
array
(
1
,
2
)))
:
?>
<div
class=
"vr-apply"
id=
"vr_id_
<?php
echo
$value
[
'id'
];
?>
"
onclick=
"applay_cancle_vr(
<?php
echo
$value
[
'id'
];
?>
,
<?php
echo
$value
[
'vr_status'
];
?>
)"
>
取消预约
</div>
<?php
endif
;
?>
<?php
endif
;
?>
</div>
</div>
</td>
...
...
@@ -799,7 +782,7 @@
</ul>
</div>
<div
class=
"btnFBbox vr3 show_applay"
align=
"center"
>
<a
style=
"margin:0;"
href=
"
####
"
class=
"btnB btnSubmit radius5 btnSubmit_vrapplay"
>
提交预约
</a>
<a
style=
"margin:0;"
href=
"
javascript:void(0);
"
class=
"btnB btnSubmit radius5 btnSubmit_vrapplay"
>
提交预约
</a>
</div>
<div
class=
"btnFBbox vr4 show_applay"
align=
"center"
>
...
...
@@ -839,8 +822,8 @@
<script
src=
"/source/zsb/js/layer-v3.1.1/layer/layer.js"
></script>
<link
href=
"/source/zsb/layui/css/mylayui.css"
rel=
"stylesheet"
type=
"text/css"
>
<
!--<
script src="/source/zsb/layui/layui.js"></script>
-->
<script
src=
"/source/zsb/layui/layui.js"
></script>
<script>
$
(
function
()
{
layer
.
config
({
...
...
@@ -899,13 +882,6 @@
//申请vr
function
applay_vr
(
id
,
isreal
,
vrshow
){
if
(
!
isreal
&&
!
vrshow
){
$
(
"#dialog_tip"
).
html
(
"普通经纪人仅有1套VR拍摄机会,【放心看】经纪人可申请3套以上赶快参与吧!"
);
openWin
(
'dialogts'
);
return
false
;
}
$
.
ajax
({
type
:
'get'
,
url
:
'
<?php
echo
GB_WO_URL
;
?>
/sell/getHouseInfo/'
,
...
...
@@ -983,38 +959,58 @@ function ajax_cancle_vr() {
}
function
check_valid
(
attr_id
,
type
){
function
check_valid
(
attr_id
,
type
){
var
val
=
$
.
trim
(
$
(
'#'
+
attr_id
).
val
());
if
(
type
==
'mashup'
){
var
val
=
$
.
trim
(
$
(
'#'
+
attr_id
).
val
());
if
(
type
==
'mashup'
){
if
(
!
val
){
$
(
'#'
+
attr_id
).
addClass
(
'check_valid_vr'
);
return
false
;
}
else
{
$
(
'#'
+
attr_id
).
removeClass
(
'check_valid_vr'
);
var
reg
=
/^
[
0-9a-zA-Z
]
+$/
if
(
!
reg
.
test
(
val
)){
$
(
'#'
+
attr_id
).
addClass
(
'check_valid_vr'
);
return
false
;
}
else
{
$
(
'#'
+
attr_id
).
removeClass
(
'check_valid_vr'
);
var
newv
=
val
var
ne
=
newv
.
toUpperCase
();
$
(
'#'
+
attr_id
).
val
(
ne
);
}
var
newv
=
val
var
ne
=
newv
.
toUpperCase
();
$
(
'#'
+
attr_id
).
val
(
ne
);
}
//检测是否全部填写,ajax 检测 是否绑定vr模型
var
house_id
=
$
.
trim
(
$
(
'#vr_house_id'
).
html
());
var
buildingnum
=
$
.
trim
(
$
(
'#buildingnum'
).
val
());
var
unitnum
=
$
.
trim
(
$
(
'#unitnum'
).
val
());
var
roomnum
=
$
.
trim
(
$
(
'#roomnum'
).
val
());
var
reg
=
/^
[
0-9a-zA-Z
]
+$/
if
(
!
reg
.
test
(
buildingnum
)
||
!
reg
.
test
(
unitnum
)
||
!
reg
.
test
(
roomnum
)){
if
(
!
reg
.
test
(
buildingnum
)){
$
(
'#buildingnum'
).
addClass
(
'check_valid_vr'
)
}
if
(
!
reg
.
test
(
unitnum
)){
$
(
'#unitnum'
).
addClass
(
'check_valid_vr'
)
}
if
(
!
reg
.
test
(
roomnum
)){
$
(
'#roomnum'
).
addClass
(
'check_valid_vr'
)
}
return
false
;
}
buildingnum
=
buildingnum
.
toUpperCase
();
unitnum
=
unitnum
.
toUpperCase
();
roomnum
=
roomnum
.
toUpperCase
();
//检测是否全部填写,ajax 检测 是否绑定vr模型
var
house_id
=
$
.
trim
(
$
(
'#vr_house_id'
).
html
());
var
buildingnum
=
$
.
trim
(
$
(
'#buildingnum'
).
val
());
var
unitnum
=
$
.
trim
(
$
(
'#unitnum'
).
val
());
var
roomnum
=
$
.
trim
(
$
(
'#roomnum'
).
val
());
if
(
buildingnum
&&
unitnum
&&
roomnum
){
if
(
buildingnum
&&
unitnum
&&
roomnum
){
$
.
ajax
({
type
:
'post'
,
url
:
'
<?php
echo
GB_WO_URL
;
?>
/sell/check_vr/'
,
data
:
{
'
rowid'
:
house_id
,
'buildingnum'
:
buildingnum
,
'unitnum'
:
unitnum
,
'roomnu
m'
:
roomnum
},
url
:
'
<?php
echo
GB_WO_URL
;
?>
/sell/check_vr
_new
/'
,
data
:
{
'
hid'
:
house_id
,
'build'
:
buildingnum
,
'unit'
:
unitnum
,
'roo
m'
:
roomnum
},
dataType
:
"json"
,
success
:
function
(
re
)
{
if
(
re
.
code
==
1
){
$
(
'.bindlike'
).
html
(
'该房源已有对应房源VR,是否立即绑定?'
);
if
(
re
.
result
==
0
){
layer
.
msg
(
re
.
msg
);
return
false
;
}
var
state
=
re
.
data
.
state
;
if
(
state
==
1
){
$
(
'.vr4'
).
removeClass
(
'show_applay'
)
$
(
'.vr1'
).
addClass
(
'show_applay'
)
$
(
'.vr2'
).
addClass
(
'show_applay'
)
...
...
@@ -1030,27 +1026,27 @@ function check_valid(attr_id,type){
}
}
});
}
}
}
}
if
(
type
==
'phone'
){
if
(
!
phonereg
(
val
)){
$
(
'#'
+
attr_id
).
addClass
(
'check_valid_vr'
);
}
else
{
$
(
'#'
+
attr_id
).
removeClass
(
'check_valid_vr'
);
if
(
type
==
'phone'
){
if
(
!
phonereg
(
val
)){
$
(
'#'
+
attr_id
).
addClass
(
'check_valid_vr'
);
}
else
{
$
(
'#'
+
attr_id
).
removeClass
(
'check_valid_vr'
);
}
}
}
if
(
type
==
'num'
){
if
(
!
(
/
(
^
[
1-9
]\d
*$
)
/
.
test
(
val
)))
{
$
(
'#'
+
attr_id
).
addClass
(
'check_valid_vr'
);
}
else
{
$
(
'#'
+
attr_id
).
removeClass
(
'check_valid_vr'
);
if
(
type
==
'num'
){
if
(
!
(
/
(
^
[
1-9
]\d
*$
)
/
.
test
(
val
)))
{
$
(
'#'
+
attr_id
).
addClass
(
'check_valid_vr'
);
}
else
{
$
(
'#'
+
attr_id
).
removeClass
(
'check_valid_vr'
);
}
}
}
}
}
/**
* 有相似房源,直接绑定
*/
...
...
@@ -1093,7 +1089,6 @@ $('.btnSubmit_vrbind').click(function () {
$
(
'.btnSubmit_vrapplay'
).
click
(
function
()
{
var
house_id
=
$
.
trim
(
$
(
'#vr_house_id'
).
html
());
var
buildingnum
=
$
.
trim
(
$
(
'#buildingnum'
).
val
());
var
unitnum
=
$
.
trim
(
$
(
'#unitnum'
).
val
());
...
...
@@ -1133,20 +1128,24 @@ $('.btnSubmit_vrapplay').click(function () {
var
form
=
$
(
"#search_form"
);
vr_applay_close
();
var
index
=
layer
.
load
(
1
,
{
shade
:
[
0.1
,
'#fff'
]
//0.1透明度的白色背景
});
$
.
ajax
({
type
:
'post'
,
url
:
'
<?php
echo
GB_WO_URL
;
?>
/sell/vrapplay/'
,
data
:
{
'
rowid'
:
house_id
,
'buildingnum'
:
buildingnum
,
'unitnum'
:
unitnum
,
'roomnum'
:
roomnum
,
'agent_telno'
:
agent_telno
,
'order_date'
:
order_date
,
'order_time'
:
order_time
,
'blockshownameall
'
:
blockshownameall
},
data
:
{
'
hid'
:
house_id
,
'build'
:
buildingnum
,
'unit'
:
unitnum
,
'room'
:
roomnum
,
'phone'
:
agent_telno
,
'order_date'
:
order_date
,
'order_time'
:
order_time
,
'block
'
:
blockshownameall
},
dataType
:
"json"
,
success
:
function
(
re
)
{
if
(
re
.
code
==
1
){
layer
.
close
(
index
);
if
(
re
.
result
==
1
){
$
(
"#dialogts #dialog_tip"
).
html
(
'申请成功'
);
openWin
(
'dialogts'
);
form
.
submit
();
setTimeout
(
function
()
{
$
(
"#search_form"
).
submit
();
},
500
)
}
else
{
$
(
"#dialogts #dialog_tip"
).
html
(
re
.
msg
);
openWin
(
'dialogts'
);
}
...
...
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