vipexam no ip limit

中科vipexam no ip limit

当前为 2019-12-05 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name vipexam no ip limit
  3. // @namespace https://github.com/maiersk
  4. // @version 0.1
  5. // @description 中科vipexam no ip limit
  6. // @author ABTTEX
  7. // @match http://lib.vipexam.org/*
  8. // @match http://lib.vipexam.cn/*
  9. // @match http://vipexam.org/*
  10. // @match http://vipexam.cn/*
  11. // @require https://code.jquery.com/jquery-3.4.1.min.js
  12. // ==/UserScript==
  13.  
  14. (function() {
  15. 'use strict';
  16.  
  17. var _vipexam = null;
  18.  
  19. layui.use(['form','layer','jquery','cookie'], function(){
  20. var $ = layui.jquery,
  21. form = layui.form,
  22. layer = layui.layer,
  23. cookie = layui.cookie;
  24.  
  25. _vipexam = $.cookie("vipexam");
  26. var _storage = !!_vipexam ? JSON.parse(_vipexam) : _veuser;
  27. var _vid = _storage.user.account;
  28.  
  29. function RequestJson(url, params, callback) {
  30. var _idx = layer.load(1);
  31. $.ajax({ type: "post", data: params, url: url, dataType: "json", global: false, success: function (data) { callback && callback(data); }, complete: function () { layer.close(_idx); },error:function (XMLHttpRequest, textStatus, errorThrown){layer.close(_idx);} });
  32. }
  33.  
  34. //代替原有登录(不可用)function
  35. form.on('submit(crashlogin)', function(data){
  36. _vid = $("#username").val();
  37. //ipValidates();
  38. RequestJson("user/login.action",{account:$("#username").val(),password:$("#password").val()},function(data){
  39. if(data.code == "1"){
  40. //if(_flag){
  41. //alert(JSON.stringify(data))
  42. $.cookie("vipexam", JSON.stringify(data), { path: '/', expires: 7});
  43. _vipexam = $.cookie("vipexam");
  44. document.location = "index.html";
  45. //}else{
  46. // layer.msg("抱歉!IP:"+_ip+" 不在系统授权范围内!",{icon:2});
  47. //}
  48. }else{
  49. layer.msg(data.msg,{icon:2});
  50. }
  51. });
  52. return false;
  53. });
  54.  
  55. //关闭ip问题弹窗
  56. $(function(){
  57. setTimeout(function () {
  58. layer.closeAll();
  59. }, 350);
  60. });
  61.  
  62. //显示已登录(不可用)信息
  63. if(_vid != "f46354b31ec64c9c96919e12a9bbd610"){
  64. $("#person").text(_vid);
  65. $("#rtbox").hide();
  66. $("#rtbox2").show();
  67. }
  68. });
  69.  
  70. $(document).ready(function() {
  71.  
  72. var div = $(".layui-form-item-center")
  73. var buthtml = '<input type="button" id="crashlogin" lay-submit lay-filter="crashlogin" value="crashlogin" />';
  74. //var buthtml = '<input type="button" id="crashlogin" value="crashlogin" />';
  75. div.append(buthtml);
  76.  
  77. // var but = $("#crashlogin")
  78.  
  79. // _vipexam = ""
  80.  
  81. // but.click(function(){
  82. // alert(JSON.stringify({account:$("#username").val(),password:$("#password").val()}))
  83. // $.ajax({
  84. // type: "post",
  85. // data: {account:$("#username").val(),password:$("#password").val()},
  86. // url: "user/login.action",
  87. // dataType: "json",
  88. // global: false,
  89. // success: function (data) {
  90. // if(data.code == "1"){
  91.  
  92. // alert(JSON.stringify(data))
  93. // $.cookie("vipexam", JSON.stringify(data), { path: '/', expires: 7});
  94. // _vipexam = $.cookie("vipexam");
  95. // document.location = "index.html";
  96.  
  97.  
  98. // }else{
  99. // layer.msg(data.msg,{icon:2});
  100. // }
  101. // },
  102. // complete: function () { },
  103. // error:function (XMLHttpRequest, textStatus, errorThrown){ }
  104. // });
  105. // })
  106.  
  107. })
  108.  
  109. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址