NativePay.js 565 B

12345678910111213141516171819202122
  1. var windowID;
  2. var timer;
  3. //加载
  4. $(function () {
  5. windowID = $.SystemGeneral.getUrlParam("WindowID");
  6. timer = setInterval(checkOrderScanned, 3000);
  7. })
  8. function checkOrderScanned() {
  9. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/Alipay/CheckOrderScanned', { productId: productId }, function (data) {
  10. if (data) {
  11. clearInterval(timer);
  12. top.$("#" + windowID).data("resultData", true);
  13. top.$("#" + windowID).dialog("close");
  14. }
  15. });
  16. }
  17. $(window).unload(function () {
  18. clearInterval(timer);
  19. });