From c1e2eba4d19e77597b67777532c546bc53951cc7 Mon Sep 17 00:00:00 2001 From: wuyize Date: Thu, 6 Jul 2023 16:18:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=85=A5=E4=B8=8B=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AicsKnowledgeBase/qml/page/ContentPage.qml | 52 ++++++++++--------- AicsKnowledgeBase/src/FileTransferManager.cpp | 6 +-- 2 files changed, 30 insertions(+), 28 deletions(-) diff --git a/AicsKnowledgeBase/qml/page/ContentPage.qml b/AicsKnowledgeBase/qml/page/ContentPage.qml index be13e9b..6025060 100644 --- a/AicsKnowledgeBase/qml/page/ContentPage.qml +++ b/AicsKnowledgeBase/qml/page/ContentPage.qml @@ -81,42 +81,43 @@ FluArea { property string brief: "这是一个简介" function getType(suffix) { - if(suffix === "md") + if (suffix === "md") return "MD" - else if(suffix === "mp4" || suffix === "avi" - || suffix === "rmvb" || suffix === "rm" - || suffix === "wmv" || suffix === "mkv") + else if (suffix === "mp4" || suffix === "avi" || suffix === "rmvb" + || suffix === "rm" || suffix === "wmv" || suffix === "mkv") return "VIDEO" - else return "OTHER" + else + return "OTHER" } function loadFile(knowledgeFileId) { content_area.knowledgeFileId = knowledgeFileId console.log(knowledgeFileId) - Request.get("knowledge/" + knowledgeFileId, function (response, data) { - content_page.publishTime = data.createTime - content_page.title = data.name - content_page.fileId = data.knowledgeFileAttribute.id + Request.get("knowledge/" + knowledgeFileId, + function (response, data) { + content_page.publishTime = data.createTime + content_page.title = data.name + content_page.fileId = data.knowledgeFileAttribute.id - content_area.type = data.knowledgeFileAttribute.suffix + content_area.type = data.knowledgeFileAttribute.suffix - var tagString = "" - for (var j = 0; j < data.knowledgeFileAttribute.tags.length; j++) { - if (j != 0) - tagString = tagString + "," - tagString = tagString + data.knowledgeFileAttribute.tags[j].name - } - content_page.tags = tagString.split(",") + var tagString = "" + for (var j = 0; j < data.knowledgeFileAttribute.tags.length; j++) { + if (j != 0) + tagString = tagString + "," + tagString = tagString + data.knowledgeFileAttribute.tags[j].name + } + content_page.tags = tagString.split(",") - content_page.brief = data.knowledgeFileAttribute.brief - content_page.browsCount = data.knowledgeFileAttribute.pageView + content_page.brief = data.knowledgeFileAttribute.brief + content_page.browsCount = data.knowledgeFileAttribute.pageView - var starers = data.knowledgeFileAttribute.starers - for(var i=0; i