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
1e0bea43
Commit
1e0bea43
authored
Jul 17, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
addOffice
parent
f4b47403
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
9 deletions
+10
-9
StoreFee.php
application/index/controller/StoreFee.php
+7
-7
StoreFeeValidate.php
application/index/validate/StoreFeeValidate.php
+2
-1
route.php
application/route.php
+1
-1
No files found.
application/index/controller/StoreFee.php
View file @
1e0bea43
...
@@ -27,7 +27,7 @@ class StoreFee extends Basic
...
@@ -27,7 +27,7 @@ class StoreFee extends Basic
* 新增数据
* 新增数据
* @return \think\Response
* @return \think\Response
*/
*/
public
function
add
Fee
Office
()
public
function
addOffice
()
{
{
header
(
'Access-Control-Allow-Origin:*'
);
header
(
'Access-Control-Allow-Origin:*'
);
$params
=
$this
->
params
;
$params
=
$this
->
params
;
...
@@ -37,18 +37,18 @@ class StoreFee extends Basic
...
@@ -37,18 +37,18 @@ class StoreFee extends Basic
"office_name"
=>
'鳖'
,
//办公室名
"office_name"
=>
'鳖'
,
//办公室名
"office_address"
=>
'上海市黄浦区龙华东路800号'
,
//办公室地址
"office_address"
=>
'上海市黄浦区龙华东路800号'
,
//办公室地址
"rent"
=>
5000
,
//租金每月
"rent"
=>
5000
,
//租金每月
"operator_id"
=>
5775
,
);
);
$checkResult
=
$this
->
validate
(
$params
,
"StoreFeeValidate.addFeeOffice"
);
$checkResult
=
$this
->
validate
(
$params
,
"StoreFeeValidate.addOffice"
);
if
(
true
!==
$checkResult
)
{
if
(
true
!==
$checkResult
)
{
return
$this
->
response
(
"101"
,
$checkResult
);
return
$this
->
response
(
"101"
,
$checkResult
);
}
}
$data
[
"site_id"
]
=
$params
[
'
name
'
];
$data
[
"site_id"
]
=
$params
[
'
site_id
'
];
$data
[
"office_name"
]
=
$params
[
'
city
'
];
$data
[
"office_name"
]
=
$params
[
'
office_name
'
];
$data
[
"office_address"
]
=
$params
[
'
city
'
];
$data
[
"office_address"
]
=
$params
[
'
office_address
'
];
$data
[
"rent"
]
=
$params
[
'
city
'
];
$data
[
"rent"
]
=
$params
[
'
rent
'
];
$data
[
"operator_id"
]
=
$this
->
userId
;
$data
[
"operator_id"
]
=
$this
->
userId
;
$res
=
$this
->
f_office
->
saveOffice
(
$data
);
//int(1)
$res
=
$this
->
f_office
->
saveOffice
(
$data
);
//int(1)
...
...
application/index/validate/StoreFeeValidate.php
View file @
1e0bea43
...
@@ -23,7 +23,7 @@ class StoreFeeValidate extends Validate {
...
@@ -23,7 +23,7 @@ class StoreFeeValidate extends Validate {
];
];
protected
$scene
=
[
protected
$scene
=
[
'add
Fee
Office'
=>
[
'site_id'
,
'office_name'
,
'office_address'
,
'rent'
],
'addOffice'
=>
[
'site_id'
,
'office_name'
,
'office_address'
,
'rent'
],
];
];
}
}
\ No newline at end of file
application/route.php
View file @
1e0bea43
...
@@ -509,7 +509,7 @@ Route::group('index', [
...
@@ -509,7 +509,7 @@ Route::group('index', [
'yindaoAndroidOffice'
=>
[
'index/ShareOfficeRoom/yindaoAndroid'
,
[
'method'
=>
'POST|GET'
]],
'yindaoAndroidOffice'
=>
[
'index/ShareOfficeRoom/yindaoAndroid'
,
[
'method'
=>
'POST|GET'
]],
'yindaoIosOffice'
=>
[
'index/ShareOfficeRoom/yindaoIos'
,
[
'method'
=>
'POST|GET'
]],
'yindaoIosOffice'
=>
[
'index/ShareOfficeRoom/yindaoIos'
,
[
'method'
=>
'POST|GET'
]],
'add
FeeOffice'
=>
[
'index/StoreFee/addFee
Office'
,
[
'method'
=>
'POST|GET'
]],
'add
Office'
=>
[
'index/StoreFee/add
Office'
,
[
'method'
=>
'POST|GET'
]],
]);
]);
...
...
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