|
@@ -12,7 +12,49 @@ class Match extends Api
|
|
|
protected $noNeedLogin = ['*'];
|
|
|
protected $noNeedRight = ['*'];
|
|
|
|
|
|
+ //视频通话记录
|
|
|
+ public function video_log(){
|
|
|
+ if($this->auth->gender == 0){
|
|
|
+ $list = Db::name('user_match_video_log')->alias('log')
|
|
|
+ ->field('log.id,log.user_id as the_user_id,log.call_minutes,log.createtime,user.avatar,user.nickname')
|
|
|
+ ->join('user','log.user_id = user.id','LEFT')
|
|
|
+ ->where('log.to_user_id' , $this->auth->id)
|
|
|
+ ->order('log.id desc')->autopage()->select();
|
|
|
+
|
|
|
+ }else{
|
|
|
+ $list = Db::name('user_match_video_log')->alias('log')
|
|
|
+ ->field('log.id,log.to_user_id as the_user_id,log.call_minutes,log.createtime,user.avatar,user.nickname')
|
|
|
+ ->join('user','log.to_user_id = user.id','LEFT')
|
|
|
+ ->where('log.user_id' , $this->auth->id)
|
|
|
+ ->order('log.id desc')->autopage()->select();
|
|
|
+ }
|
|
|
+
|
|
|
+ $list = list_domain_image($list,['avatar']);
|
|
|
+ $this->success(1,$list);
|
|
|
+ }
|
|
|
+
|
|
|
+ //语音通话记录
|
|
|
+ public function audio_log(){
|
|
|
+ if($this->auth->gender == 0){
|
|
|
+ $list = Db::name('user_match_audio_log')->alias('log')
|
|
|
+ ->field('log.id,log.user_id as the_user_id,log.call_minutes,log.createtime,user.avatar,user.nickname')
|
|
|
+ ->join('user','log.user_id = user.id','LEFT')
|
|
|
+ ->where('log.to_user_id' , $this->auth->id)
|
|
|
+ ->order('log.id desc')->autopage()->select();
|
|
|
+
|
|
|
+ }else{
|
|
|
+ $list = Db::name('user_match_audio_log')->alias('log')
|
|
|
+ ->field('log.id,log.to_user_id as the_user_id,log.call_minutes,log.createtime,user.avatar,user.nickname')
|
|
|
+ ->join('user','log.to_user_id = user.id','LEFT')
|
|
|
+ ->where('log.user_id' , $this->auth->id)
|
|
|
+ ->order('log.id desc')->autopage()->select();
|
|
|
+ }
|
|
|
+
|
|
|
+ $list = list_domain_image($list,['avatar']);
|
|
|
+ $this->success(1,$list);
|
|
|
+ }
|
|
|
|
|
|
+ //语音通话记录
|
|
|
|
|
|
//视频通话每分钟调用一次
|
|
|
public function video_onemin(){
|