File tree Expand file tree Collapse file tree 1 file changed +17
-9
lines changed Expand file tree Collapse file tree 1 file changed +17
-9
lines changed Original file line number Diff line number Diff line change 111
111
var handler
112
112
var docObj
113
113
var doc
114
+ var output
114
115
115
116
var isSingle = true
116
117
530
531
//显示远程的测试用例文档
531
532
showRemote : function ( show ) {
532
533
App . isRemoteShow = show
533
- App . view = 'markdown'
534
+ vOutput . value = show ? '' : ( output || '' )
535
+ App . showDoc ( )
534
536
535
537
if ( show && App . remotes . length <= 0 ) {
536
538
App . isRemoteShow = false
554
556
555
557
if ( rpObj != null && rpObj . code === 200 ) {
556
558
App . isRemoteShow = true
557
- App . view = 'markdown' //貌似未生效,或者被后面的操作覆盖
558
559
App . remotes = rpObj [ 'Document[]' ]
560
+ vOutput . value = show ? '' : ( output || '' )
561
+ App . showDoc ( )
559
562
560
563
//App.onChange(false)
561
564
}
562
565
} )
563
566
}
564
567
} ,
565
568
569
+ // 设置文档
570
+ showDoc : function ( ) {
571
+ if ( App . setDoc ( doc ) == false ) {
572
+ this . getDoc ( function ( d ) {
573
+ App . setDoc ( d ) ;
574
+ } ) ;
575
+ }
576
+ } ,
577
+
566
578
saveCache : function ( url , key , value ) {
567
579
var cache = this . getCache ( url ) ;
568
580
cache [ key ] = value
687
699
688
700
vInput . value = before ;
689
701
vSend . disabled = false ;
690
- vOutput . value = 'OK,请点击 [发送请求] 按钮来测试。' + code ;
702
+ output = 'OK,请点击 [发送请求] 按钮来测试。' + code ;
703
+ vOutput . value = output
691
704
692
705
693
- // 设置文档
694
- if ( App . setDoc ( doc ) == false ) {
695
- this . getDoc ( function ( d ) {
696
- App . setDoc ( d ) ;
697
- } ) ;
698
- }
706
+ App . showDoc ( )
699
707
700
708
} catch ( e ) {
701
709
log ( e )
You can’t perform that action at this time.
0 commit comments