|
@@ -439,6 +439,50 @@ class User extends Api
|
|
|
$this->success('success',$check);
|
|
|
}
|
|
|
|
|
|
+ //申请私密视频
|
|
|
+ public function apply_secretvideo(){
|
|
|
+ $secretvideo = input('secretvideo','');
|
|
|
+
|
|
|
+ if(empty($secretvideo)){
|
|
|
+ $this->error();
|
|
|
+ }
|
|
|
+
|
|
|
+ Db::startTrans();
|
|
|
+ $check = Db::name('user_secretvideo')->where('user_id',$this->auth->id)->lock(true)->find();
|
|
|
+ if(!empty($check)){
|
|
|
+ if($check['status'] == 0){
|
|
|
+ Db::rollback();
|
|
|
+ $this->error('您已经提交私密视频,请等待审核');
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ $data = [
|
|
|
+ 'user_id' => $this->auth->id,
|
|
|
+ 'secretvideo' => $secretvideo,
|
|
|
+ 'status' => 0,
|
|
|
+ 'createtime' => time(),
|
|
|
+ 'updatetime' => time(),
|
|
|
+ 'audittime' => 0,
|
|
|
+ 'auditremark' => '',
|
|
|
+ ];
|
|
|
+
|
|
|
+ //更新
|
|
|
+ $update_rs = Db::name('user')->where('id',$this->auth->id)->update(['secretvideo_status'=>0]);
|
|
|
+ if(!empty($check)){
|
|
|
+ $rs = Db::name('user_secretvideo')->where('id',$check['id'])->update($data);
|
|
|
+ }else{
|
|
|
+ $rs = Db::name('user_secretvideo')->insertGetId($data);
|
|
|
+ }
|
|
|
+
|
|
|
+ if(!$rs || !$update_rs){
|
|
|
+ Db::rollback();
|
|
|
+ $this->error('提交失败');
|
|
|
+ }
|
|
|
+
|
|
|
+ Db::commit();
|
|
|
+ $this->success('提交成功,请等待审核');
|
|
|
+ }
|
|
|
+
|
|
|
//申请实名认证
|
|
|
public function apply_idcard_confirm(){
|
|
|
$truename = input('truename','');
|
|
@@ -531,7 +575,7 @@ class User extends Api
|
|
|
*/
|
|
|
public function profile()
|
|
|
{
|
|
|
- $field_array = ['nickname','introcode','gender','birthday','height','weight','bio','audio_bio','avatar','photo_images','education_id','hobby_ids','job_id','marital_id','tag_ids','wages_id','hometown_cityid','hide_is_finishinfo'];
|
|
|
+ $field_array = ['nickname','introcode','gender','birthday','height','weight','bio','audio_bio','avatar','photo_images','education_id','hobby_ids','job_id','marital_id','tag_ids','wages_id','hometown_cityid','hide_is_finishinfo','wechat_account'];
|
|
|
|
|
|
$data = [];
|
|
|
foreach($field_array as $key => $field){
|