|
@@ -248,18 +248,30 @@ class User extends Api |
|
@@ -248,18 +248,30 @@ class User extends Api |
248
|
{
|
248
|
{
|
249
|
$param = $this->request->param();
|
249
|
$param = $this->request->param();
|
250
|
$user_id = $this->is_token($this->request->header());
|
250
|
$user_id = $this->is_token($this->request->header());
|
251
|
- $mobile = Db::name('user')->where('id', $user_id)->value('mobile');
|
|
|
252
|
- $this->CheckCode($mobile, $param['code']);
|
|
|
253
|
- $data = [
|
|
|
254
|
- 'mobile' => $param['mobile'],
|
|
|
255
|
- 'car_num' => $param['car_num'],
|
|
|
256
|
- 'car_type' => $param['car_type'],
|
|
|
257
|
- 'color' => $param['color'],
|
|
|
258
|
- 'address' => $param['address'],
|
|
|
259
|
- 'address_con' => $param['address_con'],
|
|
|
260
|
- 'lng' => $param['lng'],
|
|
|
261
|
- 'lat' => $param['lat'],
|
|
|
262
|
- ];
|
251
|
+ if (!empty($param['mobile']) || $param['mobile'] != '' || $param['mobile'] != "" || $param['mobile'] != null) {
|
|
|
252
|
+ $mobile = Db::name('user')->where('id', $user_id)->value('mobile');
|
|
|
253
|
+ $this->CheckCode($mobile, $param['code']);
|
|
|
254
|
+ $data = [
|
|
|
255
|
+ 'mobile' => $param['mobile'],
|
|
|
256
|
+ 'car_num' => $param['car_num'],
|
|
|
257
|
+ 'car_type' => $param['car_type'],
|
|
|
258
|
+ 'color' => $param['color'],
|
|
|
259
|
+ 'address' => $param['address'],
|
|
|
260
|
+ 'address_con' => $param['address_con'],
|
|
|
261
|
+ 'lng' => $param['lng'],
|
|
|
262
|
+ 'lat' => $param['lat'],
|
|
|
263
|
+ ];
|
|
|
264
|
+ } else {
|
|
|
265
|
+ $data = [
|
|
|
266
|
+ 'car_num' => $param['car_num'],
|
|
|
267
|
+ 'car_type' => $param['car_type'],
|
|
|
268
|
+ 'color' => $param['color'],
|
|
|
269
|
+ 'address' => $param['address'],
|
|
|
270
|
+ 'address_con' => $param['address_con'],
|
|
|
271
|
+ 'lng' => $param['lng'],
|
|
|
272
|
+ 'lat' => $param['lat'],
|
|
|
273
|
+ ];
|
|
|
274
|
+ }
|
263
|
$res = Db::name('user')->where('id', $user_id)->update($data);
|
275
|
$res = Db::name('user')->where('id', $user_id)->update($data);
|
264
|
if (!$res) {
|
276
|
if (!$res) {
|
265
|
$this->error('请填写完整信息', 0);
|
277
|
$this->error('请填写完整信息', 0);
|
|
@@ -418,6 +430,7 @@ class User extends Api |
|
@@ -418,6 +430,7 @@ class User extends Api |
418
|
public function MyOrder()
|
430
|
public function MyOrder()
|
419
|
{
|
431
|
{
|
420
|
$user_id = $this->is_token($this->request->header());
|
432
|
$user_id = $this->is_token($this->request->header());
|
|
|
433
|
+ $this->orderTime($user_id);
|
421
|
$param = $this->request->param();
|
434
|
$param = $this->request->param();
|
422
|
if ($param['type'] == 1) {
|
435
|
if ($param['type'] == 1) {
|
423
|
$map = [];
|
436
|
$map = [];
|