添加协议html

This commit is contained in:
zhujunshuai 2023-02-22 10:33:08 +08:00
parent 3010cd58f3
commit 1934140263
1 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,40 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title></title>
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
</head>
<body>
<div class="contaier"></div>
<script>
// 获取url参数
function getQueryString(url, name) {
var reg = new RegExp('(^|&|/?)' + name + '=([^&|/?]*)(&|/?|$)', 'i')
var r = url.substr(1).match(reg)
if (r != null) {
return r[2]
}
return null;
}
let type = getQueryString(location.href, 'type') || 0; // 0用户协议 3隐私协议
$.ajax('https://ky.sxczgkj.cn/api/agreement/getAgreementOne', {
method: 'get',
data: {
discern: type
},
success: res => {
$(document).prop('title', res.data.name)
$('.contaier').html(res.data.content)
}
})
</script>
</body>
</html>