Add: ranking - DBService
This commit is contained in:
@@ -8,6 +8,10 @@ var Ranking = {
|
|||||||
create: function() {
|
create: function() {
|
||||||
this.dbConnectManager = new DBConnectManager();
|
this.dbConnectManager = new DBConnectManager();
|
||||||
|
|
||||||
|
this.dbService = new DBService();
|
||||||
|
this.dbService.setMaestroID(sessionStorageManager.getMaestroID());
|
||||||
|
this.dbService.setPlayerID(sessionStorageManager.getPlayerID());
|
||||||
|
|
||||||
this.jsonData = null;
|
this.jsonData = null;
|
||||||
this.timeType = Ranking.MODE_HOUR;
|
this.timeType = Ranking.MODE_HOUR;
|
||||||
this.refreshTimeSec = Ranking.REFRESH_TIME_SEC;
|
this.refreshTimeSec = Ranking.REFRESH_TIME_SEC;
|
||||||
@@ -326,15 +330,37 @@ var Ranking = {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.dbConnectManager.requestRanking(
|
if(isTypingExamApp()) {
|
||||||
this.getDateTimeType(),
|
this.dbService.requestTypingExamRanking(
|
||||||
sessionStorageManager.getMaestroID(),
|
this.getDateTimeType(),
|
||||||
this.date,
|
sessionStorageManager.getWritingID(),
|
||||||
this.time,
|
this.date,
|
||||||
(function(type, rankingRecordManager) {
|
this.time,
|
||||||
this.showRanking(rankingRecordManager);
|
|
||||||
}).bind(this)
|
(function(type, rankingRecordManager) {
|
||||||
);
|
this.showRanking(rankingRecordManager);
|
||||||
|
}).bind(this),
|
||||||
|
|
||||||
|
(function(jsonData) {
|
||||||
|
console.log(jsonData);
|
||||||
|
}).bind(this)
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
this.dbConnectManager.requestRanking(
|
||||||
|
this.getDateTimeType(),
|
||||||
|
sessionStorageManager.getMaestroID(),
|
||||||
|
this.date,
|
||||||
|
this.time,
|
||||||
|
|
||||||
|
(function(type, rankingRecordManager) {
|
||||||
|
this.showRanking(rankingRecordManager);
|
||||||
|
}).bind(this),
|
||||||
|
|
||||||
|
(function(jsonData) {
|
||||||
|
console.log(jsonData);
|
||||||
|
}).bind(this)
|
||||||
|
);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onClickRankingHour: function() {
|
onClickRankingHour: function() {
|
||||||
|
|||||||
@@ -58,6 +58,7 @@
|
|||||||
<script src="../../game/lib/button/back_button.js"></script>
|
<script src="../../game/lib/button/back_button.js"></script>
|
||||||
<script src="../../game/lib/button/fullscreen_button.js"></script>
|
<script src="../../game/lib/button/fullscreen_button.js"></script>
|
||||||
<script src="../../game/lib/db_connect_manager.js"></script>
|
<script src="../../game/lib/db_connect_manager.js"></script>
|
||||||
|
<script src="../../game/lib/db_service.js"></script>
|
||||||
<!-- <script src="../../game/typing/lib/animal.js"></script> -->
|
<!-- <script src="../../game/typing/lib/animal.js"></script> -->
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user