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
47b41a12
Commit
47b41a12
authored
Jun 27, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
f275a0ab
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
AppointmentTime.php
application/api/controller/AppointmentTime.php
+1
-1
Response.php
thinkphp/library/think/Response.php
+4
-4
No files found.
application/api/controller/AppointmentTime.php
View file @
47b41a12
...
@@ -71,7 +71,7 @@ class AppointmentTime extends Basic
...
@@ -71,7 +71,7 @@ class AppointmentTime extends Basic
return
$this
->
response
(
"101"
,
"楼盘信息不能为空"
);
return
$this
->
response
(
"101"
,
"楼盘信息不能为空"
);
}
}
//todo 参数校验
//todo 参数校验
if
(
!
isset
(
$params
[
"phone"
])
||
!
preg_match
(
'/^1[345678]\d{9}$/'
,
$params
[
"phone"
]))
{
if
(
!
isset
(
$params
[
"phone"
])
||
!
preg_match
(
'/^1[345678
9
]\d{9}$/'
,
$params
[
"phone"
]))
{
return
$this
->
response
(
"101"
,
"手机号为空或手机号无效"
);
return
$this
->
response
(
"101"
,
"手机号为空或手机号无效"
);
}
}
...
...
thinkphp/library/think/Response.php
View file @
47b41a12
...
@@ -106,7 +106,7 @@ class Response
...
@@ -106,7 +106,7 @@ class Response
$this
->
header
[
'Cache-Control'
]
=
'max-age='
.
$cache
[
1
]
.
',must-revalidate'
;
$this
->
header
[
'Cache-Control'
]
=
'max-age='
.
$cache
[
1
]
.
',must-revalidate'
;
$this
->
header
[
'Last-Modified'
]
=
gmdate
(
'D, d M Y H:i:s'
)
.
' GMT'
;
$this
->
header
[
'Last-Modified'
]
=
gmdate
(
'D, d M Y H:i:s'
)
.
' GMT'
;
$this
->
header
[
'Expires'
]
=
gmdate
(
'D, d M Y H:i:s'
,
$_SERVER
[
'REQUEST_TIME'
]
+
$cache
[
1
])
.
' GMT'
;
$this
->
header
[
'Expires'
]
=
gmdate
(
'D, d M Y H:i:s'
,
$_SERVER
[
'REQUEST_TIME'
]
+
$cache
[
1
])
.
' GMT'
;
Cache
::
tag
(
$cache
[
2
])
->
set
(
$cache
[
0
],
[
$data
,
$this
->
header
],
$cache
[
1
]);
Cache
::
tag
(
$cache
[
2
])
->
set
(
$cache
[
0
],
[
$data
,
$this
->
header
],
$cache
[
1
]);
}
}
}
}
...
@@ -206,7 +206,7 @@ class Response
...
@@ -206,7 +206,7 @@ class Response
throw
new
\InvalidArgumentException
(
sprintf
(
'variable type error: %s'
,
gettype
(
$content
)));
throw
new
\InvalidArgumentException
(
sprintf
(
'variable type error: %s'
,
gettype
(
$content
)));
}
}
$this
->
content
=
(
string
)
$content
;
$this
->
content
=
(
string
)
$content
;
return
$this
;
return
$this
;
}
}
...
@@ -309,7 +309,7 @@ class Response
...
@@ -309,7 +309,7 @@ class Response
{
{
if
(
null
==
$this
->
content
)
{
if
(
null
==
$this
->
content
)
{
$content
=
$this
->
output
(
$this
->
data
);
$content
=
$this
->
output
(
$this
->
data
);
Log
::
record
(
"response msg:"
.
$content
);
if
(
null
!==
$content
&&
!
is_string
(
$content
)
&&
!
is_numeric
(
$content
)
&&
!
is_callable
([
if
(
null
!==
$content
&&
!
is_string
(
$content
)
&&
!
is_numeric
(
$content
)
&&
!
is_callable
([
$content
,
$content
,
'__toString'
,
'__toString'
,
...
@@ -318,7 +318,7 @@ class Response
...
@@ -318,7 +318,7 @@ class Response
throw
new
\InvalidArgumentException
(
sprintf
(
'variable type error: %s'
,
gettype
(
$content
)));
throw
new
\InvalidArgumentException
(
sprintf
(
'variable type error: %s'
,
gettype
(
$content
)));
}
}
$this
->
content
=
(
string
)
$content
;
$this
->
content
=
(
string
)
$content
;
}
}
return
$this
->
content
;
return
$this
->
content
;
}
}
...
...
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