Browse Source

Merge branch 'master' of http://git.dever.cc/dever-product/churen

Your Name 3 năm trước cách đây
mục cha
commit
a3c7c7faf4

+ 5 - 1
service/agent/lib/Order.php

@@ -1768,11 +1768,15 @@ class Order
                         $record = $db->fetch('select sum(num) as total from `ims_ewei_shop_member_credit_record` where `remark` LIKE "%推荐%" and `remark` LIKE "%'.$member['openid'].'%" and credittype = "credit2"');
                         $record = $db->fetch('select sum(num) as total from `ims_ewei_shop_member_credit_record` where `remark` LIKE "%推荐%" and `remark` LIKE "%'.$member['openid'].'%" and credittype = "credit2"');
                     }
                     }
 
 
-                    if (isset($record) && $record && isset($record['total'])) {
+                    if (isset($record) && $record && isset($record['total']) && $record['total']) {
                         $cash += $record['total'];
                         $cash += $record['total'];
                     }
                     }
                 }
                 }
             }
             }
+
+            if (!$cash) {
+                $cash = 0;
+            }
             
             
             $d = array
             $d = array
             (
             (

+ 11 - 1
service/option/database/account.php

@@ -216,7 +216,7 @@ return array
             'match'     => 'is_numeric',
             'match'     => 'is_numeric',
             'option'    => $is_idcard,
             'option'    => $is_idcard,
             'search'    => 'select,order',
             'search'    => 'select,order',
-            'order'     => 'asc',
+            //'order'     => 'asc',
             //'update'    => 'radio',
             //'update'    => 'radio',
             'list'      => $search_auth == 1 ? 'Dever::load("option/lib/account.getIdcard", {id})' : false,
             'list'      => $search_auth == 1 ? 'Dever::load("option/lib/account.getIdcard", {id})' : false,
             'list_order' => 3,
             'list_order' => 3,
@@ -319,6 +319,16 @@ return array
             'desc'      => '审核时间',
             'desc'      => '审核时间',
         ),
         ),
 
 
+        'up_date'     => array
+        (
+            'type'      => 'int-11',
+            'name'      => '上传资料的时间',
+            'default'   => '',
+            'match'     => 'is_numeric',
+            'order'     => 'desc',
+            'desc'      => '上传资料的时间',
+        ),
+
         'option-agreement-status'=> array
         'option-agreement-status'=> array
         (
         (
             'name'      => '名称',
             'name'      => '名称',

+ 1 - 0
service/option/src/My.php

@@ -258,6 +258,7 @@ class My extends Core
             $where['audit'] = 2;
             $where['audit'] = 2;
             $where['status'] = 2;
             $where['status'] = 2;
             $where['is_idcard'] = 1;
             $where['is_idcard'] = 1;
+            $where['up_date'] = time();
             Dever::db('option/account')->update($where);
             Dever::db('option/account')->update($where);
 
 
             Dever::db('option/member')->update(array('where_id' => $this->user['mid'], 'idcard_bind' => 1));
             Dever::db('option/member')->update(array('where_id' => $this->user['mid'], 'idcard_bind' => 1));

+ 12 - 2
service/setting/lib/Idcard.php

@@ -46,15 +46,25 @@ class Idcard
             			return $v['data'];
             			return $v['data'];
             		}
             		}
             	}else{
             	}else{
-            		Dever::alert('身份证正面有误');
+            		Dever::alert('请上传正确的身份证正面图片');
             	}
             	}
             }elseif($type == 2){
             }elseif($type == 2){
             	if(isset($rest['back']) && $rest['back']){
             	if(isset($rest['back']) && $rest['back']){
             		foreach($rest as $k =>$v){
             		foreach($rest as $k =>$v){
+                        if (isset($v['data']['validPeriod'])) {
+                            $date = explode('-',$v['data']['validPeriod']);
+                            $cdate = strtotime(str_replace('.','-',$date[1]));
+                            if(time()>=$cdate){
+                                Dever::alert('身份证背面已过期');
+                            }
+                        } else {
+                            Dever::alert('请上传正确的身份证背面图片');
+                        }
+
             			return $v['data'];
             			return $v['data'];
             		}
             		}
             	}else{
             	}else{
-            		Dever::alert('身份证背面已过期');
+            		Dever::alert('请上传正确的身份证背面图片');
             	}
             	}
             }
             }
            //  if(isset($rest['face']) && $rest['face']){
            //  if(isset($rest['face']) && $rest['face']){