作者 何书鹏
1 个管道 的构建 通过 耗费 1 秒

首页好物抢购

... ... @@ -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)
... ...
... ... @@ -631,13 +631,13 @@ class HouseBoard extends Api
private function init_wx_pay_for_gzh($Ischeck=false){
//这里首先判断 此用户是否绑定了微信公众号
// if($Ischeck){
// $third = Third::where(['user_id' => $this->auth->id, 'platform' => 'wechat'])->find();
// if(!$third){
// //从这里自动绑定微信公众号的账户
// $this->error('您未绑定微信号',null,1008);
// }
// }
if($Ischeck){
$third = Third::where(['user_id' => $this->auth->id, 'platform' => 'wechat'])->find();
if(!$third){
//从这里自动绑定微信公众号的账户
$this->error('您未绑定微信号',null,1008);
}
}
$config = get_addon_config('litestore');
... ...
此 diff 太大无法显示。