feat: 添加地址API省份、城市、区、街道、村、队信息录入
This commit is contained in:
parent
ed8fdb3422
commit
9560b4f2be
@ -35,7 +35,13 @@ class AddressLogic extends BaseLogic
|
||||
'uid' => $params['uid'],
|
||||
'real_name' => $params['real_name'],
|
||||
'phone' => $params['phone'],
|
||||
'detail' => $params['detail'],
|
||||
'province'=> $params['province'],
|
||||
'city' => $params['city'],
|
||||
'area' => $params['area'],
|
||||
'street' => $params['street'],
|
||||
'village' => $params['village'],
|
||||
'brigade' => $params['brigade'],
|
||||
'detail' => '',
|
||||
'is_default' => $params['is_default'],
|
||||
]);
|
||||
Db::commit();
|
||||
|
@ -21,7 +21,11 @@ class UserAddressValidate extends BaseValidate
|
||||
protected $rule = [
|
||||
'real_name' => 'require',
|
||||
'phone' => 'require',
|
||||
'detail' => 'require',
|
||||
'city' => 'require',
|
||||
'area' => 'require',
|
||||
'street' => 'require',
|
||||
'village' => 'require',
|
||||
'brigade' => 'require',
|
||||
'address_id' => 'require',
|
||||
"is_default"=>"require|in:0,1"
|
||||
|
||||
@ -38,7 +42,12 @@ class UserAddressValidate extends BaseValidate
|
||||
'phone' => '收货人电话',
|
||||
'detail' => '收货人详细地址',
|
||||
'address_id' => '地址id',
|
||||
"is_default"=>"默认地址"
|
||||
"is_default"=>"默认地址",
|
||||
'city'=>'城市',
|
||||
'area'=>'区',
|
||||
'street'=>'街道',
|
||||
'village'=>'村',
|
||||
'brigade'=>'队'
|
||||
|
||||
];
|
||||
|
||||
@ -51,7 +60,7 @@ class UserAddressValidate extends BaseValidate
|
||||
*/
|
||||
public function sceneAdd()
|
||||
{
|
||||
return $this->only(['real_name','phone','detail']);
|
||||
return $this->only(['real_name','phone','city','area','street','village','brigade']);
|
||||
}
|
||||
|
||||
|
||||
@ -63,7 +72,7 @@ class UserAddressValidate extends BaseValidate
|
||||
*/
|
||||
public function sceneEdit()
|
||||
{
|
||||
return $this->only(['real_name','phone','id']);
|
||||
return $this->only(['real_name','phone','id','city','area','street','village','brigade']);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user