This commit is contained in:
陈向学 2024-04-10 11:35:31 +08:00
parent 92ca42a217
commit 8a54726a2e
1 changed files with 71 additions and 69 deletions

View File

@ -45,6 +45,7 @@ public class MyManage : MonoBehaviour
SGUConfig config = new SGUConfig();
SGUSdk.GetInstance().InitSDK(config);
startMode = SGUSdk.GetInstance().GetAppStartMode();
Debug.Log("启动信息:" + JsonConvert.SerializeObject(startMode));
//获取用户信息
HttpAuthService getUserInfo = new HttpAuthService();
@ -60,33 +61,35 @@ public class MyManage : MonoBehaviour
{
//考试
playModeEnum = PlayModeEnum.;
HttpExamService getPractiseInfo = new HttpExamService();
ResponObject responObject = getPractiseInfo.PrepareExam(startMode.examId, userData.id);
if(responObject.code=="0")
{
string data = responObject.data.ToString();
Debug.Log("考生获取考试题目" + data);
}
else
{
Debug.LogError("获取考试失败:" + responObject.msg);
}
Debug.Log("考试模式:" + startMode.examId);
//HttpExamService getPractiseInfo = new HttpExamService();
//ResponObject responObject = getPractiseInfo.GetExamQuestionList(startMode.examId);
//if(responObject.code=="0")
//{
// string data = responObject.data.ToString();
// Debug.Log("考生获取考试题目" + data);
//}
//else
//{
// Debug.LogError("获取考试失败:" + responObject.msg);
//}
}
else if (startMode.practiseId > 0)
{
//练习
playModeEnum = PlayModeEnum.;
HttpPractiseService getPractiseInfo = new HttpPractiseService();
ResponObject responObject = getPractiseInfo.GetPractiseInfo(startMode.practiseId);
if(responObject.code=="0")
{
string data = responObject.data.ToString();
Debug.Log("GetPractiseInfo:" + data);
}
else
{
Debug.LogError("获取练习失败:" + responObject.msg);
}
Debug.Log("练习模式:" + startMode.practiseId);
//HttpPractiseService getPractiseInfo = new HttpPractiseService();
//ResponObject responObject = getPractiseInfo.GetPractiseInfo(startMode.practiseId);
//if(responObject.code=="0")
//{
// string data = responObject.data.ToString();
// Debug.Log("GetPractiseInfo:" + data);
//}
//else
//{
// Debug.LogError("获取练习失败:" + responObject.msg);
//}
}
}
else
@ -136,19 +139,19 @@ public class MyManage : MonoBehaviour
public void GetStartPractise()
{
//try
{
HttpPractiseService getPractiseInfo = new HttpPractiseService();
ResponObject responObject = getPractiseInfo.StartPractise(startMode.practiseId, userData.id);
if(responObject.code=="0")
{
string data = responObject.data.ToString();
Debug.Log("开始练习:" + data);
}
else
{
Debug.LogError(responObject.msg);
}
}
//{
//HttpPractiseService getPractiseInfo = new HttpPractiseService();
//ResponObject responObject = getPractiseInfo.StartPractise(startMode.practiseId, userData.id);
//if(responObject.code=="0")
//{
// string data = responObject.data.ToString();
// Debug.Log("开始练习:" + data);
//}
//else
//{
// Debug.LogError(responObject.msg);
//}
//}
//catch (System.Exception e)
//{
// throw;
@ -189,17 +192,17 @@ public class MyManage : MonoBehaviour
/// <param name="endTime"></param>
public void GetEndPractise()
{
HttpPractiseService getPractiseInfo = new HttpPractiseService();
ResponObject responObject = getPractiseInfo.EndPractise(startMode.practiseId, userData.id);
if (responObject.code == "0")
{
string data = responObject.data.ToString();
Debug.Log("结束练习:" + data);
}
else
{
Debug.LogError(responObject.msg);
}
//HttpPractiseService getPractiseInfo = new HttpPractiseService();
//ResponObject responObject = getPractiseInfo.EndPractise(startMode.practiseId, userData.id);
//if (responObject.code == "0")
//{
// string data = responObject.data.ToString();
// Debug.Log("结束练习:" + data);
//}
//else
//{
// Debug.LogError(responObject.msg);
//}
}
/// <summary>
@ -209,17 +212,17 @@ public class MyManage : MonoBehaviour
/// <param name="userId"></param>
public void GetStartExam()
{
HttpExamService getPractiseInfo = new HttpExamService();
ResponObject responObject = getPractiseInfo.StartExam(startMode.examId, userData.id);
if (responObject.code == "0")
{
string data = responObject.data.ToString();
Debug.Log("开始考试:" + data);
}
else
{
Debug.LogError(responObject.msg);
}
//HttpExamService getPractiseInfo = new HttpExamService();
//ResponObject responObject = getPractiseInfo.StartExam(startMode.examId, userData.id);
//if (responObject.code == "0")
//{
// string data = responObject.data.ToString();
// Debug.Log("开始考试:" + data);
//}
//else
//{
// Debug.LogError(responObject.msg);
//}
}
@ -256,18 +259,17 @@ public class MyManage : MonoBehaviour
/// <param name="userId"></param>
public void GetEndExam()
{
HttpExamService getPractiseInfo = new HttpExamService();
ResponObject responObject = getPractiseInfo.EndExam(startMode.examId, userData.id);
if (responObject.code == "0")
{
string data = responObject.data.ToString();
Debug.Log("结束考试:" + data);
}
else
{
Debug.LogError(responObject.msg);
}
//HttpExamService getPractiseInfo = new HttpExamService();
//ResponObject responObject = getPractiseInfo.EndExam(startMode.examId, userData.id);
//if (responObject.code == "0")
//{
// string data = responObject.data.ToString();
// Debug.Log("结束考试:" + data);
//}
//else
//{
// Debug.LogError(responObject.msg);
//}
}
}