fjlasjfos
This commit is contained in:
parent
56c0afbcea
commit
c18d22001e
|
@ -61,7 +61,7 @@ public class LoginPanel :XUIPanel
|
|||
if (MyManage.instance.startMode != null && MyManage.instance.startMode.teachplanId>0)
|
||||
{
|
||||
//参数启动
|
||||
accountInput.text = "admin" + MyManage.instance.startMode.teachplanId;
|
||||
accountInput.text = "admin" + MyManage.instance.examNum;
|
||||
accountInput.interactable = false;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 2e5cf2ce39559434da4d890cefcaf7bf
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,88 @@
|
|||
[{
|
||||
"eventTitle": "巡检工器具",
|
||||
"eventid": 1,
|
||||
"totalscore": 3,
|
||||
"workconditions": "",
|
||||
"veto": 0,
|
||||
"stepArr": []
|
||||
},
|
||||
{
|
||||
"eventTitle": "排故工器具",
|
||||
"eventid": 2,
|
||||
"totalscore": 3,
|
||||
"workconditions": "",
|
||||
"veto": 0,
|
||||
"stepArr": []
|
||||
},
|
||||
{
|
||||
"eventTitle": "停电操作票",
|
||||
"eventid": 3,
|
||||
"totalscore": 5,
|
||||
"workconditions": "",
|
||||
"veto": 0,
|
||||
"stepArr": []
|
||||
},
|
||||
{
|
||||
"eventTitle": "送电操作票",
|
||||
"eventid": 4,
|
||||
"totalscore": 5,
|
||||
"workconditions": "",
|
||||
"veto": 0,
|
||||
"stepArr": []
|
||||
},
|
||||
{
|
||||
"eventTitle": "停电操作票步骤",
|
||||
"eventid": 5,
|
||||
"totalscore": 5,
|
||||
"workconditions": "",
|
||||
"veto": 0,
|
||||
"stepArr": []
|
||||
},
|
||||
{
|
||||
"eventTitle": "送电操作票步骤",
|
||||
"eventid": 6,
|
||||
"totalscore": 5,
|
||||
"workconditions": "",
|
||||
"veto": 0,
|
||||
"stepArr": []
|
||||
},
|
||||
{
|
||||
"eventTitle": "围栏",
|
||||
"eventid": 7,
|
||||
"totalscore": 2,
|
||||
"workconditions": "",
|
||||
"veto": 0,
|
||||
"stepArr": []
|
||||
},
|
||||
{
|
||||
"eventTitle": "验电",
|
||||
"eventid": 8,
|
||||
"totalscore": 2,
|
||||
"workconditions": "",
|
||||
"veto": 0,
|
||||
"stepArr": []
|
||||
},
|
||||
{
|
||||
"eventTitle": "时间分",
|
||||
"eventid": 9,
|
||||
"totalscore": 5,
|
||||
"workconditions": "",
|
||||
"veto": 0,
|
||||
"stepArr": []
|
||||
},
|
||||
{
|
||||
"eventTitle": "缺陷查找、缺陷处理、缺陷分类分值",
|
||||
"eventid": 10,
|
||||
"totalscore": 65,
|
||||
"workconditions": "",
|
||||
"veto": 0,
|
||||
"stepArr": []
|
||||
},
|
||||
{
|
||||
"eventTitle": "其它扣分项",
|
||||
"eventid": 11,
|
||||
"totalscore": 0,
|
||||
"workconditions": "",
|
||||
"veto": 0,
|
||||
"stepArr": []
|
||||
}]
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 41d89540806e0304aa5c956b273e5ae3
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1 @@
|
|||
3
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: cb8f0815514012f4c9010a1ef0aec93a
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -11,6 +11,9 @@ using SGUnitySDK.Utils;
|
|||
using System;
|
||||
using RuralPower;
|
||||
using System.Linq;
|
||||
using NPOI.SS.UserModel;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
|
||||
public class MyManage : MonoBehaviour
|
||||
{
|
||||
|
@ -28,6 +31,10 @@ public class MyManage : MonoBehaviour
|
|||
/// </summary>
|
||||
public PlayModeEnum playModeEnum;
|
||||
/// <summary>
|
||||
/// °¸Àý±àºÅ
|
||||
/// </summary>
|
||||
public int examNum;
|
||||
/// <summary>
|
||||
/// 启动参数
|
||||
/// </summary>
|
||||
List<string> infos;
|
||||
|
@ -39,8 +46,8 @@ public class MyManage : MonoBehaviour
|
|||
|
||||
//初始化
|
||||
#if UNITY_EDITOR
|
||||
SGStartParamsService.GetInstance().setMode("eyJtb2RlIjo1LCJwbGFuTG9jYWxQYXRoIjoiRDpcXFVzZXJGaWxlc1xc5Yac55S156ue6LWb5a+55o6lXFzmoYjkvoszLnppcCIsInByYWN0aXNlSWQiOiI4Iiwic3R1VXNlcklkIjoiNzM0IiwiYXBwSWQiOiIyIiwiZXhhbUlkIjoiLTEiLCJ0ZWFjaHBsYW5JZCI6IjMiLCJjb3Vyc2VJZCI6Ii0xIn0=");
|
||||
SGStartParamsService.GetInstance().setToken("fad75ba1-541f-4d59-8366-fa5667abd615");
|
||||
SGStartParamsService.GetInstance().setMode("eyJtb2RlIjo1LCJwbGFuTG9jYWxQYXRoIjoiRDpcXFVzZXJGaWxlc1xc5Yac55S156ue6LWb5a+55o6lXFzmoYjkvoszLnppcCIsInByYWN0aXNlSWQiOiI1NSIsInN0dVVzZXJJZCI6IjUzOSIsImFwcElkIjoiMTQiLCJleGFtSWQiOiItMSIsInRlYWNocGxhbklkIjoiMTIzIiwiY291cnNlSWQiOiItMSJ9");
|
||||
SGStartParamsService.GetInstance().setToken("f1ebee39-fd39-49f1-8da5-9c7110570f90");
|
||||
#endif
|
||||
SGUConfig config = new SGUConfig();
|
||||
SGUSdk.GetInstance().InitSDK(config);
|
||||
|
@ -62,6 +69,7 @@ public class MyManage : MonoBehaviour
|
|||
//考试
|
||||
playModeEnum = PlayModeEnum.考试;
|
||||
Debug.Log("考试模式:" + startMode.examId);
|
||||
GetZip();
|
||||
//HttpExamService getPractiseInfo = new HttpExamService();
|
||||
//ResponObject responObject = getPractiseInfo.GetExamQuestionList(startMode.examId);
|
||||
//if(responObject.code=="0")
|
||||
|
@ -79,6 +87,7 @@ public class MyManage : MonoBehaviour
|
|||
//练习
|
||||
playModeEnum = PlayModeEnum.练习;
|
||||
Debug.Log("练习模式:" + startMode.practiseId);
|
||||
GetZip();
|
||||
//HttpPractiseService getPractiseInfo = new HttpPractiseService();
|
||||
//ResponObject responObject = getPractiseInfo.GetPractiseInfo(startMode.practiseId);
|
||||
//if(responObject.code=="0")
|
||||
|
@ -104,7 +113,7 @@ public class MyManage : MonoBehaviour
|
|||
if(Input.GetKeyDown(KeyCode.O))
|
||||
{
|
||||
RuralPowerAPI ruralPowerAPI = new RuralPowerAPI();
|
||||
var tmps=ruralPowerAPI.GetAnswer(ScenesRecorder.user.ExamId, ScenesRecorder.user.user_id, startMode.teachplanId);
|
||||
var tmps=ruralPowerAPI.GetAnswer(ScenesRecorder.user.ExamId, ScenesRecorder.user.user_id, examNum);
|
||||
Debug.Log("当前答案=====================");
|
||||
Debug.Log(JsonConvert.SerializeObject(DataBase.achievement_list));
|
||||
foreach (var tmp in tmps)
|
||||
|
@ -130,6 +139,15 @@ public class MyManage : MonoBehaviour
|
|||
#endif
|
||||
}
|
||||
|
||||
private void GetZip()
|
||||
{
|
||||
string path = Application.streamingAssetsPath + "/tmpcxx";
|
||||
Directory.Delete(path,true);
|
||||
Directory.CreateDirectory(path);
|
||||
System.IO.Compression.ZipFile.ExtractToDirectory(startMode.planLocalPath, path, Encoding.GetEncoding("GBK"));
|
||||
examNum = int.Parse(File.ReadAllText(path + "/examNum.txt"));
|
||||
Debug.Log("°¸Àý±àºÅ£º" + examNum);
|
||||
}
|
||||
/// <summary>
|
||||
/// 开始练习
|
||||
/// </summary>
|
||||
|
@ -167,7 +185,7 @@ public class MyManage : MonoBehaviour
|
|||
public void GetUploadPracticeAnswer()
|
||||
{
|
||||
RuralPowerAPI ruralPowerAPI=new RuralPowerAPI();
|
||||
var answers=ruralPowerAPI.GetAnswer(ScenesRecorder.user.ExamId, ScenesRecorder.user.user_id, startMode.teachplanId);
|
||||
var answers=ruralPowerAPI.GetAnswer(ScenesRecorder.user.ExamId, ScenesRecorder.user.user_id, examNum);
|
||||
Debug.Log("结束练习:");
|
||||
Debug.Log(JsonConvert.SerializeObject(answers));
|
||||
|
||||
|
@ -235,7 +253,7 @@ public class MyManage : MonoBehaviour
|
|||
public void GetUploadExamAnswer()
|
||||
{
|
||||
RuralPowerAPI ruralPowerAPI = new RuralPowerAPI();
|
||||
var answers = ruralPowerAPI.GetAnswer(ScenesRecorder.user.ExamId, ScenesRecorder.user.user_id, startMode.teachplanId);
|
||||
var answers = ruralPowerAPI.GetAnswer(ScenesRecorder.user.ExamId, ScenesRecorder.user.user_id, examNum);
|
||||
Debug.Log("结束考试:");
|
||||
Debug.Log(JsonConvert.SerializeObject(answers));
|
||||
HttpExamService getPractiseInfo = new HttpExamService();
|
||||
|
|
|
@ -66,7 +66,7 @@ public class DataHandler : MonoBehaviour
|
|||
{
|
||||
Debug.Log("Load online data!");
|
||||
RuralPowerAPI rpa = new RuralPowerAPI();
|
||||
var result = rpa.GetExam(_ip,ScenesRecorder.user.user_id,MyManage.instance.startMode.teachplanId.ToString(),Application.streamingAssetsPath+ "/zy");
|
||||
var result = rpa.GetExam(_ip,ScenesRecorder.user.user_id,MyManage.instance.examNum.ToString(),Application.streamingAssetsPath+ "/zy");
|
||||
InitData(result);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -191,7 +191,7 @@ public class ScenesRecorder : MonoBehaviour
|
|||
IsInit = true;
|
||||
RuralPowerAPI rpa = new RuralPowerAPI();
|
||||
// »ñÈ¡¿¼ÊÔ
|
||||
var resultstart = rpa.GetExam(_ip, ScenesRecorder.user.user_id,MyManage.instance.startMode.teachplanId.ToString(), Application.streamingAssetsPath + "/zy");
|
||||
var resultstart = rpa.GetExam(_ip, ScenesRecorder.user.user_id,MyManage.instance.examNum.ToString(), Application.streamingAssetsPath + "/zy");
|
||||
if (JObject.Parse(resultstart)["code"].ToObject<int>()!=0)
|
||||
{
|
||||
Debug.LogError("GetExamʧ°Ü");
|
||||
|
|
Loading…
Reference in New Issue