|
@@ -98,7 +98,23 @@ class RegisterService
|
|
|
public function registerCompany(array $data)
|
|
|
{
|
|
|
$data = array_only($data, ['companyname', 'contact', 'company_mobile', 'username',
|
|
|
- 'email', 'company_password', 'utype', 'reg_type', 'reg_source', 'landline_tel']);
|
|
|
+ 'email', 'company_password', 'utype', 'reg_type', 'reg_source', 'landline_tel','company_type']);
|
|
|
+ switch (intval($data['company_type'])){
|
|
|
+ case 1:
|
|
|
+ $data['is_renshe'] = 1;
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ $data['is_ic'] = 1;
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ $data['is_health'] = 1;
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ $data['is_edu'] = 1;
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ $data['is_renshe'] = 1;
|
|
|
+ }
|
|
|
$data['reg_source_cn'] = $this->getRegSource($data['reg_source']);
|
|
|
$data['reg_time'] = time();
|
|
|
$data['short_name'] = \Illuminate\Support\Str::substr($data['companyname'], 0, 25);
|