Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
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
hujun
tl_estate
Commits
61aa391e
Commit
61aa391e
authored
Jun 11, 2019
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
q
parent
771d3b71
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
105 additions
and
15 deletions
+105
-15
OfficeReport.php
application/api_broker/controller/OfficeReport.php
+2
-1
OfficeReportService.php
application/api_broker/service/OfficeReportService.php
+1
-3
curl_cookie.txt
application/chat/utils/curl_cookie.txt
+4
-3
OfficeGRoom.php
application/model/OfficeGRoom.php
+3
-3
route.php
application/route.php
+1
-0
Reptile.php
application/search/controller/Reptile.php
+60
-5
index.html
application/search/view/reptile/index.html
+34
-0
No files found.
application/api_broker/controller/OfficeReport.php
View file @
61aa391e
...
...
@@ -190,7 +190,8 @@ class OfficeReport extends Basic
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$field
=
"a.id,a.user_id,a.report_agent_name,a.report_agent_phone,a.user_phone,a.user_name,a.predict_see_time,a.create_time,b.id as order_id,b.order_no,b.house_id,b.house_title"
;
$field
=
"a.id,a.user_id,a.report_agent_name,a.report_agent_phone,a.user_phone,a.user_name,a.predict_see_time,
a.create_time,b.id as order_id,b.order_no,b.house_id,b.house_title"
;
if
(
isset
(
$params
[
"report_id"
]))
{
$params
[
"a.id"
]
=
$params
[
"report_id"
];
...
...
application/api_broker/service/OfficeReportService.php
View file @
61aa391e
...
...
@@ -168,7 +168,6 @@ class OfficeReportService
$sign_arr
=
$this
->
orderSign
(
$ids_str
);
$house_arr
=
$this
->
houseInfo
(
$house_id_str
);
foreach
(
$result
as
$k
=>
$v
)
{
$result
[
$k
][
"sign"
]
=
""
;
foreach
(
$sign_arr
as
$value
)
{
...
...
@@ -217,14 +216,13 @@ class OfficeReportService
$ids
=
""
;
if
(
count
(
$caseHouseId
)
>
0
)
{
foreach
(
$caseHouseId
as
$item
)
{
$ids
.=
$item
[
"house
s
_id"
]
.
","
;
$ids
.=
$item
[
"house_id"
]
.
","
;
}
}
$ids
=
rtrim
(
$ids
,
","
);
$ids
=
$ids
?
$ids
:
0
;
$params
[
"house_ids"
]
=
$ids
;
$result
=
$this
->
reportModel
->
selectReportList
(
$field
,
$params
,
$pageNo
,
$pageSize
);
break
;
default
:
...
...
application/chat/utils/curl_cookie.txt
View file @
61aa391e
...
...
@@ -2,6 +2,7 @@
# https://curl.haxx.se/docs/http-cookies.html
# This file was generated by libcurl! Edit at your own risk.
.haozu.com TRUE / FALSE 1559723045 hzucsso deleted
.haozu.com TRUE / FALSE 1559744645 haozu_user %7B%22index%22%3A3%2C%22name%22%3A%22haozu%22%2C%22value%22%3A%22haozu%22%2C%22opt_scope%22%3A2%7D
.haozu.com TRUE / FALSE 1559895845 citydomain sh
www.haozu.com FALSE / FALSE 1560838217 lookHouse 464034%2C101612%2C1103785%2C714981%2C1346697%2C1285245%2C555537%2C1107172%2C992988%2C1173150%2C583706%2C1272465%2C150430%2C583678%2C1278875%2C1012250%2C319832%2C1053143%2C583709%2C204470%2C1319631%2C1011854%2C1141554%2C1381407%2C595860%2C900389%2C1265538%2C342069%2C1121322%2C514219%2C1159068
.www.haozu.com TRUE / FALSE 1575785417 1houseView %5B%7B%22viewId%22%3A%221173150%22%2C%22userId%22%3A0%2C%22circleId%22%3A%22178%22%2C%22streetId%22%3A%226081%22%2C%22districtId%22%3A%22191%22%2C%22cityId%22%3A%2213%22%2C%22type%22%3A2%2C%22category%22%3A1%2C%22viewTime%22%3A1560233406%7D%2C%7B%22viewId%22%3A%22992988%22%2C%22userId%22%3A0%2C%22circleId%22%3A%22216%22%2C%22streetId%22%3A%226071%22%2C%22districtId%22%3A%22195%22%2C%22cityId%22%3A%2213%22%2C%22type%22%3A2%2C%22category%22%3A1%2C%22viewTime%22%3A1560233407%7D%2C%7B%22viewId%22%3A%221107172%22%2C%22userId%22%3A0%2C%22circleId%22%3A%22226%22%2C%22streetId%22%3A%226039%22%2C%22districtId%22%3A%22200%22%2C%22cityId%22%3A%2213%22%2C%22type%22%3A2%2C%22category%22%3A1%2C%22viewTime%22%3A1560233408%7D%2C%7B%22viewId%22%3A%22555537%22%2C%22userId%22%3A0%2C%22circleId%22%3A%22216%22%2C%22streetId%22%3A%226071%22%2C%22districtId%22%3A%22195%22%2C%22cityId%22%3A%2213%22%2C%22type%22%3A2%2C%22category%22%3A1%2C%22viewTime%22%3A1560233409%7D%2C%7B%22viewId%22%3A%221285245%22%2C%22userId%22%3A0%2C%22circleId%22%3A%22216%22%2C%22streetId%22%3A%226071%22%2C%22districtId%22%3A%22195%22%2C%22cityId%22%3A%2213%22%2C%22type%22%3A2%2C%22category%22%3A1%2C%22viewTime%22%3A1560233410%7D%2C%7B%22viewId%22%3A%221346697%22%2C%22userId%22%3A0%2C%22circleId%22%3A%22338%22%2C%22streetId%22%3A%227251%22%2C%22districtId%22%3A%22197%22%2C%22cityId%22%3A%2213%22%2C%22type%22%3A2%2C%22category%22%3A1%2C%22viewTime%22%3A1560233411%7D%2C%7B%22viewId%22%3A%22714981%22%2C%22userId%22%3A0%2C%22circleId%22%3A%22216%22%2C%22streetId%22%3A%226071%22%2C%22districtId%22%3A%22195%22%2C%22cityId%22%3A%2213%22%2C%22type%22%3A2%2C%22category%22%3A1%2C%22viewTime%22%3A1560233412%7D%2C%7B%22viewId%22%3A%221103785%22%2C%22userId%22%3A0%2C%22circleId%22%3A%22216%22%2C%22streetId%22%3A%226071%22%2C%22districtId%22%3A%22195%22%2C%22cityId%22%3A%2213%22%2C%22type%22%3A2%2C%22category%22%3A1%2C%22viewTime%22%3A1560233413%7D%2C%7B%22viewId%22%3A%22101612%22%2C%22userId%22%3A0%2C%22circleId%22%3A%22338%22%2C%22streetId%22%3A%227251%22%2C%22districtId%22%3A%22197%22%2C%22cityId%22%3A%2213%22%2C%22type%22%3A2%2C%22category%22%3A1%2C%22viewTime%22%3A1560233414%7D%2C%7B%22viewId%22%3A%22464034%22%2C%22userId%22%3A0%2C%22circleId%22%3A%22225%22%2C%22streetId%22%3A%226027%22%2C%22districtId%22%3A%22200%22%2C%22cityId%22%3A%2213%22%2C%22type%22%3A2%2C%22category%22%3A1%2C%22viewTime%22%3A1560233415%7D%5D
.haozu.com TRUE / FALSE 1560406217 citydomain sh
.haozu.com TRUE / FALSE 1560255017 haozu_user %7B%22index%22%3A3%2C%22name%22%3A%22haozu%22%2C%22value%22%3A%22haozu%22%2C%22opt_scope%22%3A2%7D
application/model/OfficeGRoom.php
View file @
61aa391e
...
...
@@ -439,7 +439,7 @@ class OfficeGRoom extends BaseModel
return
$data
=
$this
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
"office_g_building b"
,
"a.building_id=
a.id
"
)
->
join
(
"office_g_building b"
,
"a.building_id=
b.id"
,
"left
"
)
->
where
(
$params
)
->
find
();
}
...
...
@@ -457,10 +457,10 @@ class OfficeGRoom extends BaseModel
$result
=
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
"office_g_building b"
,
"a.building_id=
a.id
"
)
->
join
(
"office_g_building b"
,
"a.building_id=
b.id"
,
"left
"
)
->
where
(
$params
)
->
select
();
// echo $this->getLastSql();
return
$result
;
}
...
...
application/route.php
View file @
61aa391e
...
...
@@ -939,6 +939,7 @@ Route::group('broker', [
Route
::
group
(
'search'
,
[
'search'
=>
[
'search/Search/search'
,
[
'method'
=>
'get|post'
]],
'getHaoZu'
=>
[
'search/Reptile/getHaoZu'
,
[
'method'
=>
'get|post'
]],
'index'
=>
[
'search/Reptile/index'
,
[
'method'
=>
'get|post'
]],
]);
...
...
application/search/controller/Reptile.php
View file @
61aa391e
<?php
namespace
app\search\controller
;
use
app\search\extend\Basic
;
use
app\search\service\ReptileService
;
use
Think\Exception
;
use
think\Request
;
/**
...
...
@@ -10,18 +13,69 @@ use think\Request;
* Date: 2019/6/4
* Time: 11:08
*/
class
Reptile
extends
Basic
{
class
Reptile
extends
Basic
{
private
$service_
;
public
function
__construct
(
Request
$request
=
null
)
{
parent
::
__construct
(
$request
);
$this
->
service_
=
new
ReptileService
();
}
public
function
getHaoZu
(){
$url
=
"https://cowork.haozu.com/sh/list/"
;
public
function
index
()
{
return
view
(
"reptile/index"
);
}
public
function
getHaoZu
()
{
set_time_limit
(
0
);
// 取消脚本运行时间的超时上限
$url
=
"https://www.haozu.com/sh/house-list/o2"
;
$result
=
$this
->
service_
->
getHaoZu
(
$url
);
return
$this
->
response
(
"200"
,
"success"
,
$result
);
//https://www.haozu.com/sh/house1281461/
preg_match_all
(
"/www.haozu.com
\\
/\w+
\\
/house\d+/"
,
$result
,
$matches
);
$new_arr
=
array_unique
(
$matches
[
0
]);
foreach
(
$new_arr
as
$key
)
{
$params
=
[];
$body
=
$this
->
service_
->
getHaoZu
(
$key
);
$params
[
"title"
]
=
$this
->
getTitle
(
$body
);
$value
=
$this
->
getAddress
(
$body
);
$params
[
"address"
]
=
$value
[
10
];
dump
(
$params
);
/* preg_match("/\d+/", $value[14], $match1);
$params["floor_total"] = $match1[0];*/
// echo $key;
}
//return $this->response("200","success",$result);
}
/**
* 获取标题
* @param $result
* @return string
*/
private
function
getTitle
(
$result
)
{
try
{
preg_match
(
"/(?<=
\"
h3-title
\"
>)[^<>]+(?=<)/"
,
$result
,
$match1
);
}
catch
(
Exception
$e
)
{
$match1
[
0
]
=
""
;
}
return
$match1
[
0
];
}
private
function
getAddress
(
$result
){
//dump($result);
try
{
preg_match_all
(
"/(?<=
\"
s2
\"
>)[^<>]+(?=<)/"
,
$result
,
$match1
);
}
catch
(
Exception
$e
)
{
$match1
[
0
]
=
""
;
}
dump
(
$match1
);
return
$match1
[
0
];
}
}
\ No newline at end of file
application/search/view/reptile/index.html
0 → 100644
View file @
61aa391e
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
test
</title>
</head>
<body>
<button
id=
"action_add"
>
获取数据
</button>
<script
src=
"/resource/lib/js/jquery-2.0.3.min.js"
></script>
<script
type=
"text/javascript"
>
$
(
"#action_add"
).
click
(
function
(){
$
.
ajax
({
type
:
'post'
,
url
:
'/search/getHaoZu'
,
success
:
function
(
data
)
{
//console.log(data)
// data = JSON.stringify(data)
console
.
log
(
data
);
var
p
=
document
.
createElement
(
'p'
);
p
.
innerHTML
=
data
;
var
list
=
p
.
querySelectorAll
(
'.h3-title'
);
// console.log(list[0])
list
.
forEach
(
function
(
v
){
var
a
=
v
.
val
()
console
.
log
(
a
);
});
}
});
});
</script>
</body>
</html>
\ No newline at end of file
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