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
0902a28b
Commit
0902a28b
authored
Jun 04, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
后台房东手机号
parent
35a21522
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
GHouses.php
application/model/GHouses.php
+35
-0
No files found.
application/model/GHouses.php
View file @
0902a28b
...
@@ -369,6 +369,41 @@ class GHouses extends BaseModel
...
@@ -369,6 +369,41 @@ class GHouses extends BaseModel
$params
[
'status'
]
=
2
;
$params
[
'status'
]
=
2
;
}
}
if
(
!
empty
(
$params
[
'landlord_phone'
]))
{
$landlord_phone
=
[];
//排除没有手机号数据
if
(
is_array
(
json_decode
(
$params
[
'landlord_phone'
],
true
)))
{
$params
[
'landlord_phone'
]
=
json_decode
(
$params
[
'landlord_phone'
],
true
);
foreach
(
$params
[
'landlord_phone'
]
as
$k
=>
$v
)
{
if
(
!
empty
(
$v
[
'phone'
]))
{
$landlord_phone
[
$k
][
'name'
]
=
empty
(
$v
[
'name'
])
?
'房东'
:
$v
[
'name'
];
$landlord_phone
[
$k
][
'phone'
]
=
$v
[
'phone'
];
}
}
}
else
{
//兼容之前逗号隔开的手机号
$params
[
'landlord_phone'
]
=
explode
(
','
,
$params
[
'landlord_phone'
]);
foreach
(
$params
[
'landlord_phone'
]
as
$key
=>
$val
)
{
$landlord_phone
[
$key
][
'name'
]
=
'房东'
;
$landlord_phone
[
$key
][
'phone'
]
=
$val
;
}
}
if
(
isset
(
$landlord_phone
[
0
][
'phone'
]))
{
$params
[
'landlord_phone'
]
=
json_encode
(
$landlord_phone
);
}
}
if
(
isset
(
$params
[
'landlord_remark'
]))
{
$params
[
'landlord_remark'
]
=
trim
(
$params
[
'landlord_remark'
]);
//房东备注
}
//新增或编辑
//新增或编辑
if
(
$params
[
'id'
]
==
''
)
{
if
(
$params
[
'id'
]
==
''
)
{
...
...
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