74 lines
2.3 KiB
Python
74 lines
2.3 KiB
Python
# -*- coding: utf-8 -*-
|
|
|
|
import _common
|
|
|
|
class BcShop(object):
|
|
|
|
def __init__(self):
|
|
self.apis = [
|
|
{
|
|
'name': 'searchProduct',
|
|
'desc': '获取出售的商品列表',
|
|
'group': 'BcShop',
|
|
'url': 'webapp/index.php?c=BcShop&a=searchProduct',
|
|
'params': [
|
|
['account', 0, '钱包账号'],
|
|
['page', 0, '获取第几页数据'],
|
|
['sort', '', '排序字段'],
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['!rows', [_common.PreSaleBox()], '商品信息'],
|
|
['page', _common.Page(), '分页信息'],
|
|
]
|
|
},
|
|
{
|
|
'name': 'productOnline',
|
|
'desc': '上架商品',
|
|
'group': 'BcShop',
|
|
'url': 'webapp/index.php?c=BcShop&a=productOnline',
|
|
'params': [
|
|
['account', '', '钱包账号'],
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
]
|
|
},
|
|
{
|
|
'name': 'productOffline',
|
|
'desc': '上架商品',
|
|
'group': 'BcShop',
|
|
'url': 'webapp/index.php?c=BcShop&a=productOffline',
|
|
'params': [
|
|
['account', '', '钱包账号'],
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
]
|
|
},
|
|
{
|
|
'name': 'buyProduct',
|
|
'desc': '购买商品',
|
|
'group': 'BcShop',
|
|
'url': 'webapp/index.php?c=BcShop&a=productBuy',
|
|
'params': [
|
|
['account', '', '钱包账号'],
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
]
|
|
},
|
|
{
|
|
'name': 'getProductList',
|
|
'desc': '获取出售的商品列表',
|
|
'group': 'BcShop',
|
|
'url': 'webapp/index.php?c=BcShop&a=productOffline',
|
|
'params': [
|
|
['account', '', '钱包账号'],
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
]
|
|
},
|
|
]
|