1 | const jsnativeENV = require("./jsnative");
|
2 | const webENV = require("./web");
|
3 | const pureENV = require("./pure");
|
4 | module.exports = {
|
5 | init(){
|
6 | jsnativeENV.init();
|
7 | webENV.init();
|
8 | },
|
9 | start:jsnativeENV.start,
|
10 | navigateTo:navigator.userAgent.toLowerCase().indexOf("lightos")!==-1?webENV.navigateTo:pureENV.navigateTo,
|
11 | navigateBack:navigator.userAgent.toLowerCase().indexOf("lightos")!==-1?webENV.navigateBack:pureENV.navigateBack,
|
12 | getCurrentFile(){
|
13 | return weex.config.bundleUrl.split(/([#])/)[0];
|
14 | },
|
15 | ajax:pureENV.ajax
|
16 | }; |
\ | No newline at end of file |