12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- using Blue;
- using LitJson;
- using Newtonsoft.Json;
- using Newtonsoft.Json.Linq;
- using UnityEngine;
- public class InspectionService : IInspectionService
- {
- public InspectionInfo InspectionInfo { get; private set; }
- public void OnInit()
- {
- }
- public void Get()
- {
- CoroutineSystem.Instance.StartCoroutine(
- HttpTool.Instance.SendHttp(HttpActionLang.inspection_begin, "", message =>
- {
- JObject jobject = JObject.Parse(message);
- if (jobject["code"].ToString() == "200" && !string.IsNullOrWhiteSpace(jobject["data"].ToString()))
- {
- Debug.LogError("data:" + jobject["data"].ToString());
- InspectionInfo = JsonConvert.DeserializeObject<InspectionInfo>(jobject["data"].ToString());
-
- }
- }));
- }
-
-
-
-
-
-
-
-
- public void Set(int ItemID, bool Normal, string Outliers, int InspectionId, string[] ImageIds)
- {
- InspectionStepSet mInspectionStepSet = new InspectionStepSet()
- {
- itemId = ItemID,
- normal = Normal,
- outliers = Outliers,
- inspectionId = InspectionId,
- imageIds = ImageIds
- };
- string JsonString = JsonConvert.SerializeObject(mInspectionStepSet);
- CoroutineSystem.Instance.StartCoroutine(HttpTool.Instance.SendHttp(HttpActionLang.inspection_step, JsonString, message =>
- {
- JObject jobject = JObject.Parse(message);
- if (jobject["code"].ToString() == "200" && !string.IsNullOrWhiteSpace(jobject["data"].ToString()))
- {
-
- }
- }));
- }
- }
|