1
This commit is contained in:
parent
e0f0f07987
commit
915aa9f721
10
doc/Shop.py
10
doc/Shop.py
@ -17,14 +17,14 @@ class Shop(object):
|
||||
],
|
||||
'response': [
|
||||
_common.RspHead(),
|
||||
['!goods_list', [_common.NewGoods()], '商品列表'],
|
||||
['!goods_list', [_common.Goods()], '商品列表'],
|
||||
]
|
||||
},
|
||||
{
|
||||
'name': 'buyGoodsNormal',
|
||||
'desc': '购买商品(正式)',
|
||||
'name': 'buyGoods',
|
||||
'desc': '购买商品',
|
||||
'group': 'Shop',
|
||||
'url': 'webapp/index.php?c=Shop&a=buyGoodsNormal',
|
||||
'url': 'webapp/index.php?c=Shop&a=buyGoods',
|
||||
'params': [
|
||||
_common.ReqHead(),
|
||||
['id', 0, '商品唯一id,参见shopGoods表'],
|
||||
@ -36,7 +36,7 @@ class Shop(object):
|
||||
['block_chain', _common.ShopTrans(), '链上购买订单信息'],
|
||||
['award', _common.Award(), '奖励信息'],
|
||||
['property_chg', _common.PropertyChg(), '属性变更'],
|
||||
['goods_chg', _common.NewGoods(), '购买后更新商品的最新信息(可能为null客户端需要做容错处理)'],
|
||||
['goods_chg', _common.Goods(), '购买后更新商品的最新信息(可能为null客户端需要做容错处理)'],
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -151,6 +151,7 @@ class UserInfo(object):
|
||||
['!ring_list', [0], '勋章(戒指)列表'],
|
||||
['!honor_info', [HonorInfo()], '荣誉信息'],
|
||||
]
|
||||
|
||||
class HonorInfo(object):
|
||||
|
||||
def __init__(self):
|
||||
@ -158,6 +159,7 @@ class HonorInfo(object):
|
||||
['token_type',0,'NFT 类型'],
|
||||
['state',0,'1使用 0未使用'],
|
||||
]
|
||||
|
||||
class UserSimple(object):
|
||||
|
||||
def __init__(self):
|
||||
@ -376,17 +378,38 @@ class ItemPriceInfo(object):
|
||||
['price_info', PriceInfo(), '价格信息'],
|
||||
]
|
||||
|
||||
class GoodsInfo(object):
|
||||
|
||||
def __init__(self):
|
||||
self.fields = [
|
||||
['id', 0, '商品唯一id'],
|
||||
['goods_id', 0, '商品id'],
|
||||
['goods_num', 0, '堆叠个数,例如:砖石数量'],
|
||||
['max_amount', 0, '最高购买数量,单次购买'],
|
||||
['shop_id', 0, '所属商店id'],
|
||||
['shopstage', 0, '商店层级'],
|
||||
['tag', 0, '标签'],
|
||||
['recommend', 0, '推荐页位置'],
|
||||
['token_type', '', '代币类型 参见shopGoods表格'],
|
||||
['price', '', '价格 多种价格设置使用 | 隔开'],
|
||||
['discount', '', '折扣 参见shopGoods表格'],
|
||||
['limit_type', 0, '限购类型'],
|
||||
['limit_num', 0, '限购数量'],
|
||||
['buy_cond', '', '购买条件'],
|
||||
['buy_gift', '', '购买次数赠品'],
|
||||
['normal_gift', '', '普通狗赠品'],
|
||||
['free_type', 0, '免费类型 0:不免费 1:日刷新'],
|
||||
['free_num', 0, '免费次数'],
|
||||
['pending', 0, '购买中...'],
|
||||
]
|
||||
|
||||
class Goods(object):
|
||||
|
||||
def __init__(self):
|
||||
self.fields = [
|
||||
['goods_id', 0, '商品id 用于购买的时候回传'],
|
||||
['item_id', 0, '配置表id'],
|
||||
['price_info', PriceInfo(), '价格信息'],
|
||||
['flag_icon', '', '商品标记(商品左上角的显示图标,超值、9折等)'],
|
||||
['limit_type', 0, '0:不限购(这时忽略bought_times、total_buy_times) 1:每日限购 2:周限购 3:累计限购'],
|
||||
['!goods_meta', GoodsInfo(), '商品元信息(配置表数据)'],
|
||||
['bought_times', 0, '已购买次数'],
|
||||
['total_buy_times', 0, '总的可购买次数'],
|
||||
['free_num', 0, '免费次数'],
|
||||
]
|
||||
|
||||
class NewGoods(object):
|
||||
|
@ -83,7 +83,6 @@ class ShopController extends BaseAuthedController
|
||||
//27 = 韩国
|
||||
const TOKEN_TYPE_KRW = '27';
|
||||
|
||||
|
||||
// 限购类型
|
||||
const DAILY_BUY_LIMIT = 1;
|
||||
const WEEKLY_BUY_LIMIT = 2;
|
||||
@ -350,7 +349,7 @@ class ShopController extends BaseAuthedController
|
||||
);
|
||||
}
|
||||
|
||||
public function buyGoodsNormal()
|
||||
public function buyGoods()
|
||||
{
|
||||
$address = $this->_getAddress();
|
||||
if (empty($address)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user