You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

49 lines
1.6 KiB

  1. (function () {
  2. var page = {
  3. isScroll: true,
  4. init: function ($page) {
  5. // 获取登录者信息
  6. var userinfo = learun.storage.get('userinfo');
  7. var baseinfo = userinfo.baseinfo;
  8. $page.find('img').attr('src', config.webapi + 'learun/adms/user/img?data=' + baseinfo.userId);
  9. $page.find('.account').text(baseinfo.IdentityCardNo);
  10. $page.find('.enCode').text(baseinfo.enCode);
  11. $page.find('.realName').text(baseinfo.realName);
  12. $page.find('.gender').text(baseinfo.gender == 1 ? '男' : '女');
  13. if (baseinfo.companyId) {
  14. learun.clientdata.get('company', {
  15. key: baseinfo.companyId,
  16. callback: function (data) {
  17. $page.find('.company').text(data.name);
  18. }
  19. });
  20. }
  21. if (baseinfo.departmentId) {
  22. learun.clientdata.get('department', {
  23. key: baseinfo.departmentId,
  24. callback: function (data) {
  25. $page.find('.department').text(data.name);
  26. }
  27. });
  28. }
  29. var post = [];
  30. var role = [];
  31. $.each(userinfo.post, function (id, item) {
  32. post.push(item.F_Name);
  33. });
  34. $.each(userinfo.role, function (id, item) {
  35. role.push(item.F_FullName);
  36. });
  37. $page.find('.post').text(String(post));
  38. $page.find('.role').text(String(role));
  39. }
  40. };
  41. return page;
  42. })();