商店:bug修复
This commit is contained in:
@@ -52,12 +52,12 @@ export class ShopHandler {
|
||||
let sid = session.get('sid');
|
||||
let serverId = session.get('serverId');
|
||||
|
||||
let { activityId, shopItemId, count } = msg;
|
||||
let { activityId = 0, shopItemId, count } = msg;
|
||||
if( count < 0) return resResult(STATUS.WRONG_PARMS);
|
||||
|
||||
let dicShopItem = await getShopDicById(activityId, shopItemId, roleId, serverId);
|
||||
if(!dicShopItem) return STATUS.DIC_DATA_NOT_FOUND;
|
||||
if(dicShopItem['productID']) return resResult(STATUS.CAN_NOT_PURCHASE);
|
||||
if(dicShopItem['productID'] && dicShopItem['productID'] != '&') return resResult(STATUS.CAN_NOT_PURCHASE);
|
||||
|
||||
let userShop = await UserShopModel.findByRoleAndItem(roleId, activityId, dicShopItem);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user