|
@@ -3,11 +3,8 @@
|
|
|
namespace app\api\controller;
|
|
|
|
|
|
use app\common\controller\Api;
|
|
|
-use app\utils\RedisUtil;
|
|
|
use think\Cache;
|
|
|
use think\Db;
|
|
|
-use app\common\model\wallet;
|
|
|
-use Redis;
|
|
|
|
|
|
/**
|
|
|
* 会员中心,不是个人中心
|
|
@@ -527,18 +524,6 @@ class Usercenter extends Api
|
|
|
}
|
|
|
|
|
|
|
|
|
- /**
|
|
|
- * 获取当前用户信息
|
|
|
- */
|
|
|
- public function getMyUserInfo() {
|
|
|
- $userInfo = $this->auth->getUserinfo();
|
|
|
- //当月消费金额
|
|
|
- $user_renew2 = RedisUtil::getInstance('user_renew2',$this->auth->id)->get();
|
|
|
- $userInfo['user_renew2'] = empty($user_renew2)?0:intval($user_renew2);
|
|
|
-
|
|
|
- $this->success("获取成功!",$userInfo);
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
/**
|
|
|
* calc_map_distance() , 根据地图上的两个点各自的x,y坐标,计算出2点之间的直线距离
|
|
@@ -1547,74 +1532,7 @@ $resArray['money'] = $money; //返回给前端的计算结果
|
|
|
$return_data['list'] = $lists;
|
|
|
$this->success('success',$return_data);
|
|
|
}
|
|
|
- //语音视频随聊
|
|
|
- //作废
|
|
|
- public function getrandomuserbak() {
|
|
|
- $type = input('type', 0, 'intval'); //类型:1语音 2视频
|
|
|
- if (!in_array($type, [1, 2, 3])) {
|
|
|
- $this->error('您的网络开小差了');
|
|
|
- }
|
|
|
-
|
|
|
- //找到互关的人,排除
|
|
|
- //$follow_me = Db::name('user_follow')->where('follow_uid',$this->auth->id)->column('uid');
|
|
|
- //dump($follow_me);
|
|
|
- //$my_follow = Db::name('user_follow')->where(['uid'=>$this->auth->id,'follow_uid'=>['IN',$follow_me]])->column('follow_uid');
|
|
|
- //dump($my_follow);exit;
|
|
|
-
|
|
|
- //给出备选用户
|
|
|
- $map = [
|
|
|
- 'status' =>1, //未封禁用户
|
|
|
- 'gender' => $this->auth->gender == 1 ? 0 : 1, //异性
|
|
|
-// 'is_online' => 0, //不在语聊间的
|
|
|
- 'is_livebc' => 0, //不在直播的
|
|
|
- 'is_active' => 1, //在线的
|
|
|
-// 'real_status' => 1, //真人认证
|
|
|
-// 'idcard_status' => 1, //实名认证
|
|
|
- // 'id' => ['NOT IN',$my_follow] //不是好友的
|
|
|
- 'is_kefu' => 0, //不是客服
|
|
|
- ];
|
|
|
- if ($this->auth->gender == 1) {
|
|
|
- $map['real_status|idcard_status'] = 1; //真人认证或实名认证
|
|
|
- }
|
|
|
-
|
|
|
- if ($type == 1) {
|
|
|
- $map['open_match_audio'] = 1;
|
|
|
- } elseif ($type == 2) {
|
|
|
- $map['open_match_video'] = 1;
|
|
|
- }
|
|
|
-
|
|
|
- $lists = Db::name('user')
|
|
|
- ->field('id,nickname,username,avatar')
|
|
|
- ->where($map)
|
|
|
- ->order('is_active desc, active_time desc')
|
|
|
- ->page($this->page,100)
|
|
|
- ->select();
|
|
|
-
|
|
|
- $lists = list_domain_image($lists,['avatar,audio_bio']);
|
|
|
-
|
|
|
- $mt_user_greet_content = Db::name('user_greet_content');
|
|
|
- foreach ($lists as &$v) {
|
|
|
- $info = $mt_user_greet_content->where(['user_id' => $v['id'], 'is_default' => 1])->find();
|
|
|
- if ($info) {
|
|
|
- if ($info['type'] == 0) {
|
|
|
- $v['greet_content'] = $info['content'];
|
|
|
- } elseif ($info['type'] == 1) {
|
|
|
- $v['greet_content'] = '[语音]';
|
|
|
- } elseif ($info['type'] == 2) {
|
|
|
- $v['greet_content'] = '[图片]';
|
|
|
- }
|
|
|
- } else {
|
|
|
- $v['greet_content'] = '';
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- $count = Db::name('user')->where(['is_active' => 1])->count('id');
|
|
|
|
|
|
- $return_data['count'] = config('site.randomuser_num') > 0 ? config('site.randomuser_num') + $count : $count;
|
|
|
- $return_data['list'] = $lists;
|
|
|
-
|
|
|
- $this->success('success',$return_data);
|
|
|
- }
|
|
|
|
|
|
//查询免费体验视频通话用户信息
|
|
|
public function getfreevideouserinfo() {
|