PageSourceSearch

https://static.szwego.com/wsxc_portal/js/entry.js

js szwego.com collected 2026-10-04 00:17:03 UTC 1,925 bytes, 48 lines download raw bytes

1if (!window.__POWERED_BY_QIANKUN__) {
2    window.render && window.render()
3}
4
5window["wsxc_portal"] = {
6    /**
7     * bootstrap 只会在微应用初始化的时候调用一次,下次微应用重新进入时会直接调用 mount 钩子,不会再重复触发 bootstrap。
8     * 通常我们可以在这里做一些全局变量的初始化,比如不会在 unmount 阶段被销毁的应用级别的缓存等。
9     */
10    bootstrap: function (){
11        return Promise.resolve().then(function (){
12            console.log('react app bootstraped');
13        })
14    },
15    /**
16     * 应用每次进入都会调用 mount 方法,通常我们在这里触发应用的渲染方法
17     */
18    mount: function (props){
19        console.log('------ props --> ', props);
20        return Promise.resolve().then(function (){
21            var container = document.getElementById('root')
22            container = props.container
23            var innerContainer = document.createElement('div')
24            innerContainer.id = "container"
25            console.log('------ container --> ', container);
26            console.log('------ window --> ', window);
27            container.appendChild(innerContainer)
28            // root = props.container? ReactDOM.createRoot( props.container as HTMLElement) : root
29            window.render && window.render()
30        })
31    },
32    /**
33     * 应用每次 切出/卸载 会调用的方法,通常在这里我们会卸载微应用的应用实例
34     */
35    unmount: function (){
36        return Promise.resolve().then(function (){
37            ReactDOM && ReactDOM.unmountComponentAtNode(document.getElementById('container')); 
38        })
39    },
40    /**
41     * 可选生命周期钩子,仅使用 loadMicroApp 方式加载微应用时生效
42     */
43    update: function (props){
44        return Promise.resolve().then(function (){
45            console.log('update props', props);
46        })
47    }
48}   

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.