|
@@ -20,7 +20,7 @@ class order extends Api
|
|
|
|
|
|
$where = [
|
|
|
'order.user_id'=>$this->auth->id,
|
|
|
- 'order.status' =>1,
|
|
|
+ 'order.status' =>1,//已支付
|
|
|
];
|
|
|
|
|
|
if($active_status == 1){
|
|
@@ -34,13 +34,17 @@ class order extends Api
|
|
|
$where['active.activeendtime'] = ['lt',time()];
|
|
|
}
|
|
|
|
|
|
- $list = Db::name('order')->field('order.*,active.activestarttime,active.activeendtime,active.name,active.image')
|
|
|
+ $list = Db::name('order')->field('order.*,active.activestarttime,active.activeendtime,active.name,active.images')
|
|
|
->join('active','order.active_id = active.id','LEFT')
|
|
|
->where($where)->order('order.id desc')->autopage()->select();
|
|
|
- $list = list_domain_image($list,['image']);
|
|
|
+ $list = list_domain_image($list,['images']);
|
|
|
|
|
|
if(!empty($list)){
|
|
|
foreach($list as $key => &$item){
|
|
|
+ //第一个图
|
|
|
+ $item['image'] = isset($item['images'][0]) ? $item['images'][0] : '';
|
|
|
+
|
|
|
+ //状态
|
|
|
$status_text = '进行中';
|
|
|
$status = 2;
|
|
|
|