Commit 39943843 authored by 刘春鲜's avatar 刘春鲜

feat(电子签章): 接口调用延迟

parent a6bc60c5
...@@ -7,15 +7,17 @@ ...@@ -7,15 +7,17 @@
<script src="util.js"></script> <script src="util.js"></script>
</head> </head>
<body> <body>
<div>合同签订中...</div> <div>证书申请中...</div>
<script> <script>
window.onload = function () { window.onload = function () {
const studentId = getQueryString('studentId') const studentId = getQueryString('studentId')
const schoolAreaId = getQueryString('schoolAreaId') const schoolAreaId = getQueryString('schoolAreaId')
const type = getQueryString('type') const type = getQueryString('type')
if (studentId && schoolAreaId) { if (studentId && schoolAreaId) {
sendMessage({ type: 'batchPageUrl', __callback__: '__callback__', data: { studentId, schoolAreaId }}) setTimeout(() => { // 后端说 延迟3s 调借口
sendMessage({ type: 'batchPageUrl', __callback__: '__callback__', data: { studentId, schoolAreaId }})
}, 3000);
} }
if (type) { if (type) {
......
...@@ -19,6 +19,7 @@ const sendMessage = (data) => { ...@@ -19,6 +19,7 @@ const sendMessage = (data) => {
const getQueryString = (name) => { const getQueryString = (name) => {
const reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i'); const reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
const r = window.location.search.substr(1).match(reg); const r = window.location.search.substr(1).match(reg);
if (r != null) { if (r != null) {
return unescape(r[2]); return unescape(r[2]);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment