tzqdn/qt/show-qt.html
2024-02-28 15:42:52 +08:00

245 lines
11 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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>
<link rel="stylesheet" href="../css/01.css">
<link rel="stylesheet" href="../css/bootstrap.min.css">
<script src="../js/jquery.js"></script>
<script type="text/javascript" src="../js/qrcode.js"></script>
<script src="../js/bootstrap.bundle.min.js"></script>
</head>
<body>
<div class="container-01">
<div class="Background">
<!--返回箭头-->
<div class="column_01 fw-bold text-center text-truncate">
<div class="return_Arrow">
<a href="../qt/list.html">
<img src="../image/zuojiantou.png">
</a>
</div>
</div>
<!--内容区-->
<div style="background:linear-gradient(45deg,#81acec,skyblue,#fff);height: 95%;">
<div style="height: 100%;overflow-y:scroll;padding:0 32px;">
<div id="neirong" style="font-size: 16px; line-height: 30px; margin-top: 20px; margin-bottom: 20px;"></div>
<!--二维码和底部信息-->
</div>
</div>
</div>
</div>
<script type="text/javascript">
// 获取URL参数并解析值
var id = new URLSearchParams(window.location.search).get('id');
console.log(id);
// 基于ID值进行数据查询和展示
var token = '';
$.ajax({
url: 'https://qdngz.guizhoujc.com/seeyon/rest/token/test/6fc1c885-3aac-4489-95f0-7b6923622743',
dataType: 'xml',
success: function(data) {
$(data).find('UserToken').each(function() {
token = $(this).find('id').text(); // 将获取到的Token保存到变量中
});
},
error: function() {
console.log('Error loading XML document');
}
}).done(function() {
if (token !== '') {
$.ajax({
url: 'https://qdngz.guizhoujc.com/seeyon/rest/dee/task/getOther', // 数据获取的URL
dataType: 'xml',
data: {
token: token,
id: id // 传递ID查询参数
},
success: function(data) { // 成功回调函数
// 解析返回的数据并展示到页面上
console.log(data);
$(data).find('row').each(function() {
var ID = $(this).find('ID').text();
var xmmc = $(this).find('FIELD0001').text();
var row1=`${xmmc}`
$('.column_01').append(row1);
if (id === ID) {
console.log(ID+'通过ID出来了')
var xmmc = $(this).find('FIELD0001').text();
var hylb = $(this).find('FIELD0046').text();
var cylb = $(this).find('FIELD0047').text();
var jsxz = $(this).find('FIELD0048').text();
var hzfs = $(this).find('FIELD0049').text();
var jstj = $(this).find('FIELD0006').text();
var cytj = $(this).find('FIELD0007').text();
var scqjyc = $(this).find('FIELD0008').text();
var xmxzjgm = $(this).find('FIELD0009').text();
var zdmj = $(this).find('FIELD0010').text();
var jzmj = $(this).find('FIELD0011').text();
var qksm = $(this).find('FIELD0012').text();
var xmjslr = $(this).find('FIELD0013').text();
var ztze = $(this).find('FIELD0014').text();
var yzje = $(this).find('FIELD0015').text();
var tzhsq = $(this).find('FIELD0017').text();
var nyysr = $(this).find('FIELD0018').text();
var nll = $(this).find('FIELD0019').text();
var tzlrl = $(this).find('FIELD0020').text();
var yhzcjfctj = $(this).find('FIELD0022').text();
var yzdwmc = $(this).find('FIELD0032').text();
var yzdwdz = $(this).find('FIELD0033').text();
var yzdwyb = $(this).find('FIELD0035').text();
var yzdwlxr = $(this).find('FIELD0035').text();
var yzdwzj = $(this).find('FIELD0036').text();
var yzdwsj = $(this).find('FIELD0037').text();
var row = `
<p style="margin-bottom: 5px;">
<span style="font-weight: bold;">项目名称:</span>
<span>${xmmc}</span>
</p>
<p style="margin-bottom: 5px;">
<span style="font-weight: bold;">行业类别:</span>
<span>${hylb}</span>
</p>
<p style="margin-bottom: 5px;">
<span style="font-weight: bold;">产业类别:</span>
<span>${cylb}</span>
</p>
<p style="margin-bottom: 5px;">
<span style="font-weight: bold;">建设性质:</span>
<span>${jsxz}</span>
</p>
<p style="margin-bottom: 5px;">
<span style="font-weight: bold;">合作方式:</span>
<span>${hzfs}</span>
</p>
<p style="margin-bottom: 5px;">
<span style="font-weight: bold;">建设条件:</span>
<span>${jstj}</span>
</p>
<p style="margin-bottom: 5px;">
<span style="font-weight: bold;">产业条件:</span>
<span>${cytj}</span>
</p>
<p style="margin-bottom: 5px;">
<span style="font-weight: bold;">市场前景预测:</span>
<span>${scqjyc}</span>
</p>
<p style="margin-bottom: 5px;">
<span style="font-weight: bold;">项目选址及规模:</span>
<span>${xmxzjgm}</span>
</p>
<p style="margin-bottom: 5px;">
<span style="font-weight: bold;">项目建设内容:</span>
<span>${xmjslr}</span>
</p>
<p style="margin-bottom: 5px;">
<span style="font-weight: bold;">总投资额:</span>
<span>${ztze}</span>
</p>
<p style="margin-bottom: 5px;">
<span style="font-weight: bold;">引资金额:</span>
<span>${yzje}</span>
</p>
<p style="margin-bottom: 5px;">
<span style="font-weight: bold;">投资回收期:</span>
<span>${tzhsq}</span>
</p>
<p style="margin-bottom: 5px;">
<span style="font-weight: bold;">年营业收入:</span>
<span>${nyysr}</span>
</p>
<p style="margin-bottom: 5px;">
<span style="font-weight: bold;">年利润:</span>
<span>${nll}</span>
</p>
<p style="margin-bottom: 5px;">
<span style="font-weight: bold;">投资利润率:</span>
<span>${tzlrl}</span>
</p>
<p style="margin-bottom: 5px;">
<span style="font-weight: bold;">优惠政策及扶持条件:</span>
<span>${yhzcjfctj}</span>
</p>
<p style="margin-bottom: 5px;">
<span style="font-weight: bold;">项目服务单位名称:</span>
<span>${yzdwmc}</span>
</p>
<p style="margin-bottom: 5px;">
<span style="font-weight: bold;">项目服务单位地址:</span>
<span>${yzdwdz}</span>
</p>
<p style="margin-bottom: 5px;">
<span style="font-weight: bold;">项目服务单位联系人:</span>
<span>${yzdwlxr}</span>
</p>
<p style="margin-bottom: 5px;">
<span style="font-weight: bold;">项目服务单位座机:</span>
<span>${yzdwzj}</span>
</p>
<p style="margin-bottom: 5px;">
<span style="font-weight: bold;">项目服务单位手机:</span>
<span>${yzdwsj}</span>
</p>
<div style="height: 40%;background-image: url(../image/download.png);background-size: cover;width: 100%;">
<!--左放二维码-->
<div style="width: 40%;float: left;height: 100%;">
<div id="codeDiv" class="erweima">
<div id="qrcode"></div>
</div>
</div>
<!--右放信息-->
<div style="width:60%;float: right;overflow: hidden;">
<!--文本-->
<div class="text_0" style="margin-top: 30px;margin-left: 20px;">
<h5 class="text_01">黔东南州投资促进局</h5>
<p class="text_01">招商热线4008-799399</p>
<p class="text_01">http://tzcj.qdn.gov.cn</p>
<div class="erweima_02">
<img src="../image/1679366979689.jpg">
</div>
<p class="text_01" style="font-size: small;">长按二维码关注公众号</p>
</div>
</div>
</div>
`
$('#neirong').append(row);
}
})
},
error: function(xhr, status, error) { // 失败回调函数
console.error(error); // 输出错误信息
}
});
}
})
$(document).ready(function() {
// 判断id是否存在
if (id) {
setTimeout(function() {
// 生成二维码
var qrcode = new QRCode("qrcode", {
text:'https://zwy.guizhoujc.com/qt/show-qt.html?id=' + id,
render: "canvas", //渲染方式指定canvas方式
width: 128,
height: 128,
typeNumber: -1, //计算模式
colorDark: "#000000",
colorLight: "#ffffff",
correctLevel: QRCode.CorrectLevel.H
});
}, 100);
} else {
console.log("id is not defined");
}
});
function convertCanvasToImage(canvas) {
var image = new Image();
image.src = canvas.toDataURL("image/png");
return image;
}
</script>
</body>
</html>