diff --git a/webapp/controller/UserController.class.php b/webapp/controller/UserController.class.php index 66792b60..81b67c61 100644 --- a/webapp/controller/UserController.class.php +++ b/webapp/controller/UserController.class.php @@ -377,6 +377,7 @@ class UserController extends BaseAuthedController { $userInfo['total_lucky'] = Hero::getAccountLuckyTemp(); $userInfo['admission_item_num'] = myself()->_getItemCount(900006, $userInfo); $userInfo['circuit_score'] = myself()->_callModelStatic('Circuit', 'getCurrentMyScore'); + $userInfo['has_lucky_symbol'] = myself()->_callModelStatic('LuckySymbol', 'hasLuckySymbol'); } $heroDb = Hero::findByAccountId(myself()->_getAccountId(), $userInfo['hero_uniid']); if (!$heroDb) { diff --git a/webapp/models/LuckySymbol.php b/webapp/models/LuckySymbol.php index d4f16823..9005939f 100644 --- a/webapp/models/LuckySymbol.php +++ b/webapp/models/LuckySymbol.php @@ -16,7 +16,8 @@ class LuckySymbol extends BaseModel { 'account_id' => myself()->_getAccountId(), ) ); - return empty($row) ? false : $row['in_use_item'] > 0; + $has = empty($row) ? false : $row['in_use_item'] > 0; + return $has ? 1 : 0; } public static function dec()