index.ts 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. import { showFailToast } from 'vant'
  2. // export const token = '01c54JHFBaaOkzA6XETYWgkxbxorMrroEyjBLls9Gpcc5BU7634OMG_bLyWXBxYA4jfrr6ij_aviuT5F8iLB3nTUFSg39xwEAlvQ'
  3. // export const userId = '2'
  4. // export const client = ''
  5. // export const userRoleId = ''
  6. let userInfo: undefined | { token: string } = undefined
  7. const localUserInfo = localStorage.getItem('userInfo')
  8. if (localUserInfo) {
  9. userInfo = JSON.parse(localUserInfo)
  10. } else {
  11. showFailToast('本地用户信息不存在')
  12. // userInfo = {
  13. // "user_id": "100",
  14. // "user_name": "tyyxadmin",
  15. // "user_realname": "局管理",
  16. // "user_password": "b923bc037bffebe673963ddd046c7306990ea7aa",
  17. // "user_group_id": "1",
  18. // "user_role_id": "69",
  19. // "user_level_id": "1",
  20. // "user_detail_id": null,
  21. // "user_score": "23",
  22. // "modify_dateline": "1616403054",
  23. // "create_dateline": "1616403054",
  24. // "isdelete": "0",
  25. // "area_id1": "0",
  26. // "area_id2": "0",
  27. // "area_id3": "0",
  28. // "area_id4": "0",
  29. // "sm_id": "0",
  30. // "sm_admin": "0",
  31. // "cm_id": "0",
  32. // "cm_admin": "0",
  33. // "user_phone": "",
  34. // "phone_validation": "0",
  35. // "parent_user_id": null,
  36. // "user_nickname": null,
  37. // "user_avatar": "https://ossdownload.bozedu.net/template/default/static/img/avatar_student_small.png",
  38. // "user_email": null,
  39. // "email_validation": "0",
  40. // "email_token": null,
  41. // "email_token_exptime": null,
  42. // "ischeck": "1",
  43. // "student_no": null,
  44. // "address": null,
  45. // "gender": null,
  46. // "about": null,
  47. // "qq": null,
  48. // "openid": "",
  49. // "webchatopenid": null,
  50. // "user_level": "1",
  51. // "user_birthday": "",
  52. // "grade_id": null,
  53. // "create_user_id": null,
  54. // "user_dept": "",
  55. // "user_cardno": null,
  56. // "dept_id": "",
  57. // "user_eyear": "0",
  58. // "user_grade_num": "0",
  59. // "user_class_num": "0",
  60. // "last_token": null,
  61. // "last_login": null,
  62. // "token": "01c54JHFBaaOkzA6XETYWgkxbxorMrroEyjBLls9Gpcc5BU7634OMG_bLyWXBxYA4jfrr6ij_aviuT5F8iLB3nTUFSg39xwEAlvQ"
  63. // }
  64. }
  65. console.log(userInfo)
  66. export default userInfo