| xqd
@@ -154,6 +154,14 @@ class HomeService
|
|
|
$photo = array();
|
|
|
}
|
|
|
$distance = GetDistance($user->latitude,$user->longitude,$userinfo->latitude,$userinfo->longitude);
|
|
|
+
|
|
|
+
|
|
|
+ if(Redis::get(ApiEnum::GET_WEIXIN.$user_id.'_'.$user->id)){
|
|
|
+ $get_weixin = 1;
|
|
|
+ }else{
|
|
|
+ $get_weixin = 0;
|
|
|
+ }
|
|
|
+
|
|
|
}else{
|
|
|
//查询是否阅后即焚
|
|
|
if(count($photo)>0){
|
| xqd
@@ -166,6 +174,7 @@ class HomeService
|
|
|
$photo = array();
|
|
|
}
|
|
|
$distance = 0;
|
|
|
+ $get_weixin = 0;
|
|
|
}
|
|
|
|
|
|
|
| xqd
@@ -196,6 +205,7 @@ class HomeService
|
|
|
$userinfo->distance = $distance;
|
|
|
|
|
|
$userinfo->see_user_num = UserVipLimit::query()->where('user_id',$user->id)->value("user_detail");
|
|
|
+ $userinfo->get_weixin = $get_weixin;
|
|
|
return $userinfo;
|
|
|
}
|
|
|
|
| xqd
@@ -268,7 +278,6 @@ class HomeService
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if(empty($user_id)){
|
|
|
throw new Exception('参数错误');
|
|
|
}
|
| xqd
@@ -278,6 +287,9 @@ class HomeService
|
|
|
}
|
|
|
|
|
|
$weixin = UserInfoModel::query()->where('user_id',$user_id)->value('weixin');
|
|
|
+ if(!Redis::get(ApiEnum::GET_WEIXIN.$user_id.'_'.$user->id)){
|
|
|
+ Redis::setex(ApiEnum::GET_WEIXIN.$user_id.'_'.$user->id,86400*180,$weixin);
|
|
|
+ }
|
|
|
return $weixin;
|
|
|
}
|
|
|
|