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
ddbf4bff
Commit
ddbf4bff
authored
Feb 01, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jiekou
parent
36bf8acd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
0 deletions
+58
-0
AppChat.php
application/chat/controller/AppChat.php
+39
-0
HouseImgs.php
application/model/HouseImgs.php
+8
-0
HouseInfos.php
application/model/HouseInfos.php
+10
-0
route.php
application/route.php
+1
-0
No files found.
application/chat/controller/AppChat.php
View file @
ddbf4bff
...
@@ -16,6 +16,8 @@ use app\chat\service\ChatService;
...
@@ -16,6 +16,8 @@ use app\chat\service\ChatService;
use
app\chat\utils\RPush
;
use
app\chat\utils\RPush
;
use
app\extra\RedisPackage
;
use
app\extra\RedisPackage
;
use
app\model\ChatMsg
;
use
app\model\ChatMsg
;
use
app\model\HouseImgs
;
use
app\model\HouseInfos
;
use
think\Cache
;
use
think\Cache
;
use
Think\Log
;
use
Think\Log
;
...
@@ -218,4 +220,41 @@ class AppChat extends Basic
...
@@ -218,4 +220,41 @@ class AppChat extends Basic
}
}
public
function
pushMsg_gethouseinfo
()
{
$homeurl
=
$this
->
request
->
domain
();
$params
=
$this
->
params
;
$params
[
'id'
]
=
312
;
if
(
!
isset
(
$params
[
'id'
]))
{
return
$this
->
response
(
"300"
,
"参数不全"
,
[
'remote_groupid'
=>
''
]);
}
$id
=
$params
[
'id'
];
$HouseInfos
=
new
HouseInfos
();
$HouseInfosre
=
$HouseInfos
->
getHousepusmessage
(
$id
);
if
(
$HouseInfosre
){
$data
[
'title'
]
=
$HouseInfosre
[
0
][
'title'
];
$data
[
'room_area_all'
]
=
$HouseInfosre
[
0
][
'room_area'
]
.
'-'
.
$HouseInfosre
[
0
][
'room_area2'
]
.
'm²'
;
$data
[
'price'
]
=
$HouseInfosre
[
0
][
'price'
];
//同联默认图片,如果用户没上传的话/img/houseinfobackgroundimg.png
$data
[
'imagename'
]
=
$homeurl
.
'/img/houseinfobackgroundimg_new.png'
;
$HouseImgs
=
new
HouseImgs
();
$HouseImgsre
=
$HouseImgs
->
getHouseImgs
(
$id
,
1
);
//用户上传了就用上传的
if
(
$HouseImgsre
){
$data
[
'imagename'
]
=
$homeurl
.
'/houseImg/small_'
.
$HouseImgsre
[
0
][
'imagename'
];
}
// dump($HouseInfosre);
// dump($data);
// exit;
return
$this
->
response
(
"200"
,
"success!"
,
$data
);
}
else
{
return
$this
->
response
(
"400"
,
"暂无数据!"
);
}
}
}
}
application/model/HouseImgs.php
View file @
ddbf4bff
...
@@ -31,4 +31,12 @@ class HouseImgs extends Model
...
@@ -31,4 +31,12 @@ class HouseImgs extends Model
->
limit
(
$limit_
)
->
limit
(
$limit_
)
->
select
();
->
select
();
}
}
function
getHouseImgs
(
$id
,
$imgtype
)
{
$HouseImgsre
=
$this
->
db
->
where
([
'house_id'
=>
$id
,
'imgtype'
=>
$imgtype
])
->
field
(
'id,imagename'
)
->
select
();
return
$HouseImgsre
;
}
}
}
application/model/HouseInfos.php
View file @
ddbf4bff
...
@@ -102,5 +102,15 @@ class HouseInfos extends Model
...
@@ -102,5 +102,15 @@ class HouseInfos extends Model
->
select
();
->
select
();
}
}
function
getHousepusmessage
(
$id
)
{
$HouseInfosre
=
$this
->
dbHouseInfo
->
where
(
'id'
,
$id
)
->
field
(
'id,title,room_area,room_area2,price'
)
->
select
();
return
$HouseInfosre
;
}
}
}
application/route.php
View file @
ddbf4bff
...
@@ -152,6 +152,7 @@ Route::group('chat', [
...
@@ -152,6 +152,7 @@ Route::group('chat', [
'delGroupUserByIds'
=>
[
'chat/Group/delGroupUserByIds'
,
[
'method'
=>
'post|get'
]
],
'delGroupUserByIds'
=>
[
'chat/Group/delGroupUserByIds'
,
[
'method'
=>
'post|get'
]
],
'addGroupManage'
=>
[
'chat/Group/addGroupManage'
,
[
'method'
=>
'post|get'
]
],
'addGroupManage'
=>
[
'chat/Group/addGroupManage'
,
[
'method'
=>
'post|get'
]
],
'delGroupManage'
=>
[
'chat/Group/delGroupManage'
,
[
'method'
=>
'post|get'
]
],
'delGroupManage'
=>
[
'chat/Group/delGroupManage'
,
[
'method'
=>
'post|get'
]
],
'pushMsg_gethouseinfo'
=>
[
'chat/AppChat/pushMsg_gethouseinfo'
,
[
'method'
=>
'post|get'
]
],
]);
]);
Route
::
group
(
'task'
,[
Route
::
group
(
'task'
,[
...
...
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