|
@@ -27,6 +27,12 @@ class Groupon extends Common
|
|
->order('id', 'asc')
|
|
->order('id', 'asc')
|
|
// ->paginate($this->request->param('list_rows', 10));
|
|
// ->paginate($this->request->param('list_rows', 10));
|
|
->autopage()->select();
|
|
->autopage()->select();
|
|
|
|
+ $groupons = json_decode(json_encode($groupons),true);
|
|
|
|
+ foreach($groupons as $key => $groupon){
|
|
|
|
+ $groupon['expire_second'] = strtotime($groupon['expire_time']) - time();
|
|
|
|
+
|
|
|
|
+ $groupons[$key] = $groupon;
|
|
|
|
+ }
|
|
$this->success('获取成功', $groupons);
|
|
$this->success('获取成功', $groupons);
|
|
}
|
|
}
|
|
|
|
|