diff --git a/fssc/fssc b/fssc/fssc index 6d03f3d..f2995c8 100644 Binary files a/fssc/fssc and b/fssc/fssc differ diff --git a/fssc/internal/handler/nfhandler.go b/fssc/internal/handler/nfhandler.go index f8a1d2f..7b7b42a 100644 --- a/fssc/internal/handler/nfhandler.go +++ b/fssc/internal/handler/nfhandler.go @@ -20,7 +20,7 @@ type Response struct { // 文件输出的结构 type FileJson struct { Fname string `json:"fname"` - Dirflag int `json:dirflag` + Dirflag bool `json:"dirflag"` } type FilesListJson struct { @@ -69,12 +69,14 @@ func NfTest(w http.ResponseWriter, r *http.Request) { // data.Files = files for _, v := range files { - flist.Flist = append(flist.Flist, FileJson{Fname: v.Name(), Dirflag: 1}) + + // drflag:= v.IsDir()?"1":"0" + flist.Flist = append(flist.Flist, FileJson{Fname: v.Name(), Dirflag: v.IsDir()}) } } else { - //data.FileName = filepath.Base(realFilePath) - flist.Flist = append(flist.Flist, FileJson{Fname: filepath.Base(realFilePath), Dirflag: 0}) + data.FileName = filepath.Base(realFilePath) + // flist.Flist = append(flist.Flist, FileJson{Fname: filepath.Base(realFilePath), Dirflag: "1"}) } // respone file list diff --git a/fssc/web/wbconsole.tmpl b/fssc/web/wbconsole.tmpl index caebc01..296eacf 100644 --- a/fssc/web/wbconsole.tmpl +++ b/fssc/web/wbconsole.tmpl @@ -21,6 +21,11 @@ overflow:scroll; } + .flist{ + height:360px; + overflow:auto; + } + .icon { display: inline-block; width: 24px; @@ -57,21 +62,13 @@