@extscreen/es-core 1.1.29 → 1.1.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +45 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -466,6 +466,11 @@ class ESNetworkModule {
|
|
466
466
|
return Vue.Native.callNativeWithPromise('AndroidNetworkModule',
|
467
467
|
'getActiveNetworkInfo');
|
468
468
|
}
|
469
|
+
|
470
|
+
getWifiInfo() {
|
471
|
+
return Vue.Native.callNativeWithPromise('AndroidNetworkModule',
|
472
|
+
'getWifiInfo');
|
473
|
+
}
|
469
474
|
}
|
470
475
|
|
471
476
|
var ESNetworkModule$1 = new ESNetworkModule();
|
@@ -517,6 +522,10 @@ class ESNetworkManager {
|
|
517
522
|
getNetworkType() {
|
518
523
|
return this._networkInfo.type;
|
519
524
|
}
|
525
|
+
|
526
|
+
getWifiInfo() {
|
527
|
+
return ESNetworkModule$1.getWifiInfo();
|
528
|
+
}
|
520
529
|
}
|
521
530
|
|
522
531
|
var ESNetworkManager$1 = new ESNetworkManager();
|
@@ -1990,6 +1999,11 @@ class ESRouterLifecycleManager {
|
|
1990
1999
|
return route.lifecycle.instance;
|
1991
2000
|
}
|
1992
2001
|
|
2002
|
+
/**
|
2003
|
+
*
|
2004
|
+
* @param route
|
2005
|
+
* @param event
|
2006
|
+
*/
|
1993
2007
|
onESRouterLifecycleChanged(route, event) {
|
1994
2008
|
let componentInstance = this.getComponentInstance(route);
|
1995
2009
|
let lifecycleChanged = this.isFunction(componentInstance.onESLifecycleChanged);
|
@@ -2054,6 +2068,23 @@ class ESRouterLifecycleManager {
|
|
2054
2068
|
}
|
2055
2069
|
}
|
2056
2070
|
|
2071
|
+
/**
|
2072
|
+
*
|
2073
|
+
* @param route
|
2074
|
+
* @param params
|
2075
|
+
*/
|
2076
|
+
onESRouterLifecycleNewIntent(route, params) {
|
2077
|
+
let componentInstance = this.getComponentInstance(route);
|
2078
|
+
let lifecycleChanged = this.isFunction(componentInstance.onESNewIntent);
|
2079
|
+
if (componentInstance && lifecycleChanged) {
|
2080
|
+
componentInstance.onESNewIntent(params);
|
2081
|
+
} else {
|
2082
|
+
if (ESLog.isLoggable(ESLog.DEBUG)) {
|
2083
|
+
ESLog.d(TAG$1, '#-------onESRouterLifecycleNewIntent-----实例对象为空------>>>>>');
|
2084
|
+
}
|
2085
|
+
}
|
2086
|
+
}
|
2087
|
+
|
2057
2088
|
isFunction(func) {
|
2058
2089
|
return Object.prototype.toString.call(func) === '[object Function]';
|
2059
2090
|
}
|
@@ -2080,11 +2111,13 @@ var ESRouter = {
|
|
2080
2111
|
ESApp.$on('hardwareBackPress', this.onESRouterBackPressed);
|
2081
2112
|
ESApp.$on('DispatchKeyEvent', this.onESRouterDispatchKeyEvent);
|
2082
2113
|
ESApp.$on('LifecycleChange', this.onESRouterLifecycleChanged);
|
2114
|
+
ESApp.$on('OnNewIntent', this.onESRouterLifecycleNewIntent);
|
2083
2115
|
},
|
2084
2116
|
beforeDestroy() {
|
2085
2117
|
ESApp.$off('hardwareBackPress', this.onESRouterBackPressed);
|
2086
2118
|
ESApp.$off('DispatchKeyEvent', this.onESRouterDispatchKeyEvent);
|
2087
2119
|
ESApp.$off('LifecycleChange', this.onESRouterLifecycleChanged);
|
2120
|
+
ESApp.$off('OnNewIntent', this.onESRouterLifecycleNewIntent);
|
2088
2121
|
},
|
2089
2122
|
|
2090
2123
|
methods: {
|
@@ -2122,6 +2155,18 @@ var ESRouter = {
|
|
2122
2155
|
ESRouterLifecycleManager$1.onESRouterLifecycleChanged(route, event);
|
2123
2156
|
}
|
2124
2157
|
},
|
2158
|
+
|
2159
|
+
//---------------------------onNewIntent--------------------------------
|
2160
|
+
onESRouterLifecycleNewIntent(intent) {
|
2161
|
+
if (ESLog.isLoggable(ESLog.DEBUG)) {
|
2162
|
+
ESLog.d(TAG, '#-------onESRouterLifecycleNewIntent----->>>>>' + intent);
|
2163
|
+
}
|
2164
|
+
let router = this.$router;
|
2165
|
+
if (router) {
|
2166
|
+
let route = router.currentRoute;
|
2167
|
+
ESRouterLifecycleManager$1.onESRouterLifecycleNewIntent(route, intent.params);
|
2168
|
+
}
|
2169
|
+
}
|
2125
2170
|
},
|
2126
2171
|
};
|
2127
2172
|
|