|
@@ -1291,6 +1291,14 @@ class Customer extends Start_Controller {
|
|
{
|
|
{
|
|
echo json_encode(array('msg'=>'选择DPEX必须填写州信息','success'=>false));exit;
|
|
echo json_encode(array('msg'=>'选择DPEX必须填写州信息','success'=>false));exit;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ //仅独立站 地址美国对电话 10或者11位进行判断
|
|
|
|
+ if($post['country'] == 192){
|
|
|
|
+ if((strlen($post['phone'])!= 10) && (strlen($post['phone'])!= 11)){
|
|
|
|
+ echo json_encode(array('msg'=>'美国电话号码应为10/11位!','success'=>false));exit;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
/**
|
|
/**
|
|
$post['saddress']
|
|
$post['saddress']
|
|
if($post['printtype'] == 1)//如果是运单
|
|
if($post['printtype'] == 1)//如果是运单
|
|
@@ -1689,8 +1697,17 @@ class Customer extends Start_Controller {
|
|
$repeat = $this->customer->find_all('phone = "'.$value[11].'" and address = "'.($value['15']!='--'?$value['15'].' ':'').($value['14']!='--'?$value['14'].' ':'').$value['13'].'" and shop = 19');//判断电话地址
|
|
$repeat = $this->customer->find_all('phone = "'.$value[11].'" and address = "'.($value['15']!='--'?$value['15'].' ':'').($value['14']!='--'?$value['14'].' ':'').$value['13'].'" and shop = 19');//判断电话地址
|
|
$sku = $value['8'];
|
|
$sku = $value['8'];
|
|
$je = (isset($value['28']))?$value['28']:0;
|
|
$je = (isset($value['28']))?$value['28']:0;
|
|
- $value['29'] = str_replace('/','-',$value['29']);
|
|
|
|
- $dtime = strtotime($value['29']);
|
|
|
|
|
|
+ // $value['29'] = str_replace('/','-',$value['29']);
|
|
|
|
+ // $dtime = strtotime($value['29']);
|
|
|
|
+ if(!empty($value['29'])){
|
|
|
|
+ $value['29'] = str_replace('/','-',$value['29']);
|
|
|
|
+ $dtime = strtotime($value['29']);
|
|
|
|
+ if(empty($dtime)){
|
|
|
|
+ $dtime = time();
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ $dtime = time();
|
|
|
|
+ }
|
|
$post['name'] = ($value['10'] && $value['10'] != 'NULL')?str_replace(array('/( | | |\s)/',"'"),array(' ',"’"),$value['10']):'';
|
|
$post['name'] = ($value['10'] && $value['10'] != 'NULL')?str_replace(array('/( | | |\s)/',"'"),array(' ',"’"),$value['10']):'';
|
|
$post['email'] = $value['12'];
|
|
$post['email'] = $value['12'];
|
|
if($value['20'] != '')
|
|
if($value['20'] != '')
|