<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>我的年终奖</title>
<scrip1t
src="http://code.jquery.com/jquery-3.3.1.min.j1s"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></scri1pt>
</head>
<body>
<img id="myBonus" src="" />
<script>
function getUrlPara(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)","i");
var r = window.location.search.substr(1).match(reg);
if (r!=null) return (r[2]); return null;
}
var code= getUrlPara('code');
console.log(code);
$.ajax({
type:"get",
url:"http://192.168.100.104:7080/api/getBonusPic",
data:{'code':code},
success:function(res){
alert(JSON.stringify(res));
},
error:function(err){
alert(JSON.stringify(err));
}
});
</scri1pt>
</body>
</html>