|
@@ -10,6 +10,7 @@ use app\common\model\master_worker\MasterWorkerAgree;
|
|
|
use app\common\model\master_worker\MasterWorkerAuth;
|
|
use app\common\model\master_worker\MasterWorkerAuth;
|
|
|
use app\common\model\master_worker\MasterWorkerInfo;
|
|
use app\common\model\master_worker\MasterWorkerInfo;
|
|
|
use app\common\model\master_worker_register\MasterWorkerRegister;
|
|
use app\common\model\master_worker_register\MasterWorkerRegister;
|
|
|
|
|
+use app\common\model\setting\PostageRegion;
|
|
|
use app\common\service\FileService;
|
|
use app\common\service\FileService;
|
|
|
use app\common\service\sms\SmsDriver;
|
|
use app\common\service\sms\SmsDriver;
|
|
|
use app\common\service\wechat\WeChatMnpService;
|
|
use app\common\service\wechat\WeChatMnpService;
|
|
@@ -63,6 +64,11 @@ class LoginLogic extends BaseLogic
|
|
|
public static function register(array $params)
|
|
public static function register(array $params)
|
|
|
{
|
|
{
|
|
|
try {
|
|
try {
|
|
|
|
|
+ // 通过 $params['city'] 查询省市区
|
|
|
|
|
+ $postageRegion = array_column(getPostageRegion(), null, 'id');
|
|
|
|
|
+ $params['province'] = $postageRegion[$params['city']]['pid'];
|
|
|
|
|
+ $params['province'] && $params['area_name'] = $postageRegion[$params['province']]['name'].$postageRegion[$params['city']]['name'];
|
|
|
|
|
+
|
|
|
$master = MasterWorkerRegister::where('mobile',$params['mobile'])->findOrEmpty();
|
|
$master = MasterWorkerRegister::where('mobile',$params['mobile'])->findOrEmpty();
|
|
|
|
|
|
|
|
if(!$master->isEmpty() and $master->status==1){
|
|
if(!$master->isEmpty() and $master->status==1){
|
|
@@ -78,7 +84,9 @@ class LoginLogic extends BaseLogic
|
|
|
'maintain_exp_type' => isset($params['maintain_exp_type'])?$params['maintain_exp_type']:0,
|
|
'maintain_exp_type' => isset($params['maintain_exp_type'])?$params['maintain_exp_type']:0,
|
|
|
'other_exp_type' => isset($params['other_exp_type'])?$params['other_exp_type']:'',
|
|
'other_exp_type' => isset($params['other_exp_type'])?$params['other_exp_type']:'',
|
|
|
'other_exp_name' => (isset($params['other_exp_name']) && isset($params['other_exp_type']) && $params['other_exp_type'] == 4)?$params['other_exp_name']:'',
|
|
'other_exp_name' => (isset($params['other_exp_name']) && isset($params['other_exp_type']) && $params['other_exp_type'] == 4)?$params['other_exp_name']:'',
|
|
|
- 'city' => $params['city'],
|
|
|
|
|
|
|
+ 'province' => $params['province']??0,
|
|
|
|
|
+ 'city' => $params['city']??0,
|
|
|
|
|
+ 'area_name' => $params['area_name']??'',
|
|
|
'vehicle_type' => $params['vehicle_type'],
|
|
'vehicle_type' => $params['vehicle_type'],
|
|
|
'name' => $params['name'],
|
|
'name' => $params['name'],
|
|
|
'age' => $params['age'],
|
|
'age' => $params['age'],
|
|
@@ -97,7 +105,9 @@ class LoginLogic extends BaseLogic
|
|
|
'maintain_exp_type' => isset($params['maintain_exp_type'])?$params['maintain_exp_type']:0,
|
|
'maintain_exp_type' => isset($params['maintain_exp_type'])?$params['maintain_exp_type']:0,
|
|
|
'other_exp_type' => isset($params['other_exp_type'])?$params['other_exp_type']:'',
|
|
'other_exp_type' => isset($params['other_exp_type'])?$params['other_exp_type']:'',
|
|
|
'other_exp_name' => (isset($params['other_exp_name']) && isset($params['other_exp_type']) && $params['other_exp_type'] == 4)?$params['other_exp_name']:'',
|
|
'other_exp_name' => (isset($params['other_exp_name']) && isset($params['other_exp_type']) && $params['other_exp_type'] == 4)?$params['other_exp_name']:'',
|
|
|
|
|
+ 'province' => $params['province'],
|
|
|
'city' => $params['city'],
|
|
'city' => $params['city'],
|
|
|
|
|
+ 'area_name' => $params['area_name'],
|
|
|
'vehicle_type' => $params['vehicle_type'],
|
|
'vehicle_type' => $params['vehicle_type'],
|
|
|
'name' => $params['name'],
|
|
'name' => $params['name'],
|
|
|
'age' => $params['age'],
|
|
'age' => $params['age'],
|