using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class TaskPhotoPanel : MonoBehaviour { // public RawImage img; // public Text posText; // public Text messageText; // public Text pageText; // public Button lastItem; // public Button nextItem; // // public B08_TaskItems task_item; // public int currentIndex = 0; // // public Text dateText; // public string _timeInfo; // // private void Awake() // { // lastItem.onClick.AddListener(Last); // nextItem.onClick.AddListener(Next); // } // // public void SetData(B08_TaskItems item, string _time) // { // currentIndex = 0; // task_item = item; // _timeInfo = _time; // // posText.text = task_item.faItemName; // messageText.text = task_item.itemDescription == null? "暂无内容": task_item.itemDescription; // dateText.text = task_item.finishedTime == null?_timeInfo: task_item.finishedTime; // // ChangePage(currentIndex); // } // // public void Next() // { // if (task_item is { files: not null } && currentIndex < task_item.files.Length - 1) // { // currentIndex++; // ChangePage(currentIndex); // } // } // // public void Last() // { // if (task_item is { files: not null } &¤tIndex > 0) // { // currentIndex--; // ChangePage(currentIndex); // } // } // // public void ChangePage(int pageIndex) // { // img.texture = null; // if (task_item?.files == null || task_item.files.Length < 1) // { // pageText.text = $"0/0"; // return; // } // var currentData = task_item.files[pageIndex]; // if (currentData.filePath!=null&&!currentData.filePath.Equals("")) // { // string path = "http://58.19.230.46:9180/prod-api/uploads/" + currentData.filePath; // TextureLoadHelp._Instance.LoadTexFromUrl(path, img); // } // else { // img.texture = null; // } // //Debug.Log(currentData.faItemName + " " + currentData.startTime + " " + currentData.finishedTime); // // pageText.text = $"{pageIndex + 1}/{task_item.files.Length}"; // } }