waitingQueue.min.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. (function (d) {
  2. config.init();
  3. var a = {
  4. idx: [1, 6, 7, 8],
  5. count: 4,
  6. current: 8
  7. };
  8. icoNavFx.doing(d("#nav_bottom"), a);
  9. var wait = 180;
  10. var c = {
  11. hospitalId: "1000"
  12. };
  13. var b = {
  14. doing: function () {
  15. d.extend(c, {
  16. customerFamilyId: JSON.parse(d("#familyList .selected a").attr("data")).id
  17. });
  18. hzAPI.getData(window.apiUrl+"?c=ReqHis&a=waitingQueue", c, "#list ul", 1, true, null, null, "无就诊记录",b.updateTimer());
  19. },
  20. updateTimer: function () {
  21. if (wait == 0) {
  22. // wait = 0;
  23. b.doing();
  24. wait = 180;
  25. } else {
  26. wait--;
  27. setTimeout(function () {
  28. b.updateTimer()
  29. }, 1000);
  30. }
  31. $("#timeOut").html(wait);
  32. }
  33. };
  34. //2017年1月4日17:39:17 新增的排队候诊信息
  35. d("#wqReload").on("click",
  36. function () {
  37. if (wait == 0) {
  38. b.doing();
  39. wait = 180;
  40. }
  41. })
  42. window.reload = b;
  43. hzAPI.getData(window.apiUrl+"?c=Index&a=customerFamilyList", {
  44. idCk: Fx.getUrlParam("id")
  45. },
  46. "#familyList", 0, true, 4, true)
  47. })(Zepto);