Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
UserAdminApi4Tpl
Overview
Overview
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
庄欣
UserAdminApi4Tpl
Commits
9ad2c06e
Commit
9ad2c06e
authored
Oct 08, 2016
by
庄欣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
df8d17b0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
2 deletions
+25
-2
app/Http/Controllers/ControllerBase.php
+1
-1
app/Http/Controllers/Sets/Controller/Sets.php
+23
-0
app/Lib/Client/CurlClient.php
+1
-1
No files found.
app/Http/Controllers/ControllerBase.php
View file @
9ad2c06e
...
...
@@ -20,7 +20,7 @@ class ControllerBase
{
public
function
getAuth
()
{
return
request
(
"uuid"
,
12
);
return
request
(
"uuid"
,
3
);
static
$id
;
if
(
!
$id
)
{
$code
=
request
()
->
header
(
"token"
);
...
...
app/Http/Controllers/Sets/Controller/Sets.php
View file @
9ad2c06e
...
...
@@ -7,6 +7,7 @@ use App\Exceptions\ApiUnauthorized;
use
App\Http\Controllers\ControllerBase
;
use
Illuminate\Routing\Controller
;
use
App\Lib\Response\Response
;
use
Illuminate\Http\Request
;
class
Sets
extends
ControllerBase
{
...
...
@@ -17,6 +18,9 @@ class Sets extends ControllerBase
const
TIME_IN
=
1
;
const
TIME_AFTER
=
2
;
const
SETS_TYPE_NORMAL
=
0
;
const
SETS_TYPE_TRAVEL
=
1
;
protected
function
after_hook
(
$res
)
{
$path
=
app_path
(
"Lib"
)
.
"/underscore.php"
;
...
...
@@ -61,5 +65,23 @@ class Sets extends ControllerBase
}
}
/**
* 保存
*/
public
function
store
(
Request
$request
)
{
$data
=
$request
->
all
();
if
(
$data
[
'type'
]
==
self
::
SETS_TYPE_NORMAL
)
{
$request
->
merge
([
'abroad'
=>
0
//非旅拍套系则视作国内
]);
}
else
{
$request
->
merge
([
'abroad'
=>
$data
[
'abroad'
]
// 旅拍套系按照传入的值来
]);
}
return
parent
::
store
(
$request
);
}
}
\ No newline at end of file
app/Lib/Client/CurlClient.php
View file @
9ad2c06e
...
...
@@ -116,7 +116,7 @@ class CurlClient
$curlinfo
=
curl_getinfo
(
$http
);
}
if
(
$curlinfo
==
false
||
(
is_array
(
$curlinfo
)
&&
$curlinfo
[
'http_code'
]
!=
200
))
{
var_dump
(
$
curlinfo
);
var_dump
(
$
res
);
throw
new
\Exception
(
"返回错误"
);
}
$res
=
json_decode
(
$res
);
...
...
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