mirror of
https://gitee.com/zongzhige/shopxo.git
synced 2026-07-06 21:45:47 +08:00
api接口统一返回处理、插件钩子解耦扩展性提升
This commit is contained in:
@ -13,7 +13,6 @@ namespace app\api\controller;
|
||||
use app\service\BaseService;
|
||||
use app\service\GoodsService;
|
||||
use app\service\BuyService;
|
||||
use app\service\PluginsService;
|
||||
use app\service\GoodsCommentsService;
|
||||
use app\service\ResourcesService;
|
||||
use app\service\GoodsFavorService;
|
||||
@ -151,22 +150,6 @@ class Goods extends Common
|
||||
$result['nav_submit_text'] = MyC('common_is_exhibition_mode_btn_text', '立即咨询', true);
|
||||
}
|
||||
|
||||
// 限时秒杀
|
||||
$ret = PluginsService::PluginsControlCall(
|
||||
'limitedtimediscount', 'index', 'goods', 'api', ['goods_id'=>$goods_id]);
|
||||
if($ret['code'] == 0 && isset($ret['data']['code']) && $ret['data']['code'] == 0)
|
||||
{
|
||||
$result['plugins_limitedtimediscount_data'] = $ret['data']['data'];
|
||||
}
|
||||
|
||||
// 优惠券
|
||||
$ret = PluginsService::PluginsControlCall(
|
||||
'coupon', 'index', 'goods', 'api', ['goods_id'=>$goods_id]);
|
||||
if($ret['code'] == 0 && isset($ret['data']['code']) && $ret['data']['code'] == 0)
|
||||
{
|
||||
$result['plugins_coupon_data'] = $ret['data']['data'];
|
||||
}
|
||||
|
||||
return BaseService::DataReturn($result);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user