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.

StudentQRCode.js 2.1 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. (function () {
  2. var keyValue = '';
  3. var $header = null;
  4. var page = {
  5. isScroll: true,
  6. init: function ($page, param) {
  7. keyValue = param.keyValue;
  8. // 添加头部按钮列表
  9. $header = $page.parents('.f-page').find('.f-page-header');
  10. // 取消
  11. $page.find('#aa').on('tap', function () {
  12. learun.nav.go({ path: 'EducationalAdministration/StudentQRCode/Normal', title: '正常', type: 'right' });
  13. });
  14. $page.find('#bb').on('tap', function () {
  15. learun.nav.go({ path: 'EducationalAdministration/StudentQRCode/AbNormalWeak', title: '异常微弱', type: 'right' });
  16. });
  17. $page.find('#cc').on('tap', function () {
  18. learun.nav.go({ path: 'EducationalAdministration/StudentQRCode/AbNormalSerious', title: '异常严重', type: 'right' });
  19. });
  20. var logininfo = learun.storage.get('userinfo');
  21. //learun.httpget(config.webapi + 'learun/EducationalAdministration/StuInfoBasic/stuinfoDetail',logininfo.baseinfo.account, function (data) {
  22. learun.httpget(config.webapi + 'learun/adms/EducationalAdministration/StuInfoBasic/stuinfoDetail','2018010108', function (data) {
  23. console.log(data);
  24. $('.sQrList div strong').eq(0).html(data.stuInfo.StuName);
  25. $('.sQrList div strong').eq(1).html(data.majorInfo.MajorName);
  26. $('.sQrList div strong').eq(2).html(data.classInfo.ClassName);
  27. $('.sQrList div strong').eq(3).html(data.stuInfo.StuNo);
  28. $('.sQrList div strong').eq(4).html(data.roomInfo);
  29. //$('.sQrList div strong').eq(4).html(data.stuInfo.Photo); //学生照片
  30. learun.code.encode({ id: 'lr_mycode_qrcode', text: data.stuInfo.StuNo });
  31. })
  32. //learun.code.encode({ id: 'lr_mycode_qrcode', text: '2019010211' });
  33. },
  34. bind: function ($page, param) {
  35. }, destroy: function (pageinfo) {
  36. $header = null;
  37. keyValue = '';
  38. }
  39. };
  40. //上传照片
  41. return page;
  42. })();