This commit is contained in:
陈向学 2024-09-13 12:03:05 +08:00
parent 6f31d2f725
commit 12ad5f2760
18 changed files with 316 additions and 9692 deletions

View File

@ -7,7 +7,7 @@ TextureImporter:
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
sRGBTexture: 0
linearTexture: 0
fadeOut: 0
borderMipMap: 0
@ -52,7 +52,7 @@ TextureImporter:
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureType: 1
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1

View File

@ -7,7 +7,7 @@ TextureImporter:
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
sRGBTexture: 0
linearTexture: 0
fadeOut: 0
borderMipMap: 0
@ -52,7 +52,7 @@ TextureImporter:
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureType: 1
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1

View File

@ -7,7 +7,7 @@ TextureImporter:
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
sRGBTexture: 0
linearTexture: 0
fadeOut: 0
borderMipMap: 0
@ -52,7 +52,7 @@ TextureImporter:
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureType: 1
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 0ddb620b0a67d774c84b869f183a4e98
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -49,7 +49,8 @@ public class ExamDataPanel : XUIPanel
{
base.Active();
SetTimeText(ScenesRecorder.surplusTime);
real_name.text = ScenesRecorder.user.real_name;
//real_name.text = ScenesRecorder.user.real_name;
real_name.text = MyManage.instance.userData.name;
if (Data != null)
{
SetExamProcess((string)Data);

View File

@ -76,7 +76,7 @@ public class FinishPanel : XUIPanel
MyManage.instance.GetUploadExamAnswer();
MyManage.instance.GetEndExam();
}
Debug.Log("考试已结束");
Application.Quit();
}
// 上传视频
@ -115,7 +115,7 @@ public class FinishPanel : XUIPanel
MyManage.instance.GetUploadExamAnswer();
MyManage.instance.GetEndExam();
}
Debug.Log("考试已结束");
Application.Quit();
}
}

View File

@ -74,6 +74,9 @@ public class LoginPanel :XUIPanel
ClickModify();
version.text = ScenesRecorder.instance.version;
Debug.Log("登录页面初始化完成");
//自动加载
Login();
}
/// <summary>
/// 修改密码

View File

@ -251,6 +251,85 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls: []
m_IsOn: 1
--- !u!1 &349402588404518715
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5843125061876607525}
- component: {fileID: 6151659502346159614}
- component: {fileID: 2167916985893694374}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5843125061876607525
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 349402588404518715}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1476530093231212438}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6151659502346159614
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 349402588404518715}
m_CullTransparentMesh: 1
--- !u!114 &2167916985893694374
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 349402588404518715}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 14
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: "\u63D0\u4EA4\u7B54\u6848"
--- !u!1 &361299595268036102
GameObject:
m_ObjectHideFlags: 0
@ -1738,6 +1817,7 @@ RectTransform:
- {fileID: 689425970116954223}
- {fileID: 6932535485631310341}
- {fileID: 5618599330946730946}
- {fileID: 1476530093231212438}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -1821,6 +1901,127 @@ MonoBehaviour:
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &6303070546522229104
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1476530093231212438}
- component: {fileID: 7265654837086120887}
- component: {fileID: 3502662752044892293}
- component: {fileID: 5612095980632809943}
m_Layer: 5
m_Name: quitbtn
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1476530093231212438
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6303070546522229104}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 5843125061876607525}
m_Father: {fileID: 1119660332236464730}
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: -121.6}
m_SizeDelta: {x: 123.2256, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7265654837086120887
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6303070546522229104}
m_CullTransparentMesh: 1
--- !u!114 &3502662752044892293
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6303070546522229104}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: b7808765db4f15b4d97f5bb1045cc59c, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &5612095980632809943
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6303070546522229104}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 3502662752044892293}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!1 &6908594030920630853
GameObject:
m_ObjectHideFlags: 0

View File

@ -6,6 +6,7 @@ using System.Collections;
using DG.Tweening;
using System.Collections.Generic;
using System.IO;
using RuralPower;
public class SystemPanel : XUIPanel
{
@ -19,6 +20,8 @@ public class SystemPanel : XUIPanel
/// </summary>
public TogglesGroup qualitySettings;
public Button quitbtn;
public SystemPanel() : base(UIType.PopUp, UIMode.HideOther, UICollider.None)
{
uiPath = "UI/SystemPanel/Prefabs/SystemPanel";
@ -57,6 +60,40 @@ public class SystemPanel : XUIPanel
// PlayerPrefs.SetString("isVideo", Value);
// ScenesRecorder.openVideoBack = s;
//});
quitbtn.onClick.AddListener(() =>
{
XFrame.Core.UI.XUIPanel.ShowPanel<TipsCheckPanel>(isok =>
{
if((bool)isok)
{
RuralPowerAPI api = new RuralPowerAPI();
string url = ScenesRecorder._Ip;
string endExamMsg = api.EndExam(url, ScenesRecorder.user.ExamId, ScenesRecorder.user.user_id);
if (string.IsNullOrEmpty(endExamMsg))
{
}
else
{
Debug.Log("结束案例:" + endExamMsg);
//改用新的上传数据,结束考试
if (MyManage.instance.playModeEnum == PlayModeEnum.)
{
MyManage.instance.GetUploadPracticeAnswer();
MyManage.instance.GetEndPractise();
}
else if (MyManage.instance.playModeEnum == PlayModeEnum.)
{
MyManage.instance.GetUploadExamAnswer();
MyManage.instance.GetEndExam();
}
Debug.Log("退出系统");
Application.Quit();
}
}
}, "是否要提前提交答案,并退出系统", false);
});
}
public override void Active()
{

View File

@ -14,6 +14,7 @@ using System.Linq;
using NPOI.SS.UserModel;
using System.Text;
using System.IO;
using Newtonsoft.Json.Linq;
public class MyManage : MonoBehaviour
{
@ -42,6 +43,10 @@ public class MyManage : MonoBehaviour
public string testMode;
public string testToken;
public DateTime starttime;
public DateTime endtime;
public int leftTime;
private void Awake()
{
instance = this;
@ -52,8 +57,9 @@ public class MyManage : MonoBehaviour
#if UNITY_EDITOR
if (testMode != "" && testToken!="")
{
SGStartParamsService.GetInstance().setMode(testMode);
SGStartParamsService.GetInstance().setToken(testToken);
//SGStartParamsService.GetInstance().setMode(testMode);
//SGStartParamsService.GetInstance().setToken(testToken);
SGStartParamsService.GetInstance().Init(testMode, testToken);
}
if(Directory.Exists(@"D:\zy"))
@ -66,12 +72,14 @@ 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();
ResponObject responObject1 = getUserInfo.GetUserInfo();
if(responObject1.code=="0")
if (responObject1.code=="0")
{
string data1 = responObject1.data.ToString();
Debug.Log("GetUserInfo:" + data1);
@ -83,25 +91,42 @@ 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")
//{
// string data = responObject.data.ToString();
// Debug.Log("考生获取考试题目" + data);
//}
//else
//{
// Debug.LogError("获取考试失败:" + responObject.msg);
//}
HttpExamService getPractiseInfo = new HttpExamService();
ResponObject responObject = getPractiseInfo.GetExamInfo(startMode.examId);
if (responObject.code == "0")
{
string data = responObject.data.ToString();
leftTime=(int)float.Parse(JObject.Parse(data)["left_time"].ToString());
Debug.Log("获取考试时长:" + data);
GetZip();
}
else
{
Debug.LogError("获取考试失败:" + responObject.msg);
}
}
else if (startMode.practiseId > 0)
{
//练习
//练习
playModeEnum = PlayModeEnum.;
Debug.Log("练习模式:" + startMode.practiseId);
GetZip();
HttpPractiseService getPractiseInfo = new HttpPractiseService();
ResponObject responObject = getPractiseInfo.GetCurrentPractice(startMode.practiseId, userData.id);
if (responObject.code == "0")
{
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());
GetZip();
}
else
{
Debug.LogError("获取考试时间:" + responObject.msg);
}
//HttpPractiseService getPractiseInfo = new HttpPractiseService();
//ResponObject responObject = getPractiseInfo.GetPractiseInfo(startMode.practiseId);
//if(responObject.code=="0")

View File

@ -496,14 +496,23 @@ public class ScenesRecorder : MonoBehaviour
AreaName = jo["data"]["PlatformArea"].ToString();
GameManage.clicklineName = jo["data"]["SelectPlatformArea"].ToString();
examinationLink = jo["data"]["ExaminationLink"].ToString();
string time = jo["data"]["ExaminationDuration"].ToString();
surplusTime = 3600;
if (!string.IsNullOrEmpty(time))
if(MyManage.instance.leftTime!=0)
{
string min = time.Split(':')[0];
string sec = time.Split(':')[1];
surplusTime = 60 * int.Parse(min) + int.Parse(sec);
surplusTime=MyManage.instance.leftTime;
}
else
{
if (!string.IsNullOrEmpty(time))
{
string min = time.Split(':')[0];
string sec = time.Split(':')[1];
surplusTime = 60 * int.Parse(min) + int.Parse(sec);
}
}
string toolMsg = jo["data"]["TroubleshootingTool"].ToString();
if (!string.IsNullOrEmpty(toolMsg))
{

View File

@ -561,8 +561,9 @@ MonoBehaviour:
m_EditorClassIdentifier:
playModeEnum: 0
examNum: 0
testMode: eyJtb2RlIjo1LCJwbGFuTG9jYWxQYXRoIjoiRDpcXFVzZXJGaWxlc1xc5Yac55S156ue6LWb5a+55o6lXFzmoYjkvosyLnppcCIsInByYWN0aXNlSWQiOiI4NCIsInN0dVVzZXJJZCI6Ijc3MCIsImFwcElkIjoiNzIiLCJleGFtSWQiOiItMSIsInRlYWNocGxhbklkIjoiNDY0NiIsImNvdXJzZUlkIjoiLTEifQ==
testToken: a38949d7-0b13-4ac4-bcff-99cd01868daf
testMode: eyJtb2RlIjozLCJwbGFuTG9jYWxQYXRoIjoiQzpcXFVzZXJzXFw5MTA2OVxcRGVza3RvcFxc6aG555uuXFzlhpznlLXnq57otZvlr7nmjqVcXOahiOS+izMuemlwIiwicHJhY3Rpc2VJZCI6Ii0xIiwic3R1VXNlcklkIjoiMTIiLCJhcHBJZCI6Ijk4IiwiZXhhbUlkIjoiMzAiLCJ0ZWFjaHBsYW5JZCI6IjEiLCJjb3Vyc2VJZCI6Ii0xIn0=
testToken: baf8e7e8-a149-4c2e-8731-a383067ea8df
leftTime: 0
--- !u!1 &903235946
GameObject:
m_ObjectHideFlags: 0

View File

@ -7,7 +7,7 @@ TextureImporter:
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
sRGBTexture: 0
linearTexture: 0
fadeOut: 0
borderMipMap: 0
@ -52,7 +52,7 @@ TextureImporter:
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureType: 1
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1

View File

@ -7,7 +7,7 @@ TextureImporter:
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
sRGBTexture: 0
linearTexture: 0
fadeOut: 0
borderMipMap: 0
@ -52,7 +52,7 @@ TextureImporter:
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureType: 1
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1

View File

@ -7,7 +7,7 @@ TextureImporter:
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
sRGBTexture: 0
linearTexture: 0
fadeOut: 0
borderMipMap: 0
@ -52,7 +52,7 @@ TextureImporter:
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureType: 1
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1