56 lines
2.1 KiB
Python
56 lines
2.1 KiB
Python
# -*- coding: utf-8 -*-
|
|
|
|
import _common
|
|
|
|
class DailySelection(object):
|
|
|
|
def __init__(self):
|
|
self.apis = [
|
|
{
|
|
'name': 'getDailySelectionList',
|
|
'desc': '获取每日精选列表',
|
|
'group': 'Shop',
|
|
'url': 'webapp/index.php?c=Shop&a=getDailySelectionList',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['idx', 0, '每日精选的索引'],
|
|
['refresh_info', '', '每日精选的刷新信息(格式:刷新次数/可刷新总数)'],
|
|
['cost', 0, '每日精选的当前刷新价格,-1表示不可刷新'],
|
|
['!goods_list', [_common.DailySelectionGoods()], '每日精选列表'],
|
|
]
|
|
},
|
|
{
|
|
'name': 'refreshDailySelection',
|
|
'desc': '刷新每日精选',
|
|
'group': 'Shop',
|
|
'url': 'webapp/index.php?c=Shop&a=refreshDailySelection',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['cost', 0, '每日精选的当前刷新价格'],
|
|
]
|
|
},
|
|
{
|
|
'name': 'buyGoodsDS',
|
|
'desc': '购买每日精选商品',
|
|
'group': 'Shop',
|
|
'url': 'webapp/index.php?c=Shop&a=buyGoodsDS',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
['idx', 0, '每日精选的索引'],
|
|
['grid', 0, '商品在每日精选中的位置索引'],
|
|
['count', 0, '购买数量,始终是1'],
|
|
['token_type', '', "选用币种,只能选择一种"],
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['block_chain', _common.ShopTrans(), '链上购买订单信息']
|
|
]
|
|
}
|
|
]
|