...
|
...
|
@@ -248,18 +248,30 @@ class User extends Api |
|
|
{
|
|
|
$param = $this->request->param();
|
|
|
$user_id = $this->is_token($this->request->header());
|
|
|
$mobile = Db::name('user')->where('id', $user_id)->value('mobile');
|
|
|
$this->CheckCode($mobile, $param['code']);
|
|
|
$data = [
|
|
|
'mobile' => $param['mobile'],
|
|
|
'car_num' => $param['car_num'],
|
|
|
'car_type' => $param['car_type'],
|
|
|
'color' => $param['color'],
|
|
|
'address' => $param['address'],
|
|
|
'address_con' => $param['address_con'],
|
|
|
'lng' => $param['lng'],
|
|
|
'lat' => $param['lat'],
|
|
|
];
|
|
|
if (!empty($param['mobile']) || $param['mobile'] != '' || $param['mobile'] != "" || $param['mobile'] != null) {
|
|
|
$mobile = Db::name('user')->where('id', $user_id)->value('mobile');
|
|
|
$this->CheckCode($mobile, $param['code']);
|
|
|
$data = [
|
|
|
'mobile' => $param['mobile'],
|
|
|
'car_num' => $param['car_num'],
|
|
|
'car_type' => $param['car_type'],
|
|
|
'color' => $param['color'],
|
|
|
'address' => $param['address'],
|
|
|
'address_con' => $param['address_con'],
|
|
|
'lng' => $param['lng'],
|
|
|
'lat' => $param['lat'],
|
|
|
];
|
|
|
} else {
|
|
|
$data = [
|
|
|
'car_num' => $param['car_num'],
|
|
|
'car_type' => $param['car_type'],
|
|
|
'color' => $param['color'],
|
|
|
'address' => $param['address'],
|
|
|
'address_con' => $param['address_con'],
|
|
|
'lng' => $param['lng'],
|
|
|
'lat' => $param['lat'],
|
|
|
];
|
|
|
}
|
|
|
$res = Db::name('user')->where('id', $user_id)->update($data);
|
|
|
if (!$res) {
|
|
|
$this->error('请填写完整信息', 0);
|
...
|
...
|
@@ -418,6 +430,7 @@ class User extends Api |
|
|
public function MyOrder()
|
|
|
{
|
|
|
$user_id = $this->is_token($this->request->header());
|
|
|
$this->orderTime($user_id);
|
|
|
$param = $this->request->param();
|
|
|
if ($param['type'] == 1) {
|
|
|
$map = [];
|
...
|
...
|
|