linwu hai 9 meses
pai
achega
3b056e6b9b
Modificáronse 32 ficheiros con 2481 adicións e 52 borrados
  1. 2 0
      app/love/controller/MyController.php
  2. 10 0
      app/love/controller/RegisterController.php
  3. 8 3
      app/love/controller/UserwallController.php
  4. 27 0
      app/love/model/UserFollowModel.php
  5. 3 1
      app/love/model/UserMatingModel.php
  6. 6 0
      app/love/model/UserModel.php
  7. 16 4
      app/matchmaker/controller/AdminMatchmakerUserController.php
  8. 56 4
      app/matchmaker/controller/MyController.php
  9. 188 0
      app/matchmaker/controller/RegisterController.php
  10. 186 6
      app/matchmaker/controller/UserController.php
  11. 85 25
      app/user/controller/AdminIndexController.php
  12. 29 0
      public/themes/admin_simpleboot3/matchmaker/admin_matchmaker_user/index.html
  13. 16 0
      public/themes/admin_simpleboot3/matchmaker/admin_matchmaker_user/show.html
  14. 23 0
      public/themes/admin_simpleboot3/user/admin_index/follow.html
  15. 96 2
      public/themes/admin_simpleboot3/user/admin_index/index.html
  16. 16 0
      public/themes/admin_simpleboot3/user/admin_index/show.html
  17. 67 0
      public/themes/simpleboot3/love/my/cond.html
  18. 82 1
      public/themes/simpleboot3/love/my/profile.html
  19. 68 0
      public/themes/simpleboot3/love/register/cond.html
  20. 52 0
      public/themes/simpleboot3/love/register/profile.html
  21. 4 0
      public/themes/simpleboot3/love/userwall/detail.html
  22. 54 3
      public/themes/simpleboot3/matchmaker/index/index.html
  23. 31 1
      public/themes/simpleboot3/matchmaker/my/index.html
  24. 191 0
      public/themes/simpleboot3/matchmaker/my/statistics.html
  25. 33 0
      public/themes/simpleboot3/matchmaker/register/info.html
  26. 606 0
      public/themes/simpleboot3/matchmaker/register/info_add.html
  27. 461 0
      public/themes/simpleboot3/matchmaker/register/mating_add.html
  28. 13 2
      public/themes/simpleboot3/matchmaker/user/match.html
  29. 29 0
      public/themes/simpleboot3/matchmaker/user/mating_add.html
  30. 23 0
      public/themes/simpleboot3/matchmaker/user/mating_edit.html
  31. BIN=BIN
      public/themes/simpleboot3/public/assets/images/matchmaker/myIcon4.png
  32. BIN=BIN
      public/themes/simpleboot3/public/assets/images/matchmaker/myIcon5.png

+ 2 - 0
app/love/controller/MyController.php

@@ -138,6 +138,7 @@ class MyController extends LoveBaseController
             'family'    => Constant::FAMILY,
             'id_type'   => Constant::ID_TYPE,
             'tinyint'   => Constant::TINYINT,
+            'animal'    => Constant::ANIMAL,
         ];
         foreach ($data as &$v) {
             $v = json_encode($v);
@@ -183,6 +184,7 @@ class MyController extends LoveBaseController
             'smoke'      => Constant::MATTING_SMOKING,
             'drink'      => Constant::MATTING_DRINK,
             'tinyint'    => Constant::COND_TINYINT,
+            'animal'     => Constant::ANIMAL,
         ];
         foreach ($data as &$v) {
             $v = json_encode($v);

+ 10 - 0
app/love/controller/RegisterController.php

@@ -191,7 +191,12 @@ class RegisterController extends HomeBaseController
             $value                  = $this->request->post();
             $value['user_nickname'] = $value['realname'];
             $value['birthday']      = strtotime($value['birthday']);
+            $value['want_status']   = 2;
             UserModel::update($value, ['id' => cmf_get_current_user_id()]);
+            $mating = UserMatingModel::get(['user_id' => cmf_get_current_user_id()]);
+            if (empty($mating)) {
+                UserMatingModel::create(['user_id' => cmf_get_current_user_id(), 'animal' => []]);
+            }
             $this->success('');
         } else {
             $user             = UserModel::get(cmf_get_current_user_id());
@@ -211,6 +216,7 @@ class RegisterController extends HomeBaseController
                 'family'    => Constant::FAMILY,
                 'id_type'   => Constant::ID_TYPE,
                 'tinyint'   => Constant::TINYINT,
+                'animal'    => Constant::ANIMAL,
             ];
             foreach ($data as &$v) {
                 $v = json_encode($v);
@@ -236,6 +242,9 @@ class RegisterController extends HomeBaseController
             $this->success('操作成功');
         } else {
             $mating = UserMatingModel::get(['user_id' => cmf_get_current_user_id()]);
+            if (empty($mating['animal'])) {
+                $mating['animal'] = [];
+            }
             $this->assign('mating', $mating);
 
             $education   = Constant::EDUCATION;
@@ -254,6 +263,7 @@ class RegisterController extends HomeBaseController
                 'smoke'      => Constant::MATTING_SMOKING,
                 'drink'      => Constant::MATTING_DRINK,
                 'tinyint'    => Constant::COND_TINYINT,
+                'animal'     => Constant::ANIMAL,
             ];
             foreach ($data as &$v) {
                 $v = json_encode($v);

+ 8 - 3
app/love/controller/UserwallController.php

@@ -128,9 +128,10 @@ class UserwallController extends LoveBaseController
         $user->star++;
         $user->save();
         $user['age'] = Fun::getAgeByBirth($user['birthday']);
-        $user['have_house'] = Constant::COND_TINYINT[$user['have_house']];
-        $user['have_car'] = Constant::COND_TINYINT[$user['have_car']];
-        $user['with_parent_live'] = Constant::COND_TINYINT[$user['with_parent_live']];
+        $user['have_house'] = Constant::TINYINT[$user['have_house']];
+        $user['have_car'] = Constant::TINYINT[$user['have_car']];
+        $user['with_parent_live'] = Constant::TINYINT[$user['with_parent_live']];
+        $user['want_birth'] = Constant::TINYINT[$user['want_birth']];
         $user['sex_text'] = $user['sex_text'];
         if (empty($user['more'])) {
             $user['more'] = [];
@@ -142,6 +143,10 @@ class UserwallController extends LoveBaseController
         $mating['have_house'] = Constant::COND_TINYINT[$mating['have_house']];
         $mating['have_car'] = Constant::COND_TINYINT[$mating['have_car']];
         $mating['with_parent_live'] = Constant::COND_TINYINT[$mating['with_parent_live']];
+        $mating['want_birth'] = Constant::COND_TINYINT[$mating['want_birth']];
+        if (empty($mating['animal'])) {
+            $mating['animal'] = [];
+        }
         $this->assign('mating', $mating);
 
         //礼物列表

+ 27 - 0
app/love/model/UserFollowModel.php

@@ -0,0 +1,27 @@
+<?php
+// +----------------------------------------------------------------------
+// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2013-2019 http://www.thinkcmf.com All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: 老猫 <thinkcmf@126.com>
+// +----------------------------------------------------------------------
+namespace app\love\model;
+
+use think\Model;
+
+class UserFollowModel extends Model
+{
+
+    public function getCreateTimeAttr($value)
+    {
+        if (empty($value)) {
+            return '';
+        } else {
+            return date('Y-m-d H:i:s',$value);
+        }
+    }
+
+}

+ 3 - 1
app/love/model/UserMatingModel.php

@@ -14,5 +14,7 @@ use think\Model;
 
 class UserMatingModel extends Model
 {
-
+    protected $type = [
+        'animal' => 'array',
+    ];
 }

+ 6 - 0
app/love/model/UserModel.php

@@ -25,4 +25,10 @@ class UserModel extends Model
         $sex = ['保密', '男', '女'];
         return $sex[$data['sex']];
     }
+
+    public function getStatusTextAttr($value, $data)
+    {
+        $arr = ['','单身不愿意推荐', '单身愿意推荐', '热恋','已婚'];
+        return $arr[$data['status']];
+    }
 }

+ 16 - 4
app/matchmaker/controller/AdminMatchmakerUserController.php

@@ -33,6 +33,11 @@ class AdminMatchmakerUserController extends AdminBaseController
             $where[] = ['mobile', 'like', "%{$data['mobile']}%"];
         }
 
+        if (!empty($data['status'])) {
+            $where[] = ['status', '=', $data['status']];
+        }
+        $this->assign('status', $data['status'] ?? 0);
+
         $count = MatchmakerUserModel::with('matchmaker')
             ->where($where)
             ->count();
@@ -66,10 +71,11 @@ class AdminMatchmakerUserController extends AdminBaseController
 
         //获取信息
         $info                     = MatchmakerUserModel::get($id, ['matchmaker']);
-        $info['family_text']           = $info['family'] ? implode(',', $info['family']) : '未填写';
-        $info['have_house']       = Constant::COND_TINYINT[$info['have_house']];
-        $info['have_car']         = Constant::COND_TINYINT[$info['have_car']];
-        $info['with_parent_live'] = Constant::COND_TINYINT[$info['with_parent_live']];
+        $info['family_text']      = $info['family'] ? implode(',', $info['family']) : '未填写';
+        $info['have_house']       = Constant::TINYINT[$info['have_house']];
+        $info['have_car']         = Constant::TINYINT[$info['have_car']];
+        $info['with_parent_live'] = Constant::TINYINT[$info['with_parent_live']];
+        $info['want_birth']       = Constant::TINYINT[$info['want_birth']];
         if (empty($info)) {
             $this->error(lang('信息不存在或已删除'));
         }
@@ -79,6 +85,12 @@ class AdminMatchmakerUserController extends AdminBaseController
         $mating['have_house']       = Constant::COND_TINYINT[$mating['have_house']];
         $mating['have_car']         = Constant::COND_TINYINT[$mating['have_car']];
         $mating['with_parent_live'] = Constant::COND_TINYINT[$mating['with_parent_live']];
+        $mating['want_birth']       = Constant::COND_TINYINT[$mating['want_birth']];
+        if (empty($mating)) {
+            $mating['animal_text'] = '';
+        } else {
+            $mating['animal_text'] = implode(',', $mating['animal']);
+        }
         $this->assign('mating', $mating);
 
         return $this->fetch();

+ 56 - 4
app/matchmaker/controller/MyController.php

@@ -11,23 +11,24 @@
 namespace app\matchmaker\controller;
 
 use app\matchmaker\model\MatchmakerModel;
+use app\matchmaker\model\MatchmakerUserModel;
 
 class MyController extends MatchmakerBaseController
 {
     public function index()
     {
-        $data['matchmaker'] = $this->matchmaker;
+        $data['matchmaker']           = $this->matchmaker;
         $data['matchmaker']['avatar'] = cmf_get_image_url($data['matchmaker']['avatar']);
 
-        return $this->fetch('',$data);
+        return $this->fetch('', $data);
     }
 
     public function info()
     {
-        $data['matchmaker'] = $this->matchmaker;
+        $data['matchmaker']           = $this->matchmaker;
         $data['matchmaker']['avatar'] = cmf_get_image_url($data['matchmaker']['avatar']);
 
-        return $this->fetch('',$data);
+        return $this->fetch('', $data);
     }
 
     public function infoPost()
@@ -38,4 +39,55 @@ class MyController extends MatchmakerBaseController
 
         $this->success();
     }
+
+    public function statistics()
+    {
+        $data          = [];
+        $data['total']   = MatchmakerUserModel::where('matchmaker_id', $this->matchmaker->id)
+            ->count();
+        $data['sex_man']   = MatchmakerUserModel::where('matchmaker_id', $this->matchmaker->id)
+            ->where('sex', 1)
+            ->count();
+        $data['sex_woman'] = MatchmakerUserModel::where('matchmaker_id', $this->matchmaker->id)
+            ->where('sex', 2)
+            ->count();
+        $data['education_bkyx'] = MatchmakerUserModel::where('matchmaker_id', $this->matchmaker->id)
+            ->where('education', '本科以下')
+            ->count();
+        $data['education_bk'] = MatchmakerUserModel::where('matchmaker_id', $this->matchmaker->id)
+            ->where('education', '本科')
+            ->count();
+        $data['education_ss'] = MatchmakerUserModel::where('matchmaker_id', $this->matchmaker->id)
+            ->where('education', '硕士')
+            ->count();
+        $data['education_bs'] = MatchmakerUserModel::where('matchmaker_id', $this->matchmaker->id)
+            ->where('education', '博士')
+            ->count();
+        $data['marry_wh'] = MatchmakerUserModel::where('matchmaker_id', $this->matchmaker->id)
+            ->where('marry', '未婚')
+            ->count();
+        $data['marry_lh'] = MatchmakerUserModel::where('matchmaker_id', $this->matchmaker->id)
+            ->where('marry', '离婚')
+            ->count();
+        $data['marry_so'] = MatchmakerUserModel::where('matchmaker_id', $this->matchmaker->id)
+            ->where('marry', '丧偶')
+            ->count();
+        $data['status_1'] = MatchmakerUserModel::where('matchmaker_id', $this->matchmaker->id)
+            ->where('status', 1)
+            ->count();
+        $data['status_2'] = MatchmakerUserModel::where('matchmaker_id', $this->matchmaker->id)
+            ->where('status', 2)
+            ->count();
+        $data['status_3'] = MatchmakerUserModel::where('matchmaker_id', $this->matchmaker->id)
+            ->where('status', 3)
+            ->count();
+        $data['status_4'] = MatchmakerUserModel::where('matchmaker_id', $this->matchmaker->id)
+            ->where('status', 4)
+            ->count();
+        $data['status_5'] = MatchmakerUserModel::where('matchmaker_id', $this->matchmaker->id)
+            ->where('status', 5)
+            ->count();
+
+        return view('',$data);
+    }
 }

+ 188 - 0
app/matchmaker/controller/RegisterController.php

@@ -0,0 +1,188 @@
+<?php
+
+namespace app\matchmaker\controller;
+
+use app\common\Constant;
+use app\matchmaker\model\MatchmakerModel;
+use app\matchmaker\model\MatchmakerUserMatingModel;
+use app\matchmaker\model\MatchmakerUserModel;
+use cmf\controller\HomeBaseController;
+
+class RegisterController extends HomeBaseController
+{
+    /**
+     * 用户登记
+     */
+    public function infoAdd()
+    {
+        $id = $this->request->get('id', 0);
+        if (empty($id)) {
+            $this->error('参数错误');
+        }
+        $matchmaker = MatchmakerModel::get($id);
+        if (empty($matchmaker)) {
+            $this->error('红娘不存在');
+        }
+        $data = [
+            'sex'       => Constant::SEX_MATCHMAKER,
+            'marry'     => Constant::MARRY,
+            'high'      => Constant::HIGH,
+            'weight'    => Constant::WEIGHT,
+            'education' => Constant::EDUCATION,
+            'income'    => Constant::INCOME,
+            'nation'    => Constant::NATION,
+            'smoke'     => Constant::SMOKE,
+            'drink'     => Constant::DRINK,
+            'family'    => Constant::FAMILY,
+            'tinyint'   => Constant::TINYINT,
+            'animal'    => Constant::ANIMAL,
+        ];
+        foreach ($data as &$v) {
+            $v = json_encode($v);
+            unset($v);
+        }
+        $data['id'] = $id;
+
+        return $this->fetch('', $data);
+    }
+
+    public function infoAddPost()
+    {
+        $value             = $this->request->post();
+        $value['birthday'] = strtotime($value['birthday']);
+        $check             = MatchmakerUserModel::get(['mobile' => $value['mobile']]);
+        if (!empty($check)) {
+            $this->error('您已填写过,请不要重复填写');
+        }
+        $user = MatchmakerUserModel::create($value);
+        MatchmakerUserMatingModel::create(['user_id' => $user['id'], 'animal' => []]);
+        $this->success('', '', ['id' => $user['id']]);
+    }
+
+    public function matingAdd()
+    {
+        $id = $this->request->param('id');
+        if (empty($id)) {
+            $this->error('参数错误');
+        }
+        $mating = MatchmakerUserMatingModel::get(['user_id' => $id]);
+        if (empty($mating['animal'])) {
+            $mating['animal'] = [];
+        }
+        $this->assign('mating', $mating);
+
+        $education   = Constant::EDUCATION;
+        $education[] = '无要求';
+        $data        = [
+            'min_age'    => Constant::MIN_AGE,
+            'max_age'    => Constant::MAX_AGE,
+            'min_high'   => Constant::MIN_HIGH,
+            'max_high'   => Constant::MAX_HIGH,
+            'min_weight' => Constant::MIN_WEIGHT,
+            'max_weight' => Constant::MAX_WEIGHT,
+            'native'     => Constant::NATIVE,
+            'education'  => $education,
+            'income'     => Constant::COND_INCOME,
+            'smoke'      => Constant::MATTING_SMOKING,
+            'drink'      => Constant::MATTING_DRINK,
+            'tinyint'    => Constant::COND_TINYINT,
+            'animal'     => Constant::ANIMAL,
+        ];
+        foreach ($data as &$v) {
+            $v = json_encode($v);
+            unset($v);
+        }
+
+        return $this->fetch('', $data);
+    }
+
+    public function matingAddPost()
+    {
+        $param = $this->request->post();
+        if (empty($param['animal'])) {
+            $param['animal'] = [];
+        }
+        MatchmakerUserMatingModel::update($param);
+        $this->success('操作成功');
+    }
+
+    public function info()
+    {
+        return view();
+    }
+
+    /**
+     * 图片上传
+     */
+    public function imageUpload()
+    {
+        $file = $this->request->post('file');
+        $ext  = pathinfo($this->request->post('name'))['extension'];
+        if (!in_array($ext, ['jpg', 'jpeg', 'png'])) {
+            $this->error('文件后缀必须为jpg,jpeg,png');
+        }
+
+        if ($file) {
+            //创建目录
+            $upload_dir = WEB_ROOT . 'upload/image';
+            if (!is_dir($upload_dir)) {
+                @mkdir($upload_dir);
+            }
+            $upload_dir = $upload_dir . '/' . date('Ymd');
+            if (!is_dir($upload_dir)) {
+                @mkdir($upload_dir);
+            }
+
+            //保存文件
+            $file_name = $this->_file_name($ext);
+            $file_path = $upload_dir . '/' . $file_name;
+            $is_upload = $this->_base64_image_content($file, $file_path);
+            if (!$is_upload) {
+                $this->error('上传失败,请重新上传');
+            }
+
+            $avatar = cmf_get_user_avatar_url('image' . '/' . date('Ymd') . '/' . $file_name);
+
+            $this->result([
+                'avatar' => $avatar,
+            ], 1);
+        } else {
+            $this->error('请上传文件');
+        }
+    }
+
+    private function _file_name($ext)
+    {
+        //生成随机文件名
+        //定义一个包含大小写字母数字的字符串
+        $chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
+        //把字符串分割成数组
+        $newchars = str_split($chars);
+        //打乱数组
+        shuffle($newchars);
+        //从数组中随机取出15个字符
+        $chars_key = array_rand($newchars, 15);
+        //把取出的字符重新组成字符串
+        $fnstr = '';
+        for ($i = 0; $i < 15; $i++) {
+            $fnstr .= $newchars[$chars_key[$i]];
+        }
+        //输出文件名并做MD5加密
+        return md5($fnstr . microtime(true) * 1000) . '.' . $ext;
+    }
+
+    private function _base64_image_content($base64_image_content, $file_path)
+    {
+        //匹配出图片的格式
+        if (preg_match('/^(data:\s*image\/(\w+);base64,)/', $base64_image_content, $result)) {
+            if (file_put_contents($file_path, base64_decode(str_replace($result[1], '', $base64_image_content)))) {
+                return true;
+            } else {
+                return false;
+            }
+        } else {
+            return false;
+        }
+    }
+
+}

+ 186 - 6
app/matchmaker/controller/UserController.php

@@ -295,8 +295,12 @@ class UserController extends MatchmakerBaseController
      */
     public function match()
     {
-        $id   = $this->request->param('id');
-        $type = $this->request->param('type', 0);
+        $id          = $this->request->param('id');
+        $type        = $this->request->param('type', 0);
+        $match_field = $this->request->param('match_field', '');
+
+        $mating = MatchmakerUserMatingModel::where('user_id', $id)->find();
+        $where  = $this->_matchWhere($match_field, $mating);
         if (empty($id)) {
             $this->error('该用户不存在');
         }
@@ -308,21 +312,27 @@ class UserController extends MatchmakerBaseController
         if ($type == 0) {
             //自有库
             $list = MatchmakerUserModel::where('matchmaker_id', $this->matchmaker->id)
+                ->where($where)
                 ->where('id', '<>', $id)
                 ->where('sex', '<>', $user['sex'] == 1 ? 1 : 2)
+                ->where('status',2)
                 ->append(['sex_text'])
                 ->select();
         } elseif ($type == 1) {
             //其他红娘库
             $list = MatchmakerUserModel::with('matchmaker')
+                ->where($where)
                 ->where('matchmaker_id', '<>', $this->matchmaker->id)
                 ->where('sex', '<>', $user['sex'] == 1 ? 1 : 2)
+                ->where('status',2)
                 ->append(['sex_text'])
                 ->select();
         } else {
             //系统库
             $list = UserModel::where('user_type', 2)
+                ->where($where)
                 ->where('user_status', 1)
+                ->where('want_status',2)
                 ->where('is_complete', 1)
                 ->where('sex', '<>', $user['sex'] == 1 ? 1 : 2)
                 ->append(['sex_text'])
@@ -330,8 +340,7 @@ class UserController extends MatchmakerBaseController
         }
 
 
-        $mating = MatchmakerUserMatingModel::where('user_id', $id)->find();
-        $res    = $this->_orderMatchUser($list->toArray(), $mating);
+        $res = $this->_orderMatchUser($list->toArray(), $mating);
 
         return $this->fetch('', [
             'list'         => json_encode($res),
@@ -339,6 +348,7 @@ class UserController extends MatchmakerBaseController
             'user'         => $user,
             'id'           => $id,
             'mating'       => $mating,
+            'match_field'  => $match_field,
             'tinyint'      => json_encode(Constant::TINYINT),
             'cond_tinyint' => json_encode(Constant::COND_TINYINT),
         ]);
@@ -378,6 +388,154 @@ class UserController extends MatchmakerBaseController
         }
     }
 
+    private function _matchWhere($field, $mating)
+    {
+        $where       = [];
+        $match_field = [];
+        if (!empty($field)) {
+            $match_field = explode(',', $field);
+        }
+
+        //年龄
+        if (in_array('age', $match_field)) {
+            $year = date('Y');
+            if (!empty($mating['min_age'])) {
+                $min_year      = $year - $mating['min_age'];
+                $min_year_time = strtotime(date($min_year . '-m-d H:i:s'));
+                $where[]       = ['birthday', '<', $min_year_time];
+            }
+            if (!empty($mating['max_age'])) {
+                $max_year      = $year - $mating['max_age'];
+                $max_year_time = strtotime(date($max_year . '-m-d H:i:s'));
+                $where[]       = ['birthday', '>', $max_year_time];
+            }
+        }
+
+        //身高
+        if (in_array('high', $match_field)) {
+            if (!empty($mating['min_high'])) {
+                $where[] = ['high', '>', $mating['min_high']];
+            }
+            if (!empty($mating['max_high'])) {
+                $where[] = ['high', '<', $mating['max_high']];
+            }
+        }
+
+        //体重
+        if (in_array('weight', $match_field)) {
+            if (!empty($mating['min_weight'])) {
+                $where[] = ['weight', '>', $mating['min_weight']];
+            }
+            if (!empty($mating['max_weight'])) {
+                $where[] = ['weight', '<', $mating['max_weight']];
+            }
+        }
+
+        //生肖
+        if (in_array('animal', $match_field)) {
+            if (!empty($mating['animal'])) {
+                foreach ($mating['animal'] as $animal) {
+                    $where[] = ['animal', '<>', $animal];
+                }
+            }
+        }
+
+        //籍贯
+        if (in_array('native', $match_field)) {
+            if ($mating['native'] == '晋江籍') {
+                $where[] = ['native', 'like', "%晋江%"];
+            }
+            if ($mating['native'] == '非晋江籍') {
+                $where[] = ['native', 'not like', "%晋江%"];
+            }
+        }
+
+        //学历
+        if (in_array('education', $match_field)) {
+            if ($mating['education'] == '本科') {
+                $where[] = ['education', 'in', ['本科', '硕士', '博士']];
+            }
+            if ($mating['education'] == '硕士') {
+                $where[] = ['education', 'in', ['硕士', '博士']];
+            }
+            if ($mating['education'] == '博士') {
+                $where[] = ['education', '=', '博士'];
+            }
+        }
+
+        //年收入
+        if (in_array('income', $match_field)) {
+            if ($mating['income'] == '5-10万') {
+                $where[] = ['income', 'in', ['5-10万', '10-20万', '20-30万', '30-50万', '50-100万', '100万以上']];
+            }
+            if ($mating['income'] == '10-20万') {
+                $where[] = ['income', 'in', ['10-20万', '20-30万', '30-50万', '50-100万', '100万以上']];
+            }
+            if ($mating['income'] == '20-30万') {
+                $where[] = ['income', 'in', ['20-30万', '30-50万', '50-100万', '100万以上']];
+            }
+            if ($mating['income'] == '30-50万') {
+                $where[] = ['income', 'in', ['30-50万', '50-100万', '100万以上']];
+            }
+            if ($mating['income'] == '50-100万') {
+                $where[] = ['income', 'in', ['50-100万', '100万以上']];
+            }
+            if ($mating['income'] == '100万以上') {
+                $where[] = ['income', '=', '100万以上'];
+            }
+        }
+
+        //是否有房
+        if (in_array('have_house', $match_field)) {
+            if ($mating['have_house'] == 1) {
+                $where[] = ['have_house', '=', 1];
+            }
+        }
+
+        //是否有车
+        if (in_array('have_car', $match_field)) {
+            if ($mating['have_car'] == 1) {
+                $where[] = ['have_car', '=', 1];
+            }
+        }
+
+        //婚后是否愿意与父母同住
+        if (in_array('with_parent_live', $match_field)) {
+            if ($mating['with_parent_live'] == 1) {
+                $where[] = ['with_parent_live', '=', 1];
+            }
+        }
+
+        //是否吸烟
+        if (in_array('smoke', $match_field)) {
+            if ($mating['smoke'] == '接受偶尔') {
+                $where[] = ['smoke', 'in', ['社交时偶尔吸烟', '不吸烟,但不反感', '不吸,很反感']];
+            }
+            if ($mating['smoke'] == '反感') {
+                $where[] = ['smoke', 'in', ['不吸,很反感', '不吸烟,但不反感']];
+            }
+        }
+
+        //是否喝酒
+        if (in_array('drink', $match_field)) {
+            if ($mating['drink'] == '接受偶尔') {
+                $where[] = ['drink', 'in', ['不喝酒', '社交需要喝', '兴致时小酌']];
+            }
+            if ($mating['drink'] == '反感') {
+                $where[] = ['drink', 'in', ['不喝酒']];
+            }
+        }
+
+        //婚后是否愿意与父母同住
+        if (in_array('want_birth', $match_field)) {
+            if ($mating['want_birth'] == 1) {
+                $where[] = ['want_birth', '=', 1];
+            }
+        }
+
+        return $where;
+    }
+
     /**
      * 排序
      */
@@ -446,6 +604,17 @@ class UserController extends MatchmakerBaseController
                 $match_count++;
             }
 
+            //生肖
+            if (empty($mating['animal'])) {
+                $match_arr[] = 'animal';
+                $match_count++;
+            } else {
+                if (!in_array($v['animal'], $mating['animal'])) {
+                    $match_arr[] = 'animal';
+                    $match_count++;
+                }
+            }
+
             //籍贯 ['晋江籍','非晋江籍','无要求']
             if ($mating['native'] == '无要求') {
                 $match_arr[] = 'native';
@@ -552,7 +721,7 @@ class UserController extends MatchmakerBaseController
                 $match_count++;
             }
 
-            //是否吸烟 ['不吸,很反感', '不吸烟,但不反感', '社交时偶尔吸烟','烟不离手']
+            //是否吸烟 ['不反感', '接受偶尔', '反感']
             if ($mating['smoke'] == '不反感' || $mating['smoke'] == '') {
                 $match_arr[] = 'smoke';
                 $match_count++;
@@ -568,7 +737,7 @@ class UserController extends MatchmakerBaseController
                 }
             }
 
-            //是否喝酒 ['不喝酒', '社交需要喝', '兴致时小酌', '酒不离口']
+            //是否喝酒 ['不反感', '接受偶尔', '反感']
             if ($mating['drink'] == '不反感' || $mating['drink'] == '') {
                 $match_arr[] = 'drink';
                 $match_count++;
@@ -584,6 +753,17 @@ class UserController extends MatchmakerBaseController
                 }
             }
 
+            //是否生育
+            if ($mating['want_birth'] != 1) {
+                $match_arr[] = 'want_birth';
+                $match_count++;
+            } else {
+                if ($v['want_birth'] == 1) {
+                    $match_arr[] = 'want_birth';
+                    $match_count++;
+                }
+            }
+
             $list[$k]['age']         = $age;
             $list[$k]['match_arr']   = $match_arr;
             $list[$k]['match_count'] = $match_count;

+ 85 - 25
app/user/controller/AdminIndexController.php

@@ -16,6 +16,7 @@ use app\common\Constant;
 use app\common\Excel;
 use app\common\Fun;
 use app\love\model\ActiveApplyModel;
+use app\love\model\UserFollowModel;
 use app\love\model\UserFriendModel;
 use app\love\model\UserGiftModel;
 use app\love\model\UserInviteModel;
@@ -100,9 +101,13 @@ class AdminIndexController extends AdminBaseController
                 if (!empty($data['check_status'])) {
                     $query->where('check_status', $data['check_status']);
                 }
+
+                if (!empty($data['want_status'])) {
+                    $query->where('want_status', $data['want_status']);
+                }
             })
             ->count();
-        $this->assign('total',$count);
+        $this->assign('total', $count);
 
         $list = Db::name('user')
             ->where(function (Query $query) {
@@ -125,6 +130,10 @@ class AdminIndexController extends AdminBaseController
                 if (!empty($data['check_status'])) {
                     $query->where('check_status', $data['check_status']);
                 }
+
+                if (!empty($data['want_status'])) {
+                    $query->where('want_status', $data['want_status']);
+                }
             })
             ->order("check_status asc,create_time DESC")
             ->paginate(10, false, [
@@ -134,6 +143,7 @@ class AdminIndexController extends AdminBaseController
         $this->assign('sex', $this->request->param('sex') ?: 0);
         $this->assign('is_complete', $this->request->param('is_complete') ?: 0);
         $this->assign('check_status', $this->request->param('check_status') ?: 0);
+        $this->assign('want_status', $this->request->param('want_status') ?: 0);
 
         // 获取分页显示
         $page = $list->render();
@@ -166,20 +176,27 @@ class AdminIndexController extends AdminBaseController
         }
 
         //获取信息
-        $info           = UserModel::get($id);
-        $info['family'] = $info['family'] ? implode(',', json_decode($info['family'], true)) : '未填写';
-        $info['have_house'] = Constant::COND_TINYINT[$info['have_house']];
-        $info['have_car'] = Constant::COND_TINYINT[$info['have_car']];
-        $info['with_parent_live'] = Constant::COND_TINYINT[$info['with_parent_live']];
+        $info                     = UserModel::get($id);
+        $info['family']           = $info['family'] ? implode(',', json_decode($info['family'], true)) : '未填写';
+        $info['have_house']       = Constant::TINYINT[$info['have_house']];
+        $info['have_car']         = Constant::TINYINT[$info['have_car']];
+        $info['with_parent_live'] = Constant::TINYINT[$info['with_parent_live']];
+        $info['want_birth']       = Constant::TINYINT[$info['want_birth']];
         if (empty($info)) {
             $this->error(lang('信息不存在或已删除'));
         }
         $this->assign('info', $info);
 
-        $mating = UserMatingModel::get(['user_id' => $id]);
-        $mating['have_house'] = Constant::COND_TINYINT[$mating['have_house']];
-        $mating['have_car'] = Constant::COND_TINYINT[$mating['have_car']];
+        $mating                     = UserMatingModel::get(['user_id' => $id]);
+        $mating['have_house']       = Constant::COND_TINYINT[$mating['have_house']];
+        $mating['have_car']         = Constant::COND_TINYINT[$mating['have_car']];
         $mating['with_parent_live'] = Constant::COND_TINYINT[$mating['with_parent_live']];
+        $mating['want_birth']       = Constant::COND_TINYINT[$mating['want_birth']];
+        if (empty($mating)) {
+            $mating['animal_text'] = '';
+        } else {
+            $mating['animal_text'] = implode(',', $mating['animal']);
+        }
         $this->assign('mating', $mating);
 
         return $this->fetch();
@@ -299,18 +316,18 @@ class AdminIndexController extends AdminBaseController
             $where[] = ['check_status', '=', $data['check_status']];
         }
 
-        $list  = UserModel::where($where)->order("check_status asc,create_time DESC")->select();
+        $list = UserModel::where($where)->order("check_status asc,create_time DESC")->select();
         $data = [];
         foreach ($list as $v) {
             $data[] = [
-                'name' => $v['realname'],
-                'sex' => $v['sex_text'],
-                'age' => Fun::getAgeByBirth($v['birthday']),
-                'mobile' => $v['mobile'],
+                'name'    => $v['realname'],
+                'sex'     => $v['sex_text'],
+                'age'     => Fun::getAgeByBirth($v['birthday']),
+                'mobile'  => $v['mobile'],
                 'company' => $v['company'],
                 'id_type' => $v['id_type'],
-                'native' => $v['native'],
-                'marry' => $v['marry'],
+                'native'  => $v['native'],
+                'marry'   => $v['marry'],
             ];
         }
 
@@ -320,15 +337,58 @@ class AdminIndexController extends AdminBaseController
 
         $excel = new Excel();
         $title = [
-            ['name','姓名'],
-            ['sex','性别'],
-            ['age','年龄'],
-            ['mobile','电话'],
-            ['company','单位'],
-            ['id_type','身份类型'],
-            ['native','籍贯'],
-            ['marry','婚姻状况'],
+            ['name', '姓名'],
+            ['sex', '性别'],
+            ['age', '年龄'],
+            ['mobile', '电话'],
+            ['company', '单位'],
+            ['id_type', '身份类型'],
+            ['native', '籍贯'],
+            ['marry', '婚姻状况'],
         ];
-        $excel->export('本站用户',$title,$data,['mobile']);
+        $excel->export('本站用户', $title, $data, ['mobile']);
+    }
+
+    public function follow()
+    {
+        //获取id
+        $id = input('param.id');
+        if (empty($id)) {
+            $this->error(lang('信息不存在或已删除'));
+        }
+
+        $list = UserFollowModel::where('user_id', $id)->order('create_time desc')->select();
+        $this->assign('list', $list);
+
+        return $this->fetch();
+    }
+
+    public function statusPost()
+    {
+        $data = $this->request->post();
+        if (empty($data['user_id'])) {
+            $this->error('请选择用户');
+        }
+        if (empty($data['status'])) {
+            $this->error('请选择状态');
+        }
+
+        //数据初始化
+        $admin        = UserModel::get(cmf_get_current_admin_id());
+        $user         = UserModel::get($data['user_id']);
+        $status_list  = ['', '单身不愿意推荐', '单身愿意推荐', '热恋', '已婚'];
+        $start_status = $status_list[$user['want_status']];
+        $end_status   = $status_list[$data['status']];
+        $content      = "管理员({$admin['user_nickname']})将状态从{$start_status}更改为{$end_status},备注:{$data['content']}";
+
+        //状态更改
+        UserModel::update(['want_status' => $data['status']], ['id' => $data['user_id']]);
+        UserFollowModel::create([
+            'user_id'     => $data['user_id'],
+            'content'     => $content,
+            'create_time' => time(),
+        ]);
+
+        $this->success('操作成功');
     }
 }

+ 29 - 0
public/themes/admin_simpleboot3/matchmaker/admin_matchmaker_user/index.html

@@ -12,6 +12,15 @@
         手机号:
         <input class="form-control" type="text" name="mobile" style="width: 200px;" value="{:input('request.mobile')}"
                placeholder="请输入手机号">
+        状态:
+        <select class="form-control" name="status">
+            <option value="0" <eq name="status" value="0">selected</eq>>全部</option>
+            <option value="1" <eq name="status" value="1">selected</eq>>待审核</option>
+            <option value="2" <eq name="status" value="2">selected</eq>>审核通过</option>
+            <option value="3" <eq name="status" value="3">selected</eq>>审核不通过</option>
+            <option value="4" <eq name="status" value="4">selected</eq>>热恋</option>
+            <option value="5" <eq name="status" value="5">selected</eq>>已婚</option>
+        </select>
         <input type="submit" class="btn btn-primary" value="搜索"/>
         <a class="btn btn-danger" href="{:url('matchmaker/adminMatchmakerUser/index')}">清空</a>
     </form>
@@ -27,6 +36,7 @@
                 <th>生日</th>
                 <th>身高CM</th>
                 <th>体重KG</th>
+                <th>{:lang('STATUS')}</th>
                 <th>{:lang('ACTIONS')}</th>
             </tr>
             </thead>
@@ -41,6 +51,25 @@
                     <td>{:date('Y-m-d',$vo['birthday'])}</td>
                     <td>{$vo['high'] == 0 ? '未知' : $vo['high']}</td>
                     <td>{$vo['weight'] == 0 ? '未知' : $vo['high']}</td>
+                    <td>
+                        <switch name="vo.status">
+                            <case value="1">
+                                <span class="label label-danger">待审核</span>
+                            </case>
+                            <case value="2">
+                                <span class="label label-success">审核通过</span>
+                            </case>
+                            <case value="3">
+                                <span class="label label-danger">审核不通过</span>
+                            </case>
+                            <case value="4">
+                                <span class="label label-danger">热恋</span>
+                            </case>
+                            <case value="5">
+                                <span class="label label-danger">已婚</span>
+                            </case>
+                        </switch>
+                    </td>
                     <td>
                         <a class="btn btn-xs btn-primary" href="javascript:detail({$vo.id})">详情</a>
                     </td>

+ 16 - 0
public/themes/admin_simpleboot3/matchmaker/admin_matchmaker_user/show.html

@@ -46,6 +46,10 @@
                                 <div class="col-md-4">
                                     <div class="input-text">{$info['weight'] ? $info['weight'].'KG' : '保密'}</div>
                                 </div>
+                                <label class="control-label col-md-2">生肖</label>
+                                <div class="col-md-4">
+                                    <div class="input-text">{$info.animal}</div>
+                                </div>
                                 <label class="control-label col-md-2">婚姻状况</label>
                                 <div class="col-md-4">
                                     <div class="input-text">{$info.marry}</div>
@@ -118,6 +122,10 @@
                                 <div class="col-md-4">
                                     <div class="input-text">{$info.with_parent_live}</div>
                                 </div>
+                                <label class="col-md-2">是否愿意生育</label>
+                                <div class="col-md-4">
+                                    <div class="input-text">{$info.want_birth}</div>
+                                </div>
                             </div>
                         </div>
                     </div>
@@ -143,6 +151,10 @@
                                 <div class="col-md-4">
                                     <div class="input-text">{$mating['min_weight'] ? $mating['min_weight'].'KG' : '不限'} - {$mating['max_weight'] ? $mating['max_weight'].'KG' : '不限'}</div>
                                 </div>
+                                <label class="control-label col-md-2">无意愿生肖</label>
+                                <div class="col-md-4">
+                                    <div class="input-text">{$mating.animal_text}</div>
+                                </div>
                                 <label class="control-label col-md-2">籍贯</label>
                                 <div class="col-md-4">
                                     <div class="input-text">{$mating.native}</div>
@@ -151,6 +163,10 @@
                                 <div class="col-md-4">
                                     <div class="input-text">{$mating.education}</div>
                                 </div>
+                                <label class="control-label col-md-2">是否要求生育</label>
+                                <div class="col-md-4">
+                                    <div class="input-text">{$mating.want_birth}</div>
+                                </div>
                             </div>
                         </div>
                     </div>

+ 23 - 0
public/themes/admin_simpleboot3/user/admin_index/follow.html

@@ -0,0 +1,23 @@
+<include file="public@header"/>
+<style>
+    .input-text{width:100%;padding:6px 14px;line-height: 1.42857143;color:#555;min-height:32px;}
+    .text-area{white-space: pre;word-wrap: break-word;}
+</style>
+</head>
+<body>
+<div class="row" style="margin:0;">
+    <div class="col-md-offset-2 col-md-8" style="padding-top:20px;">
+        <div class="list-group">
+            <volist name='list' id="vo">
+            <a href="#" class="list-group-item list-group-item-action flex-column align-items-start" >
+                <div class="d-flex w-100 justify-content-between">
+                    <h5 class="mb-1">{$vo.content}</h5>
+                    <small class="text-muted">{$vo.create_time}</small>
+                </div>
+            </a>
+            </volist>
+        </div>
+    </div>
+</div>
+</body>
+</html>

+ 96 - 2
public/themes/admin_simpleboot3/user/admin_index/index.html

@@ -31,6 +31,14 @@
             <option value="2" <eq name="check_status" value="2">selected</eq>>已通过</option>
             <option value="3" <eq name="check_status" value="3">selected</eq>>已拒绝</option>
         </select>
+        推荐状态:
+        <select class="form-control" name="want_status">
+            <option value="0" <eq name="want_status" value="0">selected</eq>>全部</option>
+            <option value="1" <eq name="want_status" value="1">selected</eq>>单身不愿意推荐</option>
+            <option value="2" <eq name="want_status" value="2">selected</eq>>单身愿意推荐</option>
+            <option value="3" <eq name="want_status" value="3">selected</eq>>热恋</option>
+            <option value="4" <eq name="want_status" value="4">selected</eq>>已婚</option>
+        </select>
         <input type="submit" class="btn btn-primary" value="搜索"/>
         <a class="btn btn-danger" href="{:url('user/adminIndex/index')}">清空</a>
     </form>
@@ -105,6 +113,20 @@
                                 <span class="label label-danger">不公开</span>
                             </case>
                         </switch>
+                        <switch name="vo.want_status">
+                            <case value="1">
+                                <span class="label label-success">单身不愿意推荐</span>
+                            </case>
+                            <case value="2">
+                                <span class="label label-danger">单身愿意推荐</span>
+                            </case>
+                            <case value="3">
+                                <span class="label label-danger">热恋</span>
+                            </case>
+                            <case value="4">
+                                <span class="label label-danger">已婚</span>
+                            </case>
+                        </switch>
                     </td>
                     <td>
                         <empty name="vo.user_status">
@@ -123,6 +145,11 @@
                                data-id="{$vo.id}">审核</a>
                         </if>
                         <a class="btn btn-xs btn-primary" href="javascript:detail({$vo.id})">详情</a>
+                        <a class="btn btn-xs btn-info"
+                           data-toggle="modal"
+                           data-target="#statusModal"
+                           data-id="{$vo.id}">更改状态</a>
+                        <a class="btn btn-xs btn-primary" href="javascript:follow({$vo.id})">查看记录</a>
                         <a class="btn btn-xs btn-danger js-ajax-delete"
                            href="{:url('adminIndex/delete',array('id'=>$vo['id']))}">删除</a>
                     </td>
@@ -168,6 +195,45 @@
             </div>
         </div>
     </div>
+
+    <div class="modal fade" id="statusModal" tabindex="-1" role="dialog" aria-labelledby="ReviewModalLabel">
+        <div class="modal-dialog" role="document">
+            <div class="modal-content">
+                <div class="modal-header">
+                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
+                    <h4 class="modal-title" id="statusModalLabel">审核</h4>
+                </div>
+                <div class="modal-body">
+                    <form id="status_form">
+                        <input type="hidden" id="status_user_id" name="user_id" value="0">
+                        <div class="form-group">
+                            <label class="control-label">状态:</label>
+                            <label class="radio-inline">
+                                <input type="radio" name="status" value="1"> 单身不愿意推荐
+                            </label>
+                            <label class="radio-inline">
+                                <input type="radio" name="status" value="2"> 单身愿意推荐
+                            </label>
+                            <label class="radio-inline">
+                                <input type="radio" name="status" value="3"> 热恋
+                            </label>
+                            <label class="radio-inline">
+                                <input type="radio" name="status" value="4"> 已婚
+                            </label>
+                        </div>
+                        <div class="form-group">
+                            <label for="message-text" class="control-label">备注:</label>
+                            <textarea class="form-control" name="content"></textarea>
+                        </div>
+                    </form>
+                </div>
+                <div class="modal-footer">
+                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
+                    <button type="button" id="btn_status" class="btn btn-primary">确定</button>
+                </div>
+            </div>
+        </div>
+    </div>
 </div>
 <script src="__STATIC__/js/admin.js"></script>
 <script>
@@ -178,14 +244,38 @@
         modal.find('#user_id').val(id)
     });
 
+    $('#statusModal').on('show.bs.modal', function (event) {
+        var button = $(event.relatedTarget) // Button that triggered the modal
+        var id = button.data('id') // Extract info from data-* attributes
+        var modal = $(this)
+        modal.find('#status_user_id').val(id)
+    });
+
     $('#btn_check').click(function(){
         var data = $('#check_form').serialize();
         $.post("{:url('AdminIndex/checkPost')}",data,function(json){
-            $('#ReviewModal').modal('hide');
-            reloadPage(window);
+            if (json.code) {
+                $('#ReviewModal').modal('hide');
+                reloadPage(window);
+            } else {
+                alert(json.msg);
+            }
         },'json');
     });
 
+    $('#btn_status').click(function(){
+        var data = $('#status_form').serialize();
+        $.post("{:url('AdminIndex/statusPost')}",data,function(json){
+            if (json.code) {
+                $('#statusModal').modal('hide');
+                reloadPage(window);
+            } else {
+                alert(json.msg);
+            }
+        },'json');
+    });
+
+
     function reloadPage(win) {
         win.location.reload();
     }
@@ -194,6 +284,10 @@
         parent.openIframeLayer("/user/admin_index/show/id/"+id+".html",'详情',{});
     }
 
+    function follow(id) {
+        parent.openIframeLayer("/user/admin_index/follow/id/"+id+".html",'记录',{});
+    }
+
     $('.export').click(function(){
         window.open(
             '{:url("export")}?'+$(".well").serialize(),

+ 16 - 0
public/themes/admin_simpleboot3/user/admin_index/show.html

@@ -46,6 +46,10 @@
                                 <div class="col-md-4">
                                     <div class="input-text">{$info['weight'] ? $info['weight'].'KG' : '保密'}</div>
                                 </div>
+                                <label class="control-label col-md-2">生肖</label>
+                                <div class="col-md-4">
+                                    <div class="input-text">{$info.animal}</div>
+                                </div>
                                 <label class="control-label col-md-2">婚姻状况</label>
                                 <div class="col-md-4">
                                     <div class="input-text">{$info.marry}</div>
@@ -122,6 +126,10 @@
                                 <div class="col-md-4">
                                     <div class="input-text">{$info.with_parent_live}</div>
                                 </div>
+                                <label class="col-md-2">是否愿意生育</label>
+                                <div class="col-md-4">
+                                    <div class="input-text">{$info.want_birth}</div>
+                                </div>
                             </div>
                         </div>
                     </div>
@@ -147,6 +155,10 @@
                                 <div class="col-md-4">
                                     <div class="input-text">{$mating['min_weight'] ? $mating['min_weight'].'KG' : '不限'} - {$mating['max_weight'] ? $mating['max_weight'].'KG' : '不限'}</div>
                                 </div>
+                                <label class="control-label col-md-2">无意愿生肖</label>
+                                <div class="col-md-4">
+                                    <div class="input-text">{$mating.animal_text}</div>
+                                </div>
                                 <label class="control-label col-md-2">籍贯</label>
                                 <div class="col-md-4">
                                     <div class="input-text">{$mating.native}</div>
@@ -159,6 +171,10 @@
                                 <div class="col-md-4">
                                     <div class="input-text">{$mating.job}</div>
                                 </div>
+                                <label class="control-label col-md-2">是否要求生育</label>
+                                <div class="col-md-4">
+                                    <div class="input-text">{$mating.want_birth}</div>
+                                </div>
                             </div>
                         </div>
                     </div>

+ 67 - 0
public/themes/simpleboot3/love/my/cond.html

@@ -1,6 +1,10 @@
 <extend name="public@base"/>
 <block name="css">
     <style>
+        .van-row {width:100%;}
+        .btn_search_item{background:#f2f6ff;display:inline-block;border-radius:5px;line-height:35px;height:35px;text-align:center;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;position:relative;font-size:13px;width:100%;color:#666;margin-bottom:10px;}
+        .btn_search_item.active{color:var(--pink);background:#fff7fa;}
+        .btn_search_icon{position:absolute;bottom:-3px;right:-3px;font-size:30px;}
     </style>
 </block>
 <block name="body">
@@ -76,6 +80,22 @@
         ></van-picker>
     </van-popup>
 
+    <!--无意愿生肖-->
+    <van-field name="form.family" label="无意愿生肖">
+        <template #input>
+            <van-row :gutter="10">
+                <van-col span="8" v-for="(item) in animal">
+                    <div :class="{btn_search_item:true,active: in_array(item,form.animal)}"
+                         @click="selectAnimal(item)">
+                        {{item}}
+                        <van-icon v-if="in_array(item,form.animal)"
+                                  class="iconfont icon-gouxuan-youxiajiaogouxuan btn_search_icon text-pink"></van-icon>
+                    </div>
+                </van-col>
+            </van-row>
+        </template>
+    </van-field>
+
     <!--籍贯-->
     <van-field
             readonly
@@ -241,6 +261,24 @@
                 @cancel="showDrink = false"
         ></van-picker>
     </van-popup>
+
+    <van-field
+            readonly
+            clickable
+            :value="tinyint[form.want_birth]"
+            label="是否要求生育"
+            placeholder="点击选择"
+            @click="showWantBirth = true"
+    ></van-field>
+    <van-popup position="bottom" v-model="showWantBirth">
+        <van-picker
+                title="是否要求生育"
+                show-toolbar
+                :columns="tinyint"
+                @confirm="onWantBirthConfirm"
+                @cancel="showWantBirth = false"
+        ></van-picker>
+    </van-popup>
 </block>
 <block name="script">
     <script>
@@ -269,6 +307,8 @@
                     showHaveHouse: false,
                     showHaveCar: false,
                     showWithParentLive: false,
+                    animal: {$animal},
+                    showWantBirth: false,
                 };
             },
             methods: {
@@ -380,6 +420,33 @@
                     this.form.drink = value;
                     this.showDrink = false;
                 },
+                onWantBirthConfirm(value,index){
+                    this.form.want_birth = index;
+                    this.showWantBirth = false;
+                },
+                selectAnimal(value) {
+                    if (this.in_array(value,this.form.animal)) {
+                        this.removeByVal(this.form.animal,value);
+                    } else {
+                        this.form.animal.push(value);
+                    }
+                },
+                in_array(search,array){
+                    for(var i in array){
+                        if(array[i] == search){
+                            return true;
+                        }
+                    }
+                    return false;
+                },
+                removeByVal(arrylist , val) {
+                    for(var i = 0; i < arrylist .length; i++) {
+                        if(arrylist[i] == val) {
+                            arrylist .splice(i, 1);
+                            break;
+                        }
+                    }
+                },
             },
             computed: {
                 //年龄

+ 82 - 1
public/themes/simpleboot3/love/my/profile.html

@@ -5,6 +5,12 @@
         .btn_search_item{background:#f2f6ff;display:inline-block;border-radius:5px;line-height:35px;height:35px;text-align:center;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;position:relative;font-size:13px;width:100%;color:#666;margin-bottom:10px;}
         .btn_search_item.active{color:var(--pink);background:#fff7fa;}
         .btn_search_icon{position:absolute;bottom:-3px;right:-3px;font-size:30px;}
+
+        .van-row {width:100%;}
+        .btn_search_item{background:#f2f6ff;display:inline-block;border-radius:5px;line-height:35px;height:35px;text-align:center;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;position:relative;font-size:13px;width:100%;color:#666;margin-bottom:10px;}
+        .btn_search_item.active{color:var(--pink);background:#fff7fa;}
+        .btn_search_icon{position:absolute;bottom:-3px;right:-3px;font-size:30px;}
+        .van-uploader__input-wrapper {width:100%;}
     </style>
 </block>
 <block name="body">
@@ -143,6 +149,26 @@
             placeholder="请输入您小孩数量"
     ></van-field>
 
+    <!--生肖-->
+    <van-field
+            required
+            readonly
+            clickable
+            :value="form.animal"
+            label="生肖"
+            placeholder="点击选择生肖"
+            @click="showAnimal = true"
+    ></van-field>
+    <van-popup position="bottom" v-model="showAnimal">
+        <van-picker
+                title="生肖"
+                show-toolbar
+                :columns="animal"
+                @confirm="onAnimalConfirm"
+                @cancel="showAnimal = false"
+        ></van-picker>
+    </van-popup>
+
     <!--学历-->
     <van-field
             required
@@ -328,6 +354,23 @@
                 @cancel="showWithParentLive = false"
         ></van-picker>
     </van-popup>
+    <van-field
+            readonly
+            clickable
+            :value="tinyint[form.want_birth]"
+            label="是否愿意生育"
+            placeholder="点击选择"
+            @click="showWantBirth = true"
+    ></van-field>
+    <van-popup position="bottom" v-model="showWantBirth">
+        <van-picker
+                title="是否愿意生育"
+                show-toolbar
+                :columns="tinyint"
+                @confirm="onWantBirthConfirm"
+                @cancel="showWantBirth = false"
+        ></van-picker>
+    </van-popup>
 
     <!--是否吸烟-->
     <van-field
@@ -374,6 +417,23 @@
             <van-switch v-model="form.show_footmark" size="24" :active-value="1" :inactive-value="2" active-color="#FF589B"></van-switch>
         </template>
     </van-cell>
+    <van-field
+            readonly
+            clickable
+            :value="want_status[form.want_status]"
+            label="是否推荐"
+            placeholder="点击选择是否推荐"
+            @click="showWantStatus = true"
+    ></van-field>
+    <van-popup position="bottom" v-model="showWantStatus">
+        <van-picker
+                title="是否推荐"
+                show-toolbar
+                :columns="want_status"
+                @confirm="onWantStatusConfirm"
+                @cancel="showWantStatus = false"
+        ></van-picker>
+    </van-popup>
 </block>
 <block name="script">
     <script>
@@ -407,6 +467,11 @@
                     showHaveCar: false,
                     showWithParentLive: false,
                     tinyint: {$tinyint},
+                    animal: {$animal},
+                    showAnimal: false,
+                    showWantBirth: false,
+                    showWantStatus: false,
+                    want_status: ['','单身不愿意推荐','单身愿意推荐','热恋','已婚'],
                 };
             },
             methods: {
@@ -438,6 +503,10 @@
                         this.$toast('请选择婚姻状况');
                         return false;
                     }
+                    if (this.form.animal == '') {
+                        this.$toast('请选择生肖');
+                        return false;
+                    }
                     if (this.form.education == '') {
                         this.$toast('请选择学历');
                         return false;
@@ -498,6 +567,10 @@
                     this.form.marry = value;
                     this.showMarry = false;
                 },
+                onAnimalConfirm(value) {
+                    this.form.animal = value;
+                    this.showAnimal = false;
+                },
                 onEducationConfirm(value) {
                     this.form.education = value;
                     this.showEducation = false;
@@ -526,6 +599,10 @@
                     this.form.with_parent_live = index;
                     this.showWithParentLive = false;
                 },
+                onWantBirthConfirm(value,index){
+                    this.form.want_birth = index;
+                    this.showWantBirth = false;
+                },
                 onSmokeConfirm(value) {
                     this.form.smoke = value;
                     this.showSmoke = false;
@@ -534,7 +611,11 @@
                     this.form.drink = value;
                     this.showDrink = false;
                 },
-                removeByVal(arrylist , val) {
+                onWantStatusConfirm(value,index) {
+                    this.form.want_status = index;
+                    this.showWantStatus = false;
+                },
+                    removeByVal(arrylist , val) {
                     for(var i = 0; i < arrylist .length; i++) {
                         if(arrylist[i] == val) {
                             arrylist .splice(i, 1);

+ 68 - 0
public/themes/simpleboot3/love/register/cond.html

@@ -6,6 +6,11 @@
         .van-step--horizontal .van-step__title {font-size:16px;}
         .van-step--horizontal .van-step__icon {font-size:16px;}
         .van-step__circle {width:10px;height:10px;}
+
+        .van-row {width:100%;}
+        .btn_search_item{background:#f2f6ff;display:inline-block;border-radius:5px;line-height:35px;height:35px;text-align:center;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;position:relative;font-size:13px;width:100%;color:#666;margin-bottom:10px;}
+        .btn_search_item.active{color:var(--pink);background:#fff7fa;}
+        .btn_search_icon{position:absolute;bottom:-3px;right:-3px;font-size:30px;}
     </style>
 </block>
 <block name="body">
@@ -89,6 +94,22 @@
         ></van-picker>
     </van-popup>
 
+    <!--无意愿生肖-->
+    <van-field name="form.family" label="无意愿生肖">
+        <template #input>
+            <van-row :gutter="10">
+                <van-col span="8" v-for="(item) in animal">
+                    <div :class="{btn_search_item:true,active: in_array(item,form.animal)}"
+                         @click="selectAnimal(item)">
+                        {{item}}
+                        <van-icon v-if="in_array(item,form.animal)"
+                                  class="iconfont icon-gouxuan-youxiajiaogouxuan btn_search_icon text-pink"></van-icon>
+                    </div>
+                </van-col>
+            </van-row>
+        </template>
+    </van-field>
+
     <!--籍贯-->
     <van-field
             readonly
@@ -255,6 +276,24 @@
         ></van-picker>
     </van-popup>
 
+    <van-field
+            readonly
+            clickable
+            :value="tinyint[form.want_birth]"
+            label="是否要求生育"
+            placeholder="点击选择"
+            @click="showWantBirth = true"
+    ></van-field>
+    <van-popup position="bottom" v-model="showWantBirth">
+        <van-picker
+                title="是否要求生育"
+                show-toolbar
+                :columns="tinyint"
+                @confirm="onWantBirthConfirm"
+                @cancel="showWantBirth = false"
+        ></van-picker>
+    </van-popup>
+
     <div style="padding:16px;">
         <van-button block class="bg-pink" @click="onSubmit">完成</van-button>
     </div>
@@ -286,6 +325,8 @@
                     showHaveHouse: false,
                     showHaveCar: false,
                     showWithParentLive: false,
+                    animal: {$animal},
+                    showWantBirth:false,
                 };
             },
             methods: {
@@ -397,6 +438,33 @@
                     this.form.drink = value;
                     this.showDrink = false;
                 },
+                onWantBirthConfirm(value,index){
+                    this.form.want_birth = index;
+                    this.showWantBirth = false;
+                },
+                selectAnimal(value) {
+                    if (this.in_array(value,this.form.animal)) {
+                        this.removeByVal(this.form.animal,value);
+                    } else {
+                        this.form.animal.push(value);
+                    }
+                },
+                in_array(search,array){
+                    for(var i in array){
+                        if(array[i] == search){
+                            return true;
+                        }
+                    }
+                    return false;
+                },
+                removeByVal(arrylist , val) {
+                    for(var i = 0; i < arrylist .length; i++) {
+                        if(arrylist[i] == val) {
+                            arrylist .splice(i, 1);
+                            break;
+                        }
+                    }
+                },
             },
             computed: {
                 //年龄

+ 52 - 0
public/themes/simpleboot3/love/register/profile.html

@@ -154,6 +154,26 @@
             placeholder="请输入您小孩数量"
     ></van-field>
 
+    <!--生肖-->
+    <van-field
+            required
+            readonly
+            clickable
+            :value="form.animal"
+            label="生肖"
+            placeholder="点击选择生肖"
+            @click="showAnimal = true"
+    ></van-field>
+    <van-popup position="bottom" v-model="showAnimal">
+        <van-picker
+                title="生肖"
+                show-toolbar
+                :columns="animal"
+                @confirm="onAnimalConfirm"
+                @cancel="showAnimal = false"
+        ></van-picker>
+    </van-popup>
+
     <!--学历-->
     <van-field
             required
@@ -322,6 +342,23 @@
                 @cancel="showWithParentLive = false"
         ></van-picker>
     </van-popup>
+    <van-field
+            readonly
+            clickable
+            :value="tinyint[form.want_birth]"
+            label="是否愿意生育"
+            placeholder="点击选择"
+            @click="showWantBirth = true"
+    ></van-field>
+    <van-popup position="bottom" v-model="showWantBirth">
+        <van-picker
+                title="是否愿意生育"
+                show-toolbar
+                :columns="tinyint"
+                @confirm="onWantBirthConfirm"
+                @cancel="showWantBirth = false"
+        ></van-picker>
+    </van-popup>
 
     <!--是否吸烟-->
     <van-field
@@ -406,6 +443,9 @@
                     showHaveCar: false,
                     showWithParentLive: false,
                     tinyint: {$tinyint},
+                    animal: {$animal},
+                    showAnimal: false,
+                    showWantBirth: false,
                 };
             },
             methods: {
@@ -437,6 +477,10 @@
                         this.$toast('请选择婚姻状况');
                         return false;
                     }
+                    if (this.form.animal == '') {
+                        this.$toast('请选择生肖');
+                        return false;
+                    }
                     if (this.form.education == '') {
                         this.$toast('请选择学历');
                         return false;
@@ -498,6 +542,10 @@
                     this.form.marry = value;
                     this.showMarry = false;
                 },
+                onAnimalConfirm(value) {
+                    this.form.animal = value;
+                    this.showAnimal = false;
+                },
                 onEducationConfirm(value) {
                     this.form.education = value;
                     this.showEducation = false;
@@ -526,6 +574,10 @@
                     this.form.with_parent_live = index;
                     this.showWithParentLive = false;
                 },
+                onWantBirthConfirm(value,index){
+                    this.form.want_birth = index;
+                    this.showWantBirth = false;
+                },
                 onSmokeConfirm(value) {
                     this.form.smoke = value;
                     this.showSmoke = false;

+ 4 - 0
public/themes/simpleboot3/love/userwall/detail.html

@@ -145,6 +145,7 @@
             <van-cell title="年龄" :value="user.age + '岁'"></van-cell>
             <van-cell title="身高" :value="user.high ? user.high + 'CM' : '保密'"></van-cell>
             <van-cell title="体重" :value="user.weight ? user.weight + 'KG' : '保密'"></van-cell>
+            <van-cell title="生肖" :value="user.animal"></van-cell>
             <van-cell title="婚姻状况" :value="user.marry"></van-cell>
             <van-cell title="学历" :value="user.education"></van-cell>
             <van-cell title="年收入" :value="user.income"></van-cell>
@@ -165,6 +166,7 @@
             <van-cell title="宗教信仰" :value="user.faith"></van-cell>
             <van-cell title="是否吸烟" :value="user.smoke"></van-cell>
             <van-cell title="是否喝酒" :value="user.drink"></van-cell>
+            <van-cell title="是否愿意生育" :value="user.want_birth"></van-cell>
         </van-cell-group>
     </van-popup>
 
@@ -191,6 +193,8 @@
             <van-cell title="婚后是否愿意与父母同住" :value="mating.with_parent_live"></van-cell>
             <van-cell title="是否吸烟" :value="mating.smoke"></van-cell>
             <van-cell title="是否喝酒" :value="mating.drink"></van-cell>
+            <van-cell title="无意愿生肖" :value="mating.animal.join(',')"></van-cell>
+            <van-cell title="是否要求生育" :value="mating.want_birth"></van-cell>
         </van-cell-group>
     </van-popup>
 

+ 54 - 3
public/themes/simpleboot3/matchmaker/index/index.html

@@ -57,7 +57,7 @@
                     <div class="list-tool">
                         <div class="tool-btn" @click="toInfo(item.id)">基本资料</div>
                         <div class="tool-btn" @click="toMating(item.id)">择偶要求</div>
-                        <div class="tool-btn match" @click="toMatch(item.id)">智能匹配</div>
+                        <div class="tool-btn match" @click="matchField(item.id)">智能匹配</div>
                         <div class="tool-btn" @click="toFollow(item.id)">跟进</div>
                     </div>
                     <div class="list-tool">
@@ -80,6 +80,28 @@
         </van-list>
     </van-pull-refresh>
 
+    <van-popup v-model="showMatch">
+        <div style="width:80vw;padding:10px;">
+            <p style="text-align:center;">请选择必须的匹配项目</p>
+            <van-checkbox v-model="match_field.age" style="margin-top:20px;">年龄</van-checkbox>
+            <van-checkbox v-model="match_field.high" style="margin-top:20px;">身高</van-checkbox>
+            <van-checkbox v-model="match_field.weight" style="margin-top:20px;">体重</van-checkbox>
+            <van-checkbox v-model="match_field.animal" style="margin-top:20px;">生肖</van-checkbox>
+            <van-checkbox v-model="match_field.native" style="margin-top:20px;">籍贯</van-checkbox>
+            <van-checkbox v-model="match_field.education" style="margin-top:20px;">学历</van-checkbox>
+            <van-checkbox v-model="match_field.income" style="margin-top:20px;">年收入</van-checkbox>
+            <van-checkbox v-model="match_field.have_house" style="margin-top:20px;">是否有房</van-checkbox>
+            <van-checkbox v-model="match_field.have_car" style="margin-top:20px;">是否有车</van-checkbox>
+            <van-checkbox v-model="match_field.with_parent_live" style="margin-top:20px;">婚后是否愿意与父母同住</van-checkbox>
+            <van-checkbox v-model="match_field.smoke" style="margin-top:20px;">是否吸烟</van-checkbox>
+            <van-checkbox v-model="match_field.drink" style="margin-top:20px;">是否喝酒</van-checkbox>
+            <van-checkbox v-model="match_field.want_birth" style="margin-top:20px;">是否生育</van-checkbox>
+            <div style="padding:16px;">
+                <van-button block class="bg-pink" @click="toMatch">开始匹配</van-button>
+            </div>
+        </div>
+    </van-popup>
+
     <div class="add" @click="toAdd">添加</div>
 
     <van-tabbar v-model="active" active-color="#FF589B" :before-change="tabbarChange">
@@ -133,6 +155,24 @@
                         { text: '热恋', value: 4 },
                         { text: '已婚', value: 5 },
                     ],
+
+                    showMatch:false,
+                    match_field:{
+                        age: false,
+                        high: false,
+                        weight: false,
+                        animal: false,
+                        native: false,
+                        education: false,
+                        income: false,
+                        have_house: false,
+                        have_car: false,
+                        with_parent_live: false,
+                        smoke: false,
+                        drink: false,
+                        want_birth: false,
+                    },
+                    match_id: 0,
                 };
             },
             methods: {
@@ -158,8 +198,14 @@
                 toMating(id) {
                     location.href = '{:url("matchmaker/user/matingEdit")}?id=' + id;
                 },
-                toMatch(id) {
-                    location.href = '{:url("matchmaker/user/match")}?id=' + id;
+                toMatch() {
+                    let arr = [];
+                    for (let field in this.match_field) {
+                        if (this.match_field[field]) {
+                            arr.push(field);
+                        }
+                    }
+                    location.href = '{:url("matchmaker/user/match")}?id=' + this.match_id + '&match_field=' + arr.join(',');
                 },
                 toFollow(id) {
                     location.href = '{:url("matchmaker/user/follow")}?id=' + id;
@@ -178,6 +224,11 @@
                             // on cancel
                         });
                 },
+                matchField(id) {
+                    this.match_id = id;
+                    this.match_field = [];
+                    this.showMatch = true;
+                },
                 toStatus(id,action) {
                     $.post("{:url('user/statusUser')}", {id:id,status:action.value}, function (json) {
                         location.reload();

+ 31 - 1
public/themes/simpleboot3/matchmaker/my/index.html

@@ -55,6 +55,16 @@
             <h2>我的资料</h2>
             <van-icon style="margin-left: 216px" name="arrow" />
         </li>
+        <li @click="showQrcode">
+            <img src="__TMPL__/public/assets/images/matchmaker/myIcon4.png" alt="">
+            <h2>我的邀请码</h2>
+            <van-icon style="margin-left: 200px" name="arrow" />
+        </li>
+        <li @click="toStatistics">
+            <img src="__TMPL__/public/assets/images/matchmaker/myIcon5.png" alt="">
+            <h2>统计</h2>
+            <van-icon style="margin-left: 247px" name="arrow" />
+        </li>
         <li @click="callPhone('0595-88052395')">
             <img src="__TMPL__/public/assets/images/matchmaker/myIcon2.png" alt="">
             <h2>联系我们</h2>
@@ -62,6 +72,15 @@
         </li>
     </ul>
 
+    <van-popup v-model="show_qrcode">
+        <div class="qrcode">
+            <van-image
+                    width="80vw"
+                    :src="qrcode_url"
+            ></van-image>
+        </div>
+    </van-popup>
+
     <van-tabbar v-model="active" active-color="#FF589B" :before-change="tabbarChange">
         <van-tabbar-item url="{:url('matchmaker/index/index')}">
             <span>信息库</span>
@@ -86,6 +105,7 @@
                     active: 1,
                     keyword: '',
                     matchmaker: {$matchmaker},
+                    show_qrcode:false,
                 };
             },
             methods: {
@@ -101,11 +121,21 @@
                 toInfo() {
                     location.href = '{:url("matchmaker/my/info")}';
                 },
+                toStatistics() {
+                    location.href = '{:url("matchmaker/my/statistics")}';
+                },
+                showQrcode() {
+                    this.show_qrcode = true;
+                },
             },
             computed: {
                 head_image() {
                     return this.matchmaker.avatar ? this.matchmaker.avatar : '__TMPL__/public/assets/images/matchmaker/avatar2.png';
-                }
+                },
+                qrcode_url() {
+                    let code = encodeURIComponent("{:cmf_url('register/infoAdd','',true,true)}?id=" + this.matchmaker.id);
+                    return '/qrcode.php?code=' + code;
+                },
             },
 
         });

+ 191 - 0
public/themes/simpleboot3/matchmaker/my/statistics.html

@@ -0,0 +1,191 @@
+<extend name="public/base"/>
+<block name="css">
+    <style>
+        .van-nav-bar--fixed {z-index:100;}
+        .van-nav-bar .van-icon,.van-nav-bar__text {color:white;}
+        .van-step--horizontal .van-step__title {font-size:16px;}
+        .van-step--horizontal .van-step__icon {font-size:16px;}
+        .van-step__circle {width:10px;height:10px;}
+
+        .lw-item {background:white;}
+        .margin-top-10 {margin-top:10px;}
+        .lw-item h3 {padding:5px 10px;}
+        .grid-title {padding-top:5px;color:#666;font-size:14px;}
+        .grid-num {color:var(--pink);font-size:20px;}
+    </style>
+</block>
+<block name="body">
+    <van-nav-bar
+            class="bg-pink"
+            left-text="返回"
+            left-arrow
+            @click-left="onBack"
+            fixed="true"
+    >
+        <template #title>
+            <span style="color:white;">统计</span>
+        </template>
+    </van-nav-bar>
+    <div style="width:100%;height:46px;"></div>
+
+    <div class="lw-item">
+        <h3>状态</h3>
+        <van-grid :column-num="5">
+            <van-grid-item>
+                <template #icon>
+                    <p class="grid-num">{$status_1}</p>
+                </template>
+                <template #text>
+                    <p class="grid-title">待审核</p>
+                </template>
+            </van-grid-item>
+            <van-grid-item>
+                <template #icon>
+                    <p class="grid-num">{$status_2}</p>
+                </template>
+                <template #text>
+                    <p class="grid-title">审核通过</p>
+                </template>
+            </van-grid-item>
+            <van-grid-item>
+                <template #icon>
+                    <p class="grid-num">{$status_3}</p>
+                </template>
+                <template #text>
+                    <p class="grid-title">不通过</p>
+                </template>
+            </van-grid-item>
+            <van-grid-item>
+                <template #icon>
+                    <p class="grid-num">{$status_4}</p>
+                </template>
+                <template #text>
+                    <p class="grid-title">热恋</p>
+                </template>
+            </van-grid-item>
+            <van-grid-item>
+                <template #icon>
+                    <p class="grid-num">{$status_5}</p>
+                </template>
+                <template #text>
+                    <p class="grid-title">已婚</p>
+                </template>
+            </van-grid-item>
+        </van-grid>
+    </div>
+
+    <div class="lw-item margin-top-10">
+        <h3>性别</h3>
+        <van-grid :column-num="3">
+            <van-grid-item>
+                <template #icon>
+                    <p class="grid-num">{$total}</p>
+                </template>
+                <template #text>
+                    <p class="grid-title">总人数</p>
+                </template>
+            </van-grid-item>
+            <van-grid-item>
+                <template #icon>
+                    <p class="grid-num">{$sex_man}</p>
+                </template>
+                <template #text>
+                    <p class="grid-title">男性</p>
+                </template>
+            </van-grid-item>
+            <van-grid-item>
+                <template #icon>
+                    <p class="grid-num">{$sex_woman}</p>
+                </template>
+                <template #text>
+                    <p class="grid-title">女性</p>
+                </template>
+            </van-grid-item>
+        </van-grid>
+    </div>
+
+    <div class="lw-item margin-top-10">
+        <h3>学历</h3>
+        <van-grid>
+            <van-grid-item>
+                <template #icon>
+                    <p class="grid-num">{$education_bkyx}</p>
+                </template>
+                <template #text>
+                    <p class="grid-title">本科以下</p>
+                </template>
+            </van-grid-item>
+            <van-grid-item>
+                <template #icon>
+                    <p class="grid-num">{$education_bk}</p>
+                </template>
+                <template #text>
+                    <p class="grid-title">本科</p>
+                </template>
+            </van-grid-item>
+            <van-grid-item>
+                <template #icon>
+                    <p class="grid-num">{$education_ss}</p>
+                </template>
+                <template #text>
+                    <p class="grid-title">硕士</p>
+                </template>
+            </van-grid-item>
+            <van-grid-item>
+                <template #icon>
+                    <p class="grid-num">{$education_bs}</p>
+                </template>
+                <template #text>
+                    <p class="grid-title">博士</p>
+                </template>
+            </van-grid-item>
+        </van-grid>
+    </div>
+
+    <div class="lw-item margin-top-10">
+        <h3>婚姻状况</h3>
+        <van-grid :column-num="3">
+            <van-grid-item>
+                <template #icon>
+                    <p class="grid-num">{$marry_wh}</p>
+                </template>
+                <template #text>
+                    <p class="grid-title">未婚</p>
+                </template>
+            </van-grid-item>
+            <van-grid-item>
+                <template #icon>
+                    <p class="grid-num">{$marry_lh}</p>
+                </template>
+                <template #text>
+                    <p class="grid-title">离婚</p>
+                </template>
+            </van-grid-item>
+            <van-grid-item>
+                <template #icon>
+                    <p class="grid-num">{$marry_so}</p>
+                </template>
+                <template #text>
+                    <p class="grid-title">丧偶</p>
+                </template>
+            </van-grid-item>
+        </van-grid>
+    </div>
+
+</block>
+<block name="script">
+    <script>
+        new Vue({
+            el: '#app',
+            data() {
+                return {
+                };
+            },
+            methods: {
+                onBack() {
+                    history.back();
+                },
+            },
+        });
+    </script>
+</block>

+ 33 - 0
public/themes/simpleboot3/matchmaker/register/info.html

@@ -0,0 +1,33 @@
+<extend name="public/base"/>
+<block name="css">
+    <style>
+        .icon {text-align:center;}
+        .msg {text-align:center;margin-top:50px;}
+    </style>
+</block>
+<block name="body">
+    <van-nav-bar class="bg-pink">
+        <template #title>
+            <span style="color:white;">提示</span>
+        </template>
+    </van-nav-bar>
+    <div style="width:100%;height:46px;"></div>
+    <div class="icon">
+        <van-icon name="warning-o" size="160" color="#0081ff"></van-icon>
+    </div>
+    <h3 class="msg">提交成功,请等待红娘联系</h3>
+</block>
+<block name="script">
+    <script>
+        new Vue({
+            el: '#app',
+            data() {
+                return {
+                };
+            },
+            methods: {
+
+            },
+        });
+    </script>
+</block>

+ 606 - 0
public/themes/simpleboot3/matchmaker/register/info_add.html

@@ -0,0 +1,606 @@
+<extend name="public/base"/>
+<block name="css">
+    <style>
+        .van-nav-bar--fixed {z-index:100;}
+        .van-nav-bar .van-icon,.van-nav-bar__text {color:white;}
+        .van-step--horizontal .van-step__title {font-size:16px;}
+        .van-step--horizontal .van-step__icon {font-size:16px;}
+        .van-step__circle {width:10px;height:10px;}
+
+        .van-row {width:100%;}
+        .btn_search_item{background:#f2f6ff;display:inline-block;border-radius:5px;line-height:35px;height:35px;text-align:center;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;position:relative;font-size:13px;width:100%;color:#666;margin-bottom:10px;}
+        .btn_search_item.active{color:var(--pink);background:#fff7fa;}
+        .btn_search_icon{position:absolute;bottom:-3px;right:-3px;font-size:30px;}
+        .van-uploader__input-wrapper {width:100%;}
+    </style>
+</block>
+<block name="body">
+    <!--头部-->
+    <van-nav-bar
+            class="bg-pink"
+            left-text="返回"
+            left-arrow
+            @click-left="onBack"
+            fixed="true"
+    >
+        <template #title>
+            <span style="color:white;">基本资料(1/2)</span>
+        </template>
+    </van-nav-bar>
+    <div style="width:100%;height:46px;"></div>
+
+    <van-steps :active="0">
+        <van-step>基本资料</van-step>
+        <van-step>择偶要求</van-step>
+    </van-steps>
+
+
+    <!--头图-->
+    <van-uploader :max-count="1" :after-read="uploadHead" style="padding:20px 0;width:100%;">
+        <van-image width="30%" style="display:block;margin:0 auto;" :src="head_image"></van-image>
+        <div style="text-align:center;font-size:14px;color:#999;">点击上传头像</div>
+    </van-uploader>
+    <!--增空-->
+    <van-field
+            v-model="form.realname"
+            label="真实姓名"
+            placeholder="请输入真实姓名"
+            required
+    ></van-field>
+    <van-field
+            v-model="form.mobile"
+            label="电话"
+            placeholder="请输入电话号码"
+            required
+    ></van-field>
+    <van-field name="radio" label="单选框" required>
+        <template #input>
+            <van-radio-group v-model="form.sex" direction="horizontal">
+                <van-radio :name="1">男</van-radio>
+                <van-radio :name="2">女</van-radio>
+            </van-radio-group>
+        </template>
+    </van-field>
+
+    <!--生日-->
+    <van-field
+            required
+            readonly
+            clickable
+            :value="form.birthday"
+            label="生日"
+            placeholder="点击选择生日"
+            @click="showBirthday = true"
+    ></van-field>
+    <van-popup position="bottom" v-model="showBirthday">
+        <van-datetime-picker
+                title="生日"
+                :value="new Date(form.birthday)"
+                type="date"
+                :min-date="minDate"
+                @confirm="onBirthdayConfirm"
+                @cancel="showBirthday = false"
+        ></van-datetime-picker>
+    </van-popup>
+
+    <!--身高-->
+    <van-field
+            required
+            readonly
+            clickable
+            :value="form_high"
+            label="身高"
+            placeholder="请选择身高(CM)"
+            @click="showHigh = true"
+    ></van-field>
+    <van-popup position="bottom" v-model="showHigh">
+        <van-picker
+                title="身高"
+                show-toolbar
+                :columns="high"
+                @confirm="onHighConfirm"
+                @cancel="showHigh = false"
+        ></van-picker>
+    </van-popup>
+
+    <!--体重-->
+    <van-field
+            required
+            readonly
+            clickable
+            :value="form_weight"
+            label="体重"
+            placeholder="请选择体重(KG)"
+            @click="showWeight = true"
+    ></van-field>
+    <van-popup position="bottom" v-model="showWeight">
+        <van-picker
+                title="体重"
+                show-toolbar
+                :columns="weight"
+                @confirm="onWeightConfirm"
+                @cancel="showWeight = false"
+        ></van-picker>
+    </van-popup>
+
+    <van-field
+            required
+            readonly
+            clickable
+            :value="form.marry"
+            label="婚姻状况"
+            placeholder="请选择婚姻状况"
+            @click="showMarry = true"
+    ></van-field>
+    <van-popup position="bottom" v-model="showMarry">
+        <van-picker
+                title="婚姻状况"
+                show-toolbar
+                :columns="marry"
+                @confirm="onMarryConfirm"
+                @cancel="showMarry = false"
+        ></van-picker>
+    </van-popup>
+
+    <!--生肖-->
+    <van-field
+            required
+            readonly
+            clickable
+            :value="form.animal"
+            label="生肖"
+            placeholder="点击选择生肖"
+            @click="showAnimal = true"
+    ></van-field>
+    <van-popup position="bottom" v-model="showAnimal">
+        <van-picker
+                title="生肖"
+                show-toolbar
+                :columns="animal"
+                @confirm="onAnimalConfirm"
+                @cancel="showAnimal = false"
+        ></van-picker>
+    </van-popup>
+
+    <!--学历-->
+    <van-field
+            required
+            readonly
+            clickable
+            :value="form.education"
+            label="学历"
+            placeholder="点击选择学历"
+            @click="showEducation = true"
+    ></van-field>
+    <van-popup position="bottom" v-model="showEducation">
+        <van-picker
+                title="学历"
+                show-toolbar
+                :columns="education"
+                @confirm="onEducationConfirm"
+                @cancel="showEducation = false"
+        ></van-picker>
+    </van-popup>
+
+    <!--年收入-->
+    <van-field
+            required
+            readonly
+            clickable
+            :value="form.income"
+            label="年收入"
+            placeholder="点击选择年收入"
+            @click="showIncome = true"
+    ></van-field>
+    <van-popup position="bottom" v-model="showIncome">
+        <van-picker
+                title="年收入"
+                show-toolbar
+                :columns="income"
+                @confirm="onIncomeConfirm"
+                @cancel="showIncome = false"
+        ></van-picker>
+    </van-popup>
+
+    <!--工作单位和职务-->
+    <van-field
+            v-model="form.company"
+            label="工作单位"
+            placeholder="请输入工作单位"
+    ></van-field>
+    <van-field
+            v-model="form.job"
+            label="职务"
+            placeholder="请输入职务"
+    ></van-field>
+
+    <!--家庭成员-->
+    <van-field name="form.family" label="家庭成员">
+        <template #input>
+            <van-row :gutter="10">
+                <van-col span="8" v-for="(item) in family">
+                    <div :class="{btn_search_item:true,active: in_array(item,form.family)}"
+                         @click="selectFamily(item)">
+                        {{item}}
+                        <van-icon v-if="in_array(item,form.family)"
+                                  class="iconfont icon-gouxuan-youxiajiaogouxuan btn_search_icon text-pink"></van-icon>
+                    </div>
+                </van-col>
+            </van-row>
+        </template>
+    </van-field>
+
+    <!--籍贯-->
+    <van-field
+            v-model="form.native"
+            label="籍贯"
+            placeholder="请输入籍贯"
+    ></van-field>
+
+    <!--民族-->
+    <van-field
+            readonly
+            clickable
+            :value="form.nation"
+            label="民族"
+            placeholder="点击选择民族"
+            @click="showNation = true"
+    ></van-field>
+    <van-popup position="bottom" v-model="showNation">
+        <van-picker
+                title="民族"
+                show-toolbar
+                :columns="nation"
+                @confirm="onNationConfirm"
+                @cancel="showNation = false"
+        ></van-picker>
+    </van-popup>
+
+    <!--兴趣爱好-->
+    <van-field
+            v-model="form.hobby"
+            autosize
+            label="兴趣爱好"
+            type="textarea"
+            placeholder="请输入兴趣爱好"
+    ></van-field>
+
+    <h3 class="fz16 mb10 pt20 plr12">工作生活</h3>
+
+    <!--房车,与父母同住-->
+    <van-field
+            readonly
+            clickable
+            :value="tinyint[form.have_house]"
+            label="是否有房"
+            placeholder="点击选择是否有房"
+            @click="showHaveHouse = true"
+    ></van-field>
+    <van-popup position="bottom" v-model="showHaveHouse">
+        <van-picker
+                title="是否有房"
+                show-toolbar
+                :columns="tinyint"
+                @confirm="onHaveHouseConfirm"
+                @cancel="showHaveHouse = false"
+        ></van-picker>
+    </van-popup>
+    <van-field
+            readonly
+            clickable
+            :value="tinyint[form.have_car]"
+            label="是否有车"
+            placeholder="点击选择是否有车"
+            @click="showHaveCar = true"
+    ></van-field>
+    <van-popup position="bottom" v-model="showHaveCar">
+        <van-picker
+                title="是否有车"
+                show-toolbar
+                :columns="tinyint"
+                @confirm="onHaveCarConfirm"
+                @cancel="showHaveCar = false"
+        ></van-picker>
+    </van-popup>
+    <van-field
+            readonly
+            clickable
+            :value="tinyint[form.with_parent_live]"
+            label="婚后是否愿意与父母同住"
+            placeholder="点击选择"
+            @click="showWithParentLive = true"
+    ></van-field>
+    <van-popup position="bottom" v-model="showWithParentLive">
+        <van-picker
+                title="婚后是否愿意与父母同住"
+                show-toolbar
+                :columns="tinyint"
+                @confirm="onWithParentLiveConfirm"
+                @cancel="showWithParentLive = false"
+        ></van-picker>
+    </van-popup>
+    <van-field
+            readonly
+            clickable
+            :value="tinyint[form.want_birth]"
+            label="是否愿意生育"
+            placeholder="点击选择"
+            @click="showWantBirth = true"
+    ></van-field>
+    <van-popup position="bottom" v-model="showWantBirth">
+        <van-picker
+                title="是否愿意生育"
+                show-toolbar
+                :columns="tinyint"
+                @confirm="onWantBirthConfirm"
+                @cancel="showWantBirth = false"
+        ></van-picker>
+    </van-popup>
+
+
+    <!--是否吸烟-->
+    <van-field
+            readonly
+            clickable
+            :value="form.smoke"
+            label="是否吸烟"
+            placeholder="点击选择是否吸烟"
+            @click="showSmoke = true"
+    ></van-field>
+    <van-popup position="bottom" v-model="showSmoke">
+        <van-picker
+                title="是否吸烟"
+                show-toolbar
+                :columns="smoke"
+                @confirm="onSmokeConfirm"
+                @cancel="showSmoke = false"
+        ></van-picker>
+    </van-popup>
+
+    <!--是否喝酒-->
+    <van-field
+            readonly
+            clickable
+            :value="form.drink"
+            label="是否喝酒"
+            placeholder="点击选择是否喝酒"
+            @click="showDrink = true"
+    ></van-field>
+    <van-popup position="bottom" v-model="showDrink">
+        <van-picker
+                title="是否喝酒"
+                show-toolbar
+                :columns="drink"
+                @confirm="onDrinkConfirm"
+                @cancel="showDrink = false"
+        ></van-picker>
+    </van-popup>
+
+    <div style="padding:16px;">
+        <van-button block class="bg-pink" @click="onSubmit">下一步</van-button>
+    </div>
+</block>
+<block name="script">
+    <script>
+        new Vue({
+            el: '#app',
+            data() {
+                return {
+                    form: {
+                        matchmaker_id: {$id},
+                        realname: '',
+                        sex: 0,
+                        mobile: '',
+                        avatar: '',
+                        birthday: '',
+                        animal: '',
+                        high: 0,
+                        weight: 0,
+                        education: '',
+                        company: '',
+                        job: '',
+                        income: '',
+                        nation: '',
+                        hobby: '',
+                        smoke: '',
+                        drink: '',
+                        family: [],
+                        native: '',
+                        have_house: 0,
+                        want_birth: 1,
+                        have_car: 0,
+                        with_parent_live: 0,
+                        marry: '',
+                    },
+                    showSex: false,
+                    sex: {$sex},
+                    showBirthday: false,
+                    minDate: new Date(1970, 0, 1),
+                    showHigh: false,
+                    high: {$high},
+                    showWeight: false,
+                    weight: {$weight},
+                    showMarry: false,
+                    marry: {$marry},
+                    showEducation: false,
+                    education: {$education},
+                    showIncome: false,
+                    income: {$income},
+                    showNation: false,
+                    nation: {$nation},
+                    showTalentLevel: false,
+                    showSmoke: false,
+                    smoke: {$smoke},
+                    showDrink: false,
+                    drink: {$drink},
+                    family: {$family},
+                    showHaveHouse: false,
+                    showHaveCar: false,
+                    showWithParentLive: false,
+                    tinyint: {$tinyint},
+                    animal: {$animal},
+                    showAnimal: false,
+                    showWantBirth: false,
+                };
+            },
+            methods: {
+                in_array(search,array){
+                    for(var i in array){
+                        if(array[i] == search){
+                            return true;
+                        }
+                    }
+                    return false;
+                },
+                onBack() {
+                    history.back();
+                },
+                onSubmit() {
+                    if (this.form.realname == '') {
+                        this.$toast('请输入真实姓名');
+                        return false;
+                    }
+                    if (this.form.mobile == '') {
+                        this.$toast('请输入电话');
+                        return false;
+                    }
+                    if (this.form.sex == 0) {
+                        this.$toast('请选择性别');
+                        return false;
+                    }
+                    if (this.form.birthday == '') {
+                        this.$toast('请选择正确的生日');
+                        return false;
+                    }
+                    if (this.form.animal == '') {
+                        this.$toast('请选择生肖');
+                        return false;
+                    }
+                    if (this.form.marry == '') {
+                        this.$toast('请选择婚姻状况');
+                        return false;
+                    }
+                    if (this.form.education == '') {
+                        this.$toast('请选择学历');
+                        return false;
+                    }
+                    if (this.form.income == '') {
+                        this.$toast('请选择年收入');
+                        return false;
+                    }
+
+                    let self = this;
+                    $.post("{:url('infoAddPost')}", this.form, function (json) {
+                        if (json.code) {
+                            location.href = "{:url('matingAdd')}?id=" + json.data.id;
+                        } else {
+                            self.$toast(json.msg);
+                        }
+                    }, 'json');
+                },
+                onBirthdayConfirm(date) {
+                    let year = date.getFullYear();
+                    let month = date.getMonth() + 1;
+                    if (month < 10) {
+                        month = "0" + month;
+                    }
+                    let day = date.getDate();
+                    if (day < 10) {
+                        day = "0" + day;
+                    }
+                    this.form.birthday = `${year}-${month}-${day}`;
+                    this.showBirthday = false;
+                },
+                onHighConfirm(value) {
+                    this.form.high = value == '保密' ? 0 : value;
+                    this.showHigh = false;
+                },
+                onWeightConfirm(value) {
+                    this.form.weight = value == '保密' ? 0 : value;
+                    this.showWeight = false;
+                },
+                onMarryConfirm(value) {
+                    this.form.marry = value;
+                    this.showMarry = false;
+                },
+                onAnimalConfirm(value) {
+                    this.form.animal = value;
+                    this.showAnimal = false;
+                },
+                onEducationConfirm(value) {
+                    this.form.education = value;
+                    this.showEducation = false;
+                },
+                onIncomeConfirm(value) {
+                    this.form.income = value;
+                    this.showIncome = false;
+                },
+                onNationConfirm(value) {
+                    this.form.nation = value;
+                    this.showNation = false;
+                },
+                onHaveHouseConfirm(value,index) {
+                    this.form.have_house = index;
+                    this.showHaveHouse = false;
+                },
+                onHaveCarConfirm(value,index) {
+                    this.form.have_car = index;
+                    this.showHaveCar = false;
+                },
+                onWithParentLiveConfirm(value,index) {
+                    this.form.with_parent_live = index;
+                    this.showWithParentLive = false;
+                },
+                onWantBirthConfirm(value,index){
+                    this.form.want_birth = index;
+                    this.showWantBirth = false;
+                },
+                onSmokeConfirm(value) {
+                    this.form.smoke = value;
+                    this.showSmoke = false;
+                },
+                onDrinkConfirm(value) {
+                    this.form.drink = value;
+                    this.showDrink = false;
+                },
+                removeByVal(arrylist , val) {
+                    for(var i = 0; i < arrylist .length; i++) {
+                        if(arrylist[i] == val) {
+                            arrylist .splice(i, 1);
+                            break;
+                        }
+                    }
+                },
+                selectFamily(value) {
+                    if (this.in_array(value,this.form.family)) {
+                        this.removeByVal(this.form.family,value);
+                    } else {
+                        this.form.family.push(value);
+                    }
+                },
+                uploadHead(file) {
+                    let self = this;
+                    $.post("{:url('imageUpload')}",{file:file.content,name:file.file.name},function(json){
+                        if (json.code) {
+                            self.form.avatar = json.data.avatar;
+                            self.$forceUpdate();
+                        } else {
+                            self.$toast(json.msg);
+                        }
+                    },'json')
+                },
+            },
+            computed: {
+                form_high() {
+                    return this.form.high ? this.form.high + 'CM' : '保密';
+                },
+                form_weight() {
+                    return this.form.weight ? this.form.weight + 'KG' : '保密';
+                },
+                head_image() {
+                    return this.form.avatar ? this.form.avatar : '__TMPL__/public/assets/images/matchmaker/avatar2.png';
+                }
+            },
+        });
+    </script>
+</block>

+ 461 - 0
public/themes/simpleboot3/matchmaker/register/mating_add.html

@@ -0,0 +1,461 @@
+<extend name="public/base"/>
+<block name="css">
+    <style>
+        .van-nav-bar--fixed {z-index:100;}
+        .van-step--horizontal .van-step__title {font-size:16px;}
+        .van-step--horizontal .van-step__icon {font-size:16px;}
+        .van-step__circle {width:10px;height:10px;}
+        .van-nav-bar .van-icon,.van-nav-bar__text {color:white;}
+
+        .van-row {width:100%;}
+        .btn_search_item{background:#f2f6ff;display:inline-block;border-radius:5px;line-height:35px;height:35px;text-align:center;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;position:relative;font-size:13px;width:100%;color:#666;margin-bottom:10px;}
+        .btn_search_item.active{color:var(--pink);background:#fff7fa;}
+        .btn_search_icon{position:absolute;bottom:-3px;right:-3px;font-size:30px;}
+    </style>
+</block>
+<block name="body">
+    <!--头部-->
+    <van-nav-bar
+            class="bg-pink"
+            fixed="true"
+    >
+        <template #title>
+            <span style="color:white;">择偶要求(2/2)</span>
+        </template>
+    </van-nav-bar>
+    <div style="width:100%;height:46px;"></div>
+
+    <van-steps :active="1">
+        <van-step>基本资料</van-step>
+        <van-step>择偶要求</van-step>
+    </van-steps>
+
+    <!--年龄-->
+    <van-field
+            readonly
+            clickable
+            :value="form_age"
+            label="年龄"
+            placeholder="点击选择年龄"
+            @click="showAge = true"
+    ></van-field>
+    <van-popup position="bottom" v-model="showAge">
+        <van-picker
+                title="年龄"
+                show-toolbar
+                :columns="age"
+                @confirm="onMultiPikerConfirm('age',$event)"
+                @cancel="showAge = false"
+        ></van-picker>
+    </van-popup>
+
+    <!--身高-->
+    <van-field
+            readonly
+            clickable
+            :value="form_high"
+            label="身高"
+            placeholder="点击选择身高"
+            @click="showHigh = true"
+    ></van-field>
+    <van-popup position="bottom" v-model="showHigh">
+        <van-picker
+                title="身高"
+                show-toolbar
+                :columns="high"
+                @confirm="onMultiPikerConfirm('high',$event)"
+                @cancel="showHigh = false"
+        ></van-picker>
+    </van-popup>
+
+    <!--体重-->
+    <van-field
+            readonly
+            clickable
+            :value="form_weight"
+            label="体重"
+            placeholder="点击选择体重"
+            @click="showWeight = true"
+    ></van-field>
+    <van-popup position="bottom" v-model="showWeight">
+        <van-picker
+                title="体重"
+                show-toolbar
+                :columns="weight"
+                @confirm="onMultiPikerConfirm('weight',$event)"
+                @cancel="showWeight = false"
+        ></van-picker>
+    </van-popup>
+
+    <!--无意愿生肖-->
+    <van-field name="form.family" label="无意愿生肖">
+        <template #input>
+            <van-row :gutter="10">
+                <van-col span="8" v-for="(item) in animal">
+                    <div :class="{btn_search_item:true,active: in_array(item,form.animal)}"
+                         @click="selectAnimal(item)">
+                        {{item}}
+                        <van-icon v-if="in_array(item,form.animal)"
+                                  class="iconfont icon-gouxuan-youxiajiaogouxuan btn_search_icon text-pink"></van-icon>
+                    </div>
+                </van-col>
+            </van-row>
+        </template>
+    </van-field>
+
+    <!--籍贯-->
+    <van-field
+            readonly
+            clickable
+            :value="form.native"
+            label="籍贯"
+            placeholder="点击选择籍贯"
+            @click="showNative = true"
+    ></van-field>
+    <van-popup position="bottom" v-model="showNative">
+        <van-picker
+                title="籍贯"
+                show-toolbar
+                :columns="native"
+                @confirm="onNativeConfirm"
+                @cancel="showNative = false"
+        ></van-picker>
+    </van-popup>
+
+    <!--学历-->
+    <van-field
+            readonly
+            clickable
+            :value="form.education"
+            label="学历"
+            placeholder="点击选择学历"
+            @click="showEducation = true"
+    ></van-field>
+    <van-popup position="bottom" v-model="showEducation">
+        <van-picker
+                title="学历"
+                show-toolbar
+                :columns="education"
+                @confirm="onEducationConfirm"
+                @cancel="showEducation = false"
+        ></van-picker>
+    </van-popup>
+
+    <!--年收入-->
+    <van-field
+            readonly
+            clickable
+            :value="form.income"
+            label="年收入"
+            placeholder="点击选择年收入"
+            @click="showIncome = true"
+    ></van-field>
+    <van-popup position="bottom" v-model="showIncome">
+        <van-picker
+                title="年收入"
+                show-toolbar
+                :columns="income"
+                @confirm="onIncomeConfirm"
+                @cancel="showIncome = false"
+        ></van-picker>
+    </van-popup>
+
+    <van-field
+            readonly
+            clickable
+            :value="tinyint[form.have_house]"
+            label="是否有房"
+            placeholder="点击选择是否有房"
+            @click="showHaveHouse = true"
+    ></van-field>
+    <van-popup position="bottom" v-model="showHaveHouse">
+        <van-picker
+                title="是否有房"
+                show-toolbar
+                :columns="tinyint"
+                @confirm="onHaveHouseConfirm"
+                @cancel="showHaveHouse = false"
+        ></van-picker>
+    </van-popup>
+    <van-field
+            readonly
+            clickable
+            :value="tinyint[form.have_car]"
+            label="是否有车"
+            placeholder="点击选择是否有车"
+            @click="showHaveCar = true"
+    ></van-field>
+    <van-popup position="bottom" v-model="showHaveCar">
+        <van-picker
+                title="是否有车"
+                show-toolbar
+                :columns="tinyint"
+                @confirm="onHaveCarConfirm"
+                @cancel="showHaveCar = false"
+        ></van-picker>
+    </van-popup>
+    <van-field
+            readonly
+            clickable
+            :value="tinyint[form.with_parent_live]"
+            label="婚后是否愿意与父母同住"
+            placeholder="点击选择"
+            @click="showWithParentLive = true"
+    ></van-field>
+    <van-popup position="bottom" v-model="showWithParentLive">
+        <van-picker
+                title="婚后是否愿意与父母同住"
+                show-toolbar
+                :columns="tinyint"
+                @confirm="onWithParentLiveConfirm"
+                @cancel="showWithParentLive = false"
+        ></van-picker>
+    </van-popup>
+
+    <!--是否吸烟-->
+    <van-field
+            readonly
+            clickable
+            :value="form.smoke"
+            label="是否吸烟"
+            placeholder="点击选择是否吸烟"
+            @click="showSmoke = true"
+    ></van-field>
+    <van-popup position="bottom" v-model="showSmoke">
+        <van-picker
+                title="是否吸烟"
+                show-toolbar
+                :columns="smoke"
+                @confirm="onSmokeConfirm"
+                @cancel="showSmoke = false"
+        ></van-picker>
+    </van-popup>
+
+    <!--是否喝酒-->
+    <van-field
+            readonly
+            clickable
+            :value="form.drink"
+            label="是否喝酒"
+            placeholder="点击选择是否喝酒"
+            @click="showDrink = true"
+    ></van-field>
+    <van-popup position="bottom" v-model="showDrink">
+        <van-picker
+                title="是否喝酒"
+                show-toolbar
+                :columns="drink"
+                @confirm="onDrinkConfirm"
+                @cancel="showDrink = false"
+        ></van-picker>
+    </van-popup>
+
+    <van-field
+            readonly
+            clickable
+            :value="tinyint[form.want_birth]"
+            label="是否要求生育"
+            placeholder="点击选择"
+            @click="showWantBirth = true"
+    ></van-field>
+    <van-popup position="bottom" v-model="showWantBirth">
+        <van-picker
+                title="是否要求生育"
+                show-toolbar
+                :columns="tinyint"
+                @confirm="onWantBirthConfirm"
+                @cancel="showWantBirth = false"
+        ></van-picker>
+    </van-popup>
+
+    <div style="padding:16px;">
+        <van-button block class="bg-pink" @click="onSubmit">完成</van-button>
+    </div>
+</block>
+<block name="script">
+    <script>
+        new Vue({
+            el: '#app',
+            data() {
+                return {
+                    form: {$mating},
+                    showAge: false,
+                    showHigh: false,
+                    showWeight: false,
+                    showMarry: false,
+                    showEducation: false,
+                    education: {$education},
+                    showNative: false,
+                    native: {$native},
+                    showIncome: false,
+                    income: {$income},
+                    tinyint: {$tinyint},
+                    showSmoke: false,
+                    smoke: {$smoke},
+                    showDrink: false,
+                    drink: {$drink},
+                    showHaveHouse: false,
+                    showHaveCar: false,
+                    showWithParentLive: false,
+                    animal: {$animal},
+                    showWantBirth:false,
+                };
+            },
+            methods: {
+                onSubmit() {
+                    $.post("{:url('matingAddPost')}", this.form, function (json) {
+                        location.href = '{:url("info")}';
+                    }, 'json');
+                },
+                onEducationConfirm(value) {
+                    this.form.education = value;
+                    this.showEducation = false;
+                },
+                onNativeConfirm(value) {
+                    this.form.native = value;
+                    this.showNative = false;
+                },
+                onPikerConfirm(key, value) {
+                    let upperKey = key.slice(0, 1).toUpperCase() + key.slice(1)
+                    this.form[key] = value;
+                    this[`show${upperKey}`] = false;
+                },
+                onMultiPikerConfirm(key, value) {
+                    if (value[1] < value[0]) {
+                        this.$toast('第二个值不能比第一个值小');
+                        return false;
+                    }
+                    this.form[`min_${key}`] = value[0] === '不限' ? 0 : value[0];
+                    this.form[`max_${key}`] = value[1] === '不限' ? 0 : value[1];
+                    let upperKey = key.slice(0, 1).toUpperCase() + key.slice(1);
+                    this[`show${upperKey}`] = false;
+                },
+
+                //多列选择器
+                getColumns(min,min_value,max,max_value){
+                    let min_default = this.findKey(min, min_value);
+                    if (min_default === undefined) {
+                        min_default = 0;
+                    }
+                    let max_default = this.findKey(max, max_value);
+                    if (max_default === undefined) {
+                        max_default = 0;
+                    }
+
+                    return [
+                        {
+                            values: min,
+                            default: min_default,
+                        },
+                        {
+                            values: max,
+                            default: max_default,
+                        },
+                    ];
+                },
+
+                //多列选择器值
+                getColumnsValue(min,max,ext) {
+                    if (min === '' || max === '') {
+                        return '';
+                    }
+
+                    if (min === 0 && max === 0) {
+                        return '不限';
+                    }
+
+                    let min_ext = min + ext;
+                    if (min === 0) {
+                        min_ext = '不限';
+                    }
+                    let max_ext = max + ext;
+                    if (max === 0) {
+                        max_ext = '不限';
+                    }
+                    return `${min_ext}-${max_ext}`;
+                },
+
+                //找键
+                findKey(obj, value, compare = (a, b) => a === b) {
+                    return Object.keys(obj).find(k => compare(obj[k], value))
+                },
+                onIncomeConfirm(value) {
+                    this.form.income = value;
+                    this.showIncome = false;
+                },
+                onHaveHouseConfirm(value,index) {
+                    this.form.have_house = index;
+                    this.showHaveHouse = false;
+                },
+                onHaveCarConfirm(value,index) {
+                    this.form.have_car = index;
+                    this.showHaveCar = false;
+                },
+                onWithParentLiveConfirm(value,index) {
+                    this.form.with_parent_live = index;
+                    this.showWithParentLive = false;
+                },
+                onSmokeConfirm(value) {
+                    this.form.smoke = value;
+                    this.showSmoke = false;
+                },
+                onDrinkConfirm(value) {
+                    this.form.drink = value;
+                    this.showDrink = false;
+                },
+                onWantBirthConfirm(value,index){
+                    this.form.want_birth = index;
+                    this.showWantBirth = false;
+                },
+                selectAnimal(value) {
+                    if (this.in_array(value,this.form.animal)) {
+                        this.removeByVal(this.form.animal,value);
+                    } else {
+                        this.form.animal.push(value);
+                    }
+                },
+                in_array(search,array){
+                    for(var i in array){
+                        if(array[i] == search){
+                            return true;
+                        }
+                    }
+                    return false;
+                },
+                removeByVal(arrylist , val) {
+                    for(var i = 0; i < arrylist .length; i++) {
+                        if(arrylist[i] == val) {
+                            arrylist .splice(i, 1);
+                            break;
+                        }
+                    }
+                },
+            },
+            computed: {
+                //年龄
+                age() {
+                    return this.getColumns({$min_age},this.form.min_age,{$max_age},this.form.max_age);
+                },
+                form_age() {
+                    return this.getColumnsValue(this.form.min_age,this.form.max_age,'岁');
+                },
+
+                //身高
+                high() {
+                    return this.getColumns({$min_high},this.form.min_high,{$max_high},this.form.max_high);
+                },
+                form_high() {
+                    return this.getColumnsValue(this.form.min_high,this.form.max_high,'CM');
+                },
+
+                //体重
+                weight() {
+                    return this.getColumns({$min_weight},this.form.min_weight,{$max_weight},this.form.max_weight);
+                },
+                form_weight() {
+                    return this.getColumnsValue(this.form.min_weight,this.form.max_weight,'KG');
+                },
+            }
+        });
+    </script>
+</block>

+ 13 - 2
public/themes/simpleboot3/matchmaker/user/match.html

@@ -58,11 +58,12 @@
                     <img :src="dealAvatar(item.avatar,item.sex)" @click="showImage(item.avatar)" alt="">
                 </div>
                 <div class="list-right">
-                    <div class="name"><span style="color:var(--pink)">{{item.id}}</span> {{item.realname}}
+                    <div class="name">{{item.realname}}
                         <span v-if="active == 0 && item.mobile">({{item.mobile}})</span>
                         <span class="mobile" v-if="active == 1">({{item.matchmaker.mobile}}【{{item.matchmaker.name}}】)</span>
                         <span class="mobile" v-if="active == 2">(0595-88052395【妇联】)</span>
                     </div>
+                    <div class="desc">编号:{{item.id}}</div>
                     <div class="desc">匹配{{item.match_count}}项 • {{item.age}}岁 • {{dealHigh(item.high)}}</div>
                 </div>
             </div>
@@ -102,6 +103,11 @@
                 <td :class="isMatch('weight')">{{info.weight}}KG</td>
                 <td :class="isMatch('weight')">{{showMatingRange(mating.min_weight,mating.max_weight,'KG')}}</td>
             </tr>
+            <tr>
+                <td>生肖(无意愿的生肖)</td>
+                <td :class="isMatch('animal')">{{info.animal}}</td>
+                <td :class="isMatch('animal')">{{mating.animal.join(',')}}</td>
+            </tr>
             <tr>
                 <td>籍贯</td>
                 <td :class="isMatch('native')">{{info.native}}</td>
@@ -142,6 +148,11 @@
                 <td :class="isMatch('drink')">{{info.drink}}</td>
                 <td :class="isMatch('drink')">{{mating.drink}}</td>
             </tr>
+            <tr>
+                <td>是否生育</td>
+                <td :class="isMatch('want_birth')">{{tinyint[info.want_birth]}}</td>
+                <td :class="isMatch('want_birth')">{{cond_tinyint[mating.want_birth]}}</td>
+            </tr>
             <tr>
                 <td>婚姻状况</td>
                 <td>{{info.marry}}</td>
@@ -196,7 +207,7 @@
                     location.href = "{:url('index/index')}";
                 },
                 onTab(index) {
-                    location.href = "{:url('match')}?id={$id}&type=" + index;
+                    location.href = "{:url('match')}?id={$id}&match_field={$match_field}&type=" + index;
                     return false;
                 },
                 dealAvatar(avatar,sex) {

+ 29 - 0
public/themes/simpleboot3/matchmaker/user/mating_add.html

@@ -5,6 +5,12 @@
         .van-step--horizontal .van-step__title {font-size:16px;}
         .van-step--horizontal .van-step__icon {font-size:16px;}
         .van-step__circle {width:10px;height:10px;}
+        .van-nav-bar .van-icon,.van-nav-bar__text {color:white;}
+
+        .van-row {width:100%;}
+        .btn_search_item{background:#f2f6ff;display:inline-block;border-radius:5px;line-height:35px;height:35px;text-align:center;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;position:relative;font-size:13px;width:100%;color:#666;margin-bottom:10px;}
+        .btn_search_item.active{color:var(--pink);background:#fff7fa;}
+        .btn_search_icon{position:absolute;bottom:-3px;right:-3px;font-size:30px;}
     </style>
 </block>
 <block name="body">
@@ -244,6 +250,24 @@
         ></van-picker>
     </van-popup>
 
+    <van-field
+            readonly
+            clickable
+            :value="tinyint[form.want_birth]"
+            label="是否要求生育"
+            placeholder="点击选择"
+            @click="showWantBirth = true"
+    ></van-field>
+    <van-popup position="bottom" v-model="showWantBirth">
+        <van-picker
+                title="是否要求生育"
+                show-toolbar
+                :columns="tinyint"
+                @confirm="onWantBirthConfirm"
+                @cancel="showWantBirth = false"
+        ></van-picker>
+    </van-popup>
+
     <div style="padding:16px;">
         <van-button block class="bg-pink" @click="onSubmit">完成</van-button>
     </div>
@@ -274,6 +298,7 @@
                     showHaveCar: false,
                     showWithParentLive: false,
                     animal: {$animal},
+                    showWantBirth:false,
                 };
             },
             methods: {
@@ -378,6 +403,10 @@
                     this.form.drink = value;
                     this.showDrink = false;
                 },
+                onWantBirthConfirm(value,index){
+                    this.form.want_birth = index;
+                    this.showWantBirth = false;
+                },
                 selectAnimal(value) {
                     if (this.in_array(value,this.form.animal)) {
                         this.removeByVal(this.form.animal,value);

+ 23 - 0
public/themes/simpleboot3/matchmaker/user/mating_edit.html

@@ -248,6 +248,24 @@
         ></van-picker>
     </van-popup>
 
+    <van-field
+            readonly
+            clickable
+            :value="tinyint[form.want_birth]"
+            label="是否要求生育"
+            placeholder="点击选择"
+            @click="showWantBirth = true"
+    ></van-field>
+    <van-popup position="bottom" v-model="showWantBirth">
+        <van-picker
+                title="是否要求生育"
+                show-toolbar
+                :columns="tinyint"
+                @confirm="onWantBirthConfirm"
+                @cancel="showWantBirth = false"
+        ></van-picker>
+    </van-popup>
+
     <div style="padding:16px;">
         <van-button block class="bg-pink" @click="onSubmit">完成</van-button>
     </div>
@@ -278,6 +296,7 @@
                     showHaveCar: false,
                     showWithParentLive: false,
                     animal: {$animal},
+                    showWantBirth: false,
                 };
             },
             methods: {
@@ -385,6 +404,10 @@
                     this.form.drink = value;
                     this.showDrink = false;
                 },
+                onWantBirthConfirm(value,index){
+                    this.form.want_birth = index;
+                    this.showWantBirth = false;
+                },
                 selectAnimal(value) {
                     if (this.in_array(value,this.form.animal)) {
                         this.removeByVal(this.form.animal,value);

BIN=BIN
public/themes/simpleboot3/public/assets/images/matchmaker/myIcon4.png


BIN=BIN
public/themes/simpleboot3/public/assets/images/matchmaker/myIcon5.png