作者 zhl

Merge remote-tracking branch 'origin/master' into zhl

@@ -37,7 +37,8 @@ class RemainDay extends Command @@ -37,7 +37,8 @@ class RemainDay extends Command
37 protected $ceaseProjectId = [ 37 protected $ceaseProjectId = [
38 354, 38 354,
39 649, 39 649,
40 - 1283 40 + 1283,
  41 + 2066
41 ];//需要单独处理的项目 42 ];//需要单独处理的项目
42 /** 43 /**
43 * The console command description. 44 * The console command description.
@@ -39,6 +39,12 @@ class AllProjectController extends BaseController @@ -39,6 +39,12 @@ class AllProjectController extends BaseController
39 if(isset($this->map['test_domain']) && !empty($this->map['test_domain'])){ 39 if(isset($this->map['test_domain']) && !empty($this->map['test_domain'])){
40 $this->map['test_domain'] = ['like','%'.$this->map['test_domain'].'%']; 40 $this->map['test_domain'] = ['like','%'.$this->map['test_domain'].'%'];
41 } 41 }
  42 + if(isset($this->map['title']) && !empty($this->map['title'])){
  43 + $this->map['title'] = ['like','%'.$this->map['title'].'%'];
  44 + }
  45 + if(isset($this->map['company']) && !empty($this->map['company'])){
  46 + $this->map['company'] = ['like','%'.$this->map['company'].'%'];
  47 + }
42 $data = $allProject->lists($this->map,$this->page,$this->row); 48 $data = $allProject->lists($this->map,$this->page,$this->row);
43 $this->response('success',Code::SUCCESS,$data); 49 $this->response('success',Code::SUCCESS,$data);
44 } 50 }
@@ -89,6 +89,14 @@ class InquiryForm extends Base @@ -89,6 +89,14 @@ class InquiryForm extends Base
89 $model = self::where('sign', $sign)->first(); 89 $model = self::where('sign', $sign)->first();
90 if(!$model){ 90 if(!$model){
91 $model = new self(); 91 $model = new self();
  92 +
  93 + //移动端询盘表单
  94 + if($sign == md5(json_encode(["__amp_source_origin", "message", "name", "phone"]))){
  95 + $model->title = '移动端询盘';
  96 + unset($data['__amp_source_origin']);
  97 + $field = array_keys($data);
  98 + }
  99 +
92 $model->sign = $sign; 100 $model->sign = $sign;
93 $model->field = $field; 101 $model->field = $field;
94 102
@@ -103,11 +111,6 @@ class InquiryForm extends Base @@ -103,11 +111,6 @@ class InquiryForm extends Base
103 !$has_file && $model->is_default = 1; 111 !$has_file && $model->is_default = 1;
104 } 112 }
105 113
106 - //移动端询盘表单  
107 - if($sign == md5(json_encode(["__amp_source_origin", "message", "name", "phone"]))){  
108 - $model->title = '移动端询盘';  
109 - }  
110 -  
111 $model->save(); 114 $model->save();
112 } 115 }
113 return $model->id; 116 return $model->id;
@@ -55,6 +55,10 @@ class InquiryFormData extends Base @@ -55,6 +55,10 @@ class InquiryFormData extends Base
55 if(!empty($sign_data['globalso-date'])){ 55 if(!empty($sign_data['globalso-date'])){
56 unset($sign_data['globalso-date']); 56 unset($sign_data['globalso-date']);
57 } 57 }
  58 + if(!empty($sign_data['__amp_source_origin'])){
  59 + unset($sign_data['__amp_source_origin']);
  60 + unset($data['__amp_source_origin']);
  61 + }
58 $sign = md5(json_encode($sign_data)); 62 $sign = md5(json_encode($sign_data));
59 //5分钟内是否有重复数据 63 //5分钟内是否有重复数据
60 $is_exist = self::where('sign', $sign)->where('created_at', '>', date('Y-m-d H:i:s', strtotime('-5 minute')))->first(); 64 $is_exist = self::where('sign', $sign)->where('created_at', '>', date('Y-m-d H:i:s', strtotime('-5 minute')))->first();
@@ -62,6 +66,7 @@ class InquiryFormData extends Base @@ -62,6 +66,7 @@ class InquiryFormData extends Base
62 return 0; 66 return 0;
63 } 67 }
64 68
  69 +
65 $model = new self(); 70 $model = new self();
66 $model->form_id = $form_id; 71 $model->form_id = $form_id;
67 $model->domain = $domain; 72 $model->domain = $domain;