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
f5cc1a46
Commit
f5cc1a46
authored
Apr 02, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
开盘广场-编辑
parent
84830494
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
1 deletion
+50
-1
SquareService.php
application/api_broker/service/SquareService.php
+31
-0
Square.php
application/index/controller/Square.php
+17
-0
BSquare.php
application/model/BSquare.php
+1
-1
route.php
application/route.php
+1
-0
No files found.
application/api_broker/service/SquareService.php
View file @
f5cc1a46
...
...
@@ -103,4 +103,34 @@ class SquareService
$res
=
$this
->
m_square
->
updateStatus
(
$where_params
,
$update_params
);
return
$res
;
}
public
function
editSquare
(
$params
)
{
$where_params
[
'id'
]
=
$params
[
'id'
];
//城市
if
(
!
empty
(
$params
[
'site_id'
]))
{
$update_params
[
'site_id'
]
=
$params
[
'site_id'
];
}
//部门
if
(
!
empty
(
$params
[
'district_id'
]))
{
$update_params
[
'district_id'
]
=
$params
[
'district_id'
];
}
if
(
!
empty
(
$params
[
'title'
]))
{
$update_params
[
'title'
]
=
$params
[
'title'
];
}
if
(
!
empty
(
$params
[
'content'
]))
{
$update_params
[
'content'
]
=
$params
[
'content'
];
}
if
(
!
empty
(
$params
[
'cover_img'
]))
{
$update_params
[
'cover_img'
]
=
$params
[
'cover_img'
];
}
if
(
!
$update_params
){
return
false
;
}
$res
=
$this
->
m_square
->
updateStatus
(
$where_params
,
$update_params
);
return
$res
;
}
}
\ No newline at end of file
application/index/controller/Square.php
View file @
f5cc1a46
...
...
@@ -92,6 +92,23 @@ class Square extends Basic
}
}
public
function
editSquare
()
{
header
(
'Access-Control-Allow-Origin:*'
);
$params
=
$this
->
params
;
if
(
!
isset
(
$params
[
'id'
])
)
{
return
$this
->
response
(
"101"
,
"参数不全"
);
}
$res
=
$this
->
s_square
->
editSquare
(
$params
);
if
(
$res
)
{
return
$this
->
response
(
"200"
,
"成功"
);
}
else
{
return
$this
->
response
(
"101"
,
"失败"
);
}
}
...
...
application/model/BSquare.php
View file @
f5cc1a46
...
...
@@ -100,7 +100,7 @@ class BSquare extends Model
public
function
updateStatus
(
$where_params
,
$update_params
)
{
$result
=
$this
->
where
(
$where_params
)
->
update
(
$update_params
);
// dump($this->getLastSql());
// dump($this->getLastSql());
exit;
// big_log($this->getLastSql());
return
$result
;
}
...
...
application/route.php
View file @
f5cc1a46
...
...
@@ -445,6 +445,7 @@ Route::group('index', [
'getSquareList'
=>
[
'index/Square/getSquareList'
,
[
'method'
=>
'GET|POST'
]],
'getSquareInfo'
=>
[
'index/Square/getSquareInfo'
,
[
'method'
=>
'GET|POST'
]],
'delSquare'
=>
[
'index/Square/delSquare'
,
[
'method'
=>
'GET|POST'
]],
'editSquare'
=>
[
'index/Square/editSquare'
,
[
'method'
=>
'GET|POST'
]],
]);
...
...
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