diff --git a/webapp/controller/ShopController.class.php b/webapp/controller/ShopController.class.php index f0f6730..398d6de 100644 --- a/webapp/controller/ShopController.class.php +++ b/webapp/controller/ShopController.class.php @@ -296,11 +296,32 @@ class ShopController extends BaseAuthedController { $awardService = new services\AwardService(); $awardService->addItem($itemId, $itemNum); ShopBuyRecord::add($itemId, $itemNum); + $goodsDto = array( + 'goods_id' => $itemMeta['id'], + 'item_id' => $itemMeta['id'], + 'price_info' => array( + 'item_id' => $itemMeta['id'], + 'cost_list' => array(), + 'discount_begin_time' => phpcommon\datetimeToTimestamp($itemMeta['discount_begin']), + 'discount_end_time' => phpcommon\datetimeToTimestamp($itemMeta['discount_end']) + ), + 'flag_icon' => '', + 'limit_type' => $itemMeta['limit_type'], + 'bought_times' => 0, + 'total_buy_times' => $itemMeta['limit_num'], + ); + { + $priceInfo = mt\Item::getPriceInfo($itemMeta); + if (!empty($priceInfo)) { + $goodsDto['price_info'] = $priceInfo; + } + } $this->rspData(array( 'award' => $awardService->toDto(), 'property_chg' => array( 'user_info' => User::info($this->_getOrmUserInfo()) - ) + ), + 'goods_chg' => $goodsDto )); } @@ -449,4 +470,5 @@ class ShopController extends BaseAuthedController { } return true; } + } diff --git a/webapp/models/Hero.php b/webapp/models/Hero.php index 1d7d9a5..e5fc6e2 100644 --- a/webapp/models/Hero.php +++ b/webapp/models/Hero.php @@ -61,9 +61,6 @@ class Hero extends BaseModel { 'modifytime' => myself()->_getNowTime() ) ); - if ($defSkin) { - HeroSkin::addSkin($defSkin); - } } public static function takeonSkin($heroId, $skinId)