Skip to content

Commit 6bf8fff

Browse files
author
spawn
committed
终于能用了
1 parent e2a0365 commit 6bf8fff

File tree

7 files changed

+18
-11
lines changed

7 files changed

+18
-11
lines changed

android/debug_tools/src/main/assets/debug-web/3rdpartylicenses.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ MIT
55
date-fns is licensed under the [MIT license](http://kossnocorp.mit-license.org).
66
Read more about MIT at [TLDRLegal](https://tldrlegal.com/license/mit-license).
77

8+
9+
MIT
10+
MIT
11+
812
913
Apache-2.0
1014
Apache License
@@ -209,10 +213,6 @@ Apache License
209213
See the License for the specific language governing permissions and
210214
limitations under the License.
211215

212-
213-
MIT
214-
MIT
215-
216216
217217
MIT
218218
Copyright (c) 2014-2018 Denis Pushkarev

android/debug_tools/src/main/assets/debug-web/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
<link rel="stylesheet" href="styles.db23d37346ec7e86d55f.css"></head>
1111
<body>
1212
<app-root></app-root>
13-
<script type="text/javascript" src="runtime.ec2944dd8b20ec099bf3.js"></script><script type="text/javascript" src="polyfills.f6ae3e8b63939c618130.js"></script><script type="text/javascript" src="main.6ca4e1189142b991d96e.js"></script></body>
13+
<script type="text/javascript" src="runtime.ec2944dd8b20ec099bf3.js"></script><script type="text/javascript" src="polyfills.f6ae3e8b63939c618130.js"></script><script type="text/javascript" src="main.a0dbf664f5755081c54b.js"></script></body>
1414
</html>

android/debug_tools/src/main/assets/debug-web/main.a0dbf664f5755081c54b.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android/debug_tools/src/main/assets/debug-web/styles.db23d37346ec7e86d55f.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android/debug_tools/src/main/java/io/lecon/debugtools/utils/Utils.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
import java.net.SocketException;
1717
import java.util.Enumeration;
1818

19+
import static io.lecon.debugtools.route.RouteDispatcher.WEB_FOLDER;
20+
1921
/**
2022
* Created by spawn on 17-9-28.
2123
*/
@@ -94,7 +96,7 @@ public static byte[] loadAssetContent(String filePath, AssetManager assetManager
9496
output.flush();
9597
return output.toByteArray();
9698
} catch (FileNotFoundException e) {
97-
return null;
99+
return loadAssetContent(WEB_FOLDER + "/index.html",assetManager);
98100
} finally {
99101
try {
100102
if (null != input) {

web/src/app/services/api-services.service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {QueryBeanResp} from './pojo/QueryBeanResp';
99
import {BaseResponse} from './pojo/BaseResponse';
1010
import {FileListObj} from './pojo/FileListObj';
1111
import {VersionObj} from './pojo/VersionObj';
12+
import {environment} from '../../environments/environment';
1213

1314
const httpOptions = {
1415
headers: new HttpHeaders({
@@ -17,7 +18,7 @@ const httpOptions = {
1718
};
1819

1920
export class Urls {
20-
static baseUrl = 'http://127.0.0.1:8089/';
21+
static baseUrl = environment.production ? 'http://' + window.location.host + '/' : 'http://127.0.0.1:8089/';
2122
static dbUrl = Urls.baseUrl + 'db/';
2223
static diskUrl = Urls.baseUrl + 'disk/';
2324
static LIST_DATABSE = Urls.dbUrl + 'listDatabase';

web/src/main.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import { enableProdMode } from '@angular/core';
2-
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
1+
import {enableProdMode} from '@angular/core';
2+
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
33

4-
import { AppModule } from './app/app.module';
5-
import { environment } from './environments/environment';
4+
import {AppModule} from './app/app.module';
5+
import {environment} from './environments/environment';
6+
import {Urls} from './app/services/api-services.service';
67

78
if (environment.production) {
89
enableProdMode();
@@ -11,3 +12,4 @@ if (environment.production) {
1112
platformBrowserDynamic().bootstrapModule(AppModule)
1213
.catch(err => console.error(err));
1314

15+
console.log(Urls.baseUrl);

0 commit comments

Comments
 (0)