diff --git a/webapp/controller/ShopController.class.php b/webapp/controller/ShopController.class.php index ad84e0df..f4ef0b19 100644 --- a/webapp/controller/ShopController.class.php +++ b/webapp/controller/ShopController.class.php @@ -1206,7 +1206,7 @@ class ShopController extends BaseAuthedController return; } - $token_type = getReqVal('token_type', ''); + $token_type = getReqVal('token_type', '4'); switch ($token_type) { case ShopController::TOKEN_TYPE_GOLD: case ShopController::TOKEN_TYPE_DIAMOND: diff --git a/webapp/services/LogService.php b/webapp/services/LogService.php index da011643..bb06f526 100644 --- a/webapp/services/LogService.php +++ b/webapp/services/LogService.php @@ -46,7 +46,7 @@ class LogService extends BaseService public static function consumeGold($event,$param = []) { - $logInfo = self::goldRecord(myself()->_getAccountId()); + $logInfo = self::goldRecord($param); $data = self::userInfo(); $data['type'] = self::CONSUME_TYPE; $data['event_name'] = $event['name']; @@ -76,7 +76,7 @@ class LogService extends BaseService public static function productGold($event,$param = []) { - $logInfo = self::goldRecord(myself()->_getAccountId()); + $logInfo = self::goldRecord($param); $data = self::userInfo(); $data['type'] = self::PRODUCT_TYPE; $data['event_name'] = $event['name']; @@ -155,8 +155,14 @@ class LogService extends BaseService ); return $info; } - private static function goldRecord($account_id) + private static function goldRecord($params = []) { + if (isset($params['account_id']) && !empty($params['account_id'])) { + $account_id = $params['account_id']; + } else { + $account_id = myself()->_getAccountId(); + } + // $logInfo['log_class'] = $logInfo['log_class']; // unset($logInfo['log_class']); $data = array(