| xqd
@@ -1667,7 +1667,16 @@ class AlbumController extends Controller
|
|
|
$agent_check = AlbumAgentModel::where([['store_id',$data['store_id']],['user_id',$userAuth->id]])->first();
|
|
|
if($agent_check){
|
|
|
if($agent_check->status==0) return $this->error(ErrorCode::CLIENT_WRONG_PARAMS, '该用户已提交申请!');
|
|
|
- return $this->error(ErrorCode::CLIENT_WRONG_PARAMS, '该用户已是经销商!');
|
|
|
+ $agent_check->phone = $data['phone'];
|
|
|
+ $agent_check->address = $data['address'];
|
|
|
+ $agent_check->lon = $data['lon'];
|
|
|
+ $agent_check->lat = $data['lat'];
|
|
|
+ $agent_check->realname = $data['realname'];
|
|
|
+ if($agent_check->save()) return $this->api([
|
|
|
+ 'code' =>0,
|
|
|
+ 'msg' =>'success',
|
|
|
+ ]);
|
|
|
+ return $this->error(ErrorCode::CLIENT_WRONG_PARAMS, '保存失败!');
|
|
|
}
|
|
|
$data['status'] = 0;
|
|
|
$data['user_id'] = $userAuth->id;
|