linwu 9 ماه پیش
والد
کامیت
c977bf938e

+ 16 - 0
app/common/Constant.php

@@ -46,4 +46,20 @@ class Constant
      */
     const MIN_WEIGHT = ['不限', 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100];
     const MAX_WEIGHT = ['不限', 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100];
+
+    /**
+     * 生肖
+     */
+    const ANIMAL = ['鼠', '牛', '虎', '兔', '龙', '蛇', '马', '羊', '猴', '鸡', '狗', '猪'];
+
+    /**
+     * 是否
+     */
+    const YES_NO = [1 => '是', 2 => '否'];
+
+    /**
+     * 择偶抽烟
+     */
+    const MATTING_SMOKING = ['不反感', '接受偶尔', '反感'];
+    const MATTING_DRINK   = ['不反感', '接受偶尔', '反感'];
 }

+ 1 - 1
app/love/controller/LoginController.php

@@ -101,7 +101,7 @@ class LoginController extends HomeBaseController
 
     public function login1()
     {
-        $user = UserModel::get(3);
+        $user = UserModel::get(23);
         session('user', $user->toArray());
 
         $token = cmf_generate_user_token(3, 'mobile');

+ 9 - 6
app/love/controller/MyController.php

@@ -180,8 +180,8 @@ class MyController extends LoveBaseController
             'education'  => $education,
             'income'     => Constant::COND_INCOME,
             'id_type'    => array_merge(Constant::ID_TYPE, ['不限']),
-            'smoke'      => Constant::SMOKE,
-            'drink'      => Constant::DRINK,
+            'smoke'      => Constant::MATTING_SMOKING,
+            'drink'      => Constant::MATTING_DRINK,
             'tinyint'    => Constant::COND_TINYINT,
         ];
         foreach ($data as &$v) {
@@ -198,6 +198,9 @@ class MyController extends LoveBaseController
     public function condPost()
     {
         $param = $this->request->post();
+        if (empty($param['animal'])) {
+            $param['animal'] = [];
+        }
         UserMatingModel::update($param, ['user_id' => cmf_get_current_user_id()]);
         $this->success('操作成功');
     }
@@ -377,7 +380,7 @@ class MyController extends LoveBaseController
             ->where('is_confirm', 1)
             ->find();
         //奖品
-        $has_prize   = LotteryPrizeModel::all();
+        $has_prize = LotteryPrizeModel::all();
         $this->assign('has_prize', $has_prize->isEmpty() ? 'false' : 'true');
         if (!empty($select)) {
             //已选择
@@ -472,7 +475,7 @@ class MyController extends LoveBaseController
             $user = UserSelectModel::get(['user_id' => $id, 'uid' => $user_id]);
         }
         if (!empty($user)) {
-            UserSelectLogModel::where('user_id1|user_id2', $id)->update(['delete_time'=>time()]);
+            UserSelectLogModel::where('user_id1|user_id2', $id)->update(['delete_time' => time()]);
             $user->delete();
         }
 
@@ -550,8 +553,8 @@ class MyController extends LoveBaseController
         Db::name('config')->where('id', 1)->setInc('select_num');
         //发送提示
         $form_id = $this->user->sex = 1 ? $user_id : $id;
-        $to_id = $this->user->sex = 1 ? $id : $user_id;
-        $time = time();
+        $to_id   = $this->user->sex = 1 ? $id : $user_id;
+        $time    = time();
         UserMessageModel::create([
             'from_id'     => $form_id,
             'to_id'       => $to_id,

+ 6 - 3
app/love/controller/RegisterController.php

@@ -144,7 +144,7 @@ class RegisterController extends HomeBaseController
             }
             $this->success('');
         } else {
-            $this->assign('department', Constant::DEPARTMENT);
+            $this->assign('department', Constant::TINYINT);
             return $this->fetch();
         }
     }
@@ -228,6 +228,9 @@ class RegisterController extends HomeBaseController
     {
         if ($this->request->isPost()) {
             $param = $this->request->post();
+            if (empty($param['animal'])) {
+                $param['animal'] = [];
+            }
             UserMatingModel::update($param, ['user_id' => cmf_get_current_user_id()]);
             UserModel::update(['is_complete' => 1, 'id' => cmf_get_current_user_id()]);
             $this->success('操作成功');
@@ -248,8 +251,8 @@ class RegisterController extends HomeBaseController
                 'education'  => $education,
                 'income'     => Constant::COND_INCOME,
                 'id_type'    => array_merge(Constant::ID_TYPE, ['不限']),
-                'smoke'      => Constant::SMOKE,
-                'drink'      => Constant::DRINK,
+                'smoke'      => Constant::MATTING_SMOKING,
+                'drink'      => Constant::MATTING_DRINK,
                 'tinyint'    => Constant::COND_TINYINT,
             ];
             foreach ($data as &$v) {

+ 8 - 3
app/matchmaker/controller/IndexController.php

@@ -18,7 +18,8 @@ class IndexController extends MatchmakerBaseController
 {
     public function index()
     {
-        return $this->fetch();
+        $status = $this->request->get('status', 0);
+        return $this->fetch('', ['status' => $status]);
     }
 
     public function listUser()
@@ -28,17 +29,21 @@ class IndexController extends MatchmakerBaseController
         $where = [
             ['matchmaker_id', '=', $this->matchmaker['id']],
         ];
+        if (!empty($param['status'])) {
+            $where[] = ['status', '=', $param['status']];
+        }
         if (!empty($param['keyword'])) {
-            $where[] = ['realname|mobile', 'like', "%{$param['keyword']}%"];
+            $where[] = ['realname|mobile|id', 'like', "%{$param['keyword']}%"];
         }
 
         $list = MatchmakerUserModel::where($where)
             ->order('id desc')
+            ->append(['status_text'])
             ->limit(6)
             ->page($param['page'])
             ->select();
         foreach ($list as $v) {
-            $v['age'] = Fun::getAgeByBirth($v['birthday']);
+            $v['age']      = Fun::getAgeByBirth($v['birthday']);
             $v['sex_text'] = Constant::SEX[$v['sex']];
         }
 

+ 71 - 12
app/matchmaker/controller/UserController.php

@@ -33,6 +33,7 @@ class UserController extends MatchmakerBaseController
             'drink'     => Constant::DRINK,
             'family'    => Constant::FAMILY,
             'tinyint'   => Constant::TINYINT,
+            'animal'    => Constant::ANIMAL,
         ];
         foreach ($data as &$v) {
             $v = json_encode($v);
@@ -48,7 +49,7 @@ class UserController extends MatchmakerBaseController
         $value['birthday']      = strtotime($value['birthday']);
         $value['matchmaker_id'] = $this->matchmaker['id'];
         $user                   = MatchmakerUserModel::create($value);
-        MatchmakerUserMatingModel::create(['user_id' => $user['id']]);
+        MatchmakerUserMatingModel::create(['user_id' => $user['id'], 'animal' => []]);
         $this->success('', '', ['id' => $user['id']]);
     }
 
@@ -59,6 +60,9 @@ class UserController extends MatchmakerBaseController
             $this->error('参数错误');
         }
         $mating = MatchmakerUserMatingModel::get(['user_id' => $id]);
+        if (empty($mating['animal'])) {
+            $mating['animal'] = [];
+        }
         $this->assign('mating', $mating);
 
         $education   = Constant::EDUCATION;
@@ -73,9 +77,10 @@ class UserController extends MatchmakerBaseController
             'native'     => Constant::NATIVE,
             'education'  => $education,
             'income'     => Constant::COND_INCOME,
-            'smoke'      => Constant::SMOKE,
-            'drink'      => Constant::DRINK,
+            'smoke'      => Constant::MATTING_SMOKING,
+            'drink'      => Constant::MATTING_DRINK,
             'tinyint'    => Constant::COND_TINYINT,
+            'animal'     => Constant::ANIMAL,
         ];
         foreach ($data as &$v) {
             $v = json_encode($v);
@@ -88,6 +93,9 @@ class UserController extends MatchmakerBaseController
     public function matingAddPost()
     {
         $param = $this->request->post();
+        if (empty($param['animal'])) {
+            $param['animal'] = [];
+        }
         MatchmakerUserMatingModel::update($param);
         $this->success('操作成功');
     }
@@ -118,6 +126,7 @@ class UserController extends MatchmakerBaseController
             'drink'     => Constant::DRINK,
             'family'    => Constant::FAMILY,
             'tinyint'   => Constant::TINYINT,
+            'animal'    => Constant::ANIMAL,
         ];
         foreach ($data as &$v) {
             $v = json_encode($v);
@@ -143,6 +152,9 @@ class UserController extends MatchmakerBaseController
             $this->error('参数错误');
         }
         $mating = MatchmakerUserMatingModel::get(['user_id' => $id]);
+        if (empty($mating['animal'])) {
+            $mating['animal'] = [];
+        }
         $this->assign('mating', $mating);
 
         $education   = Constant::EDUCATION;
@@ -157,9 +169,10 @@ class UserController extends MatchmakerBaseController
             'native'     => Constant::NATIVE,
             'education'  => $education,
             'income'     => Constant::COND_INCOME,
-            'smoke'      => Constant::SMOKE,
-            'drink'      => Constant::DRINK,
+            'smoke'      => Constant::MATTING_SMOKING,
+            'drink'      => Constant::MATTING_DRINK,
             'tinyint'    => Constant::COND_TINYINT,
+            'animal'     => Constant::ANIMAL,
         ];
         foreach ($data as &$v) {
             $v = json_encode($v);
@@ -172,6 +185,9 @@ class UserController extends MatchmakerBaseController
     public function matingEditPost()
     {
         $param = $this->request->post();
+        if (empty($param['animal'])) {
+            $param['animal'] = [];
+        }
         MatchmakerUserMatingModel::update($param);
         $this->success('操作成功');
     }
@@ -249,6 +265,31 @@ class UserController extends MatchmakerBaseController
         $this->success('操作成功');
     }
 
+    public function deleteUser()
+    {
+        $id = $this->request->post('id', 0);
+        if (empty($id)) {
+            $this->error('数据异常,请刷新重试');
+        }
+        MatchmakerUserModel::destroy($id);
+        MatchmakerUserMatingModel::destroy(['user_id' => $id]);
+        MatchmakerUserFollowModel::destroy(['user_id' => $id]);
+
+        $this->success('操作成功');
+    }
+
+    public function statusUser()
+    {
+        $id     = $this->request->post('id', 0);
+        $status = $this->request->post('status', 0);
+        if (empty($id) || empty($status)) {
+            $this->error('数据异常,请刷新重试');
+        }
+        MatchmakerUserModel::update(['status' => $status], ['id' => $id]);
+
+        $this->success('操作成功');
+    }
+
     /**
      * 匹配
      */
@@ -512,15 +553,15 @@ class UserController extends MatchmakerBaseController
             }
 
             //是否吸烟 ['不吸,很反感', '不吸烟,但不反感', '社交时偶尔吸烟','烟不离手']
-            if ($mating['smoke'] == '烟不离手' || $mating['smoke'] == '' || $mating['smoke'] == '不吸烟,但不反感') {
+            if ($mating['smoke'] == '不反感' || $mating['smoke'] == '') {
                 $match_arr[] = 'smoke';
                 $match_count++;
-            } elseif ($mating['smoke'] == '社交时偶尔吸烟') {
+            } elseif ($mating['smoke'] == '接受偶尔') {
                 if (in_array($v['smoke'], ['社交时偶尔吸烟', '不吸烟,但不反感', '不吸,很反感'])) {
                     $match_arr[] = 'smoke';
                     $match_count++;
                 }
-            } elseif ($mating['smoke'] == '不吸,很反感') {
+            } elseif ($mating['smoke'] == '反感') {
                 if (in_array($v['smoke'], ['不吸,很反感', '不吸烟,但不反感'])) {
                     $match_arr[] = 'smoke';
                     $match_count++;
@@ -528,15 +569,15 @@ class UserController extends MatchmakerBaseController
             }
 
             //是否喝酒 ['不喝酒', '社交需要喝', '兴致时小酌', '酒不离口']
-            if ($mating['drink'] == '酒不离口' || $mating['drink'] == '') {
+            if ($mating['drink'] == '不反感' || $mating['drink'] == '') {
                 $match_arr[] = 'drink';
                 $match_count++;
-            } elseif ($mating['drink'] == '兴致时小酌' || $mating['drink'] == '社交需要喝') {
-                if ($v['drink'] == '兴致时小酌' || $v['drink'] == '社交需要喝') {
+            } elseif ($mating['drink'] == '接受偶尔') {
+                if (in_array($v['drink'], ['不喝酒', '社交需要喝', '兴致时小酌'])) {
                     $match_arr[] = 'drink';
                     $match_count++;
                 }
-            } elseif ($mating['drink'] == '不喝酒') {
+            } elseif ($mating['drink'] == '反感') {
                 if ($v['drink'] == '不喝酒') {
                     $match_arr[] = 'drink';
                     $match_count++;
@@ -546,6 +587,11 @@ class UserController extends MatchmakerBaseController
             $list[$k]['age']         = $age;
             $list[$k]['match_arr']   = $match_arr;
             $list[$k]['match_count'] = $match_count;
+
+            //姓名
+            if (mb_strlen($list[$k]['realname'], 'utf-8') > 1) {
+                $list[$k]['realname'] = $this->_replaceSecondChineseCharWithAsterisk($list[$k]['realname']); // 将第二个字符替换为星号
+            }
         }
 
         //排序
@@ -566,4 +612,17 @@ class UserController extends MatchmakerBaseController
             return $list;
         }
     }
+
+    private function _replaceSecondChineseCharWithAsterisk($string)
+    {
+        $length = mb_strlen($string, 'utf-8');
+        $arr    = [];
+        for ($i = 0; $i < $length; $i++) {
+            $arr[] = mb_substr($string, $i, 1, 'utf-8');
+        }
+        $arr[1] = '*';
+
+        return implode('', $arr);
+    }
+
 }

+ 4 - 0
app/matchmaker/model/MatchmakerUserFollowModel.php

@@ -14,6 +14,10 @@ use think\Model;
 
 class MatchmakerUserFollowModel extends Model
 {
+    protected $type = [
+        'image_list' => 'array',
+    ];
+
     public function getCreateTimeTextAttr($value, $data)
     {
         return date('Y-m-d H:i:s', $data['create_time']);

+ 3 - 0
app/matchmaker/model/MatchmakerUserMatingModel.php

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

+ 6 - 0
app/matchmaker/model/MatchmakerUserModel.php

@@ -28,4 +28,10 @@ class MatchmakerUserModel extends Model
         $sex = ['保密', '男', '女'];
         return $sex[$data['sex']];
     }
+
+    public function getStatusTextAttr($value, $data)
+    {
+        $arr = ['','待审核', '审核通过', '审核不通过','热恋','已婚'];
+        return $arr[$data['status']];
+    }
 }

+ 65 - 4
public/themes/simpleboot3/matchmaker/index/index.html

@@ -6,9 +6,10 @@
         .lw-list .list-content {display:flex;align-items:center;}
         .lw-list .list-content .list-left {width:50px;height:50px;}
         .lw-list .list-content .list-left img {width:50px;height:50px;}
-        .lw-list .list-content .list-right {margin-left:20px;}
+        .lw-list .list-content .list-right {margin-left:20px;width:100%;}
         .lw-list .list-content .list-right .name {color:black;height:30px;line-height:30px;}
         .lw-list .list-content .list-right .name .mobile {font-size:14px;color:var(--blue);}
+        .lw-list .list-content .list-right .name .status {color:#666;font-size:14px;float:right;}
         .lw-list .list-content .list-right .desc {color:#666;font-size:14px;height:20px;line-height:20px;}
         .lw-list .list-tool {border-top:1px solid #f8f9fb;margin-top:5px;display:flex;justify-content:flex-end;align-items:center;padding-top:5px;}
         .lw-list .list-tool .tool-btn {margin-left:5px;font-size:14px;border:1px solid #ccc;padding:5px 10px;border-radius:20px;color:#555;}
@@ -26,10 +27,13 @@
     <form action="/">
         <van-search
                 v-model="form.keyword"
-                placeholder="请输入姓名或电话"
+                placeholder="请输入姓名或电话或编号"
                 @search="onRefresh"
         ></van-search>
     </form>
+    <van-dropdown-menu>
+        <van-dropdown-item v-model="status" :options="status_list" @change="statusChange"></van-dropdown-item>
+    </van-dropdown-menu>
 
     <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
         <van-list
@@ -45,7 +49,8 @@
                             <img :src="dealAvatar(item.avatar,item.sex)" alt="">
                         </div>
                         <div class="list-right">
-                            <div class="name">{{item.realname}} <span class="mobile" v-if="item.mobile">({{item.mobile}})</span></div>
+                            <div class="name">{{item.realname}} <span class="mobile" v-if="item.mobile">({{item.mobile}})</span> <span class="status">{{item.status_text}}</span></div>
+                            <div class="desc">编号:{{item.id}}</div>
                             <div class="desc">{{item.sex_text}} • {{item.age}}岁 • {{dealHigh(item.high)}}</div>
                         </div>
                     </div>
@@ -54,7 +59,21 @@
                         <div class="tool-btn" @click="toMating(item.id)">择偶要求</div>
                         <div class="tool-btn match" @click="toMatch(item.id)">智能匹配</div>
                         <div class="tool-btn" @click="toFollow(item.id)">跟进</div>
-                        <div class="tool-btn delete">删除</div>
+                    </div>
+                    <div class="list-tool">
+                        <div class="tool-btn">
+                            <van-popover
+                                    v-model="showPopover"
+                                    trigger="click"
+                                    :actions="actions"
+                                    @select="toStatus(item.id,$event)"
+                            >
+                                <template #reference>
+                                    更改状态
+                                </template>
+                            </van-popover>
+                        </div>
+                        <div class="tool-btn delete" @click="toDelete(item.id)">删除</div>
                     </div>
                 </div>
             </div>
@@ -87,6 +106,7 @@
                     active: 0,
                     form: {
                         keyword: '',
+                        status: {$status},
                     },
 
                     list: [],
@@ -94,6 +114,25 @@
                     loading: false,
                     finished: false,
                     refreshing: false,
+
+                    status: {$status},
+                    status_list: [
+                        { text: '全部状态', value: 0 },
+                        { text: '待审核', value: 1 },
+                        { text: '审核通过', value: 2 },
+                        { text: '审核不通过', value: 3 },
+                        { text: '热恋', value: 4 },
+                        { text: '已婚', value: 5 },
+                    ],
+
+                    showPopover:false,
+                    actions: [
+                        { text: '待审核', value: 1 },
+                        { text: '审核通过', value: 2 },
+                        { text: '审核不通过', value: 3 },
+                        { text: '热恋', value: 4 },
+                        { text: '已婚', value: 5 },
+                    ],
                 };
             },
             methods: {
@@ -125,6 +164,25 @@
                 toFollow(id) {
                     location.href = '{:url("matchmaker/user/follow")}?id=' + id;
                 },
+                toDelete(id) {
+                    vant.Dialog.confirm({
+                        title: '提示',
+                        message: '将会删除该用户所有信息,跟进记录等,并且无法恢复,确认删除吗?',
+                    })
+                        .then(() => {
+                            $.post("{:url('user/deleteUser')}", {id:id}, function (json) {
+                                location.reload();
+                            }, 'json');
+                        })
+                        .catch(() => {
+                            // on cancel
+                        });
+                },
+                toStatus(id,action) {
+                    $.post("{:url('user/statusUser')}", {id:id,status:action.value}, function (json) {
+                        location.reload();
+                    }, 'json');
+                },
                 onLoad() {
                     //参数
                     let self = this;
@@ -161,6 +219,9 @@
 
                     this.onLoad();
                 },
+                statusChange(value) {
+                    location.href = "{:url('index')}?status=" + value;
+                },
             },
         });
     </script>

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

@@ -55,7 +55,7 @@
             <h2>我的资料</h2>
             <van-icon style="margin-left: 216px" name="arrow" />
         </li>
-        <li @click="callPhone('0595-88150395')">
+        <li @click="callPhone('0595-88052395')">
             <img src="__TMPL__/public/assets/images/matchmaker/myIcon2.png" alt="">
             <h2>联系我们</h2>
             <van-icon style="margin-left: 216px" name="arrow" />

+ 42 - 0
public/themes/simpleboot3/matchmaker/user/follow.html

@@ -19,6 +19,9 @@
         .lw-list .list-tool .tool-btn {margin-left:5px;font-size:14px;border:1px solid #ccc;padding:5px 10px;border-radius:20px;color:#555;}
         .lw-list .list-tool .tool-btn.delete {border-color:var(--pink);color:var(--pink);}
         .lw-list .list-tool .tool-btn.match {border-color:var(--blue);color:var(--blue);}
+
+        .image-box {padding:10px 0;}
+        .image-box .van-image {margin:0 5px;}
     </style>
 </block>
 <block name="body">
@@ -58,6 +61,9 @@
             placeholder="请输入跟进内容"
             show-word-limit
     ></van-field>
+    <!--头图-->
+    <van-uploader multiple :after-read="uploadHead" :before-delete="deleteImage" v-model="image_list" style="padding:20px;width:100%;background:white;">
+    </van-uploader>
     <div style="padding:16px;">
         <van-button block class="bg-pink" @click="onSubmit">提交</van-button>
     </div>
@@ -67,6 +73,15 @@
     <van-steps direction="vertical" :active="0">
         <van-step v-for="item in list">
             <h3>{{item.content}}</h3>
+            <p v-if="item.image_list != null" class="image-box">
+                <van-image
+                        v-for="(image,index) in item.image_list"
+                        width="100"
+                        height="100"
+                        :src="image"
+                        @click="showImage(item.image_list,index)"
+                ></van-image>
+            </p>
             <p>{{item.create_time_text}}</p>
         </van-step>
     </van-steps>
@@ -81,7 +96,9 @@
                     form:{
                         user_id: {$id},
                         content: '',
+                        image_list: [],
                     },
+                    image_list:[],
                     list: {$list},
                 };
             },
@@ -108,6 +125,31 @@
                 dealHigh(high) {
                     return high ? high + 'CM' : '保密';
                 },
+                uploadHead(file) {
+                    let self = this;
+                    $.post("{:url('imageUpload')}",{file:file.content,name:file.file.name},function(json){
+                        if (json.code) {
+                            self.form.image_list.push(json.data.avatar);
+                            self.$forceUpdate();
+                        } else {
+                            self.$toast(json.msg);
+                        }
+                    },'json')
+                },
+                deleteImage(file,index) {
+                    let arr = [...this.form.image_list];
+                    arr.splice(index,1);
+
+                    this.form.image_list = arr;
+                    console.log(this.form);
+                    return true;
+                },
+                showImage(images,index) {
+                    vant.ImagePreview({
+                        images: images,
+                        startPosition: index,
+                    });
+                }
             },
             computed: {
             }

+ 55 - 0
public/themes/simpleboot3/matchmaker/user/info_add.html

@@ -141,6 +141,26 @@
         ></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
@@ -298,6 +318,24 @@
                 @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
@@ -353,6 +391,7 @@
                         mobile: '',
                         avatar: '',
                         birthday: '',
+                        animal: '',
                         high: 0,
                         weight: 0,
                         education: '',
@@ -366,6 +405,7 @@
                         family: [],
                         native: '',
                         have_house: 0,
+                        want_birth: 1,
                         have_car: 0,
                         with_parent_live: 0,
                         marry: '',
@@ -396,6 +436,9 @@
                     showHaveCar: false,
                     showWithParentLive: false,
                     tinyint: {$tinyint},
+                    animal: {$animal},
+                    showAnimal: false,
+                    showWantBirth: false,
                 };
             },
             methods: {
@@ -423,6 +466,10 @@
                         this.$toast('请选择正确的生日');
                         return false;
                     }
+                    if (this.form.animal == '') {
+                        this.$toast('请选择生肖');
+                        return false;
+                    }
                     if (this.form.marry == '') {
                         this.$toast('请选择婚姻状况');
                         return false;
@@ -465,6 +512,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;
@@ -489,6 +540,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;

+ 52 - 0
public/themes/simpleboot3/matchmaker/user/info_edit.html

@@ -135,6 +135,26 @@
         ></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
@@ -292,6 +312,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
@@ -368,6 +405,9 @@
                     showHaveCar: false,
                     showWithParentLive: false,
                     tinyint: {$tinyint},
+                    animal: {$animal},
+                    showAnimal: false,
+                    showWantBirth: false,
                 };
             },
             methods: {
@@ -399,6 +439,10 @@
                         this.$toast('请选择婚姻状况');
                         return false;
                     }
+                    if (this.form.animal == '') {
+                        this.$toast('请选择生肖');
+                        return false;
+                    }
                     if (this.form.education == '') {
                         this.$toast('请选择学历');
                         return false;
@@ -437,6 +481,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;
@@ -461,6 +509,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;

+ 9 - 4
public/themes/simpleboot3/matchmaker/user/match.html

@@ -47,7 +47,7 @@
 
     <van-tabs v-model="active" :before-change="onTab">
         <van-tab title="自有库"></van-tab>
-        <van-tab title="其他媒婆库"></van-tab>
+        <van-tab title="其他红娘库"></van-tab>
         <van-tab title="妇联库"></van-tab>
     </van-tabs>
 
@@ -55,13 +55,13 @@
         <div class="list-item" v-for="item in list">
             <div class="list-content">
                 <div class="list-left">
-                    <img :src="dealAvatar(item.avatar,item.sex)" alt="">
+                    <img :src="dealAvatar(item.avatar,item.sex)" @click="showImage(item.avatar)" alt="">
                 </div>
                 <div class="list-right">
-                    <div class="name">{{item.realname}}
+                    <div class="name"><span style="color:var(--pink)">{{item.id}}</span> {{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-88150395【妇联】)</span>
+                        <span class="mobile" v-if="active == 2">(0595-88052395【妇联】)</span>
                     </div>
                     <div class="desc">匹配{{item.match_count}}项 • {{item.age}}岁 • {{dealHigh(item.high)}}</div>
                 </div>
@@ -227,6 +227,11 @@
                 isMatch(value) {
                     const match = this.info.match_arr.includes(value)
                     return match ? 'match' : 'no-match';
+                },
+                showImage(avatar) {
+                    if (avatar != '') {
+                        vant.ImagePreview([avatar]);
+                    }
                 }
             },
             computed: {

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

@@ -81,6 +81,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
@@ -257,6 +273,7 @@
                     showHaveHouse: false,
                     showHaveCar: false,
                     showWithParentLive: false,
+                    animal: {$animal},
                 };
             },
             methods: {
@@ -361,6 +378,29 @@
                     this.form.drink = value;
                     this.showDrink = 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: {
                 //年龄

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

@@ -6,6 +6,11 @@
         .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">
@@ -80,6 +85,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
@@ -256,6 +277,7 @@
                     showHaveHouse: false,
                     showHaveCar: false,
                     showWithParentLive: false,
+                    animal: {$animal},
                 };
             },
             methods: {
@@ -363,6 +385,29 @@
                     this.form.drink = value;
                     this.showDrink = 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: {
                 //年龄