11
This commit is contained in:
@@ -18,7 +18,7 @@ from .core.fun_basic import load_as_base64
|
|||||||
"fxdyz",
|
"fxdyz",
|
||||||
"通过调用剑网三API接口获取游戏数据,处理发送。",
|
"通过调用剑网三API接口获取游戏数据,处理发送。",
|
||||||
"2.8",
|
"2.8",
|
||||||
"https://git.fxdyz.com/qsc20001102/astrbot_plugin_jx3"
|
"https://github.com/qsc20001102/astrbot_plugin_jx3"
|
||||||
)
|
)
|
||||||
class Jx3ApiPlugin(Star):
|
class Jx3ApiPlugin(Star):
|
||||||
def __init__(self, context: Context, config: AstrBotConfig):
|
def __init__(self, context: Context, config: AstrBotConfig):
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ display_name: 剑网三游戏数据查询工具
|
|||||||
desc: 通过接口调用剑网三API接口获取游戏数据,处理发送。
|
desc: 通过接口调用剑网三API接口获取游戏数据,处理发送。
|
||||||
version: v2.8
|
version: v2.8
|
||||||
author: 飞翔大野猪
|
author: 飞翔大野猪
|
||||||
repo: https://git.fxdyz.com/qsc20001102/astrbot_plugin_jx3
|
repo: https://github.com/qsc20001102/astrbot_plugin_jx3
|
||||||
astrbot_version: ">=4.11.0"
|
astrbot_version: ">=4.11.0"
|
||||||
support_platforms:
|
support_platforms:
|
||||||
- aiocqhttp
|
- aiocqhttp
|
||||||
|
|||||||
+153
-40
@@ -14,53 +14,98 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
max-width: 1040px;
|
max-width: 1200px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
font-size: 32px;
|
font-size: 38px;
|
||||||
margin: 0 0 8px 0;
|
margin: 0 0 10px 0;
|
||||||
color: #222;
|
color: #222;
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.meta {
|
.meta {
|
||||||
margin-bottom: 24px;
|
margin-bottom: 26px;
|
||||||
color: #7a7f99;
|
color: #7a7f99;
|
||||||
font-size: 16px;
|
font-size: 18px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
table {
|
table {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
table-layout: fixed;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
background: white;
|
background: white;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
box-shadow: 0 4px 16px rgba(0,0,0,0.08);
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
thead {
|
thead {
|
||||||
background: #d93939;
|
background: #d93939;
|
||||||
color: white;
|
color: white;
|
||||||
font-size: 17px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
th, td {
|
th,
|
||||||
padding: 12px 10px;
|
td {
|
||||||
|
padding: 14px 10px;
|
||||||
border-bottom: 1px solid #eee;
|
border-bottom: 1px solid #eee;
|
||||||
font-size: 15px;
|
font-size: 17px;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 700;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
tbody tr:nth-child(even) {
|
tbody tr:nth-child(even) {
|
||||||
background: #fafafa;
|
background: #fafafa;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tbody tr:hover {
|
||||||
|
background: #fff4f4;
|
||||||
|
}
|
||||||
|
|
||||||
|
tbody tr:last-child td {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 各列宽度
|
||||||
|
* 第二列头像宽度较小,使头像和职业列靠近
|
||||||
|
*/
|
||||||
|
.rank-width {
|
||||||
|
width: 70px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.avatar-width {
|
||||||
|
width: 72px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.force-width {
|
||||||
|
width: 170px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.role-width {
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.server-width {
|
||||||
|
width: 180px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.score-width {
|
||||||
|
width: 130px;
|
||||||
|
}
|
||||||
|
|
||||||
.rank-col,
|
.rank-col,
|
||||||
|
.avatar-col,
|
||||||
|
.role-name-col,
|
||||||
.server-col,
|
.server-col,
|
||||||
.score-col {
|
.score-col {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
@@ -68,67 +113,110 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.rank-col {
|
.rank-col {
|
||||||
width: 56px;
|
|
||||||
color: #d93939;
|
color: #d93939;
|
||||||
|
font-size: 18px;
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
}
|
}
|
||||||
|
|
||||||
.role,
|
/*
|
||||||
.force {
|
* 第二列只显示头像
|
||||||
display: flex;
|
*/
|
||||||
align-items: center;
|
.avatar-col {
|
||||||
gap: 8px;
|
padding-left: 4px;
|
||||||
min-width: 150px;
|
padding-right: 4px;
|
||||||
font-weight: 700;
|
|
||||||
color: #333;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.avatar {
|
.avatar {
|
||||||
width: 34px;
|
display: block;
|
||||||
height: 34px;
|
width: 46px;
|
||||||
|
height: 46px;
|
||||||
|
margin: 0 auto;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
flex: 0 0 auto;
|
|
||||||
background: #eef2f8;
|
background: #eef2f8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 职业列
|
||||||
|
* 取消原来的 min-width,避免第二列和第三列间隔过大
|
||||||
|
*/
|
||||||
|
.force-col {
|
||||||
|
padding-left: 4px;
|
||||||
|
padding-right: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.force {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
gap: 10px;
|
||||||
|
min-width: 0;
|
||||||
|
color: #333;
|
||||||
|
font-size: 17px;
|
||||||
|
font-weight: 700;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
.force-icon {
|
.force-icon {
|
||||||
width: 30px;
|
width: 40px;
|
||||||
height: 30px;
|
height: 40px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
background: #eef2f8;
|
background: #eef2f8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.force-name {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.role-name-col {
|
||||||
|
color: #333;
|
||||||
|
font-size: 17px;
|
||||||
|
font-weight: 600;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
.server-col {
|
.server-col {
|
||||||
color: #333;
|
color: #333;
|
||||||
|
font-size: 17px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.score-col {
|
.score-col {
|
||||||
color: #d93939;
|
color: #d93939;
|
||||||
|
font-size: 18px;
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
font-variant-numeric: tabular-nums;
|
font-variant-numeric: tabular-nums;
|
||||||
}
|
}
|
||||||
|
|
||||||
.avatar-col {
|
|
||||||
width: 70px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>{{ school }} 资历排行</h1>
|
<h1>{{ school }} 资历排行</h1>
|
||||||
<div class="meta">{{ server }} | 更新时间:{{ update_time }}</div>
|
|
||||||
|
<div class="meta">
|
||||||
|
{{ server }} | 更新时间:{{ update_time }}
|
||||||
|
</div>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
|
<colgroup>
|
||||||
|
<col class="rank-width">
|
||||||
|
<col class="avatar-width">
|
||||||
|
<col class="force-width">
|
||||||
|
<col class="role-width">
|
||||||
|
<col class="server-width">
|
||||||
|
<col class="score-width">
|
||||||
|
</colgroup>
|
||||||
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>排名</th>
|
<th>排名</th>
|
||||||
<th>推栏用户</th>
|
<th>头像</th>
|
||||||
<th>职业</th>
|
<th>职业</th>
|
||||||
<th>角色</th>
|
<th>角色</th>
|
||||||
<th>服务器</th>
|
<th>服务器</th>
|
||||||
@@ -139,24 +227,49 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
{% for item in items %}
|
{% for item in items %}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="rank-col">{{ loop.index }}</td>
|
<td class="rank-col">
|
||||||
|
{{ loop.index }}
|
||||||
|
</td>
|
||||||
|
|
||||||
<td class="avatar-col">
|
<td class="avatar-col">
|
||||||
{% if item.avatarUrl %}
|
{% if item.avatarUrl %}
|
||||||
<img class="avatar" src="{{ item.avatarUrl }}" alt="{{ item.roleName }}">
|
<img
|
||||||
|
class="avatar"
|
||||||
|
src="{{ item.avatarUrl }}"
|
||||||
|
alt="{{ item.roleName }}"
|
||||||
|
>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
|
||||||
|
<td class="force-col">
|
||||||
<div class="force">
|
<div class="force">
|
||||||
{% set force_icon = item.forceIcon or icons.sect.get(item.forceName) %}
|
{% set force_icon = item.forceIcon or icons.sect.get(item.forceName) %}
|
||||||
|
|
||||||
{% if force_icon %}
|
{% if force_icon %}
|
||||||
<img class="force-icon" src="{{ force_icon }}" alt="{{ item.forceName }}">
|
<img
|
||||||
|
class="force-icon"
|
||||||
|
src="{{ force_icon }}"
|
||||||
|
alt="{{ item.forceName }}"
|
||||||
|
>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<span>{{ item.forceName }}</span>
|
|
||||||
|
<span class="force-name">
|
||||||
|
{{ item.forceName }}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="server-col">{{ item.roleName }}</td>
|
|
||||||
<td class="server-col">{{ item.serverName }}</td>
|
<td class="role-name-col">
|
||||||
<td class="score-col">{{ item.seniority }}</td>
|
{{ item.roleName }}
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td class="server-col">
|
||||||
|
{{ item.serverName }}
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td class="score-col">
|
||||||
|
{{ item.seniority }}
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
Reference in New Issue
Block a user