Commit 6036f357 authored by 李维's avatar 李维

更新接口

parent 58ac8b1b
No preview for this file type
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>form_vue</title><script defer="defer" src="js/chunk-vendors.18bbe7ed.js"></script><script defer="defer" src="js/app.ae1b0e28.js"></script><link href="css/chunk-vendors.77489a8d.css" rel="stylesheet"><link href="css/app.703caa6a.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but form_vue doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><script src="https://staging-teach.cdn.ireadabc.com/h5template/h5-static-lib/js/air.js"></script><script>if (document.domain.indexOf("iteachabc.com") > 0) {
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>form_vue</title><script defer="defer" src="js/chunk-vendors.18bbe7ed.js"></script><script defer="defer" src="js/app.20df7838.js"></script><link href="css/chunk-vendors.77489a8d.css" rel="stylesheet"><link href="css/app.703caa6a.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but form_vue doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><script src="https://staging-teach.cdn.ireadabc.com/h5template/h5-static-lib/js/air.js"></script><script>if (document.domain.indexOf("iteachabc.com") > 0) {
document.domain = "iteachabc.com";
}</script><div id="app"></div></body></html>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
const actionName = "getDPEData";
const commonPostMessage = function (messageObj) {
const obj = { ...messageObj, urlParams: window.location.search, origin: "template" }
window.parent.postMessage(obj, '*');
......@@ -12,16 +14,17 @@ export const getDPEData = async function () {
reject("timeout")
}
}, 5000);
const eventCallback = (e) => {
console.log("==3==")
if(e.data.action !== actionName) {
return;
}
processed = true;
window.removeEventListener("message", eventCallback);
clearTimeout(timeoutId);
resolve(e)
}
console.log("==1==")
commonPostMessage({ action: "getDPEData", data: window.location.search });
console.log("==2==")
commonPostMessage({ action: actionName, data: window.location.search });
window.addEventListener("message", eventCallback)
})
}
\ No newline at end of file
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