From 73d359b06690a60a2840947740d959c2c84c68b9 Mon Sep 17 00:00:00 2001 From: xc Date: Fri, 5 Sep 2025 12:17:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=96=87=E4=BB=B6=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aufs/core/AuFile.go | 6 +++++- aufs/main.go | 2 +- vue/afvue/src/api/scinfo.js | 6 +++--- vue/afvue/src/views/Dashboard.vue | 2 +- vue/afvue/src/views/Flist.vue | 15 +++++++++++++-- 5 files changed, 23 insertions(+), 8 deletions(-) diff --git a/aufs/core/AuFile.go b/aufs/core/AuFile.go index 86f47f9..a8c5255 100644 --- a/aufs/core/AuFile.go +++ b/aufs/core/AuFile.go @@ -19,11 +19,15 @@ func Flist(w http.ResponseWriter, r *http.Request) { } // 调用远程方法 var reply string - var args = Args{"/www/xt"} + var args = Args{"/www/wwwroot"} err = client.Call("FileRpcService.GetFilePath", args, &reply) if err != nil { fmt.Fprintf(w, "jsonrpc call faild %v", err) return } + // 输出内容 + w.Header().Set("Content-Type", "application/json") + // json.NewEncoder(w).Encode(dtm) + w.Write([]byte(reply)) } diff --git a/aufs/main.go b/aufs/main.go index e4d07d6..15cb0bc 100644 --- a/aufs/main.go +++ b/aufs/main.go @@ -45,7 +45,7 @@ func startWeb() { // 编辑 http.HandleFunc("/scedit", core.Scedit) // 文件列表 - http.HandleFunc("/flsit", core.Flist) + http.HandleFunc("/flist", core.Flist) // 内存信息 http.HandleFunc("/dtmem", core.Dtmem) diff --git a/vue/afvue/src/api/scinfo.js b/vue/afvue/src/api/scinfo.js index 487eb94..022a2f8 100644 --- a/vue/afvue/src/api/scinfo.js +++ b/vue/afvue/src/api/scinfo.js @@ -44,10 +44,10 @@ export function Scedit(data){ } // 文件列表 -export function Flist(data){ +export function GetFileList(param){ return axios({ url: '/flist', - method: 'POST', - data + method: 'get', + params: param }) } diff --git a/vue/afvue/src/views/Dashboard.vue b/vue/afvue/src/views/Dashboard.vue index b0fcb19..8ebaaa8 100644 --- a/vue/afvue/src/views/Dashboard.vue +++ b/vue/afvue/src/views/Dashboard.vue @@ -6,7 +6,7 @@ {{index+1}}、 {{ item.addr }} 服务器概况
- 文件浏览器 + 文件浏览器 代码对比
diff --git a/vue/afvue/src/views/Flist.vue b/vue/afvue/src/views/Flist.vue index dcdeeab..0faa7f6 100644 --- a/vue/afvue/src/views/Flist.vue +++ b/vue/afvue/src/views/Flist.vue @@ -1,11 +1,21 @@