|
@@ -436,6 +436,7 @@ class Order extends Api |
|
@@ -436,6 +436,7 @@ class Order extends Api |
436
|
$type = $this->request->param('type');
|
436
|
$type = $this->request->param('type');
|
437
|
$page = $this->request->param('page', 1, 'intval');
|
437
|
$page = $this->request->param('page', 1, 'intval');
|
438
|
$pageNum = $this->request->param('pageNum', 10, 'intval');
|
438
|
$pageNum = $this->request->param('pageNum', 10, 'intval');
|
|
|
439
|
+// 类型(如果为空或者为1是进行中 2是已完成3是售后4待总结5已总结
|
439
|
if($type == '' || $type == 1){
|
440
|
if($type == '' || $type == 1){
|
440
|
$data = Db::name('order')
|
441
|
$data = Db::name('order')
|
441
|
->alias('a')
|
442
|
->alias('a')
|
|
@@ -457,7 +458,7 @@ class Order extends Api |
|
@@ -457,7 +458,7 @@ class Order extends Api |
457
|
->page($page,$pageNum)
|
458
|
->page($page,$pageNum)
|
458
|
->select();
|
459
|
->select();
|
459
|
foreach ($data as &$v){
|
460
|
foreach ($data as &$v){
|
460
|
- $seventime = $v['expirationtime']+7*86400;
|
461
|
+ $seventime = $v['expirationtime']+14*86400;
|
461
|
if($seventime>time()){
|
462
|
if($seventime>time()){
|
462
|
$v['xian'] = 1;
|
463
|
$v['xian'] = 1;
|
463
|
}else{
|
464
|
}else{
|
|
@@ -498,6 +499,14 @@ class Order extends Api |
|
@@ -498,6 +499,14 @@ class Order extends Api |
498
|
->order('id desc')
|
499
|
->order('id desc')
|
499
|
->page($page,$pageNum)
|
500
|
->page($page,$pageNum)
|
500
|
->select();
|
501
|
->select();
|
|
|
502
|
+ foreach ($data as &$v){
|
|
|
503
|
+ $seventime = $v['expirationtime']+14*86400;
|
|
|
504
|
+ if($seventime>time()){
|
|
|
505
|
+ $v['xian'] = 1;
|
|
|
506
|
+ }else{
|
|
|
507
|
+ $v['xian'] = 2;
|
|
|
508
|
+ }
|
|
|
509
|
+ }
|
501
|
}elseif ($type == 5){
|
510
|
}elseif ($type == 5){
|
502
|
$data = Db::name('order')
|
511
|
$data = Db::name('order')
|
503
|
->alias('a')
|
512
|
->alias('a')
|
|
@@ -508,6 +517,14 @@ class Order extends Api |
|
@@ -508,6 +517,14 @@ class Order extends Api |
508
|
->order('id desc')
|
517
|
->order('id desc')
|
509
|
->page($page,$pageNum)
|
518
|
->page($page,$pageNum)
|
510
|
->select();
|
519
|
->select();
|
|
|
520
|
+ foreach ($data as &$v){
|
|
|
521
|
+ $seventime = $v['expirationtime']+14*86400;
|
|
|
522
|
+ if($seventime>time()){
|
|
|
523
|
+ $v['xian'] = 1;
|
|
|
524
|
+ }else{
|
|
|
525
|
+ $v['xian'] = 2;
|
|
|
526
|
+ }
|
|
|
527
|
+ }
|
511
|
}
|
528
|
}
|
512
|
else{
|
529
|
else{
|
513
|
$this->error('类型有误');
|
530
|
$this->error('类型有误');
|