11
This commit is contained in:
@@ -251,7 +251,6 @@ class JX3Service:
|
|||||||
if not data_list or not isinstance(data_list, list):
|
if not data_list or not isinstance(data_list, list):
|
||||||
return_data["msg"] = "获取接口信息失败或数据格式错误"
|
return_data["msg"] = "获取接口信息失败或数据格式错误"
|
||||||
return return_data
|
return return_data
|
||||||
|
|
||||||
# 加载模板
|
# 加载模板
|
||||||
try:
|
try:
|
||||||
return_data["temp"] = load_template("jinjia.html")
|
return_data["temp"] = load_template("jinjia.html")
|
||||||
|
|||||||
@@ -211,9 +211,9 @@ class Jx3ApiPlugin(Star):
|
|||||||
yield event.plain_result("猪脑过载,请稍后再试")
|
yield event.plain_result("猪脑过载,请稍后再试")
|
||||||
|
|
||||||
|
|
||||||
@jx3.command("奇遇")
|
@jx3.command("区服奇遇")
|
||||||
async def jx3_qiyu(self, event: AstrMessageEvent,adventureName: str = "阴阳两界", server: str = None):
|
async def jx3_qiyu(self, event: AstrMessageEvent,adventureName: str = "阴阳两界", server: str = None):
|
||||||
"""剑三 奇遇 奇遇名称 服务器"""
|
"""剑三 区服奇遇 奇遇名称 服务器"""
|
||||||
try:
|
try:
|
||||||
data= await self.jx3fun.qiyu(adventureName,await self.serverdefault(server))
|
data= await self.jx3fun.qiyu(adventureName,await self.serverdefault(server))
|
||||||
if data["code"] == 200:
|
if data["code"] == 200:
|
||||||
|
|||||||
+107
-16
@@ -1,30 +1,121 @@
|
|||||||
<div style="width: 1220px; margin: 0 auto;">
|
<!DOCTYPE html>
|
||||||
<h1 style="text-align: center;">剑网3交易行价格查询</h1>
|
<html lang="zh-CN">
|
||||||
<p style="text-align: center;">服务器: {{ server }}</p>
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>剑网3交易行价格查询</title>
|
||||||
|
|
||||||
<div style="overflow-x: auto; overflow-y: hidden;">
|
<style>
|
||||||
<table style="width: 100%; border-collapse: collapse; margin: 0 auto;">
|
body {
|
||||||
|
font-family: "Microsoft YaHei", Arial, sans-serif;
|
||||||
|
background: #f1f2f6;
|
||||||
|
margin: 0;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
max-width: 1220px;
|
||||||
|
margin: 0 auto;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 32px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
color: #222;
|
||||||
|
font-weight: 800;
|
||||||
|
}
|
||||||
|
|
||||||
|
.server-info {
|
||||||
|
font-size: 16px;
|
||||||
|
color: #555;
|
||||||
|
margin-bottom: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ===== 表格样式 ===== */
|
||||||
|
.table-wrapper {
|
||||||
|
overflow-x: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
background: #ffffff;
|
||||||
|
border-radius: 12px;
|
||||||
|
overflow: hidden;
|
||||||
|
box-shadow: 0 4px 16px rgba(0,0,0,0.08);
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
thead {
|
||||||
|
background: #d93939;
|
||||||
|
color: #ffffff;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
th, td {
|
||||||
|
padding: 14px 12px;
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
font-size: 16px;
|
||||||
|
text-align: center;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
tbody tr:hover {
|
||||||
|
background: #fff2f2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ===== 物品列 ===== */
|
||||||
|
.item-col {
|
||||||
|
text-align: left;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-col img {
|
||||||
|
width: 22px;
|
||||||
|
height: 22px;
|
||||||
|
vertical-align: middle;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
|
<h1>剑网3交易行价格查询</h1>
|
||||||
|
<div class="server-info">服务器:{{ server }}</div>
|
||||||
|
|
||||||
|
<div class="table-wrapper">
|
||||||
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr style="height: 50px; text-align: center;">
|
<tr>
|
||||||
<th style="border:1px solid #000; padding:4px;">物品名称</th>
|
<th>物品名称</th>
|
||||||
<th style="border:1px solid #000; padding:4px;">最低价</th>
|
<th>最低价</th>
|
||||||
<th style="border:1px solid #000; padding:4px;">总数量</th>
|
<th>总数量</th>
|
||||||
<th style="border:1px solid #000; padding:4px;">数据更新时间</th>
|
<th>数据更新时间</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for item in items %}
|
{% for item in items %}
|
||||||
<tr style="height: 45px; text-align: center;">
|
<tr>
|
||||||
<td style="border:1px solid #000; padding:4px; text-align: left;">
|
<td class="item-col">
|
||||||
<img src="{{ item.IconID }}" alt="icon" style="width:20px; height:20px; vertical-align:middle; border-radius:4px; margin-right:6px;">
|
<img src="{{ item.IconID }}" alt="icon">
|
||||||
{{ item.Name }}
|
{{ item.Name }}
|
||||||
</td>
|
</td>
|
||||||
<td style="border:1px solid #000; padding:4px;">{{ item.AvgPrice }}</td>
|
<td>{{ item.AvgPrice }}</td>
|
||||||
<td style="border:1px solid #000; padding:4px;">{{ item.SampleSize }}</td>
|
<td>{{ item.SampleSize }}</td>
|
||||||
<td style="border:1px solid #000; padding:4px;">{{ item.Date }}</td>
|
<td>{{ item.Date }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
max-width: 1300px;
|
max-width: 1000px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
text-align: center; /* ★ 让容器内标题更自然居中 */
|
text-align: center; /* ★ 让容器内标题更自然居中 */
|
||||||
}
|
}
|
||||||
|
|||||||
+18
-304
@@ -1,316 +1,30 @@
|
|||||||
<!DOCTYPE html>
|
<div style="width: 1220px; margin: 0 auto;">
|
||||||
<html lang="zh-CN">
|
<h1 style="text-align: center;">剑网3交易行价格查询</h1>
|
||||||
<head>
|
<p style="text-align: center;">服务器: {{ server }}</p>
|
||||||
<meta charset="UTF-8">
|
|
||||||
<title>{{ name }} - 万宝楼行情</title>
|
|
||||||
|
|
||||||
<style>
|
<div style="overflow-x: auto; overflow-y: hidden;">
|
||||||
body {
|
<table style="width: 100%; border-collapse: collapse; margin: 0 auto;">
|
||||||
font-family: "Microsoft YaHei", Arial, sans-serif;
|
|
||||||
background: #f1f2f6;
|
|
||||||
margin: 0;
|
|
||||||
padding: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.container {
|
|
||||||
max-width: 1400px;
|
|
||||||
margin: 0 auto;
|
|
||||||
color: #222;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
font-size: 32px;
|
|
||||||
font-weight: 800;
|
|
||||||
margin-bottom: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.goods-image {
|
|
||||||
width: 100%;
|
|
||||||
border-radius: 16px;
|
|
||||||
box-shadow: 0 6px 24px rgba(0,0,0,0.12);
|
|
||||||
margin-bottom: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.goods-desc {
|
|
||||||
font-size: 16px;
|
|
||||||
color: #444;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.meta-row {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
gap: 40px;
|
|
||||||
font-size: 18px;
|
|
||||||
margin-bottom: 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.meta-row .price {
|
|
||||||
color: #d93939;
|
|
||||||
font-weight: 800;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-wrapper {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(3, 1fr);
|
|
||||||
gap: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-card {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-title {
|
|
||||||
font-size: 20px;
|
|
||||||
font-weight: 700;
|
|
||||||
margin-bottom: 8px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
table {
|
|
||||||
width: 100%;
|
|
||||||
border-collapse: collapse;
|
|
||||||
background: #ffffff;
|
|
||||||
border-radius: 12px;
|
|
||||||
overflow: hidden;
|
|
||||||
box-shadow: 0 4px 16px rgba(0,0,0,0.08);
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
thead {
|
|
||||||
background: #d93939;
|
|
||||||
color: #ffffff;
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
th, td {
|
|
||||||
padding: 12px 10px;
|
|
||||||
border-bottom: 1px solid #eee;
|
|
||||||
font-size: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
tbody tr:hover {
|
|
||||||
background: #fff2f2;
|
|
||||||
}
|
|
||||||
|
|
||||||
.server-col {
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.price-col {
|
|
||||||
color: #d93939;
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<div class="container">
|
|
||||||
|
|
||||||
<h1>{{ name }} ({{ alias }})</h1>
|
|
||||||
|
|
||||||
<img src="{{ view }}" alt="{{ name }}" class="goods-image">
|
|
||||||
|
|
||||||
<p class="goods-desc">{{ desc }}</p>
|
|
||||||
|
|
||||||
<div class="meta-row">
|
|
||||||
<span>发布时间:{{ date }}</span>
|
|
||||||
<span class="price">参考价格:{{ cost }} 元</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="table-wrapper">
|
|
||||||
|
|
||||||
<!-- 1 万宝楼公示 -->
|
|
||||||
<div class="table-card">
|
|
||||||
<div class="table-title">万宝楼公示</div>
|
|
||||||
<table>
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr style="height: 50px; text-align: center;">
|
||||||
<th>时间</th>
|
<th style="border:1px solid #000; padding:4px;">物品名称</th>
|
||||||
<th>服务器</th>
|
<th style="border:1px solid #000; padding:4px;">最低价</th>
|
||||||
<th>价格</th>
|
<th style="border:1px solid #000; padding:4px;">总数量</th>
|
||||||
<th>状态</th>
|
<th style="border:1px solid #000; padding:4px;">数据更新时间</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for item in list[3] %}
|
{% for item in items %}
|
||||||
<tr>
|
<tr style="height: 45px; text-align: center;">
|
||||||
<td class="server-col">{{ item.date }}</td>
|
<td style="border:1px solid #000; padding:4px; text-align: left;">
|
||||||
<td class="server-col">{{ item.server }}</td>
|
<img src="{{ item.IconID }}" alt="icon" style="width:20px; height:20px; vertical-align:middle; border-radius:4px; margin-right:6px;">
|
||||||
<td class="price-col">{{ item.value }}</td>
|
{{ item.Name }}
|
||||||
<td class="server-col"> 公示 </td>
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 2 万宝楼在售 -->
|
|
||||||
<div class="table-card">
|
|
||||||
<div class="table-title">万宝楼在售</div>
|
|
||||||
<table>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>时间</th>
|
|
||||||
<th>服务器</th>
|
|
||||||
<th>价格</th>
|
|
||||||
<th>状态</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% for item in list[4] %}
|
|
||||||
<tr>
|
|
||||||
<td class="server-col">{{ item.date }}</td>
|
|
||||||
<td class="server-col">{{ item.server }}</td>
|
|
||||||
<td class="price-col">{{ item.value }}</td>
|
|
||||||
<td class="server-col"> 在售 </td>
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 3 查询区服 -->
|
|
||||||
<div class="table-card">
|
|
||||||
<div class="table-title">查询区服</div>
|
|
||||||
<table>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>时间</th>
|
|
||||||
<th>服务器</th>
|
|
||||||
<th>价格</th>
|
|
||||||
<th>状态</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% for item in list[5] %}
|
|
||||||
<tr>
|
|
||||||
<td class="server-col">{{ item.date }}</td>
|
|
||||||
<td class="server-col">{{ item.server }}</td>
|
|
||||||
<td class="price-col">{{ item.value }}</td>
|
|
||||||
<td class="server-col">
|
|
||||||
{% if item.source == 1 %}出售
|
|
||||||
{% elif item.source == 2 %}收购
|
|
||||||
{% elif item.source == 3 %}想出
|
|
||||||
{% elif item.source == 4 %}想收
|
|
||||||
{% elif item.source == 5 %}成交
|
|
||||||
{% elif item.source == 6 %}正出
|
|
||||||
{% else %}未知
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
</td>
|
||||||
|
<td style="border:1px solid #000; padding:4px;">{{ item.AvgPrice }}</td>
|
||||||
|
<td style="border:1px solid #000; padding:4px;">{{ item.SampleSize }}</td>
|
||||||
|
<td style="border:1px solid #000; padding:4px;">{{ item.Date }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 4 电信区 -->
|
|
||||||
<div class="table-card">
|
|
||||||
<div class="table-title">电信区</div>
|
|
||||||
<table>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>时间</th>
|
|
||||||
<th>服务器</th>
|
|
||||||
<th>价格</th>
|
|
||||||
<th>状态</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% for item in list[0] %}
|
|
||||||
<tr>
|
|
||||||
<td class="server-col">{{ item.date }}</td>
|
|
||||||
<td class="server-col">{{ item.server }}</td>
|
|
||||||
<td class="price-col">{{ item.value }}</td>
|
|
||||||
<td class="server-col">
|
|
||||||
{% if item.source == 1 %}出售
|
|
||||||
{% elif item.source == 2 %}收购
|
|
||||||
{% elif item.source == 3 %}想出
|
|
||||||
{% elif item.source == 4 %}想收
|
|
||||||
{% elif item.source == 5 %}成交
|
|
||||||
{% elif item.source == 6 %}正出
|
|
||||||
{% else %}未知
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 5 双线区 -->
|
|
||||||
<div class="table-card">
|
|
||||||
<div class="table-title">双线区</div>
|
|
||||||
<table>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>时间</th>
|
|
||||||
<th>服务器</th>
|
|
||||||
<th>价格</th>
|
|
||||||
<th>状态</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% for item in list[1] %}
|
|
||||||
<tr>
|
|
||||||
<td class="server-col">{{ item.date }}</td>
|
|
||||||
<td class="server-col">{{ item.server }}</td>
|
|
||||||
<td class="price-col">{{ item.value }}</td>
|
|
||||||
<td class="server-col">
|
|
||||||
{% if item.source == 1 %}出售
|
|
||||||
{% elif item.source == 2 %}收购
|
|
||||||
{% elif item.source == 3 %}想出
|
|
||||||
{% elif item.source == 4 %}想收
|
|
||||||
{% elif item.source == 5 %}成交
|
|
||||||
{% elif item.source == 6 %}正出
|
|
||||||
{% else %}未知
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 6 无界区 -->
|
|
||||||
<div class="table-card">
|
|
||||||
<div class="table-title">无界区</div>
|
|
||||||
<table>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>时间</th>
|
|
||||||
<th>服务器</th>
|
|
||||||
<th>价格</th>
|
|
||||||
<th>状态</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% for item in list[2] %}
|
|
||||||
<tr>
|
|
||||||
<td class="server-col">{{ item.date }}</td>
|
|
||||||
<td class="server-col">{{ item.server }}</td>
|
|
||||||
<td class="price-col">{{ item.value }}</td>
|
|
||||||
<td class="server-col">
|
|
||||||
{% if item.source == 1 %}出售
|
|
||||||
{% elif item.source == 2 %}收购
|
|
||||||
{% elif item.source == 3 %}想出
|
|
||||||
{% elif item.source == 4 %}想收
|
|
||||||
{% elif item.source == 5 %}成交
|
|
||||||
{% elif item.source == 6 %}正出
|
|
||||||
{% else %}未知
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user