实名认证优化
This commit is contained in:
@@ -117,10 +117,6 @@ class Guild extends Model
|
||||
*/
|
||||
public function join_guild_apply($guild_id,$user_id=0)
|
||||
{
|
||||
// $user_info = model('User')->get_user_info($user_id);
|
||||
// if(!$user_info){
|
||||
// return ['code' => 0, 'msg' => '参数错误', 'data' => null];
|
||||
// }
|
||||
//查询是否实名认证
|
||||
$is_real = model('api/UserData')->real_name_info($user_id);
|
||||
if($is_real['code']==0){
|
||||
|
||||
@@ -462,7 +462,7 @@ class Tasks extends Model
|
||||
//领取每日任务奖励
|
||||
public function daily_tasks_receive($user_id,$task_id,$student_id = 0){
|
||||
//查询是否实名认证
|
||||
$mobile = db::name('user')->where(['id' => $user_id,'status'=>1])->value('mobile');
|
||||
$mobile = db::name('user')->where(['id' => $user_id])->value('mobile');
|
||||
$is_real = db::name('user_auth')->where('mobile' , $mobile)->field('real_name,card_id,is_real,mobile')->find();
|
||||
if(empty($is_real)){
|
||||
return ['code' => 0, 'msg' => '请先实名认证','data' => null];
|
||||
|
||||
@@ -422,7 +422,7 @@ class UserData extends Model
|
||||
//实名认证后的信息
|
||||
public function real_name_info($user_id)
|
||||
{
|
||||
$mobile = db::name('user')->where(['id' => $user_id,'status'=>1])->value('mobile');
|
||||
$mobile = db::name('user')->where(['id' => $user_id])->value('mobile');
|
||||
$data = db::name('user_auth')->where('mobile' , $mobile)->field('real_name,card_id,is_real,mobile')->find();
|
||||
if(!$data){
|
||||
return ['code' => 0, 'msg' => '未实名','data' =>null];
|
||||
|
||||
Reference in New Issue
Block a user