...
|
...
|
@@ -221,6 +221,44 @@ class House extends Api |
|
|
}
|
|
|
|
|
|
/**
|
|
|
* @ApiTitle (好物抢购)
|
|
|
* @ApiSummary (好物抢购)
|
|
|
* @ApiMethod (POST)
|
|
|
* @ApiRoute (/api/house/goods)
|
|
|
*
|
|
|
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
|
|
|
*
|
|
|
* @ApiReturn({
|
|
|
"code": 1,
|
|
|
"msg": "success",
|
|
|
"time": "1598620381",
|
|
|
"data": [
|
|
|
{
|
|
|
"goods_id": 21,
|
|
|
"goods_name": "小米Mix3",
|
|
|
"goods_price": "3299.00",
|
|
|
"image": "https://her-family.oss-cn-qingdao.aliyuncs.com/addons_store_uploads/20181105/ffc4440df18661948b9c2d4dd4ae419b.jpg"
|
|
|
}
|
|
|
]
|
|
|
})
|
|
|
*/
|
|
|
public function goods()
|
|
|
{
|
|
|
$goods_ids = Db::name('config_goods')->where('id',1)->value('goods_ids');
|
|
|
$list = Db::name('litestore_goods')
|
|
|
->where('goods_id','in',$goods_ids)
|
|
|
->field('goods_id,goods_name,images')
|
|
|
->select();
|
|
|
foreach($list as &$v){
|
|
|
$spec = Db::name('litestore_goods_spec')->where('goods_id',$v['goods_id'])->field('goods_price')->find();
|
|
|
$v['goods_price'] = $spec['goods_price'];
|
|
|
$v['image'] = explode(',',$v['images'])[0];
|
|
|
unset($v['images']);
|
|
|
}
|
|
|
$this->success('success',$list);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* @ApiTitle (社区列表)
|
|
|
* @ApiSummary (社区列表)
|
|
|
* @ApiMethod (POST)
|
...
|
...
|
|