Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
token
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wallet
token
Commits
27539997
Commit
27539997
authored
Jul 02, 2019
by
shajiaiming
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into feature/ucenter
parents
a17a6778
c6c9aa19
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
CoinController.php
api/controllers/CoinController.php
+6
-0
GameBetController.php
api/controllers/GameBetController.php
+1
-1
No files found.
api/controllers/CoinController.php
View file @
27539997
...
...
@@ -172,6 +172,8 @@ class CoinController extends BaseController
$value
[
'id'
]
=
$value
[
'cid'
];
$value
[
'sid'
]
=
ucfirst
(
$value
[
'sid'
]);
$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
(
$key
,
$value
);
...
...
@@ -245,6 +247,8 @@ class CoinController extends BaseController
$nickname
=
json_decode
(
$value
[
'nickname'
],
true
);
$value
[
'nickname'
]
=
$nickname
[
$this
->
lang
];
$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
;
}
...
...
@@ -295,6 +299,8 @@ class CoinController extends BaseController
foreach
(
$result
as
$key
=>
&
$value
)
{
$nickname
=
json_decode
(
$value
[
'nickname'
],
true
);
$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
];
}
...
...
api/controllers/GameBetController.php
View file @
27539997
...
...
@@ -74,7 +74,7 @@ class GameBetController extends BaseController
$query
=
CoinGameBet
::
find
()
->
select
(
'round, player, amount, height, guess_num, guess_num, rand_num, player_win'
)
->
where
(
'player= :player'
,[
':player'
=>
$player
])
->
andWhere
([
'valid'
=>
CoinGameBet
::
VAILD_TRUE
])
#
->andWhere(['valid' => CoinGameBet::VAILD_TRUE])
->
orderBy
(
'update_time desc'
);
$count
=
$query
->
count
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment