高章伟
2022-03-18 4bfe21c4b5ddc089ae5a95f4b10f6cff148b690d
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
26
27
<apex:page showHeader="false" sidebar="false" id="test01" title="1.相关性确认">
    <apex:includeLightning />
    <div style="width:100%;height:100%;" id="test01Container" />
    <script>
        $Lightning.use("c:test01App", function () {
            $Lightning.createComponent("c:relevant",
                {},
                "test01Container",
                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>