|
@@ -161,6 +161,27 @@ class User Extends Model
|
|
|
}
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
+ * 提交用户资料审核
|
|
|
+ */
|
|
|
+ public static function InfoSubmitAudit($user_id,$data){
|
|
|
+ $userData = UserData::where('user_id',$user_id)->order('id desc')->limit(1)->find();
|
|
|
+ if ($userData && $userData['audit']!=2){
|
|
|
+ if (UserData::where('id',$userData['id'])->update($data)){
|
|
|
+ return Common::return_success('提交成功');
|
|
|
+ }else{
|
|
|
+ return Common::return_error('提交失败');
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ $data['user_id'] = $user_id;
|
|
|
+ if (UserData::create($data)){
|
|
|
+ return Common::return_success('提交成功');
|
|
|
+ }else{
|
|
|
+ return Common::return_error('提交失败');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 编辑用户资料
|