|
@@ -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');
|
|
|
- if (!in_array($type, [1, 2, 3])) {
|
|
|
- $this->error('您的网络开小差了');
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- $map = [
|
|
|
- 'status' =>1,
|
|
|
- 'gender' => $this->auth->gender == 1 ? 0 : 1,
|
|
|
-
|
|
|
- 'is_livebc' => 0,
|
|
|
- 'is_active' => 1,
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- '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() {
|