Merge branch 'star' of git.kingsome.cn:server/game2006api into star
This commit is contained in:
commit
a91c844117
@ -403,6 +403,27 @@ class Market(object):
|
|||||||
_common.RspHead()
|
_common.RspHead()
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'name': 'sell',
|
||||||
|
'desc': '出售NFT',
|
||||||
|
'group': 'Market',
|
||||||
|
'url': 'webapp/index.php?c=Market&a=sell',
|
||||||
|
'params': [
|
||||||
|
['account', '', '账号id'],
|
||||||
|
['token', '', 'token'],
|
||||||
|
['nft_token', '', 'nft_token'],
|
||||||
|
['item_id', '', '道具id,'],
|
||||||
|
['s_price', '', '出售价格USDT'],
|
||||||
|
['amount', 0, '出售数量'],
|
||||||
|
['payment_token_address', '', 'payment_token_address'],
|
||||||
|
['nonce', '', 'nonce'],
|
||||||
|
['signature', '', '签名soliditySha3(type, payment_token_address, price, nonce), 签名的replace客户端做处理'],
|
||||||
|
['net_id', '', '网络id'],
|
||||||
|
],
|
||||||
|
'response': [
|
||||||
|
_common.RspHead()
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
'name': 'buyNft',
|
'name': 'buyNft',
|
||||||
'desc': '购买NFT',
|
'desc': '购买NFT',
|
||||||
|
@ -187,7 +187,8 @@ class Shop(object):
|
|||||||
'response': [
|
'response': [
|
||||||
_common.RspHead(),
|
_common.RspHead(),
|
||||||
['idx', 0, '每日精选的索引'],
|
['idx', 0, '每日精选的索引'],
|
||||||
['cost', 0, '每日精选的当前刷新价格'],
|
['refresh_info', '', '每日精选的刷新信息(格式:刷新次数/可刷新总数)'],
|
||||||
|
['cost', 0, '每日精选的当前刷新价格,-1表示不可刷新'],
|
||||||
['!goods_list', [_common.DailySelectionGoods()], '每日精选列表'],
|
['!goods_list', [_common.DailySelectionGoods()], '每日精选列表'],
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -86,15 +86,19 @@ class BaseAuthedController extends BaseController {
|
|||||||
}
|
}
|
||||||
$r = $this->_getRedis($this->_getAccountId());
|
$r = $this->_getRedis($this->_getAccountId());
|
||||||
$sessionId = $r->get(LAST_SESSION_KEY . $this->_getAccountId());
|
$sessionId = $r->get(LAST_SESSION_KEY . $this->_getAccountId());
|
||||||
if (empty($sessionId)) {
|
// error_log('SERVER_ENV:' . SERVER_ENV . '_DEBUG:' . _DEBUG);
|
||||||
$this->updateSession(myself()->_getAccountId(),
|
if (SERVER_ENV != _DEBUG)
|
||||||
myself()->_getSessionId());
|
{
|
||||||
} else if ($sessionId != $this->_getSessionId()) {
|
if (empty($sessionId)) {
|
||||||
error_log('session expiration' . json_encode(
|
$this->updateSession(myself()->_getAccountId(),
|
||||||
$_REQUEST
|
myself()->_getSessionId());
|
||||||
));
|
} else if ($sessionId != $this->_getSessionId()) {
|
||||||
phpcommon\sendError(1001, 'session expiration');
|
error_log('session expiration' . json_encode(
|
||||||
die();
|
$_REQUEST
|
||||||
|
));
|
||||||
|
phpcommon\sendError(1001, 'session expiration');
|
||||||
|
die();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->_userLvRestriction();
|
$this->_userLvRestriction();
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -418,11 +418,14 @@ class ShopController extends BaseAuthedController
|
|||||||
$count = $this->countTodayRefreshTimes($address);
|
$count = $this->countTodayRefreshTimes($address);
|
||||||
$costs = mt\Parameter::getByName('daily_selection_refresh_cost');
|
$costs = mt\Parameter::getByName('daily_selection_refresh_cost');
|
||||||
$arrCosts = explode('|', $costs['param_value']);
|
$arrCosts = explode('|', $costs['param_value']);
|
||||||
$cost = $count < count($arrCosts) ? $arrCosts[$count] : null;
|
|
||||||
|
$max_count = count($arrCosts);
|
||||||
|
$cost = $count < $max_count ? $arrCosts[$count] : -1;
|
||||||
|
|
||||||
$this->_rspData(
|
$this->_rspData(
|
||||||
array(
|
array(
|
||||||
'idx' => $selection['idx'],
|
'idx' => $selection['idx'],
|
||||||
|
'refresh_info' => "{$count}/{$max_count}",
|
||||||
'cost' => $cost,
|
'cost' => $cost,
|
||||||
'goods_list' => $goodsList,
|
'goods_list' => $goodsList,
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user