不限时

This commit is contained in:
陈向学 2024-09-25 15:25:40 +08:00
parent dd16e0614f
commit b69b27f1c2
3 changed files with 48 additions and 8 deletions

View File

@ -134,10 +134,22 @@ public class ExamDataPanel : XUIPanel
{
s_second = 0 + s_second;
}
surplusTime.text = s_min + ":" + s_second;
string tmptime = "";
if (!MyManage.instance.hasMit)
{
surplusTime.text = "²»ÏÞʱ";
tmptime= s_min + ":" + s_second;
}
else
{
surplusTime.text = s_min + ":" + s_second;
tmptime = s_min + ":" + s_second;
}
if (second.Equals(0) || second.Equals(30))
{
API.UpdateExaminationDuration(ScenesRecorder._Ip, ScenesRecorder.user.user_id, ScenesRecorder.user.ExamId, surplusTime.text);
API.UpdateExaminationDuration(ScenesRecorder._Ip, ScenesRecorder.user.user_id, ScenesRecorder.user.ExamId, tmptime);
if (min == 1)
{
if (sceond == 0)

View File

@ -46,7 +46,14 @@ public class MyManage : MonoBehaviour
public DateTime starttime;
public DateTime endtime;
/// <summary>
/// Ê£Óàʼþ
/// </summary>
public int leftTime;
/// <summary>
/// ÊÇ·ñÓÐÏÞʱ
/// </summary>
public bool hasMit=true;
private void Awake()
{
instance = this;
@ -96,7 +103,17 @@ public class MyManage : MonoBehaviour
if (responObject.code == "0")
{
string data = responObject.data.ToString();
leftTime=(int)float.Parse(JObject.Parse(data)["left_time"].ToString());
leftTime = 99999999;
hasMit = false;
if (JObject.Parse(data)["left_time"]!=null)
{
string tmplef = JObject.Parse(data)["left_time"].ToString();
if (!string.IsNullOrEmpty(tmplef))
{
leftTime = (int)float.Parse(tmplef);
hasMit = true;
}
}
Debug.Log("获取考试时长:" + data);
GetZip();
}
@ -117,9 +134,19 @@ public class MyManage : MonoBehaviour
string data = responObject.data.ToString();
Debug.Log("获取时长:" + data);
JObject jb=JObject.Parse(data);
starttime = DateTime.Parse(jb["current_train"]["start_time"].ToString());
endtime = DateTime.Parse(jb["current_train"]["end_time"].ToString());
leftTime = (int)float.Parse(jb["current_train"]["left_time"].ToString());
//starttime = DateTime.Parse(jb["current_train"]["start_time"].ToString());
//endtime = DateTime.Parse(jb["current_train"]["end_time"].ToString());
leftTime = 99999999;
hasMit = false;
if (jb["current_train"]["left_time"] != null)
{
string tmplif = jb["current_train"]["left_time"].ToString();
if (!string.IsNullOrEmpty(tmplif))
{
leftTime = (int)float.Parse(tmplif);
hasMit = true;
}
}
GetZip();
}
else

View File

@ -561,9 +561,10 @@ MonoBehaviour:
m_EditorClassIdentifier:
playModeEnum: 0
examNum: 0
testMode: eyJtb2RlIjozLCJwbGFuTG9jYWxQYXRoIjoiQzpcXFVzZXJzXFw5MTA2OVxcRGVza3RvcFxc6aG555uuXFzlhpznlLXnq57otZvlr7nmjqVcXOahiOS+izMuemlwIiwicHJhY3Rpc2VJZCI6Ii0xIiwic3R1VXNlcklkIjoiMTIiLCJhcHBJZCI6Ijk4IiwiZXhhbUlkIjoiMzAiLCJ0ZWFjaHBsYW5JZCI6IjEiLCJjb3Vyc2VJZCI6Ii0xIn0=
testToken: baf8e7e8-a149-4c2e-8731-a383067ea8df
testMode: eyJtb2RlIjo1LCJwbGFuTG9jYWxQYXRoIjoiQzpcXFVzZXJzXFw5MTA2OVxcRGVza3RvcFxc6aG555uuXFzlhpznlLXnq57otZvlr7nmjqVcXOahiOS+izMuemlwIiwicHJhY3Rpc2VJZCI6IjgyIiwic3R1VXNlcklkIjoiNCIsImFwcElkIjoiODAiLCJleGFtSWQiOiItMSIsInRlYWNocGxhbklkIjoiOTY5NiIsImNvdXJzZUlkIjoiLTEifQ==
testToken: 9ec93631-92a6-448c-b9cf-b3c0d8095175
leftTime: 0
hasMit: 0
--- !u!1 &903235946
GameObject:
m_ObjectHideFlags: 0