|
|
发表于 2023-4-29 11:29:58
|
显示全部楼层
福建省泉州市
https://www.jste.net.cn/uids/jste/getLoginQR.jsp?c=0.38295837262852905 请求这个接口会拿到一个code
{"status":"ok","code":"6279df60013e46b381790b5d8067fdf9"} 这是接口返回的数据
$.getJSON("getLoginQR.jsp?c="+Math.random(),function(data){
if(data["status"]=="ok"){
var qrcode = new QRCode(document.getElementById("divQRCode"), {
width : 250,
height : 250
});
loginCode=data["code"];
qrcode.makeCode("https://www.jste.net.cn/uids/wechat_redirect.jsp?returnURL="+encodeURI("/uids/jste/scanlogin2.jsp?id="+data["code"]));
$("#divQRCode .info").hide();
justRefresh=false;
waitScan();
}else{
$("#divQRCode .info").html("获取二维码出错!"+data["msg"]);
}
})
这是获取并生成二维码的过程 他是通过前端来生成二维码的
二维码的地址 就是这个 qrcode.makeCode("https://www.jste.net.cn/uids/wechat_redirect.jsp?returnURL="+encodeURI("/uids/jste/scanlogin2.jsp?id="+data["code"]));
code 就是最上面请求的接口返回的
|
|