Merge branch 'master' into develop
This commit is contained in:
@@ -47,17 +47,17 @@ class AreaController
|
||||
{
|
||||
$list = RedisHelper::get("rpc_country");
|
||||
$list = null;
|
||||
if(!$list){
|
||||
$res = HttpClient::get(config('const.rpc_domain') . '/country/all');
|
||||
if ($res['code'] != 200 && $res['data']['code'] != 0){
|
||||
Log::info('register_rpc',$res);
|
||||
return Util::fail($res, trans('register_fail'));
|
||||
}
|
||||
$list = $res['data']['data']['data'];
|
||||
RedisHelper::set("rpc_country", $list, 600);
|
||||
}
|
||||
// if(!$list){
|
||||
// $res = HttpClient::get(config('const.rpc_domain') . '/country/all');
|
||||
// if ($res['code'] != 200 && $res['data']['code'] != 0){
|
||||
// Log::info('register_rpc',$res);
|
||||
// return Util::fail($res, trans('register_fail'));
|
||||
// }
|
||||
// $list = $res['data']['data']['data'];
|
||||
// RedisHelper::set("rpc_country", $list, 600);
|
||||
// }
|
||||
|
||||
// $list = Country::get()->toArray();
|
||||
$list = Country::get()->toArray();
|
||||
$language = 'en_addr';
|
||||
if($request->user['language'] == 'zh_CN'){
|
||||
$language = 'cn_addr';
|
||||
|
||||
@@ -123,10 +123,13 @@ class FollowController
|
||||
if(Util::isEmpty($type)){
|
||||
return Util::fail([],'type'.trans('not_null'));
|
||||
}
|
||||
$picture = Util::getParam($request,'picture');
|
||||
if(Util::isEmpty($picture)){
|
||||
return Util::fail([],trans('picture_not_null'));
|
||||
}
|
||||
|
||||
$picture = Util::getParam($request,'picture');
|
||||
$audio_text = Util::getParam($request,'audio_text');
|
||||
$remark = Util::getParam($request,'remark');
|
||||
if(Util::isEmpty($picture) && Util::isEmpty($audio_text) && Util::isEmpty($remark)){
|
||||
return Util::fail([],trans('follow_not_null'));
|
||||
}
|
||||
|
||||
$data = [
|
||||
'user_id'=>$request->user['id'],
|
||||
|
||||
@@ -47,11 +47,12 @@ class UserController
|
||||
$userPassword = $user['password'];
|
||||
|
||||
//加密
|
||||
$hashedPassword = password_hash($password, PASSWORD_DEFAULT);
|
||||
// $hashedPassword = password_hash($password, PASSWORD_DEFAULT);
|
||||
|
||||
//验证密码
|
||||
// if (!password_verify($userPassword, $hashedPassword)) {
|
||||
if ($userPassword == $hashedPassword) {
|
||||
// if ($userPassword == $hashedPassword) {
|
||||
if (!password_verify($password, $userPassword)) {
|
||||
locale($language);
|
||||
return Util::fail([], trans('password_error'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user