|
@@ -126,15 +126,23 @@ class Programme extends Api
|
|
*ApiReturnParams (name=id,description=方案id)
|
|
*ApiReturnParams (name=id,description=方案id)
|
|
* ApiReturnParams (name=name,description=方案名称)
|
|
* ApiReturnParams (name=name,description=方案名称)
|
|
* ApiReturnParams (name=createtime,description=创建时间)
|
|
* ApiReturnParams (name=createtime,description=创建时间)
|
|
|
|
+ * ApiReturnParams (name=sku_id,description=规格低)
|
|
|
|
+ * ApiReturnParams (name=sku,description=规格名称)
|
|
|
|
+ * ApiReturnParams (name=num,description=数量)
|
|
*/
|
|
*/
|
|
public function lists(){
|
|
public function lists(){
|
|
$user=$this->auth->getUser();
|
|
$user=$this->auth->getUser();
|
|
$lists=$user->programmes()
|
|
$lists=$user->programmes()
|
|
->order('id','desc')
|
|
->order('id','desc')
|
|
->paginate(input('limit',15));
|
|
->paginate(input('limit',15));
|
|
|
|
+ $data = $lists->toArray();
|
|
|
|
+ $list = $data['data'];
|
|
|
|
+ foreach ($list as &$v){
|
|
|
|
+ $v['goods'] = Db('ProgrammeGoods')->field('sku_id,sku,num')->where('programme_id',$v['id'])->select();
|
|
|
|
+ }
|
|
|
|
+ $data['data'] = $list;
|
|
|
|
|
|
-
|
|
|
|
- $this->success('',$lists);
|
|
|
|
|
|
+ $this->success('',$data);
|
|
}
|
|
}
|
|
/**
|
|
/**
|
|
* 查看方案
|
|
* 查看方案
|