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}`);