diff --git a/client-patch/90CN_web.ini b/client-patch/90CN_web.ini index 09e7023..b22d94d 100644 --- a/client-patch/90CN_web.ini +++ b/client-patch/90CN_web.ini @@ -15,7 +15,7 @@ minimize_game=0 ; (推荐,原面板不会残留、也不会再露面);0 = 把面板放回去(老行为,会看到旧 IE 页面) close_action=1 ; 我们自己的窗口尺寸 -width=1040 +width=920 height=720 ; 目标页面。必须是本地 http,避免浏览器弹证书提示。 url=http://127.0.0.1:18112/ diff --git a/gmweb/app.js b/gmweb/app.js index 1e6ba5a..f248463 100644 --- a/gmweb/app.js +++ b/gmweb/app.js @@ -4,7 +4,7 @@ 'use strict'; var S = { - charId: '', charName: '', chars: [], bagRows: [], + charId: '', charName: '', chars: [], itemId: 0, itemName: '', picked: null, items: [], page: 1, pageSize: 20, total: 0 }; @@ -66,7 +66,6 @@ for (var j = 0; j < panes.length; j++) { panes[j].className = 'pane' + (panes[j].id === 'pane-' + name ? ' on' : ''); } - if (name === 'bag') { loadBag(0); } } function bindTabs() { @@ -156,6 +155,17 @@ return true; } + /* 一键回满疲劳:直接把库里 fatigue 写回上限。 + 服务端要求角色已下线(在线时写库会被下一个存档覆盖),所以在线角色会报错。 */ + function refillFatigue() { + if (!requireChar()) { return; } + api('/dnf/gm/characters/' + S.charId + '/fatigue/refill', 'POST', {}, function (d) { + if (!d) { return; } + log('已回满 ' + S.charName + ' 的疲劳值', 'ok'); + loadChars(); + }); + } + /* ---------------------------------------------------------------- 物品 */ /* 装备类型标签:PVF 里是 "[weapon]" 这种,去掉括号后映射成中文。 */ @@ -384,10 +394,7 @@ var data = d.data || {}; log('已发 ' + S.itemName + ' ×' + n + optText(o) + (data.slot != null ? ',格位 ' + data.list_type + ':' + data.slot : ''), 'ok'); - // 发完立刻切到背包页并高亮这一行:到底有没有进包,玩家要看得见 - switchTab('bag'); - loadBag(S.itemId); - setTimeout(function () { loadBag(S.itemId); }, 600); + // 回游戏里看背包即可(客户端会自动刷新),这里不再切页打断操作 }); } @@ -406,78 +413,22 @@ }); } - /* ---------------------------------------------------------------- 背包 */ + /* ---------------------------------------------------------------- 赞助 */ - /* 背包 / 穿戴的实时快照。GM 发完东西,玩家第一件事就是看它到底进没进包, - 所以这里按服务端实际存的行来列,不做任何本地猜测。 */ - function loadBag(highlightItemId) { - if (!S.charId) { - $('bag-list').innerHTML = '
+
+
的后缀改成 .jpg 即可
+- 换图后刷新控制台页面(标题栏的刷新按钮)就能看到,不用重启服务
+- 图片没放时,赞助页显示「二维码未配置」占位,不影响其他功能
diff --git a/gmweb/serve.py b/gmweb/serve.py
index 7acdd9a..aa46237 100644
--- a/gmweb/serve.py
+++ b/gmweb/serve.py
@@ -32,6 +32,12 @@ MIME = {
".js": "application/javascript; charset=utf-8",
".css": "text/css; charset=utf-8",
".png": "image/png",
+ ".jpg": "image/jpeg",
+ ".jpeg": "image/jpeg",
+ ".gif": "image/gif",
+ ".webp": "image/webp",
+ ".bmp": "image/bmp",
+ ".svg": "image/svg+xml",
".ico": "image/x-icon",
}
diff --git a/gmweb/style.css b/gmweb/style.css
index 35ea91f..689c18d 100644
--- a/gmweb/style.css
+++ b/gmweb/style.css
@@ -6,11 +6,10 @@ html, body {
overflow: hidden;
}
#hd {
- height: 30px; padding: 0 10px;
+ height: 26px; padding: 0 10px;
background: #1d2029; border-bottom: 1px solid #2b3040;
- line-height: 30px;
+ line-height: 26px;
}
-#hd-t { float: left; font-weight: bold; color: #e8c979; letter-spacing: 1px; }
#hd-s { float: right; color: #8d94a6; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 4px; margin-right: 6px; }
.dot.on { background: #4ec46a; }
@@ -24,7 +23,7 @@ html, body {
.tab:hover { color: #d8dbe2; }
.tab.on { color: #e8c979; border-bottom-color: #e8c979; background: #20242e; }
-#body { position: absolute; top: 59px; bottom: 62px; left: 0; right: 0; overflow: auto; }
+#body { position: absolute; top: 55px; bottom: 62px; left: 0; right: 0; overflow: auto; }
.pane { display: none; padding: 10px; }
.pane.on { display: block; }
@@ -111,3 +110,19 @@ select.inp { padding: 3px 2px; }
font-style: normal; font-size: 11px; padding: 0 4px; margin-left: 4px;
background: #e8c979; color: #1a1e27; border-radius: 2px;
}
+
+/* 赞助页:收款码(IE11 不支持 flex,用 float 排两列) */
+.qr-wrap { overflow: hidden; margin-top: 10px; }
+.qr-card {
+ float: left; width: 216px; margin: 0 14px 10px 0;
+ background: #1a1e27; border: 1px solid #2b3040; padding: 10px;
+}
+.qr-title { color: #e8c979; letter-spacing: 1px; margin-bottom: 8px; }
+.qr-box {
+ width: 194px; height: 194px; position: relative; overflow: hidden;
+ background: #0f1116; border: 1px dashed #3a4154; text-align: center;
+}
+.qr-box img { display: block; width: 194px; height: 194px; }
+.qr-miss { display: none; padding-top: 72px; color: #666e80; line-height: 1.8; }
+.qr-box.miss .qr-miss { display: block; }
+.qr-path { color: #4c5365; font-size: 11px; margin-top: 2px; }