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
7d6f21bb
Commit
7d6f21bb
authored
Jun 15, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
db9083ce
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
Register.php
application/api/controller/Register.php
+4
-1
RegisterValidate.php
application/api/validate/RegisterValidate.php
+1
-4
No files found.
application/api/controller/Register.php
View file @
7d6f21bb
...
...
@@ -37,10 +37,13 @@ class Register extends Basic
public
function
registerSendCode
()
{
$params
=
$this
->
params
;
/*
$params = array(
/*
$params = array(
"phone" => "13817616471",
"device_id" => "86280603569236"
);*/
if
(
!
isset
(
$params
[
"phone"
])){
return
$this
->
response
(
"101"
,
"手机号为必填字段"
);
}
$checkResult
=
$this
->
validate
(
$params
,
"RegisterValidate.verify"
);
if
(
true
!==
$checkResult
)
{
return
$this
->
response
(
"101"
,
$checkResult
);
...
...
application/api/validate/RegisterValidate.php
View file @
7d6f21bb
...
...
@@ -17,15 +17,12 @@ class RegisterValidate extends Validate
'wx_union_id'
=>
'require|length:10,50'
,
'code'
=>
'require|number'
,
'device_id'
=>
'require'
,
// require|number|regex:(1[3-8])[0-9]{9}|unique:user|length:11
'phone'
=>
'require|regex:((13[0-9])|(14[0-9])|(15[0-9])|(18[0-9])|(16[0-9])|(17[0-9])|(19[0-9]))\\d{8}'
,
'phone'
=>
[
'regex'
=>
'/^((13[0-9])|(14[0-9])|(15[0-9])|(18[0-9])|(16[0-9])|(17[0-9])|(19[0-9]))\\d{8}$/i'
],
];
protected
$message
=
[
'wx_union_id.require'
=>
'微信union_id不能为空'
,
'wx_union_id.length:10,50'
=>
'微信union_id错误'
,
'phone.require'
=>
'手机号不能为空'
,
'phone.regex'
=>
'手机号格式不正确'
,
'device_id.require'
=>
'设备id不能为空'
,
'code.require'
=>
'code为必填字段'
,
...
...
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