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

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

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

+ 0 - 2
app/api/controller/IndexController.php

@@ -13,8 +13,6 @@ use cmf\controller\HomeBaseController;
 class IndexController extends HomeBaseController
 {
 
-
-    
     /**
      * 获取JSSDK参数
      */

+ 77 - 24
app/api/controller/MemberController.php

@@ -8,6 +8,7 @@ namespace app\api\controller;
 
 use app\weixin\model\Advice;
 use app\weixin\model\Complain;
+use app\weixin\service\IdnAuth;
 use function AlibabaCloud\Client\value;
 use app\weixin\model\AccountLog;
 use app\weixin\model\Meals;
@@ -88,6 +89,7 @@ class MemberController extends BaseController
                 $memberInfo['collectCount'] = UserCollect::getUserCount($userId, $memberInfo['vip_auth']);
                 $memberInfo['rechargeCount'] = Member::getRechargeCount($userId);
                 $memberInfo['messageCount'] = Member::getMessageTotal($userId, ['type' => 1, 'status' => 2]);
+                $memberInfo['accessCount'] = Member::getAccessCount($userId);
             }
 
             if ($type == 2) {
@@ -135,7 +137,7 @@ class MemberController extends BaseController
                 $memberInfo['authInfo'] = $authData;
             }
             if ($type == 6) {
-                $field = 'graduate,education,education_img,education_fail,education_check';
+                $field = 'graduate,education,education_img,education_fail,education_check,education_code,education_type';
                 $authData = UserProfile::where(['userid' => $userId])
                     ->field($field)
                     ->find();
@@ -144,7 +146,7 @@ class MemberController extends BaseController
                 $memberInfo['authInfo'] = $authData ? $authData : [];
             }
             if ($type == 7) {
-                $field = 'company,occupation,position_img,position_fail,position_check';
+                $field = 'company,occupation,position_img,position_fail,position_check,position_type,position_hide';
                 $authData = UserProfile::where(['userid' => $userId])
                     ->field($field)
                     ->find();
@@ -181,6 +183,13 @@ class MemberController extends BaseController
                 $memberInfo['contact_time'] = $contactTime;
             }
 
+            if($type == 9){
+                $accountConfig = cmf_get_option('account_config');
+                $pay = isset($accountConfig['lock_access_pay']) ? intval($accountConfig['lock_access_pay']) : 0;
+                $pay = $pay ? $pay : 1;
+                $memberInfo['lock_access_pay'] = $pay;
+            }
+
         }
 
         showJson(1005, 1001, $memberInfo);
@@ -677,6 +686,11 @@ class MemberController extends BaseController
         $userId = $id ? $id : $this->userId;
         $myInfo = Member::getHomeInfo($userId, '', $type);
 
+        // 访问记录
+        if($myInfo && $type == 4){
+            Member::makeUserAccess($userId, $this->userId);
+        }
+
         $cUserInfo = [];
         $cInfo = [];
         if ($cid <= 0 && $id) {
@@ -921,6 +935,7 @@ class MemberController extends BaseController
         switch ($scene) {
             case 'idcard':  // 身份证认证
                 $idcard = isset($params['idcard']) ? trim($params['idcard']) : '';
+                $realname = isset($params['realname'])? trim($params['realname']) : '';
                 $profileData = [
                     'idcard' => $idcard,
                     'front_idcard' => isset($params['front_idcard']) ? trim($params['front_idcard']) : '',
@@ -936,40 +951,30 @@ class MemberController extends BaseController
                     showJson(1004, 2128);
                 }
 
-
-                // 身份证照片
-                /*if (isset($_FILES['image1'])) {
-                    $file1 = request()->file('image1');
-                    $fileData = Storage::uploadImg($file1, 'auth');
-                    $frontIdcard = isset($fileData['file']) ? $fileData['file'] : '';
-                    $profileData['front_idcard'] = $waterTxt ? Storage::imageWater($frontIdcard, $waterTxt) : $frontIdcard;
+                // 在线验证
+                $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);
                 }
 
-
-                //$file2 = isset($_FILES['image2'])? $_FILES['image2'] : null;
-                $files = request()->file();
-                if (isset($_FILES['image2'])) {
-                    $file2 = request()->file('image2');
-                    $fileData = Storage::uploadImg($file2, 'auth');
-                    $backIdcard = isset($fileData['file']) ? $fileData['file'] : '';
-                    $profileData['back_idcard'] = $waterTxt ? Storage::imageWater($backIdcard, $waterTxt) : $backIdcard;
-                }*/
-
-                if (empty($profileData['front_idcard'])) {
+                // 身份证照片
+                /*if (empty($profileData['front_idcard'])) {
                     showJson(1004, 2024);
                 }
                 if (empty($profileData['back_idcard'])) {
                     showJson(1004, 2025);
-                }
-
-//                var_dump($profileData);exit;
+                }*/
 
                 Db::startTrans();
-                if (!Member::saveData(['id' => $this->userId], ['real_name' => trim($params['realname'])])) {
+                if (!Member::saveData(['id' => $this->userId], ['real_name' => $realname])) {
                     Db::rollback();
                     showJson(1004, 2026);
                 }
 
+                // 在线验证是否通过
+                $profileData['idcard_online_check'] = $code == 'success'? 1 : 0;
                 if (UserProfile::checkProfile($this->userId)) {
                     $profileData['updated_at'] = date('Y-m-d H:i:s');
                     $res = UserProfile::saveData(['userid' => $this->userId], $profileData);
@@ -993,6 +998,8 @@ class MemberController extends BaseController
                     '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_check' => 1,
                 ];
 
@@ -1035,6 +1042,8 @@ class MemberController extends BaseController
                     'company' => isset($params['company']) ? trim($params['company']) : '',
                     'occupation' => isset($params['occupation']) ? trim($params['occupation']) : '',
                     'position_img' => isset($params['position_img']) ? trim($params['position_img']) : '',
+                    'position_type' => isset($params['position_type']) ? intval($params['position_type']) : 0,
+                    'position_hide' => isset($params['position_hide']) ? intval($params['position_hide']) : 0,
                     'position_check' => 1,
                 ];
 
@@ -1605,5 +1614,49 @@ class MemberController extends BaseController
         session('openid', null);
         showJson(1005, 1001);
     }
+
+    /**
+     * 认证记录
+     * @throws \think\Exception\DbException
+     */
+    public function getAuthNotice(){
+        $dataList = \app\weixin\service\Member::getAuthNotices();
+        showJson(1005, 1001, $dataList);
+    }
+
+    /**
+     * 获取用户访问记录
+     */
+    public function getUserAccess(){
+        $pageSize = input('pageSize', 30);
+        $dataList = Member::getUserAccess($this->userId, $pageSize);
+        showJson(1005, 1001, $dataList);
+    }
+
+    /**
+     * 解锁访问用户信息
+     */
+    public function unlock(){
+        $uid = input('uid', 0);
+        $cuid = input('cuid', 0);
+        if(empty($uid) || empty($cuid)){
+            showJson(1004,1012);
+        }
+
+        if($uid != $this->userId || ($uid == $cuid)){
+            showJson(1004,8301);
+        }
+
+        if (UserProfile::where(['userid' => $this->userId])->value('idcard_check') != 2) {
+            showJson(1006, 2132, ['url' => Wechat::makeRedirectUrl(url('/weixin/auth/idcard', '', '', true))]);
+        }
+
+        $res = Member::catchUnlock($uid, $cuid);
+        if (is_array($res)) {
+            showJson(1005, 8302);
+        } else {
+            showJson(1004, $res ? $res : 8303);
+        }
+    }
 }
 

+ 10 - 2
app/weixin/controller/MemberController.php

@@ -64,7 +64,6 @@ class MemberController extends BaseController
         return $this->fetch();
     }
 
-
     /**
      * 个人主页
      * @return mixed
@@ -87,7 +86,6 @@ class MemberController extends BaseController
         return $this->fetch();
     }
 
-
     /**
      * 我的活动
      * @return mixed
@@ -105,6 +103,7 @@ class MemberController extends BaseController
     {
         return $this->fetch();
     }
+
     /**
      * 怦然心动
      * @return mixed
@@ -142,6 +141,15 @@ class MemberController extends BaseController
     }
 
     /**
+     * 我的访客
+     * @return mixed
+     */
+    public function access()
+    {
+        return $this->fetch(':member/access/index');
+    }
+
+    /**
      * 我的相册
      * @return mixed
      */

+ 7 - 0
app/weixin/controller/PageController.php

@@ -33,6 +33,13 @@ class PageController extends HomeBaseController
         return $this->fetch(':index/rule');
     }
 
+    /**
+     * 认证说明
+     * @return mixed
+     */
+    public function auth(){
+        return $this->fetch(':index/auth');
+    }
 
     /**
      * 用户服务协议

+ 11 - 0
app/weixin/model/AuthLog.php

@@ -0,0 +1,11 @@
+<?php
+
+namespace app\weixin\model;
+
+use think\Model;
+
+class AuthLog extends Model
+{
+    protected $table = 'sg_auth_logs';
+
+}

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


+ 11 - 0
app/weixin/model/UserAccess.php

@@ -0,0 +1,11 @@
+<?php
+
+namespace app\weixin\model;
+
+use think\Model;
+
+class UserAccess extends Model
+{
+    protected $table = 'sg_user_access';
+
+}

+ 62 - 0
app/weixin/service/IdnAuth.php

@@ -0,0 +1,62 @@
+<?php
+/**
+ * 身份认证服务
+ * @author wesmiler
+ */
+
+namespace app\weixin\service;
+
+class IdnAuth
+{
+    // 文档 https://market.aliyun.com/products/57000002/cmapi025518.html?spm=5176.2020520132.101.3.1cca7218tmS1IZ#sku=yuncode1951800000
+    protected static $apiUrl = 'http://idenauthen.market.alicloudapi.com';
+    protected static $appKey = '203953968';
+    protected static $appSecret = 'nbP0eTttVbGFjXSI8GbY04tE89Mnw9ow';
+    protected static $appCode = '689f5d471a2140ea8091c8f4e979f8dd';
+    protected static $errors = [
+        '0000'=> '身份证信息匹配',
+        '0001'=> '开户名不能为空',
+        '0002'=> '开户名不能包含特殊字符',
+        '0003'=> '身份证号不能为空',
+        '0004'=> '身份证号不匹配或格式错误',
+        '0007'=> '该身份证号码不存在',
+        '0008'=> '身份证信息不匹配',
+        '0010'=> '系统维护,请稍后再试',
+    ];
+    /**
+     * 发生短信验证码
+     * @param $realname 姓名
+     * @param $idcard 身份证号码
+     * @return array|bool
+     */
+    public static function check($realname, $idcard)
+    {
+        if(empty($realname) || empty($idcard)){
+            return 2012;
+        }
+
+        // 参数配置
+        $smsConfig = cmf_get_option('idenauth_config');
+        $appKey = isset($params['appKey']) && $params['appKey']?trim($params['appKey']) : self::$appKey;
+        $appCode = isset($params['appCode'])&&$params['appCode']?trim($params['appCode']) : self::$appCode;
+        $appSecret = isset($params['appSecret'])&&$params['appSecret']?trim($params['appSecret']) : self::$appSecret;
+
+        // 构建请求参数
+        $headers = [
+            "Authorization:APPCODE {$appCode}",
+            "Content-Type:application/x-www-form-urlencoded; charset=UTF-8",
+        ];
+
+        $url = self::$apiUrl.'/idenAuthentication';
+        $query = "idNo={$idcard}&name={$realname}";
+        PRedis::set("idAurh:{$idcard}:request", ['url'=> $url,'query'=> $query,'headers'=> $headers], 600);
+        $result = httpHeaderRequest($url,$query,'post',$headers);
+        $respCode = isset($result['respCode'])? $result['respCode'] : '';
+        PRedis::set("idAurh:{$idcard}:result", $result, 600);
+        if($respCode != '0000'){
+            $msg = isset(self::$errors[$respCode])? self::$errors[$respCode] : '身份证在线校验失败';
+            return ['code'=> 'error', 'msg'=> $msg, 'result'=> $result];
+        }
+        return ['code'=> 'success', 'msg'=> '身份证匹配成功', 'result'=> $result];
+    }
+}

+ 23 - 1
app/weixin/service/Member.php

@@ -6,6 +6,7 @@
 namespace app\weixin\service;
 
 use app\weixin\model\AccountLog;
+use app\weixin\model\AuthLog;
 use app\weixin\model\Complain;
 use app\weixin\model\UserBalanceLog;
 use app\weixin\model\UserProfile;
@@ -278,7 +279,7 @@ class Member
 
             // 被举报用户通知
             $cOpenid = isset($cUserInfo['openid'])? $cUserInfo['openid'] : '';
-           $cnickname = isset($cUserInfo['user_nickname'])? $cUserInfo['user_nickname'] : '';
+            $cnickname = isset($cUserInfo['user_nickname'])? $cUserInfo['user_nickname'] : '';
             if($cOpenid){
                 $params = [
                     'title' => "尊敬的{$cnickname}用户,由于您的账号被多人举报经平台已经将您的账号冻结,若有疑问请联系平台客服\n\n举报原因:\t{$freezing}",
@@ -305,4 +306,25 @@ class Member
         return false;
     }
 
+    /**
+     * 获取认证记录
+     * @return \think\db\Query|null
+     * @throws \think\Exception\DbException
+     */
+    public static function getAuthNotices(){
+        return AuthLog::alias('a')
+            ->leftJoin('user u','u.id=a.user_id')
+            ->where(['u.user_type'=> 2,'u.user_status'=> 1, 'a.status'=> 1])
+            ->where('u.id','>', 0)
+            ->where('a.created_at','>=', date('Y-m-d'))
+            ->field('a.user_id,a.type,a.created_at,u.avatar,u.user_nickname as nickname')
+            ->order('a.created_at','desc')
+            ->limit(0,10)
+            ->all()
+            ->each(function($item, $k){
+                $item['avatar'] = $item['avatar']? cmf_get_image_preview_url($item['avatar']) : '';
+                $item['nickname'] = $item['nickname']? formatName($item['nickname']) : '';
+            });
+    }
+
 }

+ 2 - 2
app/weixin/validate/MemberValidate.php

@@ -21,10 +21,10 @@ class MemberValidate extends Validate
         'realname' => 'require|chs',
         'now_address' => 'require|length:2,100',
         'home_address' => 'require|length:2,100',
-        'graduate' => 'require|length:2,30',
+        'graduate' => 'length:2,30',
         'company' => 'require|length:2,30',
         'occupation' => 'require|length:2,30',
-        'eduacation' => 'require|integer|length:1,5',
+        'eduacation' => 'integer|integer|length:1,5',
         'nickname' => 'require',
         'money' => 'require|float|length:1,14',
         'weight' => 'require|integer|length:2,20',

+ 1 - 0
data/config/weixin.php

@@ -46,6 +46,7 @@ return [
         'agree' => 8, // 用户服务协议
         'privacy' => 9, // 隐私保护政策
         'marketAgree' => 10, // 隐私保护政策
+        'auth' => 11, // 认证说明
     ],
     // 收益类型
     'incomeTypes'=> [

+ 70 - 3
vendor/thinkcmf/cmf-app/src/admin/controller/BooksController.php

@@ -864,7 +864,7 @@ class BooksController extends AdminBaseController
 
         $where = array('u.user_type' => 2);
 
-        $field = 'b.book_num,`u`.`user_nickname`,YEAR(from_unixtime(`u`.`birthday`)) as birthday,up.height,up.education,up.occupation,u.mobile,up.wechat_code ';
+        $field = 'b.book_num,`u`.`user_nickname`,u.real_name,YEAR(from_unixtime(`u`.`birthday`)) as birthday,up.height,up.education,up.occupation,u.mobile,up.wechat_code ';
         $dataList = Db::name('books')->alias('b')
             ->join('user u', 'b.uid=u.id', 'left')
             ->join('user_profile up', 'up.userid=u.id', 'left')
@@ -875,12 +875,13 @@ class BooksController extends AdminBaseController
             ->where('b.aid', input('aid'))
             ->field($field)
             ->order("b.id DESC")
+            
             ->select();
-        //echo Db::name('user')->getLastSql();die;
+     //echo Db::name('user')->getLastSql();die;
         foreach ($dataList as $key => $item) {
             $key += 2;
             $PHPSheet->setCellValue('A' . $key, $item['book_num']);
-            $PHPSheet->setCellValue('B' . $key, $this->filterEmoji($item['user_nickname']));
+            $PHPSheet->setCellValue('B' . $key, $this->guolv($this->filterEmoji($item['user_nickname'])));
             $PHPSheet->setCellValue('C' . $key, $item['birthday']);
             $PHPSheet->setCellValue('D' . $key, $item['height']);
             $PHPSheet->setCellValue('E' . $key, $this->xueli($item['education']));
@@ -941,5 +942,71 @@ class BooksController extends AdminBaseController
 
     }
 
+      //过滤字符串
+    public function guolv($str){
+        
+          $str = str_replace('=', '等', $str);
+      
+          return $str;
+ 
+    } 
+
+    //过滤字符串
+    public function guolv2($str){
+          $str = str_replace('`', '', $str);
+          $str = str_replace('·', '', $str);
+          $str = str_replace('~', '', $str);
+          $str = str_replace('!', '', $str);
+          $str = str_replace('!', '', $str);
+          $str = str_replace('@', '', $str);
+          $str = str_replace('#', '', $str);
+          $str = str_replace('$', '', $str);
+          $str = str_replace('¥', '', $str);
+          $str = str_replace('%', '', $str);
+          $str = str_replace('^', '', $str);
+          $str = str_replace('……', '', $str);
+          $str = str_replace('&', '', $str);
+          $str = str_replace('*', '', $str);
+          $str = str_replace('(', '', $str);
+          $str = str_replace(')', '', $str);
+          $str = str_replace('(', '', $str);
+          $str = str_replace(')', '', $str);
+          $str = str_replace('-', '', $str);
+          $str = str_replace('_', '', $str);
+          $str = str_replace('——', '', $str);
+          $str = str_replace('+', '', $str);
+          $str = str_replace('=', '', $str);
+          $str = str_replace('|', '', $str);
+          $str = str_replace('\\', '', $str);
+          $str = str_replace('[', '', $str);
+          $str = str_replace(']', '', $str);
+          $str = str_replace('【', '', $str);
+          $str = str_replace('】', '', $str);
+          $str = str_replace('{', '', $str);
+          $str = str_replace('}', '', $str);
+          $str = str_replace(';', '', $str);
+          $str = str_replace(';', '', $str);
+          $str = str_replace(':', '', $str);
+          $str = str_replace(':', '', $str);
+          $str = str_replace('\'', '', $str);
+          $str = str_replace('"', '', $str);
+          $str = str_replace('“', '', $str);
+          $str = str_replace('”', '', $str);
+          $str = str_replace(',', '', $str);
+          $str = str_replace(',', '', $str);
+          $str = str_replace('<', '', $str);
+          $str = str_replace('>', '', $str);
+          $str = str_replace('《', '', $str);
+          $str = str_replace('》', '', $str);
+          $str = str_replace('.', '', $str);
+          $str = str_replace('。', '', $str);
+          $str = str_replace('/', '', $str);
+          $str = str_replace('、', '', $str);
+          $str = str_replace('?', '', $str);
+          $str = str_replace('?', '', $str);
+          return trim($str);
+ 
+    } 
+
 
 }

+ 26 - 14
vendor/thinkcmf/cmf-app/src/user/controller/AdminIndexController.php

@@ -982,7 +982,7 @@ class AdminIndexController extends AdminBaseController
             $join   = [
                 ['user_profile up', 'u.id = up.userid']
             ];
-            $userresult=Db::name('user')->field('u.real_name,up.idcard,up.idcard_check,up.idcard_fail,up.front_idcard,up.back_idcard')
+            $userresult=Db::name('user')->field('u.real_name,up.idcard,up.idcard_check,up.idcard_online_check,up.idcard_fail,up.front_idcard,up.back_idcard')
                 ->alias('u')->join($join)
                 ->where('u.id',$id)
                 ->find();
@@ -1139,7 +1139,7 @@ class AdminIndexController extends AdminBaseController
             $id = $this->request->param('id', 0, 'intval');
             //读取用户表和用户资料表的信息出来
 
-            $companyresult=Db::name('user_profile')->field('company,occupation,position_img,position_fail,position_check')
+            $companyresult=Db::name('user_profile')->field('company,occupation,position_img,position_fail,position_type,position_check')
 
                 ->where('userid',$id)
                 ->find();
@@ -1212,7 +1212,7 @@ class AdminIndexController extends AdminBaseController
             $id = $this->request->param('id', 0, 'intval');
             //读取用户表和用户资料表的信息出来
 
-            $schoolresult=Db::name('user_profile')->field('graduate,education,education_fail,education_img,education_check')
+            $schoolresult=Db::name('user_profile')->field('graduate,education,education_fail,education_type,education_code,education_img,education_check')
                 ->where('userid',$id)
                 ->find();
 
@@ -1770,8 +1770,6 @@ class AdminIndexController extends AdminBaseController
 
                 //身高区间查询
 
-
-
                 if((!empty(input('height')) && input('height')!='none') && (!empty(input('heightt')) && input('heightt')!='none')){
 
                     $query->where('up.height',['>',input('height')],['<',input('heightt')],'and');
@@ -2155,7 +2153,8 @@ class AdminIndexController extends AdminBaseController
     //处理举报用户
 
     public function tohandle(){
-     
+
+       
          $param  = $this->request->param();
          $siteInfo = cmf_get_site_info();
          $id =  $param['ids'];
@@ -2170,24 +2169,35 @@ class AdminIndexController extends AdminBaseController
                 //冻结被举报人, //进行奖励
                      $userresult2=Db::name('user')->where('id',$result['c_uid'])->update(['user_status'=>0,'freezing'=>$result['remark']]);
                     if($userresult2){
-                        //奖励举报人爱心,并且发送模板消息
-                            $result3=Db::name('user')->where('id',$result['uid'])->setInc('redheart',$siteInfo['complain_award_redheart']); 
+
+                        $comsel_result=Db::name('complain')->field('uid')->where('c_uid',$result['c_uid'])->select();
+
+                        foreach ($comsel_result as $key => $value) {
+                              $aryuser=$value['uid'];
+                        }
+
+                        //奖励举报人爱心,并且发送模板消息,循环多人发送
+                            $result3=Db::name('user')->where('id','in',$aryuser)->setInc('redheart',$siteInfo['complain_award_redheart']); 
                              if($result3){
                                      //变成已经处理
                                       $com_result= Db::name("complain")->where(['c_uid'=>$result['c_uid']])->update(['status'=>2]);
                                        if($com_result){
-                                            //举报人的openid
-                                            $memberInfo = MemberModel::getInfo(['id'=>$result['uid']],'');
 
-                                             //被举报人的openid  wechat_code
+                                               //被举报人的openid  wechat_code
                                             $memberInfoc = MemberModel::getInfo(['id'=>$result['c_uid']],'');
                                             $wechat_result=Db::name('user_profile')->field('wechat_code')->where('userid',$result['c_uid'])->find();
 
-                                             // 推送审核信息 $result['remark']
-                                            $openid = isset($memberInfo['openid'])? $memberInfo['openid'] : '';
+
+                                            //举报人的openid
+                                            //$memberInfo = MemberModel::getInfo(['id'=>$result['uid']],'');
+                                            $memberInfo = Db::name('name')->field('openid,real_name')->where('id','in',$aryuser)->select();
+                                          
+                                            foreach ($memberInfo as $values) { 
+                                               // 推送审核信息 $result['remark']
+                                              $openid = isset($values['openid'])? $values['openid'] : '';
 
                                              if ($openid) {
-                                                $realname = isset($memberInfo['real_name']) ? $memberInfo['real_name'] : '';
+                                                $realname = isset($values['real_name']) ? $values['real_name'] : '';
                                                 $checkTime = date('Y.m.d H:i');
                    
                                                 $remark = "脱单需主动,交友需真诚!\n你举报的用户已被处理,奖励你爱心{$siteInfo['complain_award_redheart']}个";
@@ -2213,6 +2223,8 @@ class AdminIndexController extends AdminBaseController
                                               
                                                 Wechat::sendTplMsg($openid, $params);
                                             }
+                                        }
+
 
                                              //推送被举报人信息
                                             $openidc = isset($memberInfoc['openid'])? $memberInfoc['openid'] : '';

+ 96 - 0
vendor/thinkcmf/cmf/src/common.php

@@ -1430,6 +1430,40 @@ function httpRequest($url, $data=[], $type='post', $dataType='array', $timeout=6
 }
 
 /**
+ * HTTP请求
+ * @param $url 链接
+ * @param $data 提交数据
+ * @param string $type 请求类型:get post
+ * @param string $dataType 返回数据类型 array json
+ * @param int $timeout
+ * @return mixed
+ */
+function httpHeaderRequest($url, $data=[], $type='post', $headers=[], $dataType='array', $timeout=60){
+    $data = $data && is_array($data)? http_build_query($data) : $data;
+    $url = strtolower($type) == 'get'? $url.(strpos($url, '?') === false ? '?' : ''). $data : $url;
+    $ch = curl_init($url);
+    if($headers){
+        curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
+    }
+    curl_setopt($ch, CURLOPT_POST, 1);
+    curl_setopt($ch, CURLOPT_HEADER,0 );
+    curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);
+    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
+    curl_setopt($ch, CURLOPT_FORBID_REUSE, 1);
+    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); // 对认证证书来源的检查,0-规避ssl的证书检查
+    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
+    curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
+    curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
+    $ret = curl_exec($ch);
+    curl_close($ch);
+    if(strtolower($dataType) == 'array' && !is_array($ret)){
+        $ret = json_decode($ret, true);
+    }
+    return $ret;
+}
+
+
+/**
  * HTTP请求(远程文件)
  * @param $url 链接
  * @param $data 提交数据
@@ -2677,4 +2711,66 @@ function getDistance($lng1, $lat1, $lng2, $lat2, $unit = 2, $decimal = 2)
     }
 
     return round($distance, $decimal);
+}
+
+/**
+ * 获取星座
+ * @param $date 如 01-01
+ * @return string
+ */
+function getStart($date)
+{
+    if ($date >= '03-21' && $date <= '04-19') {
+        return '白羊座';
+    } else if ($date >= '04-20' && $date <= '05-20') {
+        return '金牛座';
+    } else if ($date >= '05-21' && $date <= '06-21') {
+        return '双子座';
+    } else if ($date >= '06-22' && $date <= '07-22') {
+        return '巨蟹座';
+    } else if ($date >= '07-23' && $date <= '08-22') {
+        return '狮子座';
+    } else if ($date >= '08-23' && $date <= '09-22') {
+        return '处女座';
+    } else if ($date >= '09-23' && $date <= '10-23') {
+        return '天秤座';
+    } else if ($date >= '10-24' && $date <= '11-22') {
+        return '天蝎座';
+    } else if ($date >= '11-23' && $date <= '12-21') {
+        return '射手座';
+    } else if ($date >= '12-22' && $date <= '01-19') {
+        return '摩羯座';
+    } else if ($date >= '01-20' && $date <= '02-18') {
+        return '水瓶座';
+    } else if ($date >= '02-19' && $date <= '03-20') {
+        return '双鱼座';
+    }
+}
+
+/**
+ * 格式化时间段
+ * @param int $time 时间戳
+ * @return string 输出格式化时间
+ * @author wesmiler
+ * @date 2019/5/23
+ */
+function format_time($time)
+{
+    $interval = time() - $time;
+    $format = array(
+        '31536000' => '年',
+        '2592000' => '个月',
+        '604800' => '星期',
+        '86400' => '天',
+        '3600' => '小时',
+        '60' => '分钟',
+        '1' => '秒',
+    );
+    foreach ($format as $key => $val) {
+        $match = floor($interval / (int)$key);
+        if (0 != $match) {
+            return $match . $val . '前';
+        }
+    }
+    return date('Y-m-d', $time);
 }

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

@@ -169,8 +169,8 @@ return [
     '2135'=>'性别与您相同无法收藏',
     '2136'=>'系统错误,信息提交失败',
     '2137'=>'爱心不足请先充值',
-
-
+    '2138'=>'身份在线验证失败',
+    '2139'=>'您的拒绝申请操作已撤回',
 
 
     /* 文件上传 */
@@ -272,4 +272,12 @@ return [
     '8203'=> '位置数据更新失败',
     '8204'=> '位置数据转换失败',
 
+    // 解锁
+    '8301'=>'该信息您无权操作',
+    '8302'=>'解锁访问信息成功',
+    '8303'=>'解锁访问信息失败',
+    '8304'=>'该访问信息已解锁,请不要重复操作',
+    '8305'=>'解锁用户账号不存在或已被冻结,请刷新后重试',
+    '8306'=>'处理账户明细失败',
+
 ];