From bd33759b8084d4d8657e7f742adae0131aac3d61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=AF=BB=E6=AC=A2?= Date: Thu, 9 May 2024 09:44:57 +0800 Subject: [PATCH] =?UTF-8?q?:new:=20=E6=B7=BB=E5=8A=A0=E7=BE=A4=E6=88=90?= =?UTF-8?q?=E5=91=98=E6=98=BE=E7=A4=BA(WIP)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- views/components.html | 40 ++++++++++++++++++++++++++++++++++++++++ views/friend.html | 6 +----- views/group.html | 16 +++++++++------- views/groupuser.html | 21 +++++++++++++++++++++ views/static/js/index.js | 7 ++++--- 5 files changed, 75 insertions(+), 15 deletions(-) create mode 100644 views/groupuser.html diff --git a/views/components.html b/views/components.html index 0d4f5b79..bf3772bd 100644 --- a/views/components.html +++ b/views/components.html @@ -136,3 +136,43 @@ {{end}} + + + +{{define "groupRank"}} + +{{end}} + + + +{{define "flagTag"}} +{{ if eq . true }} + +{{ else }} + +{{ end }} +{{end}} diff --git a/views/friend.html b/views/friend.html index ee745061..06f4a46c 100644 --- a/views/friend.html +++ b/views/friend.html @@ -28,11 +28,7 @@ Tuple
{{ .Nickname }}
- {{ if eq .IsOk true }} - 正常 - {{ else }} - 已删除 - {{ end }} + {{ template "flagTag" .IsOk }}
diff --git a/views/group.html b/views/group.html index 4feccec5..b8f53723 100644 --- a/views/group.html +++ b/views/group.html @@ -47,6 +47,9 @@ 是否启用指令 + + 操作 + @@ -64,13 +67,7 @@ {{ end }} - {{ if eq .IsOk true }} - - {{ else }} - - {{ end }} + {{ template "flagTag" .IsOk }} {{ template "ai" . }} @@ -104,6 +101,9 @@ {{ template "command" . }} + + + {{ end }} @@ -113,6 +113,8 @@ {{ template "footer.html" }} + + {{ template "groupuser.html" }} diff --git a/views/groupuser.html b/views/groupuser.html new file mode 100644 index 00000000..984c6cde --- /dev/null +++ b/views/groupuser.html @@ -0,0 +1,21 @@ + + + diff --git a/views/static/js/index.js b/views/static/js/index.js index 10e47783..352f4548 100644 --- a/views/static/js/index.js +++ b/views/static/js/index.js @@ -155,12 +155,13 @@ function getGroupUsers(groupId, groupName) { // Insert data into cells row.insertCell(0).innerHTML = wxid; row.insertCell(1).innerHTML = nickname; - row.insertCell(2).innerHTML = `
${isMember ? '是' : '否'}
`; - row.insertCell(3).innerHTML = `
${isAdmin ? '是' : '否'}
`; + row.insertCell(2).innerHTML = `${isMember ? '是' : '否'}`; + row.insertCell(3).innerHTML = `${isAdmin ? '是' : '否'}`; row.insertCell(4).innerHTML = joinTime; row.insertCell(5).innerHTML = lastActive; row.insertCell(6).innerHTML = leaveTime; - row.insertCell(7).innerHTML = ``; + // row.insertCell(7).innerHTML = ``; + row.insertCell(7).innerHTML = `${skipChatRank ? '是' : '否'}`; }); }).catch(function (error) { console.log(`错误信息: ${error}`);