更新地址
This commit is contained in:
parent
4933121bd1
commit
611b5da8dc
@ -4,6 +4,7 @@ namespace app\api\controller;
|
||||
|
||||
use app\common\model\informationg\UserInformationg;
|
||||
use app\common\logic\BaseLogic;
|
||||
use app\common\model\user\User;
|
||||
|
||||
class InformationController extends BaseApiController
|
||||
{
|
||||
@ -29,8 +30,15 @@ class InformationController extends BaseApiController
|
||||
public function add()
|
||||
{
|
||||
$param = Request()->param();
|
||||
$user=User::where('id',$this->userId)->find();
|
||||
$param['admin_id'] = $this->userId;
|
||||
$param['company_id']=$this->userInfo['company_id'];
|
||||
$param['province']=$user['province'];
|
||||
$param['city']=$user['city'];
|
||||
$param['area']=$user['area'];
|
||||
$param['street']=$user['street'];
|
||||
$param['village']=$user['village'];
|
||||
$param['brigade']=$user['brigade'];
|
||||
$res = UserInformationg::add($param);
|
||||
if ($res != true) {
|
||||
return $this->fail( BaseLogic::getError());
|
||||
|
Loading…
x
Reference in New Issue
Block a user