Commit 27539997 authored by shajiaiming's avatar shajiaiming

Merge branch 'master' into feature/ucenter

parents a17a6778 c6c9aa19
...@@ -172,6 +172,8 @@ class CoinController extends BaseController ...@@ -172,6 +172,8 @@ class CoinController extends BaseController
$value['id'] = $value['cid']; $value['id'] = $value['cid'];
$value['sid'] = ucfirst($value['sid']); $value['sid'] = ucfirst($value['sid']);
$value['chain_quotation'] = $coin_quotations[$coin_infos[$value['cid']]['chain']]; $value['chain_quotation'] = $coin_quotations[$coin_infos[$value['cid']]['chain']];
$value['chain_rmb'] = isset($coin_quotations[$coin_infos[$value['cid']]['chain']]['rmb']) ? $coin_quotations[$coin_infos[$value['cid']]['chain']]['rmb'] : 0;
$value['chain_usd'] = isset($coin_quotations[$coin_infos[$value['cid']]['chain']]['usd']) ? $coin_quotations[$coin_infos[$value['cid']]['chain']]['usd'] : 0;
unset($value['create_time'], $value['update_time'], $value['cid']); unset($value['create_time'], $value['update_time'], $value['cid']);
} }
unset($key, $value); unset($key, $value);
...@@ -245,6 +247,8 @@ class CoinController extends BaseController ...@@ -245,6 +247,8 @@ class CoinController extends BaseController
$nickname = json_decode($value['nickname'], true); $nickname = json_decode($value['nickname'], true);
$value['nickname'] = $nickname[$this->lang]; $value['nickname'] = $nickname[$this->lang];
$value['chain_quotation'] = $chain_quotation[$value['chain']] ?: null; $value['chain_quotation'] = $chain_quotation[$value['chain']] ?: null;
$value['chain_rmb'] = isset($value['chain_quotation']['rmb']) ? $value['chain_quotation']['rmb'] : 0;
$value['chain_usd'] = isset($value['chain_quotation']['usd']) ? $value['chain_quotation']['usd'] : 0;
} }
return $result; return $result;
} }
...@@ -295,6 +299,8 @@ class CoinController extends BaseController ...@@ -295,6 +299,8 @@ class CoinController extends BaseController
foreach ($result as $key => &$value) { foreach ($result as $key => &$value) {
$nickname = json_decode($value['nickname'], true); $nickname = json_decode($value['nickname'], true);
$value['nickname'] = $nickname[$this->lang]; $value['nickname'] = $nickname[$this->lang];
$value['chain_rmb'] = isset($value['chain_quotation']['rmb']) ? $value['chain_quotation']['rmb'] : 0;
$value['chain_usd'] = isset($value['chain_quotation']['usd']) ? $value['chain_quotation']['usd'] : 0;
} }
return ['code' => 0, 'count' => $total, 'data' => $result]; return ['code' => 0, 'count' => $total, 'data' => $result];
} }
......
...@@ -74,7 +74,7 @@ class GameBetController extends BaseController ...@@ -74,7 +74,7 @@ class GameBetController extends BaseController
$query = CoinGameBet::find() $query = CoinGameBet::find()
->select('round, player, amount, height, guess_num, guess_num, rand_num, player_win') ->select('round, player, amount, height, guess_num, guess_num, rand_num, player_win')
->where('player= :player',[':player' => $player]) ->where('player= :player',[':player' => $player])
->andWhere(['valid' => CoinGameBet::VAILD_TRUE]) #->andWhere(['valid' => CoinGameBet::VAILD_TRUE])
->orderBy('update_time desc'); ->orderBy('update_time desc');
$count = $query->count(); $count = $query->count();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment