Commit d01a7606 authored by 冯超鹏's avatar 冯超鹏

密码操作

parent 652e0939
Pipeline #144 canceled with stages
...@@ -120,6 +120,17 @@ class UinappHomeController extends Controller ...@@ -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) private function isKanji($str)
{ {
......
...@@ -18,6 +18,7 @@ use \App\Laravue\JsonResponse; ...@@ -18,6 +18,7 @@ use \App\Laravue\JsonResponse;
Route::post('auth/login', 'AuthController@login'); Route::post('auth/login', 'AuthController@login');
Route::post('auth/userslogin', 'AuthController@userslogin');//用户登入接口 Route::post('auth/userslogin', 'AuthController@userslogin');//用户登入接口
Route::post('huinapphome/isemail','UinappHomeController@isemail');//邮箱验证 Route::post('huinapphome/isemail','UinappHomeController@isemail');//邮箱验证
Route::post('huinapphome/ispassword','UinappHomeController@ispassword');//密码更改
Route::group(['middleware' => 'auth:api'], function () { Route::group(['middleware' => 'auth:api'], function () {
Route::get('auth/user', 'AuthController@user'); Route::get('auth/user', 'AuthController@user');
Route::post('auth/logout', 'AuthController@logout'); Route::post('auth/logout', 'AuthController@logout');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment