Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

发现一个或许有用的API #6

Closed
recolic opened this issue Jun 4, 2020 · 4 comments
Closed

发现一个或许有用的API #6

recolic opened this issue Jun 4, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@recolic
Copy link

recolic commented Jun 4, 2020

我注意到, https://health.hust.edu.cn/new_jp/jp/home/getRedPoint这个API可以检测, 这个学生这一天有没有提交成功. 它返回当天提交过体温的次数, 或许会有用.
这个API是在这里发现的, 华科官方用的解析代码如下(就是RECORD TIME有用)

//判断是否需要健康上报
Util.ajax({
    url : contextpath+"/jp/home/getRedPoint",//后台的请求路径
    param :{} ,
    success : function(data){
        if (data.ID_TYPE == '1'||data.ID_TYPE == '2'||data.ID_TYPE == '3' ){
            if (data.RECORD_TIMES > 0){
                $("#redpoint").hide();
                $("#day-health").unbind("click").click(function(){
                    Msg.error('今日已上报!');
                });
                $("#redpoint_h").hide();
            }else{
                $("#day-health").unbind("click").click(function(){
                    window.location.href=css_path+"/h6?m=jp#act=jp/healthreport";
                });
                $("#redpoint").show();
                $("#redpoint_h").show();
            }
        }else {
            if (data.RECORD_TIME > 0){
                $("#redpoint").hide();
                $("#redpoint_h").hide();
                $("#day-health").unbind("click").click(function(){
                    Msg.error('今日已上报!');
                });
            }else{
                $("#day-health").unbind("click").click(function(){
                    window.location.href=css_path+"/h6?m=jp#act=jp/temporary";
                });
                $("#redpoint").show();
                $("#redpoint_h").show();
            }
        }
    }
});

附送一个HAR.
hust-ncov-detect.har.txt

@winderica
Copy link
Owner

感谢,之后看一下

@winderica winderica added the enhancement New feature or request label Jun 4, 2020
@winderica
Copy link
Owner

目前加了简单的验证,只是为了防止重复提交,没有考虑未提交、补交的情况。

如果有需要可以再open😉。

@recolic
Copy link
Author

recolic commented Jun 5, 2020

其实我是有一种担忧。如果有一天,华科突然把api改了,然后学生填报失败,自己都不知道。就没办法返校了)

@winderica
Copy link
Owner

winderica commented Jun 5, 2020

确实,这点只能自己定期检查一下。
不过脚本这件事校方应该是知道的,改API也需要成本,所以就没有动。而且现在大三及以下的返校方案还不确定(至少我不知道),估计到时候填报情况也不会有太大影响。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants