1.商品创建
~~~[api]
post:https://admin.nineopen.com/goods/goods_create
cate_id#栏目id
shop_id#掌柜id
area_id#城市id
genre#1拼人数2拼数量
goods_name#商品名称
goods_cover#商品封面
goods_about#商品简介
goods_content#商品内容(数组)
goods_stock#商品库存
goods_unit#商品单位
goods_price#商品单位价格
goods_group_price#商品团购价
goods_group_num#商品拼团人数或数量
is_send#0=>配送,1=>无配送
<<<
success
{
"status": 0,
"message": "success",
"data": []
}
<<<
error
error
~~~
2.商品查询
~~~[api]
get:https://admin.nineopen.com/goods/goods_find
goods_id#商品id
<<<
success
{
"status": 0,
"message": "ok",
"data": {
"goods_id": 2,
"cate_id": 1,
"shop_id": 1,
"area_id": 2,
"goods_name": "sas",
"goods_cover": "asas",
"goods_about": "asas",
"goods_content": [
"sadsadsadsa",
"dsdsdsdds"
],
"goods_stock": 2,
"goods_unit": "sas",
"goods_price": "23.45",
"goods_group_price": "45.78",
"goods_group_num": 23,
"is_play": 0,
"is_send": 1,
"state": 0,
"state_id": null,
"update_time": "2019-03-20 09:45:03",
"create_time": "2019-03-20 09:45:03"
}
}
注释:is_play:0下架,1上架;is_send:0商品不到店领取,1到店领取;state:0待审核1审核通过2审核未通过;
type:1商品,2服务;state_id:后台审核人员id
<<<
error
~~~
3.商品修改
~~~
array取值范围:
['cate_id','area_id','genre','goods_name','goods_cover','goods_about','goods_content','goods_unit','goods_price','goods_group_price','goods_group_num','is_send','goods_stock']
~~~
~~~[api]
put:https://admin.nineopen.com/goods/goods_update
goods_id#商品id
shop_id#掌柜id
array#数组,存放要修改的字段,比如:[ "goods_stock": 2,"goods_unit": "sas",]
<<<
success
{
"status": 0,
"message": "success",
"data": []
}
<<<
error
error
~~~
4.商品删除
~~~[api]
delete:https://admin.nineopen.com/goods/goods_del
goods_id#商品id
shop_id#掌柜id
<<<
success
{
"status": 0,
"message": "success",
"data": []
}
<<<
error
error
~~~
5.各种商品列表
~~~
array取值范围:
['cate_id','area_id','genre','is_play','is_send','state','state_id']
~~~
~~~[api]
get:https://admin.nineopen.com/goods/goods_list
shop_id#
page#页码
array#(cate_id,area_id,is_play,is_send,state)查询条件
<<<
success
<<<
error
~~~
5-1,商品上架和下架
~~~[api]
put:https://admin.nineopen.com/goods/goods_display
goods_id#商品id
shop_id#掌柜id
type#1=>上架,2=>下架
<<<
success
<<<
error
~~~
5-2,商品库存更新
~~~[api]
put:https://admin.nineopen.com/goods/goods_stock
goods_id#
shop_id#
goods_stock#
<<<
success
<<<
error
~~~
6.开团与未开团过的商品列表(弃用)
~~~[api]
get:https://admin.nineopen.com/goods/goods_colonel_list
type#type:1=>开团商品,2=>未开团商品
page#页码
colonel_id#团长id
<<<
success
{
"status": 0,
"message": "ok",
"data": [
{
"goods_id": 3,
"cate_id": 1,
"shop_id": 2,
"area_id": 1,
"genre": 1,
"goods_name": "麻阳冰糖橙小甜橙5斤装",
"goods_cover": "https://store.nineopen.com/upload/20190321/0ae1bed44806986e0d00ef1ba4cc8e87.jpg",
"goods_about": "麻阳冰糖橙产于湖南省,是1960-1969年从普通甜橙实生变异中选出的地方优良种,因其含糖量高而得名,俗称冰糖泡或冰糖柑。麻阳县1980年中后期引进开始大面积发展,现栽面积已达6万余亩,年产量4万余吨,种植冰糖橙已成为麻阳带动农民增收的支柱产业。小果45-55mm 中果50-60mm 大果55-70mm",
"goods_stock": 50,
"goods_unit": "份",
"goods_price": "0.10",
"goods_group_price": "0.12",
"goods_group_num": 5,
"is_play": 0,
"is_send": 1,
"state": 0,
"state_id": null,
"update_time": "2019-03-21 17:25:21",
"create_time": "2019-03-21 17:25:21"
},
<<<
error
~~~
7.首页商品列表
~~~[api]
get:http://122.114.30.20/goods/index_list
page#页码
area_id#
<<<
success
{
"status": 0,
"message": "ok",
"data": [
{
"goods_id": 3,
"cate_id": 1,
"shop_id": 2,
"area_id": 1,
"genre": 1,
"goods_name": "麻阳冰糖橙小甜橙5斤装",
"goods_cover": "https://store.nineopen.com/upload/20190321/0ae1bed44806986e0d00ef1ba4cc8e87.jpg",
"goods_about": "麻阳冰糖橙产于湖南省,是1960-1969年从普通甜橙实生变异中选出的地方优良种,因其含糖量高而得名,俗称冰糖泡或冰糖柑。麻阳县1980年中后期引进开始大面积发展,现栽面积已达6万余亩,年产量4万余吨,种植冰糖橙已成为麻阳带动农民增收的支柱产业。小果45-55mm 中果50-60mm 大果55-70mm",
"goods_stock": 50,
"goods_unit": "份",
"goods_price": "8.50",
"goods_group_price": "11.05",
"goods_group_num": 5,
"is_play": 0,
"is_send": 1,
"state": 0,
"state_id": null,
"update_time": "2019-03-21 17:25:21",
"create_time": "2019-03-21 17:25:21"
},
<<<
error
~~~
8.推荐列表
~~~[api]
get:https://admin.nineopen.com/goods/referral_list
page#页码
cate_id#分类id
area_id#
<<<
success
{
"status": 0,
"message": "ok",
"data": [
{
"goods_id": 3,
"cate_id": 1,
"shop_id": 2,
"area_id": 1,
"genre": 1,
"goods_name": "麻阳冰糖橙小甜橙5斤装",
"goods_cover": "https://store.nineopen.com/upload/20190321/0ae1bed44806986e0d00ef1ba4cc8e87.jpg",
"goods_about": "麻阳冰糖橙产于湖南省,是1960-1969年从普通甜橙实生变异中选出的地方优良种,因其含糖量高而得名,俗称冰糖泡或冰糖柑。麻阳县1980年中后期引进开始大面积发展,现栽面积已达6万余亩,年产量4万余吨,种植冰糖橙已成为麻阳带动农民增收的支柱产业。小果45-55mm 中果50-60mm 大果55-70mm",
"goods_stock": 50,
"goods_unit": "份",
"goods_price": "8.50",
"goods_group_price": "11.05",
"goods_group_num": 5,
"is_play": 0,
"is_send": 1,
"state": 0,
"state_id": null,
"update_time": "2019-03-21 17:25:21",
"create_time": "2019-03-21 17:25:21"
},
<<<
error
~~~
9.从首页列表进入后的商品信息展示
~~~[api]
get:https://admin.nineopen.com/goods/goods_show
goods_id#商品id
unionid#用户unionid(可选)
<<<
success
{
"status": 0,
"message": "ok",
"data": {
"goods_id": 2,
"cate_id": 1,
"shop_id": 2,
"area_id": 1,
"genre": 1,
"goods_name": "广西玉芒大青芒当季新鲜水果类芒果10斤装",
"goods_cover": "https://store.nineopen.com/upload/20190321/e18e4b67c083a48ef9f4df0aeded98fd.jpg",
"goods_about": "【坏果包赔】果实长椭圆形,平均果重200~250克,表皮光滑,成熟果皮浅黄色;果肉乳黄色,品质与白象牙相似,嫩滑,味清甜,纤维少,品质上等。",
"goods_content": [
"https://store.nineopen.com/upload/20190321/53c8500d8dae9f79edab5b758f4a1d97.jpg",
"https://store.nineopen.com/upload/20190321/9bf510f619505efeeaf42faacac8b541.jpg",
"https://store.nineopen.com/upload/20190321/8c7af340cb0ce995e10515989b594e3b.jpg",
"https://store.nineopen.com/upload/20190321/6617d19b5e22b7fdb5add468595d3428.jpg",
"https://store.nineopen.com/upload/20190321/fc0b19f9ab3277ac0eb5c028c5374896.jpg"
],
"goods_stock": 50,
"goods_unit": "份",
"goods_price": "11.46",
"goods_group_price": "14.90",
"goods_group_num": 5,
"is_play": 0,
"is_send": 1,
"state": 0,
"state_id": null,
"update_time": "2019-03-21 17:01:30",
"create_time": "2019-03-21 17:01:30"
}
}
<<<
error
~~~
掌柜----------------------------------------------------------------------------------
1.库存量列表
~~~[api]
get:https://admin.nineopen.com/goods/shop_stock_list
shop_id#掌柜id
page#页码
<<<
success
<<<
error
~~~
2.商品销量榜
~~~[api]
get:https://admin.nineopen.com/goods/shop_sell_list
shop_id#掌柜id
page#页码
<<<
success
<<<
error
~~~
3.商品今日销量榜
~~~[api]
get:https://admin.nineopen.com/goods/shop_sell_day_list
shop_id#掌柜id
page#页码
<<<
success
<<<
error
~~~
团长-------------------------------------------------------------------
1.商品搜索
~~~[api]
get:https://admin.nineopen.com/goods/colonel_search
colonel_id#团长id
search#搜索关键词
area_id#地区id
page#页码
<<<
success
<<<
error
~~~
2.商品分类列表
~~~[api]
get:https://admin.nineopen.com/goods/colonel_cate_list
colonel_id#团长id
area_id#地区id
page#页码
<<<
success
<<<
error
~~~
3.店铺头部信息
~~~[api]
get:https://admin.nineopen.com/goods/colonel_shop_head
shop_id#掌柜id
<<<
success
<<<
error
~~~
4.店铺列表
~~~[api]
get:https://admin.nineopen.com/goods/colonel_shop_store
colonel_id#团长id
shop_id#掌柜id
area_id#地区id(弃用)
page#页码
<<<
success
<<<
error
~~~
5.商品详情
~~~[api]
get:https://admin.nineopen.com/goods/colonel_goods_find
colonel_id#团长id
goods_id#商品id
<<<
success
<<<
error
~~~
6.三个未开团列表
~~~[api]
get:https://admin.nineopen.com/goods/colonel_goods_list
unionid#本人unionid
colonel_id#colonel_id
area_id#地区id
page#页码
type#1=>推荐列表,2=>销量列表,3=>最新商品列表
<<<
success
<<<
error
~~~
店铺-----------------------------------------
1.店铺头部
~~~[api]
get:https://admin.nineopen.com/goods/shop_head
shop_id#掌柜id
unionid#用户unionid
<<<
success
<<<
error
~~~
2.店铺三种排序列表
~~~[api]
get:https://admin.nineopen.com/goods/shop_goods_list
shop_id#掌柜id
page#页码
unionid#用户unionid
type#=>推荐列表,2=>销量列表,3=>最新商品列表,4=>开团数量最多的6个商品
<<<
success
<<<
error
~~~
商城----------------------------------------------------------
1.商城搜索
~~~[api]
get:https://admin.nineopen.com/goods/home_search
search#搜索关键词
area_id#地区id
page#页码
<<<
success
<<<
error
~~~
2.商城商品分类列表
~~~[api]
get:https://admin.nineopen.com/goods/home_cate_list
area_id#地区id
page#页码
cate_id#分类id
<<<
success
<<<
error
~~~
3.商城三种排序列表
~~~[api]
get:https://admin.nineopen.com/goods/home_goods_list
area_id#地区id
page#页码
unionid#用户unionid
type#=>推荐列表,2=>销量列表,3=>最新商品列表
<<<
success
<<<
error
~~~