Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
L
laravelzh
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
冯超鹏
laravelzh
Commits
d01a7606
Commit
d01a7606
authored
Oct 08, 2020
by
冯超鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
密码操作
parent
652e0939
Pipeline
#144
canceled with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
UinappHomeController.php
app/Http/Controllers/UinappHomeController.php
+11
-0
api.php
routes/api.php
+1
-0
No files found.
app/Http/Controllers/UinappHomeController.php
View file @
d01a7606
...
...
@@ -120,6 +120,17 @@ class UinappHomeController extends Controller
}
}
public
function
ispassword
(
Request
$request
){
$password
=
$request
->
input
(
'password'
);
$isemail
=
$request
->
input
(
'email'
);
$data
=
DB
::
table
(
'users'
)
->
where
(
'email'
,
'='
,
$isemail
)
->
update
([
'password'
=>
$password
]);
if
(
$data
!==
false
){
return
$this
->
jsonSuccessData
(
1
);
}
else
{
return
$this
->
jsonSuccessData
(
2
);
}
}
//监测是否是汉子
private
function
isKanji
(
$str
)
{
...
...
routes/api.php
View file @
d01a7606
...
...
@@ -18,6 +18,7 @@ use \App\Laravue\JsonResponse;
Route
::
post
(
'auth/login'
,
'AuthController@login'
);
Route
::
post
(
'auth/userslogin'
,
'AuthController@userslogin'
);
//用户登入接口
Route
::
post
(
'huinapphome/isemail'
,
'UinappHomeController@isemail'
);
//邮箱验证
Route
::
post
(
'huinapphome/ispassword'
,
'UinappHomeController@ispassword'
);
//密码更改
Route
::
group
([
'middleware'
=>
'auth:api'
],
function
()
{
Route
::
get
(
'auth/user'
,
'AuthController@user'
);
Route
::
post
(
'auth/logout'
,
'AuthController@logout'
);
...
...
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