UserInfoItem.cs 699 B

12345678910111213141516171819202122232425
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using LitJson;
  4. using UnityEngine;
  5. using UnityEngine.UI;
  6. public class UserInfoItem : MonoBehaviour
  7. {
  8. public Text namet;
  9. public Text account;
  10. public Text dept;
  11. public Text position;
  12. public Text create_time;
  13. public Text admin;
  14. public void init(JsonData data)
  15. {
  16. namet.text = data["name"].ToString();
  17. dept.text = data["dept"].ToString();
  18. account.text = data["account"].ToString();
  19. position.text = data["position"].ToString();
  20. create_time.text = data["create_time"].ToString();
  21. admin.text = data["admin"].ToString()=="1"?"超级管理员":"普通用户";
  22. }
  23. }