Merge branch 'master' of http://47.244.231.31:8099/zhl/globalso-v6
正在显示
1 个修改的文件
包含
8 行增加
和
2 行删除
| @@ -5,6 +5,7 @@ namespace App\Models\Inquiry; | @@ -5,6 +5,7 @@ namespace App\Models\Inquiry; | ||
| 5 | use App\Models\Base; | 5 | use App\Models\Base; |
| 6 | use Illuminate\Database\Eloquent\SoftDeletes; | 6 | use Illuminate\Database\Eloquent\SoftDeletes; |
| 7 | use Illuminate\Support\Facades\Cache; | 7 | use Illuminate\Support\Facades\Cache; |
| 8 | +use Illuminate\Support\Str; | ||
| 8 | 9 | ||
| 9 | /** | 10 | /** |
| 10 | * Class InquiryForm | 11 | * Class InquiryForm |
| @@ -36,10 +37,11 @@ class InquiryForm extends Base | @@ -36,10 +37,11 @@ class InquiryForm extends Base | ||
| 36 | 'phone' => '电话', | 37 | 'phone' => '电话', |
| 37 | 'mobile' => '电话', | 38 | 'mobile' => '电话', |
| 38 | 'message' => '询盘内容', | 39 | 'message' => '询盘内容', |
| 39 | - 'company' => '公司名称' | 40 | + 'company' => '公司名称', |
| 41 | + 'file' => '文件' | ||
| 40 | ]; | 42 | ]; |
| 41 | if($field){ | 43 | if($field){ |
| 42 | - return $map[$field] ?? $field; | 44 | + return $map[Str::lower($field)] ?? Str::studly($field); |
| 43 | } | 45 | } |
| 44 | return $map; | 46 | return $map; |
| 45 | } | 47 | } |
| @@ -70,6 +72,10 @@ class InquiryForm extends Base | @@ -70,6 +72,10 @@ class InquiryForm extends Base | ||
| 70 | unset($data['globalso-domain']); | 72 | unset($data['globalso-domain']); |
| 71 | unset($data['globalso-edition']); | 73 | unset($data['globalso-edition']); |
| 72 | unset($data['globalso-date']); | 74 | unset($data['globalso-date']); |
| 75 | + | ||
| 76 | + //数组key转为小写 | ||
| 77 | + $data = array_change_key_case($data, CASE_LOWER); | ||
| 78 | + | ||
| 73 | ksort($data); | 79 | ksort($data); |
| 74 | $field = array_keys($data); | 80 | $field = array_keys($data); |
| 75 | $sign = md5(json_encode($field)); | 81 | $sign = md5(json_encode($field)); |
-
请 注册 或 登录 后发表评论