diff --git a/webapp/controller/ShopController.class.php b/webapp/controller/ShopController.class.php index 23eb8e97..d9f9ba80 100644 --- a/webapp/controller/ShopController.class.php +++ b/webapp/controller/ShopController.class.php @@ -774,9 +774,16 @@ class ShopController extends BaseAuthedController $goodsList[$i] = mt\Dailyselection::get($selection['grid_' . $i]); $goodsList[$i]['count'] = $selection['count_' . $i]; } + + $count = $this->countTodayRefreshTimes($account); + $costs = mt\Parameter::getByName('daily_selection_refresh_cost'); + $arrCosts = explode('|', $costs['param_value']); + $cost = $arrCosts[$count]; + $this->_rspData( array( 'idx' => $selection['idx'], + 'cost' => $cost, 'goods_list' => $goodsList, ) ); @@ -857,7 +864,7 @@ class ShopController extends BaseAuthedController $nowTime = $this->_getNowTime(); $dayTime = $this->_getDaySeconds($nowTime); - $sql = "SELECT COUNT(*) AS cnt FROM t_shop_dailyselection WHERE account_id = '$account' AND refresh_time >= $dayTime"; + $sql = "SELECT COUNT(*) AS cnt FROM t_shop_dailyselection WHERE account_id = '$account' AND refresh_mode = 1 AND refresh_time >= $dayTime"; $row = $conn->execQuery($sql);