Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1c55900291 | ||
|
|
386e0dd6d3 | ||
|
|
9bec70319b | ||
|
|
bd33759b80 | ||
|
|
45109b02ef | ||
|
|
e8523c1e3e | ||
|
|
765e0ead7f | ||
|
|
e7117d227b | ||
|
|
448ac83514 |
24
app/pages.go
24
app/pages.go
@@ -20,8 +20,28 @@ func Index(ctx *gin.Context) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
result["msg"] = fmt.Sprintf("数据获取失败: %s", err.Error())
|
result["msg"] = fmt.Sprintf("数据获取失败: %s", err.Error())
|
||||||
}
|
}
|
||||||
result["friendCount"] = len(friends)
|
var in, notIn int
|
||||||
result["groupCount"] = len(groups)
|
for _, d := range friends {
|
||||||
|
if d.IsOk {
|
||||||
|
in++
|
||||||
|
} else {
|
||||||
|
notIn++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result["friendCount"] = in
|
||||||
|
result["friendWithoutCount"] = notIn
|
||||||
|
|
||||||
|
var gin, gnotIn int
|
||||||
|
for _, d := range groups {
|
||||||
|
if d.IsOk {
|
||||||
|
gin++
|
||||||
|
} else {
|
||||||
|
gnotIn++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result["groupCount"] = gin
|
||||||
|
result["groupWithoutCount"] = gnotIn
|
||||||
|
|
||||||
result["vnc"] = config.Conf.Wechat.VncUrl
|
result["vnc"] = config.Conf.Wechat.VncUrl
|
||||||
result["isVnc"] = config.Conf.Wechat.VncUrl != ""
|
result["isVnc"] = config.Conf.Wechat.VncUrl != ""
|
||||||
result["aiModels"] = config.Conf.Ai.Models
|
result["aiModels"] = config.Conf.Ai.Models
|
||||||
|
|||||||
@@ -87,6 +87,10 @@ resource:
|
|||||||
welcome-new:
|
welcome-new:
|
||||||
type: emotion
|
type: emotion
|
||||||
path: 58e4150be2bba8f7b71974b10391f9e9
|
path: 58e4150be2bba8f7b71974b10391f9e9
|
||||||
|
# 给新好友或者群的自我介绍,不配置就不发送
|
||||||
|
introduce:
|
||||||
|
type: text
|
||||||
|
path: "大家好,我是一个AI机器人,可以直接@我询问你想问的问题。"
|
||||||
# 水群排行榜词云,只能是图片,末尾的`\%s`也是必须的
|
# 水群排行榜词云,只能是图片,末尾的`\%s`也是必须的
|
||||||
wordcloud:
|
wordcloud:
|
||||||
type: image
|
type: image
|
||||||
|
|||||||
@@ -47,12 +47,31 @@ func SaveMessage(msg entity.Message) {
|
|||||||
// @return records
|
// @return records
|
||||||
// @return err
|
// @return err
|
||||||
func GetTextMessagesById(id string) (records []vo.TextMessageItem, err error) {
|
func GetTextMessagesById(id string) (records []vo.TextMessageItem, err error) {
|
||||||
|
// APP消息类型
|
||||||
|
appMsgList := []string{"57", "4", "5", "6"}
|
||||||
|
// 这个查询子句抽出来写,方便后续扩展
|
||||||
|
selectStr := `CASE
|
||||||
|
WHEN tm.type = 49 THEN
|
||||||
|
CASE
|
||||||
|
WHEN EXTRACTVALUE ( tm.content, "/msg/appmsg/type" ) = '57' THEN
|
||||||
|
EXTRACTVALUE ( tm.content, "/msg/appmsg/title" )
|
||||||
|
WHEN EXTRACTVALUE ( tm.content, "/msg/appmsg/type" ) = '5' THEN
|
||||||
|
CONCAT("网页分享消息,标题: ", EXTRACTVALUE (tm.content, "/msg/appmsg/title"), ",描述:", EXTRACTVALUE (tm.content, "/msg/appmsg/des"))
|
||||||
|
WHEN EXTRACTVALUE ( tm.content, "/msg/appmsg/type" ) = '4' THEN
|
||||||
|
CONCAT("网页分享消息,标题: ", EXTRACTVALUE (tm.content, "/msg/appmsg/title"), ",描述:", EXTRACTVALUE (tm.content, "/msg/appmsg/des"))
|
||||||
|
WHEN EXTRACTVALUE ( tm.content, "/msg/appmsg/type" ) = '6' THEN
|
||||||
|
CONCAT("文件消息,文件名: ", EXTRACTVALUE (tm.content, "/msg/appmsg/title"))
|
||||||
|
|
||||||
|
ELSE EXTRACTVALUE ( tm.content, "/msg/appmsg/des" )
|
||||||
|
END ELSE tm.content
|
||||||
|
END`
|
||||||
|
|
||||||
tx := client.MySQL.
|
tx := client.MySQL.
|
||||||
Table("`t_message` AS tm").
|
Table("`t_message` AS tm").
|
||||||
Joins("LEFT JOIN t_group_user AS tgu ON tm.group_user = tgu.wxid AND tgu.group_id = tm.from_user").
|
Joins("LEFT JOIN t_group_user AS tgu ON tm.group_user = tgu.wxid AND tgu.group_id = tm.from_user").
|
||||||
Select("tgu.nickname", "IF( tm.type = 49, EXTRACTVALUE ( tm.content, \"/msg/appmsg/title\" ), tm.content ) AS message").
|
Select("tgu.nickname", selectStr+" AS message").
|
||||||
Where("tm.`from_user` = ?", id).
|
Where("tm.`from_user` = ?", id).
|
||||||
Where(`(tm.type = 1 OR ( tm.type = 49 AND EXTRACTVALUE ( tm.content, "/msg/appmsg/type" ) = '57' ))`).
|
Where(`(tm.type = 1 OR ( tm.type = 49 AND EXTRACTVALUE ( tm.content, "/msg/appmsg/type" ) IN (?) ))`, appMsgList).
|
||||||
Where("DATE ( tm.create_at ) = DATE ( CURDATE() - INTERVAL 1 DAY )").
|
Where("DATE ( tm.create_at ) = DATE ( CURDATE() - INTERVAL 1 DAY )").
|
||||||
Order("tm.create_at ASC")
|
Order("tm.create_at ASC")
|
||||||
|
|
||||||
|
|||||||
@@ -73,8 +73,20 @@ func Sync() {
|
|||||||
log.Printf("新增好友失败: %s", err.Error())
|
log.Printf("新增好友失败: %s", err.Error())
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
// 发送一条新消息
|
if conf, ok := config.Conf.Resource["introduce"]; ok {
|
||||||
utils.SendMessage(friend.Wxid, "", "大家好,我是一个AI机器人,可以直接@我询问你想问的问题。该功能默认未启用,请群主艾特我并发送 /ai enable 指令启用", 0)
|
// 发送一条新消息
|
||||||
|
switch conf.Type {
|
||||||
|
case "text":
|
||||||
|
// 文字类型
|
||||||
|
utils.SendMessage(friend.Wxid, "", conf.Path, 0)
|
||||||
|
case "image":
|
||||||
|
// 图片类型
|
||||||
|
utils.SendImage(friend.Wxid, conf.Path, 0)
|
||||||
|
case "emotion":
|
||||||
|
// 表情类型
|
||||||
|
utils.SendEmotion(friend.Wxid, conf.Path, 0)
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
pm := map[string]any{
|
pm := map[string]any{
|
||||||
"nickname": friend.Nickname,
|
"nickname": friend.Nickname,
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ func AiSummary() {
|
|||||||
注意,他们可能是多个话题,请仔细甄别。
|
注意,他们可能是多个话题,请仔细甄别。
|
||||||
每一行代表一个人的发言,每一行的的格式为: {"{nickname}": "{content}"}--end--
|
每一行代表一个人的发言,每一行的的格式为: {"{nickname}": "{content}"}--end--
|
||||||
|
|
||||||
聊天记录如下:
|
聊天记录如下:
|
||||||
%s
|
%s
|
||||||
`
|
`
|
||||||
|
|
||||||
@@ -81,6 +81,7 @@ func AiSummary() {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
replyMsg := fmt.Sprintf("#昨日消息总结\n又是一天过去了,让我们一起来看看昨儿群友们都聊了什么有趣的话题吧~\n\n%s", resp.Choices[0].Message.Content)
|
replyMsg := fmt.Sprintf("#昨日消息总结\n又是一天过去了,让我们一起来看看昨儿群友们都聊了什么有趣的话题吧~\n\n%s", resp.Choices[0].Message.Content)
|
||||||
|
//log.Printf("群[%s]对话记录总结成功,总结内容: %s", group.Wxid, replyMsg)
|
||||||
utils.SendMessage(group.Wxid, "", replyMsg, 0)
|
utils.SendMessage(group.Wxid, "", replyMsg, 0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -136,3 +136,43 @@
|
|||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 水群排行榜 -->
|
||||||
|
{{define "groupRank"}}
|
||||||
|
<button type="button"
|
||||||
|
class="{{ if eq .EnableWelcome true }}bg-green-600{{ else }}bg-gray-200{{ end }} relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-green-600 focus:ring-offset-2"
|
||||||
|
role="switch" aria-checked="false" onclick="changeUserGroupRankSkipStatus({{.Wxid}})">
|
||||||
|
<span
|
||||||
|
class="{{ if eq .EnableWelcome true }}translate-x-5{{ else }}translate-x-0{{ end }} pointer-events-none relative inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out">
|
||||||
|
<span
|
||||||
|
class="{{ if eq .EnableWelcome true }}opacity-0 duration-100 ease-out{{ else }}opacity-100 duration-200 ease-in{{ end }} absolute inset-0 flex h-full w-full items-center justify-center transition-opacity"
|
||||||
|
aria-hidden="true">
|
||||||
|
<svg class="h-3 w-3 text-gray-400" fill="none" viewBox="0 0 12 12">
|
||||||
|
<path d="M4 8l2-2m0 0l2-2M6 6L4 4m2 2l2 2" stroke="currentColor" stroke-width="2" stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"/>
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
class="{{ if eq .EnableWelcome true }}opacity-100 duration-200 ease-in{{ else }}opacity-0 duration-100 ease-out{{ end }} absolute inset-0 flex h-full w-full items-center justify-center transition-opacity"
|
||||||
|
aria-hidden="true">
|
||||||
|
<svg class="h-3 w-3 text-green-600" fill="currentColor" viewBox="0 0 12 12">
|
||||||
|
<path
|
||||||
|
d="M3.707 5.293a1 1 0 00-1.414 1.414l1.414-1.414zM5 8l-.707.707a1 1 0 001.414 0L5 8zm4.707-3.293a1 1 0 00-1.414-1.414l1.414 1.414zm-7.414 2l2 2 1.414-1.414-2-2-1.414 1.414zm3.414 2l4-4-1.414-1.414-4 4 1.414 1.414z"/>
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 是否tag -->
|
||||||
|
{{define "flagTag"}}
|
||||||
|
{{ if eq . true }}
|
||||||
|
<span
|
||||||
|
class="inline-flex items-center rounded-md bg-green-50 px-2 py-1 text-xs font-medium text-green-700 ring-1 ring-inset ring-green-600/20">是</span>
|
||||||
|
{{ else }}
|
||||||
|
<span
|
||||||
|
class="inline-flex items-center rounded-md bg-red-50 px-2 py-1 text-xs font-medium text-red-700 ring-1 ring-inset ring-red-600/20">否</span>
|
||||||
|
{{ end }}
|
||||||
|
{{end}}
|
||||||
|
|||||||
@@ -21,87 +21,75 @@
|
|||||||
<main class="-mt-32">
|
<main class="-mt-32">
|
||||||
<div class="mx-auto max-w-7xl px-4 pb-12 sm:px-6 lg:px-8">
|
<div class="mx-auto max-w-7xl px-4 pb-12 sm:px-6 lg:px-8">
|
||||||
<div class="rounded-lg bg-white px-5 py-6 shadow sm:px-6 text-2xl">
|
<div class="rounded-lg bg-white px-5 py-6 shadow sm:px-6 text-2xl">
|
||||||
<table class="min-w-full divide-y divide-gray-300">
|
<ul role="list" class="grid grid-cols-1 gap-x-6 gap-y-8 lg:grid-cols-3 xl:gap-x-8">
|
||||||
<thead class="bg-gray-50">
|
|
||||||
<tr>
|
|
||||||
<th scope="col"
|
|
||||||
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
|
||||||
微信Id
|
|
||||||
</th>
|
|
||||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
|
|
||||||
微信号
|
|
||||||
</th>
|
|
||||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">昵称
|
|
||||||
</th>
|
|
||||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
|
|
||||||
最后活跃时间
|
|
||||||
</th>
|
|
||||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
|
|
||||||
是否在通讯录
|
|
||||||
</th>
|
|
||||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
|
|
||||||
是否启用AI
|
|
||||||
</th>
|
|
||||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
|
|
||||||
是否启用指令
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody class="divide-y divide-gray-200 bg-white">
|
|
||||||
{{ range .friends }}
|
{{ range .friends }}
|
||||||
<tr class="even:bg-gray-50">
|
<li class="overflow-hidden rounded-xl border border-gray-200">
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6">
|
<div class="flex items-center gap-x-4 border-b border-gray-900/5 bg-gray-50 p-6">
|
||||||
{{ .Wxid }}
|
<img src="assets/img/status-{{ if eq .IsOk true }}ok{{else}}fail{{end}}.png" alt="Tuple" class="h-12 w-12 flex-none rounded-lg bg-white object-cover ring-1 ring-gray-900/10">
|
||||||
</td>
|
<div class="flex-1">
|
||||||
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">{{
|
<div class="text-sm font-medium leading-6 text-gray-900">{{ .Nickname }}</div>
|
||||||
.CustomAccount }}
|
{{ template "flagTag" .IsOk }}
|
||||||
</td>
|
</div>
|
||||||
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">{{
|
</div>
|
||||||
.Nickname }}
|
<dl class="-my-3 divide-y divide-gray-100 px-6 py-4 text-sm leading-6">
|
||||||
</td>
|
<div class="flex justify-between gap-x-4 py-3">
|
||||||
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
<dt class="text-gray-500">原始微信Id<br/>微信号</dt>
|
||||||
{{ if eq .LastActive.IsNil true }}
|
<dd>
|
||||||
无数据
|
<div class="text-gray-700">{{ .Wxid }}</div>
|
||||||
{{ else }}
|
{{ if not (eq .CustomAccount "") }}
|
||||||
{{ .LastActive }}
|
<div class="truncate text-gray-500">{{ .CustomAccount }}</div>
|
||||||
{{ end }}
|
{{end}}
|
||||||
</td>
|
</dd>
|
||||||
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
</div>
|
||||||
{{ if eq .IsOk true }}
|
<div class="flex justify-between gap-x-4 py-3">
|
||||||
<span
|
<dt class="text-gray-500">最后活跃时间</dt>
|
||||||
class="inline-flex items-center rounded-md bg-green-50 px-2 py-1 text-xs font-medium text-green-700 ring-1 ring-inset ring-green-600/20">是</span>
|
<dd class="flex items-start gap-x-2">
|
||||||
{{ else }}
|
<div class="font-medium text-gray-900">
|
||||||
<span
|
{{ if eq .LastActive.IsNil true }}
|
||||||
class="inline-flex items-center rounded-md bg-red-50 px-2 py-1 text-xs font-medium text-red-700 ring-1 ring-inset ring-red-600/20">否</span>
|
无数据
|
||||||
{{ end }}
|
{{ else }}
|
||||||
</td>
|
<time datetime="{{ .LastActive }}">{{ .LastActive }}</time>
|
||||||
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
{{ end }}
|
||||||
{{ template "ai" . }}
|
</div>
|
||||||
<!-- 使用的模型 -->
|
</dd>
|
||||||
{{ if eq .EnableAi true }}
|
</div>
|
||||||
<select id="location" name="location"
|
|
||||||
class="mt-2 block w-full rounded-md border-0 py-1.5 pl-3 pr-10 text-gray-900 ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-green-600 sm:text-sm sm:leading-6"
|
|
||||||
onchange="aiModelChange(event, {{.Wxid}})">
|
|
||||||
<option value="" {{ if eq .AiModel
|
|
||||||
"" }}selected{{ end }}>默认(gpt-3.5-turbo-0613)
|
|
||||||
</option>
|
|
||||||
|
|
||||||
{{$useModel := .AiModel}}
|
<div class="flex justify-between gap-x-4 py-3">
|
||||||
{{ range $.aiModels }}
|
<dt class="text-gray-500">AI</dt>
|
||||||
<option value="{{.Model}}" {{ if eq $useModel .Model}}selected{{ end }}>
|
<dd class="flex items-start gap-x-2">
|
||||||
{{.Name}}({{.Model}})
|
{{ template "ai" . }}
|
||||||
</option>
|
</dd>
|
||||||
{{ end }}
|
</div>
|
||||||
</select>
|
{{ if eq .EnableAi true }}
|
||||||
|
<div class="flex justify-between gap-x-4 py-3">
|
||||||
|
<dt class="text-gray-500 mt-2">AI模型</dt>
|
||||||
|
<dd class="flex items-start gap-x-2">
|
||||||
|
<label>
|
||||||
|
<select class="block w-full rounded-md border-0 py-1.5 pl-3 pr-10 text-gray-900 ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-green-600 sm:text-sm sm:leading-6" onchange="aiModelChange(event, {{.Wxid}})">
|
||||||
|
{{$useModel := .AiModel}}
|
||||||
|
{{ range $.aiModels }}
|
||||||
|
<option value="{{.Model}}" {{ if eq $useModel .Model}}selected{{ end }}>
|
||||||
|
{{.Name}}
|
||||||
|
</option>
|
||||||
|
{{ end }}
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
</dd>
|
||||||
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</td>
|
|
||||||
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
<div class="flex justify-between gap-x-4 py-3">
|
||||||
{{ template "command" . }}
|
<dt class="text-gray-500">指令</dt>
|
||||||
</td>
|
<dd class="flex items-start gap-x-2">
|
||||||
</tr>
|
{{ template "command" . }}
|
||||||
|
</dd>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</tbody>
|
</ul>
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
@@ -47,6 +47,9 @@
|
|||||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
|
||||||
是否启用指令
|
是否启用指令
|
||||||
</th>
|
</th>
|
||||||
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
|
||||||
|
操作
|
||||||
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody class="divide-y divide-gray-200 bg-white">
|
<tbody class="divide-y divide-gray-200 bg-white">
|
||||||
@@ -64,13 +67,7 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
</td>
|
</td>
|
||||||
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
||||||
{{ if eq .IsOk true }}
|
{{ template "flagTag" .IsOk }}
|
||||||
<span
|
|
||||||
class="inline-flex items-center rounded-md bg-green-50 px-2 py-1 text-xs font-medium text-green-700 ring-1 ring-inset ring-green-600/20">是</span>
|
|
||||||
{{ else }}
|
|
||||||
<span
|
|
||||||
class="inline-flex items-center rounded-md bg-red-50 px-2 py-1 text-xs font-medium text-red-700 ring-1 ring-inset ring-red-600/20">否</span>
|
|
||||||
{{ end }}
|
|
||||||
</td>
|
</td>
|
||||||
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
||||||
{{ template "ai" . }}
|
{{ template "ai" . }}
|
||||||
@@ -104,6 +101,9 @@
|
|||||||
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
||||||
{{ template "command" . }}
|
{{ template "command" . }}
|
||||||
</td>
|
</td>
|
||||||
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
||||||
|
<button class="btn btn-link" onclick="getGroupUsers({{.Wxid}}, {{.Nickname}})">成员</button>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</tbody>
|
</tbody>
|
||||||
@@ -113,6 +113,8 @@
|
|||||||
</main>
|
</main>
|
||||||
|
|
||||||
{{ template "footer.html" }}
|
{{ template "footer.html" }}
|
||||||
|
|
||||||
|
{{ template "groupuser.html" }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
21
views/groupuser.html
Normal file
21
views/groupuser.html
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<dialog id="groupUserModal" class="modal">
|
||||||
|
<div class="modal-box w-11/12 max-w-7xl">
|
||||||
|
<h3 class="font-bold text-lg" id="groupUserModalName">我是群名称</h3>
|
||||||
|
<div class="divider divider-warning">成员列表</div>
|
||||||
|
<table class="table table-zebra">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>微信Id</th>
|
||||||
|
<th>昵称</th>
|
||||||
|
<th>是否群成员</th>
|
||||||
|
<th>是否群主</th>
|
||||||
|
<th>加群时间</th>
|
||||||
|
<th>最后活跃时间</th>
|
||||||
|
<th>退群时间</th>
|
||||||
|
<th>是否跳过水群排行榜</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody id="groupUsers"></tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</dialog>
|
||||||
@@ -24,11 +24,13 @@
|
|||||||
<dl class="mt-5 grid grid-cols-1 gap-5 sm:grid-cols-3">
|
<dl class="mt-5 grid grid-cols-1 gap-5 sm:grid-cols-3">
|
||||||
<div class="overflow-hidden rounded-lg bg-white px-4 py-5 shadow sm:p-6">
|
<div class="overflow-hidden rounded-lg bg-white px-4 py-5 shadow sm:p-6">
|
||||||
<dt class="truncate text-sm font-medium text-gray-500">好友数量</dt>
|
<dt class="truncate text-sm font-medium text-gray-500">好友数量</dt>
|
||||||
<dd class="mt-1 text-3xl font-semibold tracking-tight text-gray-900">{{ .friendCount }}</dd>
|
<dd class="mt-1 text-2xl font-semibold tracking-tight text-gray-900">{{ .friendCount }}/{{ .friendWithoutCount }}</dd>
|
||||||
|
<dd class="mt-1 text-xs font-semibold tracking-tight text-red-300">通讯录/已删除</dd>
|
||||||
</div>
|
</div>
|
||||||
<div class="overflow-hidden rounded-lg bg-white px-4 py-5 shadow sm:p-6">
|
<div class="overflow-hidden rounded-lg bg-white px-4 py-5 shadow sm:p-6">
|
||||||
<dt class="truncate text-sm font-medium text-gray-500">群组数量</dt>
|
<dt class="truncate text-sm font-medium text-gray-500">群组数量</dt>
|
||||||
<dd class="mt-1 text-3xl font-semibold tracking-tight text-gray-900">{{ .groupCount }}</dd>
|
<dd class="mt-1 text-3xl font-semibold tracking-tight text-gray-900">{{ .groupCount }}/{{ .groupWithoutCount }}</dd>
|
||||||
|
<dd class="mt-1 text-xs font-semibold tracking-tight text-red-300">在群聊/已退出</dd>
|
||||||
</div>
|
</div>
|
||||||
<div class="overflow-hidden rounded-lg bg-white px-4 py-5 shadow sm:p-6">
|
<div class="overflow-hidden rounded-lg bg-white px-4 py-5 shadow sm:p-6">
|
||||||
<dt class="truncate text-sm font-medium text-gray-500">是否配置VNC</dt>
|
<dt class="truncate text-sm font-medium text-gray-500">是否配置VNC</dt>
|
||||||
|
|||||||
BIN
views/static/img/status-fail.png
Normal file
BIN
views/static/img/status-fail.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 210 KiB |
BIN
views/static/img/status-ok.png
Normal file
BIN
views/static/img/status-ok.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 123 KiB |
@@ -155,12 +155,13 @@ function getGroupUsers(groupId, groupName) {
|
|||||||
// Insert data into cells
|
// Insert data into cells
|
||||||
row.insertCell(0).innerHTML = wxid;
|
row.insertCell(0).innerHTML = wxid;
|
||||||
row.insertCell(1).innerHTML = nickname;
|
row.insertCell(1).innerHTML = nickname;
|
||||||
row.insertCell(2).innerHTML = `<div class="badge badge-${isMember ? 'info' : 'error'} gap-2">${isMember ? '是' : '否'}</div>`;
|
row.insertCell(2).innerHTML = `<span class="inline-flex items-center rounded-md px-2 py-1 text-xs font-medium ring-1 ring-inset ${isMember ? 'bg-green-50 text-green-700 ring-green-600/20' : 'bg-red-50 text-red-700 ring-red-600/20'}">${isMember ? '是' : '否'}</span>`;
|
||||||
row.insertCell(3).innerHTML = `<div class="badge badge-${isAdmin ? 'info' : 'error'} gap-2">${isAdmin ? '是' : '否'}</div>`;
|
row.insertCell(3).innerHTML = `<span class="inline-flex items-center rounded-md px-2 py-1 text-xs font-medium ring-1 ring-inset ${isAdmin ? 'bg-green-50 text-green-700 ring-green-600/20' : 'bg-red-50 text-red-700 ring-red-600/20'}">${isAdmin ? '是' : '否'}</span>`;
|
||||||
row.insertCell(4).innerHTML = joinTime;
|
row.insertCell(4).innerHTML = joinTime;
|
||||||
row.insertCell(5).innerHTML = lastActive;
|
row.insertCell(5).innerHTML = lastActive;
|
||||||
row.insertCell(6).innerHTML = leaveTime;
|
row.insertCell(6).innerHTML = leaveTime;
|
||||||
row.insertCell(7).innerHTML = `<input type="checkbox" class="toggle toggle-error" ${skipChatRank ? 'checked' : ''} onclick="changeUserGroupRankSkipStatus('${groupId}', '${wxid}')" />`;
|
// row.insertCell(7).innerHTML = `<input type="checkbox" class="toggle toggle-error" ${skipChatRank ? 'checked' : ''} onclick="changeUserGroupRankSkipStatus('${groupId}', '${wxid}')" />`;
|
||||||
|
row.insertCell(7).innerHTML = `<span class="inline-flex items-center rounded-md px-2 py-1 text-xs font-medium ring-1 ring-inset ${skipChatRank ? 'bg-green-50 text-green-700 ring-green-600/20' : 'bg-red-50 text-red-700 ring-red-600/20'}">${skipChatRank ? '是' : '否'}</span>`;
|
||||||
});
|
});
|
||||||
}).catch(function (error) {
|
}).catch(function (error) {
|
||||||
console.log(`错误信息: ${error}`);
|
console.log(`错误信息: ${error}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user