切换导航条
此项目
正在载入...
登录
何书鹏
/
anttest
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
何书鹏
4 years ago
提交
db76e10c396cb04438d7df8a5a9fd6cf93ad5320
1 个父辈
f850102a
商品接口
隐藏空白字符变更
内嵌
并排对比
正在显示
4 个修改的文件
包含
32 行增加
和
5 行删除
addons/shopro/model/UserFavorite.php
application/api/controller/Goods.php
application/extra/queue.php
public/api.html
addons/shopro/model/UserFavorite.php
查看文件 @
db76e10
...
...
@@ -29,7 +29,7 @@ class UserFavorite extends Model
extract
(
$params
);
$user
=
User
::
info
();
//批量删除模式
if
(
isset
(
$goods_ids
))
{
if
(
!
empty
(
$goods_ids
))
{
foreach
(
$goods_ids
as
$g
)
{
self
::
get
([
'goods_id'
=>
$g
,
'user_id'
=>
$user
->
id
])
->
delete
();
}
...
...
application/api/controller/Goods.php
查看文件 @
db76e10
...
...
@@ -173,7 +173,20 @@ class Goods extends Base
"image": "http://api.7wpp.com/uploads/20200222/57d971eb5984317ee794e531ea0f9207.png", //图片
"description": "超快无审核退款流程" //描述
}],
"sku": [],
"sku": [{ //规格
"id": 1,
"name": "颜色", //一级规格名称
"pid": 0,
"goods_id": 4,
"weigh": 0,
"content": [{ //二级规格
"id": 2, //规格ID
"name": "黄色", //名称
"pid": 1,
"goods_id": 4,
"weigh": 0
}]
}],
"coupons": []
}
})
...
...
@@ -521,9 +534,23 @@ class Goods extends Base
$this
->
success
(
'活动列表'
,
$activity
);
}
/**
* @ApiInternal
* 收藏或取消收藏
* @ApiWeigh (93)
* @ApiTitle (收藏或取消收藏)
* @ApiSummary (收藏或取消收藏)
* @ApiMethod (POST)
*
* @ApiHeaders (name=token, type=string, required=false, description="请求的Token")
* @ApiParams (name=goods_id, type=inter, required=false, description="商品ID")
* @ApiParams (name=goods_ids, type=inter, required=false, description="商品ID集合,批量删除时可用")
*
* @ApiReturn({
"code": 1,
"msg": "收藏成功|取消收藏",
"time": "1608039147",
"data": null
})
*/
public
function
favorite
()
{
...
...
application/extra/queue.php
查看文件 @
db76e10
...
...
@@ -10,5 +10,5 @@
// +----------------------------------------------------------------------
return
[
'connector'
=>
'
Sync
'
'connector'
=>
'
database
'
];
...
...
public/api.html
查看文件 @
db76e10
此 diff 太大无法显示。
请
注册
或
登录
后发表评论