welcome-ext.html 1.2 KB

12345678910111213141516171819202122232425
  1. {template 'common/header'}
  2. <div></div>
  3. <script>
  4. $(function () {
  5. $('.loader').show();
  6. $.ajax({
  7. type: 'POST',
  8. url: "{php echo url('module/welcome/get_module_info', array('m' => $modulename, 'uniacid' => $redirect_uniacid))}",
  9. dataType: 'json',
  10. success: function (data) {
  11. var redirect_url = '';
  12. if (data.message.errno == 0 && data.message.message.module_info.welcome_display) {
  13. redirect_url = "{php echo url('module/welcome/welcome_display', array('m' => $modulename, 'uniacid' => $redirect_uniacid, 'version_id' => intval($_GPC['version_id'])))}";
  14. } else {
  15. redirect_url = "{php echo url('module/welcome/display', array('m' => $modulename, 'uniacid' => $redirect_uniacid, 'version_id' => intval($_GPC['version_id'])))}";
  16. }
  17. location.href = redirect_url;
  18. },
  19. error: function () {
  20. location.href = "{php echo url('module/welcome/display', array('m' => $modulename, 'uniacid' => $redirect_uniacid, 'version_id' => intval($_GPC['version_id'])))}";
  21. },
  22. })
  23. })
  24. </script>
  25. {template 'common/footer'}