mirror of
https://github.com/VickScarlet/lifeRestart.git
synced 2026-08-19 18:43:53 +08:00
38 lines
1.7 KiB
HTML
38 lines
1.7 KiB
HTML
<!doctype html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Toy 分片云存档接入示例</title>
|
|
<style>
|
|
:root { color-scheme: light; font-family: system-ui, sans-serif; }
|
|
body { max-width: 760px; margin: 0 auto; padding: 24px; color: #18191c; background: #f6f7f8; }
|
|
main { display: grid; gap: 16px; padding: 24px; border: 1px solid #e3e5e7; border-radius: 12px; background: #fff; }
|
|
textarea { width: 100%; min-height: 220px; box-sizing: border-box; padding: 12px; font: 14px/1.6 ui-monospace, monospace; }
|
|
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
|
|
button { min-height: 44px; padding: 0 18px; border: 0; border-radius: 8px; color: #fff; background: #00aeec; cursor: pointer; }
|
|
button:disabled { cursor: wait; opacity: .55; }
|
|
#status { min-height: 24px; margin: 0; color: #61666d; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<main>
|
|
<h1>Toy 分片云存档接入示例</h1>
|
|
<p>示例始终先保存本地档;Toy SDK 可用且玩家已登录时,再提交云端。</p>
|
|
<label for="save-json">存档 JSON</label>
|
|
<textarea id="save-json" spellcheck="false"></textarea>
|
|
<div class="actions">
|
|
<button id="make-example" type="button">生成示例</button>
|
|
<button id="save" type="button">保存</button>
|
|
<button id="load" type="button">读取</button>
|
|
</div>
|
|
<p id="status" role="status" aria-live="polite">正在初始化…</p>
|
|
</main>
|
|
|
|
<!-- 顺序不可颠倒:Toy SDK → 通用核心 → 业务脚本。 -->
|
|
<script src="https://s1.hdslb.com/bfs/seed/toy/app/sdk/toy-sdk.js"></script>
|
|
<script src="./cloud-save-core.js"></script>
|
|
<script src="./example.js"></script>
|
|
</body>
|
|
</html>
|