|
@@ -24,10 +24,10 @@ class IndexController extends LoveBaseController
|
|
|
{
|
|
|
public function index()
|
|
|
{
|
|
|
- $user_id = cmf_get_current_user_id();
|
|
|
- $user = UserModel::get($user_id);
|
|
|
- $matting = UserMatingModel::where('user_id', $user_id)->find();
|
|
|
- $where = [
|
|
|
+ $user_id = cmf_get_current_user_id();
|
|
|
+ $user = UserModel::get($user_id);
|
|
|
+ $matting = UserMatingModel::where('user_id', $user_id)->find();
|
|
|
+ $where = [
|
|
|
['user_type', '=', 2],
|
|
|
['check_status', '=', 2],
|
|
|
['is_complete', '=', 1],
|
|
@@ -44,13 +44,13 @@ class IndexController extends LoveBaseController
|
|
|
if (!empty($matting['min_age'])) {
|
|
|
$age_end = strtotime("-{$matting['min_age']} year");
|
|
|
}
|
|
|
- $where[] = ['birthday', 'between', [$age_start, $age_end]];
|
|
|
+ $where[] = ['birthday', 'between', [$age_start, $age_end]];
|
|
|
//身高
|
|
|
$max_high = 200;
|
|
|
if (!empty($matting['max_high'])) {
|
|
|
$max_high = $matting['max_high'];
|
|
|
}
|
|
|
- $where[] = ['high', 'between', [$matting['min_high'], $max_high]];
|
|
|
+ $where[] = ['high', 'between', [$matting['min_high'], $max_high]];
|
|
|
//体重
|
|
|
$max_weight = 200;
|
|
|
if (!empty($matting['max_weight'])) {
|
|
@@ -83,14 +83,16 @@ class IndexController extends LoveBaseController
|
|
|
$this->assign('unread_num', $unread_num + $invite_num);
|
|
|
|
|
|
//配对播报
|
|
|
- $select = UserSelectLogModel::with(['user1','user2'])->order('id desc')->limit(3)->select();
|
|
|
+ /*$select = UserSelectLogModel::with(['user1','user2'])->order('id desc')->limit(3)->select();
|
|
|
if (!empty($select)) {
|
|
|
foreach ($select as $v) {
|
|
|
$v['name1'] = Fun::getEncodeName($v['user1']['realname']);
|
|
|
$v['name2'] = Fun::getEncodeName($v['user2']['realname']);
|
|
|
}
|
|
|
}
|
|
|
- $this->assign('select',json_encode($select));
|
|
|
+ $this->assign('select',json_encode($select));*/
|
|
|
+ $select_count = UserSelectLogModel::useGlobalScope(false)->count();
|
|
|
+ $this->assign('select_count', $select_count + 4);
|
|
|
|
|
|
return $this->fetch(':index');
|
|
|
}
|