File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 382
382
var vTransfer = document . getElementById ( "vTransfer" ) ;
383
383
var vSend = document . getElementById ( "vSend" ) ;
384
384
385
- vUrl . value = new String ( URL_GET ) ; //main.js里访问不到,可能是script引用顺序问题
385
+ vUrl . value = new String ( URL_BASE + '/get' ) ; //main.js里访问不到,可能是script引用顺序问题
386
386
387
387
var vMarkdown = document . getElementById ( 'vMarkdown' ) ;
388
388
Original file line number Diff line number Diff line change 256
256
//设置基地址
257
257
setBaseUrl : function ( ) {
258
258
// 重新拉取文档
259
- if ( baseUrl != this . getBaseUrl ( ) ) {
260
- baseUrl = this . getBaseUrl ( ) ;
259
+ var bu = this . getBaseUrl ( )
260
+ if ( baseUrl != bu ) {
261
+ baseUrl = bu ;
261
262
doc = null
262
263
this . User = this . getCache ( baseUrl , 'User' ) || { }
263
264
this . remotes = [ ]
265
+ this . saveCache ( '' , 'URL_BASE' , baseUrl )
264
266
}
265
267
} ,
266
268
//获取基地址
1347
1349
}
1348
1350
} ,
1349
1351
created ( ) {
1352
+ try { //可能URL_BASE是const类型,不允许改,这里是初始化,不能出错
1353
+ var url = this . getCache ( '' , 'URL_BASE' )
1354
+ if ( StringUtil . isEmpty ( url , true ) == false ) {
1355
+ URL_BASE = url
1356
+ }
1357
+ } catch ( e ) {
1358
+ console . log ( 'created try { ' +
1359
+ '\nURL_BASE = this.getCache(, URL_BASE)' +
1360
+ '\n} catch (e) {\n' + e . message )
1361
+ }
1362
+ //无效,只能在index里设置 vUrl.value = this.getCache('', 'URL_BASE')
1350
1363
this . listHistory ( )
1351
1364
this . transfer ( )
1352
1365
}
You can’t perform that action at this time.
0 commit comments