Compare commits

..

No commits in common. "b6291a9c1bd084f5c91b7eeb848580b0a1b55cdf" and "a711bf787d602f851756e2784e3821e3d309ea9a" have entirely different histories.

2 changed files with 5 additions and 17 deletions

View File

@ -47,16 +47,10 @@ public class ScoreController : MonoSingleton<ScoreController>
}
public string GetModuleDictJson(string name = "", string id = "", string sum = "")
public string GetModuleDictJson(string name = "")
{
var resultDict = new Dictionary<string, object>();
DateTime curTime = DateTime.Now;
resultDict.Add("name", name);
resultDict.Add("id", id);
resultDict.Add("sum", sum);
resultDict.Add("time", curTime.ToString("yyyy.MM.dd"));
resultDict.Add("year", curTime.Year);
resultDict.Add("month", curTime.Month);
foreach (var dataPair in moduleDict)
{
var data = dataPair.Value;
@ -68,12 +62,7 @@ public class ScoreController : MonoSingleton<ScoreController>
string key = $"{scoreStep.step}{scoreStep.name}";
resultDict[key] = scoreStep.value;
string value = "\u00A0";
if (string.IsNullOrEmpty(scoreStep.time) == false)
{
value = scoreStep.time;
}
resultDict.Add(key + "Time", value);
resultDict.Add(key + "Time", string.IsNullOrEmpty(scoreStep.time) == true ? "" : scoreStep.time);
}
}
}

View File

@ -33,7 +33,7 @@ namespace QFramework.Example
#if UNITY_WEBGL&&!UNITY_EDITOR
#if UNITY_WEBGL
ResLoader loader = ResLoader.Allocate();
loader.Add2Load(Global.reportDemoPath.ToLocalBytesResName(), (success, res) =>
{
@ -45,7 +45,7 @@ namespace QFramework.Example
}
});
loader.LoadAsync();
#elif UNITY_STANDALONE_WIN||UNITY_EDITOR
#elif UNITY_STANDALONE_WIN
DownLoad.interactable = false;
AsposeHelper.Writer(GetScoreDataJson(), () =>
{
@ -60,7 +60,7 @@ namespace QFramework.Example
public string GetScoreDataJson()
{
return ScoreController.Instance.GetModuleDictJson(InputName.text, InputId.text, this.Sum.text);
return ScoreController.Instance.GetModuleDictJson(InputName.text);
}
@ -108,7 +108,6 @@ namespace QFramework.Example
startTime = item.Value.time,
endTime = item.Value.time,
seq = seq,
StepState = (int)item.Value.value == float.Parse(item.Value.sum) ? "全部正确" : "有错误"
});
seq++;
}