Commit 75fb7df5 authored by wildfirecode's avatar wildfirecode

1

parent 5bff6b16
...@@ -52,30 +52,30 @@ var a = { ...@@ -52,30 +52,30 @@ var a = {
"three": 32000 "three": 32000
}; };
//取数据格式用,一般情况注释 // 取数据格式用,一般情况注释
// (function exportFile(chapters: ChapterData[]) { (function exportFile(chapters: ChapterData[]) {
// var obj = [] var obj = []
// for (var i = 1; i < chapters.length; i++) { for (var i = 1; i < chapters.length; i++) {
// var chapter: ChapterData = chapters[i] var chapter: ChapterData = chapters[i]
// var target: PassTargetData = chapter.passTarget var target: PassTargetData = chapter.passTarget
// var a: any = {}; var a: any = {};
// a["lev"] = i; a["lev"] = i;
// a["tar"] = []; a["tar"] = [];
// if (target.type == PassType.SCORE_TARGET) { if (target.type == PassType.SCORE_TARGET) {
// a["tar"].push({ "type": 1, "num": target.score }) a["tar"].push({ "type": 1, "num": target.score })
// } else { } else {
// for (var j = 0; j < target.elements.length; j++) { for (var j = 0; j < target.elements.length; j++) {
// var element = target.elements[j]; var element = target.elements[j];
// a["tar"].push({ "type": submitTran[element.type], "num": element.count }) a["tar"].push({ "type": submitTran[element.type], "num": element.count })
// } }
// } }
// a["one"] = chapter.starScores[0]; a["one"] = chapter.starScores[0];
// a["two"] = chapter.starScores[1]; a["two"] = chapter.starScores[1];
// a["three"] = chapter.starScores[2]; a["three"] = chapter.starScores[2];
// obj.push(a) obj.push(a)
// } }
// var file = new File([JSON.stringify(obj)], "cfg.json", { type: "text/plain;charset=utf-8" }); var file = new File([JSON.stringify(obj)], "cfg.json", { type: "text/plain;charset=utf-8" });
// window["saveAs"](file); window["saveAs"](file);
// })(chapters) })(chapters)
\ No newline at end of file \ No newline at end of file
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