李彤
2023-05-15 19ae52ae3e06c44c646ae6b45dc2b0d7f2cead88
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<apex:page showHeader="false" sidebar="false" id="yb" title="项目终止" lightningStylesheets="true">
    <apex:includeLightning />
    <div style="width:100%;height:100%;" id="TerminateAPP" />
    <script>
        $Lightning.use("c:TerminateAPP", function () {
            $Lightning.createComponent("c:isTerminate",
                {},
                "TerminateAPP",
                function (cmp) {
                    console.log('Component created, do something cool here');
                });
        });
 
        var interval = setInterval(()=>{
            var hrefStr = window.location.href;
            if (hrefStr.indexOf("Refresh") != -1) {
                var arr = hrefStr.split("==");
                window.opener.parent.location.href = "/"+arr[1];
                top.window.close();
                clearInterval(interval);
            }
        },1000);
    </script>
 
</apex:page>