Просмотр исходного кода

wesmiler 更新第5期更新代码合并

wesmiler 4 лет назад
Родитель
Сommit
db087eae82

+ 19 - 21
app/api/controller/MemberController.php

@@ -126,7 +126,7 @@ class MemberController extends BaseController
 
             // 认证数据
             if ($type == 5) {
-                $field = 'idcard,front_idcard,back_idcard,idcard_fail,idcard_check,idcard_online_check';
+                $field = 'idcard,front_idcard,back_idcard,idcard_fail,idcard_check,idcard_type,idcard_online_check';
                 $authData = UserProfile::where(['userid' => $userId])
                     ->field($field)
                     ->find();
@@ -941,6 +941,7 @@ class MemberController extends BaseController
                     'idcard' => $idcard,
                     'front_idcard' => isset($params['front_idcard']) ? trim($params['front_idcard']) : '',
                     'back_idcard' => isset($params['back_idcard']) ? trim($params['back_idcard']) : '',
+                    'idcard_type' => isset($params['idcard_type']) ? intval($params['idcard_type']) : 1,
                     'idcard_check' => 1,
                 ];
 
@@ -952,21 +953,14 @@ class MemberController extends BaseController
                     showJson(1004, 2128);
                 }
 
-                // 在线验证
-                $checkData = IdnAuth::check($realname, $idcard);
-                $code = isset($checkData['code'])? $checkData['code'] : '';
-                $msg = isset($checkData['msg'])? $checkData['msg'] : '';
-                if($code != 'success' && (empty($profileData['front_idcard']) || empty($profileData['back_idcard']))){
-                    showJson(1004, $msg? $msg : 2138);
-                }
 
                 // 身份证照片
-                /*if (empty($profileData['front_idcard'])) {
+                if (empty($profileData['front_idcard'])) {
                     showJson(1004, 2024);
                 }
                 if (empty($profileData['back_idcard'])) {
                     showJson(1004, 2025);
-                }*/
+                }
 
                 Db::startTrans();
                 if (!Member::saveData(['id' => $this->userId], ['real_name' => $realname])) {
@@ -975,7 +969,7 @@ class MemberController extends BaseController
                 }
 
                 // 在线验证是否通过
-                $profileData['idcard_online_check'] = $code == 'success'? 1 : 0;
+                $profileData['idcard_online_check'] = 0;
                 if (UserProfile::checkProfile($this->userId)) {
                     $profileData['updated_at'] = date('Y-m-d H:i:s');
                     $res = UserProfile::saveData(['userid' => $this->userId], $profileData);
@@ -995,12 +989,13 @@ class MemberController extends BaseController
                 showJson(1005, 2027);
                 break;
             case 'education':  // 学历认证
+                $educationType = isset($params['education_type']) ? intval($params['education_type']) : 0;
                 $profileData = [
                     'graduate' => isset($params['graduate']) ? trim($params['graduate']) : '',
                     'education' => isset($params['education']) ? trim($params['education']) : '',
                     'education_img' => isset($params['education_img']) ? trim($params['education_img']) : '',
                     'education_code' => isset($params['education_code']) ? trim($params['education_code']) : '',
-                    'education_type' => isset($params['education_type']) ? intval($params['education_type']) : 0,
+                    'education_type' => $educationType,
                     'education_check' => 1,
                 ];
 
@@ -1008,16 +1003,19 @@ class MemberController extends BaseController
                 $waterTxt = isset($siteInfo['water_txt']) ? trim($siteInfo['water_txt']) : '此证件仅限于拾光单身平台使用';
 
                 // 学历证明照片
-                $file = request()->file('image1');
-                if ($file) {
-                    $fileData = Storage::uploadImg($file, 'education_img');
-                    $educationImg = isset($fileData['file']) ? $fileData['file'] : '';
-                    $profileData['education_img'] = $waterTxt ? Storage::imageWater($educationImg, $waterTxt) : $educationImg;
+                if ($educationType != 2){
+                    $file = request()->file('image1');
+                    if ($file) {
+                        $fileData = Storage::uploadImg($file, 'education_img');
+                        $educationImg = isset($fileData['file']) ? $fileData['file'] : '';
+                        $profileData['education_img'] = $waterTxt ? Storage::imageWater($educationImg, $waterTxt) : $educationImg;
+                    }
+
+                    if (empty($profileData['education_img'])) {
+                        showJson(1004, 2028);
+                    }
                 }
 
-                if (empty($profileData['education_img'])) {
-                    showJson(1004, 2028);
-                }
 
                 Db::startTrans();
                 if (UserProfile::checkProfile($this->userId)) {
@@ -1658,7 +1656,7 @@ class MemberController extends BaseController
         }
 
         if($redheart < $logoutPay){
-            showJson(1004, 1125);
+            showJson(1004, lang(1125,['pay'=> $logoutPay]));
         }
 
         DB::startTrans();

Разница между файлами не показана из-за своего большого размера
+ 17 - 4
app/weixin/model/Member.php


+ 54 - 54
public/themes/admin_simpleboot3/user/admin_examine/allexamine.html

@@ -31,7 +31,7 @@
                 <th>真实姓名</th>
                 <th>爱心</th>
                 <th style="text-align: center;">是否推荐</th>
-              
+
                 <th>{:lang('REGISTRATION_TIME')}</th>
                 <th>身份证</th>
                 <th>职位</th>
@@ -54,67 +54,67 @@
                     <td>{$vo['user_nickname']?$vo['user_nickname']:lang('NOT_FILLED')}</td>
                     <td>{$vo['real_name']?$vo['real_name']:lang('NOT_FILLED')}</td>
                     <td>{$vo['redheart']}</td>
-                 
+
                     <td style="text-align: center;">
-                      <switch name="vo.is_heart">
+                        <switch name="vo.is_heart">
                             <case value="1">
                                 <span style="color: blue">是</span>
                             </case>
                             <case value="2">
                                 <span style="color: red">否</span>
                             </case>
-                      </switch>
+                        </switch>
 
                     </td>
-                   
+
                     <td>{:date('Y-m-d H:i',$vo['create_time'])}</td>
                     <td>
-                         <switch name="vo.idcard_check">
+                        <switch name="vo.idcard_check">
                             <case value="1">
-                               <span style="color:red">未审</span>
+                                <span style="color:red">未审</span>
                             </case>
                             <case value="2">
-                              <span style="color:green">已审</span>
+                                <span style="color:green">已审</span>
                             </case>
                             <case value="3">
-                               <span style="color:#ef9413">驳回</span>
+                                <span style="color:#ef9413">驳回</span>
                             </case>
                         </switch>
                     </td>
                     <td>
                         <switch name="vo.position_check">
-                           <case value="0">
-                               <span style="color:blue">未填</span>
+                            <case value="0">
+                                <span style="color:blue">未填</span>
                             </case>
                             <case value="1">
-                               <span style="color:red">未审</span>
+                                <span style="color:red">未审</span>
                             </case>
                             <case value="2">
-                              <span style="color:green">已审</span>
+                                <span style="color:green">已审</span>
                             </case>
                             <case value="3">
-                               <span style="color:#ef9413">驳回</span>
+                                <span style="color:#ef9413">驳回</span>
                             </case>
                         </switch>
                     </td>
                     <td>
                         <switch name="vo.education_check">
-                         <case value="0">
-                               <span style="color:blue">未填</span>
+                            <case value="0">
+                                <span style="color:blue">未填</span>
                             </case>
                             <case value="1">
-                               <span style="color:red">未审</span>
+                                <span style="color:red">未审</span>
                             </case>
                             <case value="2">
-                              <span style="color:green">已审</span>
+                                <span style="color:green">已审</span>
                             </case>
                             <case value="3">
-                               <span style="color:#ef9413">驳回</span>
+                                <span style="color:#ef9413">驳回</span>
                             </case>
                         </switch>
 
                     </td>
-                
+
                     <td>
                         <switch name="vo.user_status">
                             <case value="0">
@@ -130,9 +130,9 @@
                     </td>
 
                     <td>
-                          <a class="btn btn-xs btn-primary" href="{:url('adminIndex/idpost',array('id'=>$vo['id']))}">身份</a>
-                            <a class="btn btn-xs btn-danger" href="{:url('adminIndex/companypost',array('id'=>$vo['id']))}">职位</a>
-                              <a class="btn btn-xs btn-warning" href="{:url('adminIndex/schoolpost',array('id'=>$vo['id']))}">学历</a>
+                        <a class="btn btn-xs btn-primary" href="{:url('adminIndex/idpost',array('id'=>$vo['id']))}">身份</a>
+                        <a class="btn btn-xs btn-danger" href="{:url('adminIndex/companypost',array('id'=>$vo['id']))}">职位</a>
+                        <a class="btn btn-xs btn-warning" href="{:url('adminIndex/schoolpost',array('id'=>$vo['id']))}">学历</a>
                     </td>
                 </tr>
             </foreach>
@@ -181,45 +181,45 @@
 <script>
     function doDelete() {
         // Wind.use('artDialog', function () {
-            var ids = [];
-            $(".js-check:checked").each(function () {
-                var id = $(this).val();
-                if (id > 0) {
-                    ids.push(id);
-                }
-            });
-            if (ids.length <= 0) {
-                showMsg('请先选择操作项');
-                return false;
-            }
-            if(confirm('确定批量删除选择项?不可恢复')){
-                $.post('/user/admin_index/del',{id:ids},function(res){
-                    if(res.code == 1){
-                        showMsg(res.msg);
-                        setTimeout(function () {
-                            location.reload();
-                        }, 800)
-                    }else{
-                        showMsg(res.msg);
-                    }
-                },"json")
+        var ids = [];
+        $(".js-check:checked").each(function () {
+            var id = $(this).val();
+            if (id > 0) {
+                ids.push(id);
             }
+        });
+        if (ids.length <= 0) {
+            showMsg('请先选择操作项');
+            return false;
+        }
+        if(confirm('确定批量删除选择项?不可恢复')){
+            $.post('/user/admin_index/del',{id:ids},function(res){
+                if(res.code == 1){
+                    showMsg(res.msg);
+                    setTimeout(function () {
+                        location.reload();
+                    }, 800)
+                }else{
+                    showMsg(res.msg);
+                }
+            },"json")
+        }
 
 
         // });
     }
 
-  /*  function showMsg(msg, time){
-        time = time? time : 1000;
-        art.dialog({
-            content: msg,
-            icon: 'warning'
-        });
+    /*  function showMsg(msg, time){
+          time = time? time : 1000;
+          art.dialog({
+              content: msg,
+              icon: 'warning'
+          });
 
-        setTimeout(function () {
+          setTimeout(function () {
 
-        }, time)
-    }*/
+          }, time)
+      }*/
 </script>
 </body>
 </html>

+ 84 - 67
public/themes/admin_simpleboot3/user/admin_index/editID.html

@@ -7,7 +7,7 @@
 
 </head>
 <script type="text/html" id="photos-item-tpl">
-    <li id="saved-image{id}">  
+    <li id="saved-image{id}">
         <input id="photo-{id}" type="hidden" name="photo_urls[]" value="{filepath}">
         <input class="form-control" id="photo-{id}-name" type="text" name="photo_names[]" value="{name}"
                style="width: 200px;" title="图片名称">
@@ -20,35 +20,52 @@
 <body>
 <div class="wrap">
     <ul class="nav nav-tabs">
-      <if condition="$Request.action eq 'custom' || $Request.param.u eq 2">
-
-          <li><a href="{:url('/user/admin_index/custom',array('u'=>2))}">付费会员</a></li>
-          <li><a href="{:url('/user/admin_index/edit',array('id'=>$id,'u'=>2))}">用户基本信息</a></li>
-          <li><a href="{:url('/user/admin_index/profile',array('id'=>$id,'u'=>2))}">匹配信息</a></li>
-          <li class="active"><a>身份证认证</a></li>
-          <li><a href="{:url('/user/admin_index/companypost',array('id'=>$id,'u'=>2))}">职位认证</a></li>
-          <li><a href="{:url('/user/admin_index/schoolpost',array('id'=>$id,'u'=>2))}">学历认证</a></li>
-       
-       <else/>
-             <li><a href="{:url('/user/admin_index/index')}">会员列表</a></li>
-              <li><a href="{:url('/user/admin_index/edit',array('id'=>$id))}">用户基本信息</a></li>
-              <li><a href="{:url('/user/admin_index/profile',array('id'=>$id))}">匹配信息</a></li>
-              <li class="active"><a>身份证认证</a></li>
-              <li><a href="{:url('/user/admin_index/companypost',array('id'=>$id))}">职位认证</a></li>
-              <li><a href="{:url('/user/admin_index/schoolpost',array('id'=>$id))}">学历认证</a></li>
-       </if>
+        <if condition="$Request.action eq 'custom' || $Request.param.u eq 2">
+
+            <li><a href="{:url('/user/admin_index/custom',array('u'=>2))}">付费会员</a></li>
+            <li><a href="{:url('/user/admin_index/edit',array('id'=>$id,'u'=>2))}">用户基本信息</a></li>
+            <li><a href="{:url('/user/admin_index/profile',array('id'=>$id,'u'=>2))}">匹配信息</a></li>
+            <li class="active"><a>身份证认证</a></li>
+            <li><a href="{:url('/user/admin_index/companypost',array('id'=>$id,'u'=>2))}">职位认证</a></li>
+            <li><a href="{:url('/user/admin_index/schoolpost',array('id'=>$id,'u'=>2))}">学历认证</a></li>
+
+            <else/>
+            <li><a href="{:url('/user/admin_index/index')}">会员列表</a></li>
+            <li><a href="{:url('/user/admin_index/edit',array('id'=>$id))}">用户基本信息</a></li>
+            <li><a href="{:url('/user/admin_index/profile',array('id'=>$id))}">匹配信息</a></li>
+            <li class="active"><a>身份证认证</a></li>
+            <li><a href="{:url('/user/admin_index/companypost',array('id'=>$id))}">职位认证</a></li>
+            <li><a href="{:url('/user/admin_index/schoolpost',array('id'=>$id))}">学历认证</a></li>
+        </if>
     </ul>
     <form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('/User/admin_index/idpost')}">
         <div class="form-group">
             <label for="input-user_login" class="col-sm-2 control-label">真实姓名</label>
             <div class="col-md-6 col-sm-10">
-                 <input type="text" class="form-control" id="real_name" name="real_name" value="{$userresult.real_name}" >
+                <input type="text" class="form-control" id="real_name" name="real_name" value="{$userresult.real_name}" >
             </div>
         </div>
         <div class="form-group">
             <label for="input-user_login" class="col-sm-2 control-label">身份证号</label>
             <div class="col-md-6 col-sm-10">
-                 <input type="text" class="form-control" id="idcard" name="idcard" value="{$userresult.idcard}" >
+                <input type="text" class="form-control" id="idcard" name="idcard" value="{$userresult.idcard}" >
+            </div>
+        </div>
+        <php>$types=[1=>'大陆居民身份证', 2=>'港澳台身份证', 3=>'护照']</php>
+
+        <div class="form-group">
+            <label for="input-user_type" class="col-sm-2 control-label">认证方式</label>
+            <div class="col-md-6 col-sm-10">
+                <select class="form-control" name="idcard_type" id="type">
+                    <option value="none">--请选择--</option>
+                    <volist name="$types" id="vo">
+                        <if condition="$userresult.idcard_type eq $key">
+                            <option value="{$key}" selected="">{$vo}</option>
+                            <else/>
+                            <option value="{$key}">{$vo}</option>
+                        </if>
+                    </volist>
+                </select>
             </div>
         </div>
         <div class="form-group">
@@ -64,69 +81,69 @@
         <div class="form-group">
             <label for="input-user_login" class="col-sm-2 control-label">身份证正面</label>
             <div class="col-md-6 col-sm-10">
-               <img id="photo-preview1" src="{:cmf_get_image_preview_url($userresult['front_idcard'])}"
-                        style="height:36px;width: 36px;"  onclick="parent.imagePreviewDialog(this.src);"/>
-           </div> 
-           </div> 
-         <div class="form-group">
+                <img id="photo-preview1" src="{:cmf_get_image_preview_url($userresult['front_idcard'])}"
+                     style="height:36px;width: 36px;"  onclick="parent.imagePreviewDialog(this.src);"/>
+            </div>
+        </div>
+        <div class="form-group">
             <label for="input-user_login" class="col-sm-2 control-label">身份证反面</label>
             <div class="col-md-6 col-sm-10">
-             <img id="photo-preview1" src="{:cmf_get_image_preview_url($userresult['back_idcard'])}"
-                        style="height:36px;width: 36px;"  onclick="parent.imagePreviewDialog(this.src);"/>
-          
-              </div> 
-          <!--   <div class="col-md-6 col-sm-10">
-                   <ul id="photos" class="pic-list list-unstyled form-inline">
-                                <notempty name="post.more.photos">
-                                    <foreach name="post.more.photos" item="vo">
-                                        <php>$img_url=cmf_get_image_preview_url($vo['url']);</php>
-                                        <li id="saved-image{$key}">
-                                            <input id="photo-{$key}" type="hidden" name="photo_urls[]"
-                                                   value="{$vo.url}">
-                                            <input class="form-control" id="photo-{$key}-name" type="text"
-                                                   name="photo_names[]"
-                                                   value="{$vo.name|default=''}" style="width: 200px;" title="图片名称">
-                                            <img id="photo-{$key}-preview"
-                                                 src="{:cmf_get_image_preview_url($vo['url'])}"
-                                                 style="height:36px;width: 36px;"
-                                                 onclick="parent.imagePreviewDialog(this.src);">
-                                            <a href="javascript:uploadOneImage('图片上传','#photo-{$key}');">替换</a>
-                                            <a href="javascript:(function(){$('#saved-image{$key}').remove();})();">移除</a>
-                                        </li>
-                                    </foreach>
-                                </notempty>
-                            </ul>
-                            <a href="javascript:uploadMultiImage('图片上传','#photos','photos-item-tpl');"
-                               class="btn btn-sm btn-default">选择图片</a>
-            </div> -->
-    
+                <img id="photo-preview1" src="{:cmf_get_image_preview_url($userresult['back_idcard'])}"
+                     style="height:36px;width: 36px;"  onclick="parent.imagePreviewDialog(this.src);"/>
+
+            </div>
+            <!--   <div class="col-md-6 col-sm-10">
+                     <ul id="photos" class="pic-list list-unstyled form-inline">
+                                  <notempty name="post.more.photos">
+                                      <foreach name="post.more.photos" item="vo">
+                                          <php>$img_url=cmf_get_image_preview_url($vo['url']);</php>
+                                          <li id="saved-image{$key}">
+                                              <input id="photo-{$key}" type="hidden" name="photo_urls[]"
+                                                     value="{$vo.url}">
+                                              <input class="form-control" id="photo-{$key}-name" type="text"
+                                                     name="photo_names[]"
+                                                     value="{$vo.name|default=''}" style="width: 200px;" title="图片名称">
+                                              <img id="photo-{$key}-preview"
+                                                   src="{:cmf_get_image_preview_url($vo['url'])}"
+                                                   style="height:36px;width: 36px;"
+                                                   onclick="parent.imagePreviewDialog(this.src);">
+                                              <a href="javascript:uploadOneImage('图片上传','#photo-{$key}');">替换</a>
+                                              <a href="javascript:(function(){$('#saved-image{$key}').remove();})();">移除</a>
+                                          </li>
+                                      </foreach>
+                                  </notempty>
+                              </ul>
+                              <a href="javascript:uploadMultiImage('图片上传','#photos','photos-item-tpl');"
+                                 class="btn btn-sm btn-default">选择图片</a>
+              </div> -->
+
         </div>
         <div class="form-group">
             <label for="input-user_login" class="col-sm-2 control-label">身份审核失败原因</label>
             <div class="col-md-6 col-sm-10">
-                  <textarea class="form-control" name="idcard_fail" id="idcard_fail" ><if condition="$userresult.idcard_check eq 3">{$userresult.idcard_fail}</if></textarea>
+                <textarea class="form-control" name="idcard_fail" id="idcard_fail" ><if condition="$userresult.idcard_check eq 3">{$userresult.idcard_fail}</if></textarea>
             </div>
         </div>
-    
+
         <div class="form-group">
             <div class="col-sm-offset-2 col-sm-10">
                 <input type="hidden" name="id" value="{$id}" />
-    
+
                 <if condition="$userresult.idcard_check eq 2">
-                <button type="submit" class="btn btn-danger js-ajax-submit" name="passbtn" disabled="disabled" value="yipass" >已审核</button>
+                    <button type="submit" class="btn btn-danger js-ajax-submit" name="passbtn" disabled="disabled" value="yipass" >已审核</button>
                     <button type="submit" class="btn btn-primary js-ajax-submit" name="passbtn" value="pass" onclick="return confirm('确定审核用户信息?')">审核通过</button>
                     <button type="submit" class="btn btn-primary js-ajax-submit" name="passbtn" value="nopass" onclick="return confirm('确定不通过审核用户信息?')">审核不通过</button>
-                    
-                <elseif condition="$userresult.idcard_check eq 3">
-
-                      <button type="submit" class="btn btn-primary js-ajax-submit" name="passbtn" value="pass" onclick="return confirm('确定审核用户信息?')">审核通过</button>
-                      <button type="submit" class="btn btn-danger js-ajax-submit" name="passbtn" disabled="disabled" >已驳回</button>
-                 <else/>    
-                      <button type="submit" class="btn btn-primary js-ajax-submit" name="passbtn" value="pass" onclick="return confirm('确定审核用户信息?')">审核通过</button>
-                      <button type="submit" class="btn btn-primary js-ajax-submit" name="passbtn" value="nopass" onclick="return confirm('确定不通过审核用户信息?')">审核不通过</button>
+
+                    <elseif condition="$userresult.idcard_check eq 3">
+
+                        <button type="submit" class="btn btn-primary js-ajax-submit" name="passbtn" value="pass" onclick="return confirm('确定审核用户信息?')">审核通过</button>
+                        <button type="submit" class="btn btn-danger js-ajax-submit" name="passbtn" disabled="disabled" >已驳回</button>
+                        <else/>
+                        <button type="submit" class="btn btn-primary js-ajax-submit" name="passbtn" value="pass" onclick="return confirm('确定审核用户信息?')">审核通过</button>
+                        <button type="submit" class="btn btn-primary js-ajax-submit" name="passbtn" value="nopass" onclick="return confirm('确定不通过审核用户信息?')">审核不通过</button>
                 </if>
 
-          
+
                 <button type="submit" class="btn btn-primary js-ajax-submit"  name="passbtn" value="edit" onclick="return confirm('确定修改用户信息?')">{:lang('SAVE')}</button>
                 <a class="btn btn-default" href="javascript:history.back(-1);">{:lang('BACK')}</a>
             </div>

+ 7 - 5
public/themes/default/weixin/auth/idcard.html

@@ -10,23 +10,25 @@
             <p>认证信息仅用于身份审核,信息将会同步验证公安系统,请确保您信息的真实性,拾光承诺绝对不会将用户资料用于任何第三方场景。</p></div>
         <div class="gerxix_box">
             <ul>
+                <li><h1>认证方式:</h1><img src="/themes/default/weixin/public/assets/img/tubiao10.png" class="minzu"><input class="tianx select-value4" id="idcard_type" type="text" placeholder="请选择" readonly :data-code="authInfo.idcard_type" :disabled="authInfo.idcard_check==2? true: false"></li>
                 <li><h1>真实姓名:</h1><input v-model="authInfo.realname" class="tianx" type="text" placeholder="请填写" :readonly="authInfo.idcard_check==2? true : false"></li>
                 <li><h1>身份证号:</h1><input v-model="authInfo.idcard" class="tianx" type="text" placeholder="请填写" :readonly="authInfo.idcard_check==2? true : false"></li>
             </ul>
         </div>
-        <!--<div class="xiangce_tj">
-            <h1>请上传两张正反面身份证照片(点击图片上传)生日、身高、婚姻状态通过认证后无法修改(可选)</h1>
+        <div class="xiangce_tj" v-if="authType!=1">
+            <h1 v-if="authType==2">请上传两张正反面身份证照片(点击图片上传)生日、身高、婚姻状态通过认证后无法修改(可选)</h1>
+            <h1 v-else>请上传您的真实护照清晰照片,包含护照姓名证件号页和护照页照片</h1>
             <p class="error" v-if="authInfo.idcard_check==3">失败原因:<span v-text="authInfo.idcard_fail? authInfo.idcard_fail : '无'"></span></p>
             <ul>
                 <li><img id="front_idcard" :src="authInfo.front_idcard_preview? authInfo.front_idcard_preview : '__TMPL__/weixin/public/assets/img/tubiao20.png'" onerror="this.src='__TMPL__/weixin/public/assets/img/tubiao20.png'"><input type="file" accept="image/*" @change="selectImg($event,'front_idcard')" :disabled="authInfo.idcard_check==2? true : false"></li>
                 <li><img id="back_idcard" :src="authInfo.back_idcard_preview? authInfo.back_idcard_preview : '__TMPL__/weixin/public/assets/img/tubiao20.png'" onerror="this.src='__TMPL__/weixin/public/assets/img/tubiao20.png'"><input type="file" accept="image/*" @change="selectImg($event,'back_idcard')" :disabled="authInfo.idcard_check==2? true : false"></li>
             </ul>
-        </div>-->
+        </div>
         <div class="baoc_ann" >
-            <h1 v-if="authInfo.idcard_check == 3" @click="authCheck()">重新提交</h1>
+            <h1 v-if="authInfo.idcard_check == 3" @click="formSubmit()">重新提交</h1>
             <h1 v-else-if="authInfo.idcard_check == 2" >已认证</h1>
             <h1 v-else-if="authInfo.idcard_check == 1 && authInfo.idcard_online_check">审核中</h1>
-            <h1 v-else @click="authCheck()">开始验证</h1>
+            <h1 v-else @click="formSubmit()">开始验证</h1>
         </div>
     </div>
 </div>

+ 4 - 1
public/themes/default/weixin/auth/vip.html

@@ -26,7 +26,10 @@
                 2.报名活动有VIP折扣<br>
                 3.怦然心动每天推荐3位<br>
                 4.关注时间无限制<br>
-                5.有机会优先和定制的小伙伴匹配介绍<br>
+                5.解锁访客免爱心<br>
+                6.有机会优先和定制的小伙伴匹配介绍<br>
+                7.VIP权益为虚拟产品,因此购买之后无法进行退换货,购买前请慎重。<br>
+                8.拾光婚恋是相亲平台,请认真严肃对待每一位用户。如果你办理会员之后,不是以相亲为目的,并骚扰用户,投诉2次以上,将永久封号,并且不退还任何会员费用。<br>
             </P>
         </div>
     </div>

+ 5 - 2
public/themes/default/weixin/member/home.html

@@ -91,7 +91,7 @@
                                 <img v-else class="check" src="__TMPL__/weixin/public/assets/img/auth/confirm_no.png"
                                      alt="">
                             </div>
-                            <div class="auth-type" v-if="homeInfo.position_check==2">学历已认证</div>
+                            <div class="auth-type" v-if="homeInfo.education_check==2">学历已认证</div>
                             <div class="auth-type" v-else>学历未认证</div>
                         </div>
                     </div>
@@ -108,7 +108,10 @@
                             </div>
                             <div class="auth-type" >
                                 <p v-if="homeInfo.idcard_check==2">实名已认证</p><p v-else>实名未认证</p>
-                                <p class="type">认证方式:人脸核验</p>
+                                <p class="type" v-if="homeInfo.idcard_type==1 && homeInfo.front_idcard">认证方式:居民身份证</p>
+                                <p class="type" v-else-if="homeInfo.idcard_type==1">认证方式:人脸核验</p>
+                                <p class="type" v-else-if="homeInfo.idcard_type==2">认证方式:港澳台身份证</p>
+                                <p class="type" v-else-if="homeInfo.idcard_type==3">认证方式:护照</p>
                             </div>
                         </div>
                     </div>

+ 1 - 1
public/themes/default/weixin/member/message/detail.html

@@ -42,7 +42,7 @@
                         <div class="info-item" v-if="info.type==2">
                             <p class="p1"><span>您发出申请</span> <span v-text="info.created_at"></span></p>
                             <p class="p2"><span v-html="info.time"></span> <span v-if="info.status!=1" v-text="info.updated_at"></span><span class="out" v-if="info.status==1 && info.is_read">已读</span></p>
-                            <p class="p3" v-if="info.status==2"><span>对方微信号</span><span>{{info.wechat_code}}</span></p>
+                            <p class="p3" v-if="info.status==2 "><span>对方微信号</span><span v-if="info.show_wechat">{{info.wechat_code}}</span><span>7天后已隐藏</span></p>
                         </div>
                     </div>
                 </div>

+ 12 - 0
public/themes/default/weixin/public/assets/css/auth-idcard.css

@@ -62,3 +62,15 @@ body{background: #fff;}
     margin: 0 auto;
     margin-top: 20px;
 }
+.tip {
+    height: 30px;
+    margin-top: 10px;
+    color: #666;
+    font-size: 14px;
+}
+
+.minzu {
+    float: right;
+    width: 12px;
+    margin-top: 18px;
+}

+ 8 - 6
public/themes/default/weixin/public/assets/js/auth-education.js

@@ -204,12 +204,14 @@ var app = new Vue({
             })
 
             // 照片
-            var education_img = typeof(_this.files['education_img'])? _this.files['education_img'] : '';
-            if(education_img){
-                formData.append('image1', education_img);
-            } else if(params.education_img == '' || params.education_img == null){
-                $.toast('请上传学历证明照片', 'text');
-                return false;
+            if(params.education_type!=2) {
+                var education_img = typeof (_this.files['education_img']) ? _this.files['education_img'] : '';
+                if (education_img) {
+                    formData.append('image1', education_img);
+                } else if (params.education_img == '' || params.education_img == null) {
+                    $.toast('请上传学历证明照片', 'text');
+                    return false;
+                }
             }
 
             $.modal({

+ 68 - 10
public/themes/default/weixin/public/assets/js/auth-idcard.js

@@ -4,11 +4,17 @@ var app = new Vue({
         // 用户信息
         memberInfo: {},
         // 认证数据
+        authType: 1,
         authInfo: {},
         // 已选文件
         files: [],
         // 提交状态
         submitting: {'submit': null},
+        types: [
+            '大陆居民身份证',
+            '港澳台居民身份证',
+            '护照',
+        ]
     },
     created: function(){
         this.getInfo();
@@ -24,6 +30,9 @@ var app = new Vue({
                 if (res.code == 'success'){
                     _this.memberInfo = res.data
                     _this.authInfo = res.data? res.data.authInfo : [];
+                    _this.authInfo.idcard_type = typeof(_this.authInfo.idcard_type)!='undefined'?_this.authInfo.idcard_type : 1;
+                    _this.authType = _this.authInfo.idcard_type
+                    _this.initData()
                 }else if(res.code == 'exception'){
                     $.modal({
                         id: "status",
@@ -47,6 +56,36 @@ var app = new Vue({
                 }
             }, "json");
         },
+        initData: function(){
+            var _this = this
+            var idcard_type = _this.authInfo.idcard_type;
+            console.log(_this.authInfo)
+            $.each(_this.types, function(k, item){
+                if(idcard_type && idcard_type-1 == k){
+                    $("#idcard_type").val(item);
+                    //_this.authInfo.idcard_type = item;
+                }
+            });
+
+            $("#idcard_type").picker({
+                title: "请选择认证方式",
+                cols: [
+                    {
+                        textAlign: 'center',
+                        values: _this.types,
+                    }
+                ],
+                onChange: function (data) {
+                    _this.authType = data.cols[0].activeIndex+1
+                    $("#idcard_type").attr('data-code', data.cols[0].activeIndex+1);
+
+                },
+                onConfirm: function (data) {
+                    var code = data.cols[0].value;
+                    _this.authInfo.idcard_type = data.cols[0].activeIndex+1;
+                },
+            });
+        },
         // 选择图片
         selectImg: function(ele, previewId){
             var _this = this;
@@ -105,6 +144,13 @@ var app = new Vue({
                 }
             }
         },
+        formSubmit: function(){
+          if(this.authType == 1){
+              this.authCheck()
+          } else{
+              this.saveData()
+          }
+        },
         authCheck: function(){
             var _this = this;
             var params = _this.authInfo;
@@ -182,6 +228,7 @@ var app = new Vue({
         saveData: function(){
             var _this = this;
             var params = _this.authInfo;
+            params.idcard_type = _this.authType
             if(_this.submitting.submit){
                 return false;
             }
@@ -207,20 +254,31 @@ var app = new Vue({
             if(front_idcard){
                 formData.append('image1', front_idcard);
             }
-
-           /* else if(params.front_idcard == '' || params.front_idcard == null){
-                $.toast('请上传身份证正面照', 'text');
-                return false;
-            }*/
-
             var back_idcard = typeof(_this.files['back_idcard'])? _this.files['back_idcard'] : '';
             if(params.back_idcard == '' && (back_idcard == null || back_idcard == '')){
                 formData.append('image2', back_idcard);
             }
-            /*else if(params.back_idcard == '' || params.back_idcard == null){
-                $.toast('请上传身份证反面照', 'text');
-                return false;
-            }*/
+            if(_this.authType == 2){
+                if(params.front_idcard == '' || params.front_idcard == null){
+                    $.toast('请上传身份证正面照', 'text');
+                    return false;
+                }
+                if(params.back_idcard == '' || params.back_idcard == null){
+                    $.toast('请上传身份证反面照', 'text');
+                    return false;
+                }
+            }else if(_this.authType == 3){
+                if(params.front_idcard == '' || params.front_idcard == null){
+                    $.toast('请上传护照姓名证件号页照片', 'text');
+                    return false;
+                }
+                if(params.back_idcard == '' || params.back_idcard == null){
+                    $.toast('请上传护照页面照片', 'text');
+                    return false;
+                }
+            }
+
+            /*else */
 
            /* if(params.front_idcard == '' || params.front_idcard == null){
                 $.toast('请上传身份证正面照', 'text');

+ 798 - 2
public/themes/default/weixin/public/assets/js/entry.js

@@ -710,9 +710,805 @@ var app = new Vue({
             if(!_this.agree){
                 $.closeModal();
                 $.modal({
-                    id: "privacy",
+                    id: "privacy",var app = new Vue({
+                        'el': '#app',
+                        'data': {
+                            // 当前导航
+                            curNav: 'member',
+                            // 用户信息
+                            wxInfo: {},
+                            // 用户信息
+                            content: {},
+                            showContent: '内容加载中...',
+                            // 信息
+                            params: {
+                                nickname: '',
+                                mobile: '',
+                                avatar: '',
+                                sex: '',
+                                birthday: '',
+                                code: '',
+                                height: '',
+                                weight: '',
+                                wechat_code: '',
+                                now_address: '广西壮族自治区 南宁市 西乡塘区',
+                                home_address: '广西壮族自治区 南宁市 西乡塘区',
+                                married: '',
+                            },
+                            // 协议
+                            agree: false,
+                            // 文件
+                            file: null,
+                            options: {},
+                            cropData: {},
+                            cropParams: {},
+                            // 上传弹窗
+                            uploadBox: false,
+                            submitting: {'sendcode': null, 'submit': null},
+                            rebackurl: '',
+                            time: 60,
+                            timeText: '获取验证码',
+                            timeId: null,
+                        },
+                        created: function(){
+                            this.getInfo();
+                            var rebackurl = getParam('rebackurl');
+                            if(typeof (rebackurl) != 'undefined' && rebackurl != null){
+                                this.rebackurl = rebackurl;
+                            }
+
+                            // 获取历史数据
+                            var params = sessionStorage.getItem('params')
+                            params = typeof(params) != 'undefined' && params!= null? JSON.parse(params) : {};
+                            if(params!='' && typeof(params.nickname)!='undefined'){
+                                params.code = '';
+                                params.birthday_code = typeof (params.birthday_code) != 'undefined'? params.birthday_code : '';
+                                this.params = params;
+                            }
+                        },
+                        updated: function(){
+                            var _this = this;
+
+                            // 居住地
+                            $("#now_address").val(_this.params.now_address);
+                            $("#now_address").cityPicker({
+                                title: "请选择现居地址",
+                                onChange: function (picker, values, displayValues) {
+                                    _this.params.now_address = displayValues.join(' ');
+                                    // console.log(displayValues);
+                                }
+                                // showDistrict: false
+                            });
+
+                            // 家乡
+                            $("#home_address").val(_this.params.home_address);
+                            $("#home_address").cityPicker({
+                                title: "请选择家乡地址",
+                                onChange: function (picker, values, displayValues) {
+                                    _this.params.home_address = displayValues.join(' ');
+                                    // console.log(displayValues);
+                                }
+                                // showDistrict: false
+                            });
+
+                            // 性别
+                            var sexs = ['男', '女'];
+                            $.each(sexs, function (k, item) {
+                                if (_this.params.sex == k+1) {
+                                    $("#sex").val(item);
+                                }
+                            });
+                            $("#sex").picker({
+                                title: "请选择性别",
+                                cols: [
+                                    {
+                                        textAlign: 'center',
+                                        value: _this.params.sex,
+                                        values: sexs,
+
+                                    }
+                                ],
+                                onChange: function(data){
+                                    $("#sex").attr('data-code',data.cols[0].activeIndex+1);
+                                }
+                            });
+
+                            //  身高
+                            var heightArr = [];
+                            for(var i=1; i<=70; i++){
+                                if (parseInt(_this.params.height) == i + 145) {
+                                    $("#height").val((145 + i).toString() + 'cm');
+                                    //$("#height").attr('data-code', (145 + i).toString());
+                                }
+                                heightArr.push((145+i).toString()+'cm');
+                            }
+
+                            $("#height").picker({
+                                title: "请选择身高",
+                                cols: [
+                                    {
+                                        textAlign: 'center',
+                                        values: heightArr,
+                                        onChange: function(data){
+                                            var code = data.cols[0].value;
+                                            $("#height").attr('data-code', code.replace('cm',''));
+                                        }
+                                    }
+                                ]
+                            });
+
+                            // 体重
+                            var weightArr = [];
+                            for(var i=0; i<=80; i++){
+                                if (parseInt(_this.params.weight) == i+40) {
+                                    $("#weight").val((40 + i).toString() + 'KG');
+                                    //$("#weight").attr('data-code', (40 + i).toString());
+                                }
+                                weightArr.push((40+i).toString()+'KG');
+                            }
+                            $("#weight").val(_this.params.weight? _this.params.weight+'kg' : '')
+                            $("#weight").picker({
+                                title: "请选择体重",
+                                cols: [
+                                    {
+                                        textAlign: 'center',
+                                        values: weightArr,
+                                    }
+                                ],
+                                onChange: function(data){
+                                    var code = data.cols[0].value;
+                                    $("#weight").attr('data-code', code.replace('KG',''));
+                                }
+                            });
+
+                            // 生日
+                            var years = [];
+                            var date = new Date();
+                            var year = date.getFullYear()-20;
+                            for(var i=20;i>=0;i--){
+                                years.push(year-i);
+                            }
+                            var code = $("#birthday").val();
+                            _this.params.birthday = _this.params.birthday? $.trim(_this.params.birthday)+' ' : (code? code : (year-10)+'-01-01 ');
+                            _this.params.birthday_code = _this.params.birthday? $.trim(_this.params.birthday)+' ' : (code? code : (year-10)+'-01-01 ');
+                            console.log(_this.params)
+                            $("#birthday").val(_this.params.birthday_code);
+                            $("#birthday").datetimePicker({
+                                title: '请选择出生日期',
+                                dateFormat: 'yyyy-mm-dd',
+                                years: years,
+                                yearSplit: '-',
+                                monthSplit: '-',
+                                value: _this.params.birthday,
+                                // dateSplit: '-',
+                                times: function(){
+                                    return [];
+                                }
+                            });
+
+                            // 婚姻状况
+                            var marrieds = ['未婚', '离异','离异有小孩']
+                            $.each(marrieds, function (k, item) {
+                                if (_this.params.married == k + 1) {
+                                    $("#married").val(item);
+                                }
+                            });
+                            $("#married").picker({
+                                title: "请选择婚姻状况",
+                                cols: [
+                                    {
+                                        textAlign: 'center',
+                                        value: _this.params.married,
+                                        values: marrieds,
+                                    }
+                                ],
+                                onChange: function(data){
+                                    // _this.params.married = data.cols[0].activeIndex+1;
+                                    $("#married").attr('data-code',data.cols[0].activeIndex+1);
+                                }
+                            });
+
+                        },
+                        methods: {
+                            // 显示头像弹窗
+                            showPop: function(){
+                                if(this.uploadBox){
+                                    this.uploadBox = false;
+                                    $("body").css('overflowY','auto');
+                                }else{
+                                    this.uploadBox = true;
+                                    $("body").css('overflowY','hidden');
+                                }
+                            },
+                            showPopup: function(title,type){
+                                var _this = this;
+                                $.showLoading("数据加载中...");
+                                _this.content.title = title
+                                $.closePopup()
+                                $("body").css('overflowY', 'hidden');
+                                // setTimeout(function(){
+                                $.hideLoading();
+                                _this.showContent = "<iframe src=\"/weixin/page/"+type+"\" style=\"width:100%;height:100%;\"></iframe>"
+                                $("#popupBox").popup();
+                            },
+                            hidePopup: function(){
+                                this.content = {}
+                                $.closePopup()
+                                $("body").css('overflowY', 'scroll');
+                                this.showContent = '内容加载中...'
+                                //$("#popupBox").hide();
+                            },
+                            // 获取用户信息
+                            getInfo: function(){
+                                var _this = this;
+                                $.showLoading("数据加载中...");
+                                $.post('/api/index/getWxInfo',{}, function(res){
+                                    $.hideLoading();
+                                    if(res.code == 'success'){
+                                        _this.wxInfo = res.data;
+                                        _this.params.avatar = _this.wxInfo.headimgurl;
+                                        _this.params.nickname = _this.wxInfo.nickname;
+                                        _this.params.sex = typeof (_this.wxInfo.sex) !='undefined' &&_this.wxInfo.sex? _this.wxInfo.sex : 1;
+                                    }
+                                }, "json");
+                            },
+                            // 发送验证码
+                            sendCode: function(){
+                                var _this = this;
+                                if(_this.submitting.sendcode){
+                                    return false;
+                                }
+                                _this.params.mobile = $.trim($("#mobile").val());
+                                if(_this.params.mobile == '' || _this.params.mobile == null){
+                                    $.toast('请填写手机号','text');
+                                    return false;
+                                }
+
+                                var patternMobile = /^(1[3-9][0-9]{9})$/;
+                                if (!patternMobile.test(_this.params.mobile)) {
+                                    $.toast("请填写正确格式的手机号码", 'text');
+                                    return false;
+                                }
+
+                                _this.submitting.sendcode = true;
+
+                                // 发送验证码
+                                $.showLoading('提交中');
+                                $.post('/api/sms/sendCode',{mobile: _this.params.mobile}, function(res){
+                                    $.hideLoading();
+                                    if(res.code == 'success'){
+                                        _this.timeLock();
+                                    }else{
+                                        _this.submitting.sendcode = false;
+                                    }
+                                    $.toast(res.message, 'text');
+
+                                }, "json");
+                            },
+                            // 倒计时
+                            timeLock: function(){
+                                var _this = this;
+                                _this.timeId = setInterval(function(){
+                                    _this.time--;
+                                    // _this.timeText = _this.time+'s';
+                                    $("#btnSendCode").val(_this.time+'s')
+                                    if(_this.time<=0){
+                                        _this.time = 60;
+                                        //_this.timeText = '获取验证码';
+                                        $("#btnSendCode").val('获取验证码')
+                                        _this.submitting.sendcode = false;
+                                        clearInterval(_this.timeId)
+                                    }
+
+                                }, 1000);
+                            },
+                            // 选择图片
+                            selectImg: function(ele, previewId){
+                                var _this = this;
+                                var selectFile = ele.target.files[0];
+                                if (selectFile) {
+                                    var reader = new FileReader();
+                                    reader.readAsDataURL(selectFile);
+                                    reader.onloadend = function (even) {
+                                        //_this.file = selectFile;
+                                        // _this.showPop();
+                                        $('#preview_' + previewId).attr('src', even.currentTarget.result);
+                                        $('#preview_' + previewId).attr('old-src', even.currentTarget.result);
+                                        _this.picEdit(previewId);
+                                    }
+                                }
+                            },
+
+                            picEdit: function (id) {
+                                var _this = this;
+                                $.closePopup();
+                                var src = $('#preview_' + id).attr('src');
+                                if (src == '') {
+                                    $.toast('请重新选择图片');
+                                    return false;
+                                }
+
+                                _this.showPop();
+                                $("#cropPreview").hide();
+                                $("#preview_box").show();
+                                $("body").css('overflowY', 'hidden');
+                                $image = $('#preview_' + id);
+                                $image.attr('src', src);
+                                $image.attr('data-src', src);
+                                var width = $("body").outerWidth() * 0.85;
+                                var height = (425 / 343) * width;
+
+                                var _image = new Image();
+                                _image.src = src;
+                                var iWidth = _image.width;
+                                var iHeight = _image.height;
+                                var rate = iWidth/iHeight;
+                                $(".preview-box").css('width', width);
+                                $(".preview-box").css('height', height);
+                                $(".crop-preview .desc").css('width', width);
+                                $("#cropBox").popup();
+                                $.showLoading('图片加载中')
+                                _this.options = {
+                                    aspectRatio: 0,
+                                    center: true,
+                                    movable: true,
+                                    zoomable: true,
+                                    zoomOnTouch: true,
+                                    zoomOnWheel: false,
+                                    scalable: true,
+                                    wheelZoomRatio: 0.1,
+                                    background: false,
+                                    responsive: true,
+                                    guides: false,
+                                    strict: false,
+                                    width: width,
+                                    dragMode: 'move',
+                                    height: height,
+                                    autoCropArea: 1,
+                                    cropBoxMovable: false,
+                                    cropBoxResizable: false,
+                                    minContainerWidth: width,
+                                    minContainerHeight: height,
+                                    minCropBoxWidth: width,
+                                    maxCropBoxWidth: width,
+                                    minCropBoxHeight: height,
+                                    maxCropBoxHeight: height,
+                                    minCanvasWeight: width,
+                                    maxCanvasWeight: width,
+                                    minCanvasHeight: height,
+                                    maxCanvasHeight: height,
+                                    viewMode: 1,
+                                    ready: function () {
+                                        $.hideLoading();
+                                    },
+                                    crop: function (data) {
+                                        $.hideLoading();
+                                        _this.cropData = data
+                                        $(".cropper-container img").attr('id', 'cropimg');
+                                        $("#cropPreview").html('<div class="cropper-container" style="width: '+width+'px; height: '+height+'px;">'+$(".cropper-container").html()+'</div>');
+                                        var cropHeight = $(".cropper-view-box img").height();
+                                        var cropWidth = $(".cropper-view-box img").width();
+                                        var marginLeft = cropWidth>width? -(cropWidth-width)/2 : 0;
+                                        var marginTop = cropHeight>height? -(cropHeight-height)/2 : 0;
+                                        $("#cropPreview .cropper-view-box img").css('marginLeft', marginLeft+'px');
+                                        $("#cropPreview .cropper-view-box img").css('marginTop', marginTop+'px');
+                                        $("#cropPreview .cropper-dashed").remove();
+                                        $("#cropPreview .cropper-face").remove();
+                                        $("#cropPreview .cropper-line").remove();
+                                        $("#cropPreview .cropper-point").remove();
+                                        _this.cropParams = {
+                                            width: data.height,
+                                            height: data.width,
+                                            rotate: data.rotate,
+                                            imageSmoothingQuality: 'high',
+                                            fillColor: '#fff',
+                                        };
+                                    }
+                                }
+
+                                if (_this.jc != null) {
+                                    $image.cropper(_this.options);
+                                    $image.cropper('replace', src);
+                                } else {
+                                    $image.cropper(_this.options);
+                                    _this.jc = $image.cropper('replace', src);
+                                }
+
+                                _image.onload = function(){
+                                    rate = 0;
+                                    iWidth = _image.width;
+                                    iHeight = _image.height;
+                                    if((iWidth<iHeight*0.9 || iHeight<iWidth*0.9)){
+                                        if(iWidth/iHeight < width/height){
+                                            rate = parseFloat((width/height)/(iWidth/iHeight)).toFixed(2);
+                                        }else{
+                                            rate = parseFloat(0.1*((height/width)/(iHeight/iWidth)));
+                                        }
+                                    }
+
+                                    setTimeout(function(){
+                                        if(rate>0){
+                                            $image.cropper('zoom', rate);
+                                        }
+                                        var cropHeight = $(".cropper-view-box img").height();
+                                        var cropWidth = $(".cropper-view-box img").width();
+                                        var marginLeft = cropWidth>width? -(cropWidth-width)/2 : (width-cropWidth)/2;
+                                        var marginTop = cropHeight>height? -(cropHeight-height)/2 : (height-cropHeight)/2;
+                                        if(marginLeft != 0){
+                                            $(".cropper-view-box img").css('marginLeft', marginLeft+'px');
+                                        }
+
+                                        $(".cropper-view-box img").css('marginTop', marginTop+'px');
+
+                                    }, 50)
+                                }
+                            },
+                            // 取消
+                            cropCancel: function(){
+                                this.showPop();
+                                $("#upload").val("");
+                                $("body").css('overflowY', 'scroll');
+                                $.closePopup();
+                            },
+                            // 重置
+                            cropReset: function (id) {
+                                $image = $("#preview_" + id);
+                                var src = $image.attr('old-src');
+                                $image.cropper(this.options);
+                                this.jc = $image.cropper('replace', src);
+
+                                var _image = new Image();
+                                _image.src = src;
+                                var iWidth = _image.width;
+                                var iHeight = _image.height;
+                                var width = $("body").outerWidth() * 0.9;
+                                var height = (425 / 343) * width;
+                                _image.onload = function(){
+                                    var rate = 0;
+                                    iWidth = _image.width;
+                                    iHeight = _image.height;
+                                    if((iWidth<iHeight*0.9 || iHeight<iWidth*0.9)){
+                                        if(iWidth/iHeight < width/height){
+                                            rate = parseFloat((width/height)/(iWidth/iHeight)).toFixed(2);
+                                        }else{
+                                            rate = parseFloat(0.1*((height/width)/(iHeight/iWidth)));
+                                        }
+                                    }
+
+                                    setTimeout(function(){
+                                        if(rate){
+                                            $image.cropper('zoom', rate);
+                                        }
+                                        var cropHeight = $(".cropper-view-box img").height();
+                                        var cropWidth = $(".cropper-view-box img").width();
+                                        var marginLeft = cropWidth>width? -(cropWidth-width)/2 : 0;
+                                        var marginTop = cropHeight>height? -(cropHeight-height)/2 : 0;
+                                        $(".cropper-view-box img").css('marginLeft', marginLeft+'px');
+                                        $(".cropper-view-box img").css('marginTop', marginTop+'px');
+                                    }, 50)
+                                }
+                            },
+                            // 完成
+                            cropConfirm: function (id) {
+                                var _this = this;
+                                if (this.jc != null) {
+                                    if(!_this.cropParams){
+                                        $.toast('请先处理图片','text');
+                                        return false;
+                                    }
+                                    $image = $("#preview_" + id);
+                                    $.showLoading('图片处理中...');
+                                    $("#cropPreview").show();
+                                    $("#preview_box").hide();
+                                    //console.log(_this.cropParams);
+                                    var canvas = $image.cropper('getCroppedCanvas', _this.cropParams);
+                                    var url = canvas.toBlob(function (e) {
+                                        if (e != null && _this.cropData.y > 0) {
+                                            console.log("剪裁方式");
+                                            var timestamp = Date.parse(new Date());
+                                            e.name = timestamp + ".jpeg";
+                                            url = URL.createObjectURL(e);
+                                            _this.file = _this.dataURLtoFile(e, e.name);
+                                            $image.attr('data-src', url);
+                                            $("body").css('overflowY', 'scroll');
+                                            setTimeout(function () {
+                                                $.hideLoading();
+                                                $.closePopup();
+                                                $(id).cropper('destroy');
+                                                $('#' + id).attr('src', $image.attr('data-src'));
+                                                $("#upload").val("");
+                                                _this.jc = null;
+                                            }, 200);
+
+                                        }else{
+                                            console.log("合成方式");
+                                            var width = $("body").outerWidth() * 0.9;
+                                            var height = (425 / 343) * width;
+                                            var opts = {
+                                                width: width,
+                                                height: height,
+                                                scale: 5,
+                                                background: '#fff',
+                                                useCROS: true,
+                                            };
+
+                                            var _image = document.getElementById('cropPreview');
+                                            html2canvas(_image, opts).then(function (canvas) {
+                                                const context = canvas.getContext('2d');
+                                                context.translate(0.5, 0.5);
+                                                context.mozImageSmoothingEnabled = false;
+                                                context.webkitImageSmoothingEnabled = false;
+                                                context.msImageSmoothingEnabled = false;
+                                                context.imageSmoothingEnabled = false;
+
+                                                var src = canvas.toDataURL('image/jpeg');
+                                                var timestamp = Date.parse(new Date());
+                                                var name = timestamp + ".jpeg";
+                                                _this.file = _this.dataURLtoFile1(src, name ? name : 'avatar.jpeg');
+                                                $image.attr('data-src', url);
+                                                $("body").css('overflowY', 'scroll');
+                                                setTimeout(function () {
+                                                    $.hideLoading();
+                                                    $.closePopup();
+                                                    $(id).cropper('destroy');
+                                                    $('#' + id).attr('src', src);
+                                                    $("#upload").val("");
+                                                    _this.jc = null;
+                                                }, 200);
+                                            });
+
+                                        }
+                                    }, "image/jpeg");
+                                } else {
+                                    $.toast('处理失败请刷新重试','text');
+                                    $.closePopup();
+                                }
+                            },
+                            // base转文件
+                            dataURLtoFile: function (dataurl, filename) {//将base64转换为文件
+                                return new File([dataurl], filename, {type: 'image/jpeg'});
+                            },
+                            //
+                            dataURLtoFile1: function (dataurl, filename) {//将base64转换为文件
+                                var arr = dataurl.split(','), mime = arr[0].match(/:(.*?);/)[1],
+                                    bstr = atob(arr[1]), n = bstr.length, u8arr = new Uint8Array(n);
+                                while (n--) {
+                                    u8arr[n] = bstr.charCodeAt(n);
+                                }
+                                return new File([u8arr], filename, {type: mime});
+                            },
+                            // blob处理
+                            processData: function (dataUrl) {
+                                var binaryString = window.atob(dataUrl.split(',')[1]);
+                                var arrayBuffer = new ArrayBuffer(binaryString.length);
+                                var intArray = new Uint8Array(arrayBuffer);
+                                for (var i = 0, j = binaryString.length; i < j; i++) {
+                                    intArray[i] = binaryString.charCodeAt(i);
+                                }
+
+                                var data = [intArray],
+                                    blob;
+
+                                try {
+                                    blob = new Blob(data);
+                                } catch (e) {
+                                    window.BlobBuilder = window.BlobBuilder ||
+                                        window.WebKitBlobBuilder ||
+                                        window.MozBlobBuilder ||
+                                        window.MSBlobBuilder;
+                                    if (e.name === 'TypeError' && window.BlobBuilder) {
+                                        var builder = new BlobBuilder();
+                                        builder.append(arrayBuffer);
+                                        blob = builder.getBlob(imgType); // imgType为上传文件类型,即 file.type
+                                    } else {
+                                        console.log('版本过低,不支持上传图片');
+                                    }
+                                }
+                                return blob;
+                            },
+                            // 提交数据
+                            postSubmit: function(){
+                                var _this = this;
+                                var params = _this.params;
+                                // var params = JSON.parse(JSON.stringify(_this.params));
+                                if(_this.submitting.submit){
+                                    return false;
+                                }
+                                var sex = $("#sex").attr('data-code');
+                                if(typeof(sex) != 'undefined'){
+                                    params.sex = sex;
+                                }
+                                var height = $("#height").attr('data-code');
+                                if(typeof(height) != 'undefined'){
+                                    params.height = height;
+                                }
+                                var weight = $("#weight").attr('data-code');
+                                if(typeof(weight) != 'undefined'){
+                                    params.weight = weight;
+                                }
+                                params.nickname = $.trim($("#nickname").val());
+                                params.wechat_code = $.trim($("#wechat_code").val());
+                                params.mobile = $.trim($("#mobile").val());
+                                params.code = $.trim($("#code").val());
+                                params.birthday = $("#birthday").val();
+                                params.now_address = $("#now_address").val();
+                                params.home_address = $("#home_address").val();
+                                params.married = $("#married").attr('data-code');
+                                params.sex = $("#sex").attr('data-code');
+                                //console.log(params);
+                                // alert(JSON.stringify(_this.params));
+                                if(_this.file == '' || _this.file == null){
+                                    $.toast("请上传真实头像", 'text');
+                                    return false;
+                                }
+
+                                if(params.nickname == ''){
+                                    params.nickname = _this.wxInfo.nickname;
+                                }
+
+                                if(params.nickname == '' || params.nickname == null){
+                                    $.toast("请填写昵称", 'text');
+                                    return false;
+                                }
+
+                                /*if(_this.params.realname == '' || _this.params.realname == null){
+                                    $.toast("请填写真实姓名", 'text');
+                                    return false;
+                                }*/
+
+                                if(params.wechat_code == '' || params.wechat_code == null){
+                                    $.toast("请填写微信号", 'text');
+                                    return false;
+                                }
+
+                                if(params.mobile == '' || params.mobile == null){
+                                    $.toast("请填写手机号", 'text');
+                                    return false;
+                                }
+                                var pattMobile = /^(1[3-9][0-9]{9})$/;
+                                if(!pattMobile.test(params.mobile)){
+                                    $.toast("请填写正确格式的手机号", 'text');
+                                    return false;
+                                }
+
+
+                                if(params.code == '' || params.code == null){
+                                    $.toast("请填写短信验证码", 'text');
+                                    return false;
+                                }
+
+                                var pattCode = /^[0-9]{4,6}$/;
+                                if(!pattCode.test(params.code)){
+                                    $.toast("请填写正确格式的短信验证码", 'text');
+                                    return false;
+                                }
+
+                                if(params.birthday <=0 || params.birthday == '' || params.birthday == null){
+                                    $.toast("请选择您的出生日期", 'text');
+                                    return false;
+                                }
+
+                                if(params.sex <=0 || params.sex == ''){
+                                    $.toast("请选择您的性别", 'text');
+                                    return false;
+                                }
+
+                                if(params.height <=0 || params.height == ''){
+                                    $.toast("请选择您的身高", 'text');
+                                    return false;
+                                }
+
+                                if(params.weight <=0 || params.weight == ''){
+                                    $.toast("请选择您的体重", 'text');
+                                    return false;
+                                }
+
+                                if(params.now_address == '' || params.now_address == null){
+                                    $.toast("请选择您的现居地址", 'text');
+                                    return false;
+                                }
+
+                                if(params.home_address == '' || params.home_address == null){
+                                    $.toast("请选择您的家乡地址", 'text');
+                                    return false;
+                                }
+
+                                if(params.married <= 0 || params.married == ''){
+                                    $.toast("请选择您的婚姻状况", 'text');
+                                    return false;
+                                }
+
+                                sessionStorage.setItem('params', JSON.stringify(params))
+                                if(!_this.agree){
+                                    $.closeModal();
+                                    $.modal({
+                                        id: "privacy",
+                                        title: "温馨提示",
+                                        text: '<div class="tips"><p>非常感谢您对拾光婚恋平台的信任和支持,为了保证平台用户能够在安全的环境中使用该平台,共同营造出真诚靠谱的交友环境,请您仔细阅读并同意相关条款。</p><br><p><a data-type="privacy">《用户服务协议》</a></p><p><a data-type="agree">《隐私保护政策》</a></div>',
+                                        buttons: [
+                                            {
+                                                text: "不同意", className: "default", onClick: function () {
+                                                    _this.agree = false;
+                                                    return false;
+                                                }
+                                            },{
+                                                text: "同意", className: "success", onClick: function () {
+                                                    _this.agree = true;
+                                                    _this.postSubmit();
+                                                    return true;
+                                                }
+                                            }]
+                                    });
+
+                                    $(".tips p a ").on('click',function (){
+                                        var type = $(this).attr('data-type');
+                                        var title = $(this).text();
+                                        _this.showPopup(title,type);
+                                    })
+                                    return false;
+                                }
+
+                                var formData = new FormData();
+                                $.each(params, function(k,item){
+                                    formData.append(k, item);
+                                })
+
+                                if(_this.file != null){
+                                    formData.append('image', _this.file);
+                                }
+
+                                _this.agree = false;
+                                _this.submitting.submit = true;
+                                $.showLoading('数据保存中...');
+                                $.ajax({
+                                    url: '/api/member/setProfile',
+                                    data: formData,
+                                    type: "post",
+                                    dataType: 'json',
+                                    cache : false,
+                                    contentType : false,
+                                    processData : false,
+                                    success: function(res) {
+                                        $.hideLoading();
+                                        _this.submitting.submit = false;
+                                        if(res.code == 'success'){
+                                            $.showLoading(res.message);
+                                            setTimeout(function(){
+                                                location.href = '/weixin/member/info';
+                                            }, 500)
+                                        }else if (res.code == 'login'){
+                                            var url = res.data.url;
+                                            $.showLoading(res.message);
+                                            if(url){
+                                                setTimeout(function(){
+                                                    location.href = url;
+                                                }, 500)
+                                            }
+                                        }else{
+                                            res.message = typeof(res.message) != 'undefined' && res.message? res.message : '提交失败,请刷新重试';
+                                            $.toast(res.message,'text');
+                                        }
+                                    },
+                                    error:function (res) {
+                                        res.message = typeof(res.message) != 'undefined' && res.message? res.message : '提交失败,请刷新重试';
+                                        _this.submitting.submit = false;
+                                        $.toast(res.message,'text');
+                                        $.hideLoading();
+                                    }
+                                });
+                            }
+                        }
+                    })
+
+
+
+
+
+
+
+
                     title: "温馨提示",
-                    text: '<div class="tips"><p>非常感谢您对拾光婚恋平台的信任和支持,为了保证平台用户能够在安全的环境中使用该平台,共同营造出真诚靠谱的交友环境,请您仔细阅读并同意相关条款。</p><br><p><a data-type="privacy">《用户服务协议》</a></p><p><a data-type="marketAgree">《隐私保护政策》</a></div>',
+                    text: '<div class="tips"><p>非常感谢您对拾光婚恋平台的信任和支持,为了保证平台用户能够在安全的环境中使用该平台,共同营造出真诚靠谱的交友环境,请您仔细阅读并同意相关条款。</p><br><p><a data-type="privacy">《用户服务协议》</a></p><p><a data-type="agree">《隐私保护政策》</a></div>',
                     buttons: [
                         {
                             text: "不同意", className: "default", onClick: function () {

+ 1 - 1
public/themes/default/weixin/public/assets/js/member-access.js

@@ -103,7 +103,7 @@ var app = new Vue({
         },
         // 查看主页
         goHome: function(id){
-            location.href = '/weixin/member/home?type=2&id='+id;
+            location.href = '/weixin/member/home?id='+id;
         },
         // 获取默认头像
         getAvatar: function(info){

Разница между файлами не показана из-за своего большого размера
+ 399 - 399
vendor/thinkcmf/cmf-app/src/user/controller/AdminIndexController.php


+ 1 - 1
vendor/thinkcmf/cmf/src/common.php

@@ -2738,7 +2738,7 @@ function getStart($date)
         return '天蝎座';
     } else if ($date >= '11-23' && $date <= '12-21') {
         return '射手座';
-    } else if ($date >= '12-22' && $date <= '01-19') {
+    } else if (($date >= '12-22' && $date<='12-31') || ($date >= '01-01' && $date <= '01-19')) {
         return '摩羯座';
     } else if ($date >= '01-20' && $date <= '02-18') {
         return '水瓶座';

+ 1 - 1
vendor/thinkcmf/cmf/src/lang/zh-cn.php

@@ -84,7 +84,7 @@ return [
     '1023'=> '账号已冻结:因封号拉黑、违规',
 
     '1124'=> '账号已注销',
-    '1125'=> '注销账号扣除{:pay}颗爱心,当前余额不足',
+    '1125'=> '注销账号扣除{:pay}颗爱心,当前余额不足',
 
 
     /* 代码 */