提交 799cdaeb 编写于 作者: D Devil

商品详情接口优化

上级 9fb683f4
......@@ -256,6 +256,12 @@ class Goods extends Common
*/
public function Favor()
{
// 是否ajax请求
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 是否登录
$this->IsLogin();
......@@ -275,6 +281,12 @@ class Goods extends Common
*/
public function SpecType()
{
// 是否ajax请求
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始处理
$params = input('post.');
return GoodsService::GoodsSpecType($params);
......@@ -290,6 +302,12 @@ class Goods extends Common
*/
public function SpecDetail()
{
// 是否ajax请求
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始处理
$params = input('post.');
return GoodsService::GoodsSpecDetail($params);
......@@ -304,8 +322,18 @@ class Goods extends Common
*/
public function Comment()
{
// 是否ajax请求
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 参数
$params = input();
if(empty($params['goods_id']))
{
return DataReturn('参数有误', -1);
}
// 分页
$number = 10;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册