...
|
...
|
@@ -436,6 +436,7 @@ class Order extends Api |
|
|
$type = $this->request->param('type');
|
|
|
$page = $this->request->param('page', 1, 'intval');
|
|
|
$pageNum = $this->request->param('pageNum', 10, 'intval');
|
|
|
// 类型(如果为空或者为1是进行中 2是已完成3是售后4待总结5已总结
|
|
|
if($type == '' || $type == 1){
|
|
|
$data = Db::name('order')
|
|
|
->alias('a')
|
...
|
...
|
@@ -457,7 +458,7 @@ class Order extends Api |
|
|
->page($page,$pageNum)
|
|
|
->select();
|
|
|
foreach ($data as &$v){
|
|
|
$seventime = $v['expirationtime']+7*86400;
|
|
|
$seventime = $v['expirationtime']+14*86400;
|
|
|
if($seventime>time()){
|
|
|
$v['xian'] = 1;
|
|
|
}else{
|
...
|
...
|
@@ -498,6 +499,14 @@ class Order extends Api |
|
|
->order('id desc')
|
|
|
->page($page,$pageNum)
|
|
|
->select();
|
|
|
foreach ($data as &$v){
|
|
|
$seventime = $v['expirationtime']+14*86400;
|
|
|
if($seventime>time()){
|
|
|
$v['xian'] = 1;
|
|
|
}else{
|
|
|
$v['xian'] = 2;
|
|
|
}
|
|
|
}
|
|
|
}elseif ($type == 5){
|
|
|
$data = Db::name('order')
|
|
|
->alias('a')
|
...
|
...
|
@@ -508,6 +517,14 @@ class Order extends Api |
|
|
->order('id desc')
|
|
|
->page($page,$pageNum)
|
|
|
->select();
|
|
|
foreach ($data as &$v){
|
|
|
$seventime = $v['expirationtime']+14*86400;
|
|
|
if($seventime>time()){
|
|
|
$v['xian'] = 1;
|
|
|
}else{
|
|
|
$v['xian'] = 2;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
else{
|
|
|
$this->error('类型有误');
|
...
|
...
|
|