1

我浏览了此处的示例,但找不到解决方案?我脑子里想的是我从开发者网站上拿了代码,只在它说我可以的地方添加了我的一点。它加载到除 IE 之外的所有浏览器上。请提供建议,因为这让我很头疼。我在 chrome 和 firefox 上执行错误代码,但它会加载。

错误代码是:未捕获(承诺)取消

我的代码在 javascript 中,同时检查我们的会话是否处于活动状态

<script>

    if (!<?php echo isset($_SESSION['user_id'])?'true':'false'; ?>) {

swal({
  title: "So its your first job request?",
  text: "If you are new here, click CONTINUE to enter your personal details then your job details or click LOGIN",
  type: "info",
  showCancelButton: true,
  confirmButtonColor: '#3085d6',
  cancelButtonColor: '#d33',
  confirmButtonText: 'No, LOGIN!',
  cancelButtonText: 'CONTINUE'
}).then(function () {

 window.location.replace("login"); 
})

      $('#progress').show();
      $('#your-details').show();
      $('#status-register').show();
      $('#start2').show(); 

    } else {
      $('#your-details').hide();
      $('#status-pickup').show();  
      $('#progress').show();
      $('#pickup-details').show(); 
      $('#start1').show(); 
    }   
      $('#bottom-stuff').show();    
</script>

任何帮助都会帮助我拔掉头发,谢谢

4

1 回答 1

-3

要解决此问题,只需添加此

<script src="https://cdnjs.cloudflare.com/ajax/libs/core-js/2.4.1/core.js"></script>
于 2017-05-30T13:35:51.417 回答