alemonjs-mhy 1.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +142 -0
- package/README_COMMAND.md +3 -0
- package/lib/assets/css/input.scss.js +4 -0
- package/lib/assets/font/tttgbnumber.ttf.js +4 -0
- package/lib/assets/input.scss-WpyAoyNf.css +2 -0
- package/lib/assets/tttgbnumber-BbQ05dtA.ttf +0 -0
- package/lib/constants/mihoyo.d.ts +53 -0
- package/lib/constants/mihoyo.js +46 -0
- package/lib/img/views/BuddyCard.d.ts +16 -0
- package/lib/img/views/BuddyCard.js +111 -0
- package/lib/img/views/CkHelpCard.d.ts +2 -0
- package/lib/img/views/CkHelpCard.js +147 -0
- package/lib/img/views/DailyNoteCard.d.ts +66 -0
- package/lib/img/views/DailyNoteCard.js +211 -0
- package/lib/img/views/HTML.d.ts +3 -0
- package/lib/img/views/HTML.js +29 -0
- package/lib/img/views/LedgerCard.d.ts +50 -0
- package/lib/img/views/LedgerCard.js +216 -0
- package/lib/img/views/MihoyoHelp.d.ts +10 -0
- package/lib/img/views/MihoyoHelp.js +164 -0
- package/lib/img/views/MysNewsCard.d.ts +24 -0
- package/lib/img/views/MysNewsCard.js +134 -0
- package/lib/img/views/PlayerIndexCard.d.ts +79 -0
- package/lib/img/views/PlayerIndexCard.js +252 -0
- package/lib/img/views/QrLoginCard.d.ts +10 -0
- package/lib/img/views/QrLoginCard.js +171 -0
- package/lib/img/views/RoleCombatCard.d.ts +74 -0
- package/lib/img/views/RoleCombatCard.js +148 -0
- package/lib/img/views/RoleExploreCard.d.ts +63 -0
- package/lib/img/views/RoleExploreCard.js +189 -0
- package/lib/img/views/SpiralAbyssCard.d.ts +96 -0
- package/lib/img/views/SpiralAbyssCard.js +151 -0
- package/lib/img/views/WeaponCard.d.ts +26 -0
- package/lib/img/views/WeaponCard.js +157 -0
- package/lib/index.d.ts +16 -0
- package/lib/index.js +21 -0
- package/lib/model/keys.d.ts +13 -0
- package/lib/model/keys.js +16 -0
- package/lib/model/mihoyo/account.d.ts +19 -0
- package/lib/model/mihoyo/account.js +128 -0
- package/lib/model/mihoyo/apiMap.d.ts +2 -0
- package/lib/model/mihoyo/apiMap.js +126 -0
- package/lib/model/mihoyo/cookie.d.ts +29 -0
- package/lib/model/mihoyo/cookie.js +128 -0
- package/lib/model/mihoyo/mysApi.d.ts +33 -0
- package/lib/model/mihoyo/mysApi.js +333 -0
- package/lib/model/mihoyo/query.d.ts +16 -0
- package/lib/model/mihoyo/query.js +74 -0
- package/lib/model/mihoyo/region.d.ts +2 -0
- package/lib/model/mihoyo/region.js +50 -0
- package/lib/model/mihoyo/sign.d.ts +22 -0
- package/lib/model/mihoyo/sign.js +331 -0
- package/lib/model/mihoyo/stoken.d.ts +62 -0
- package/lib/model/mihoyo/stoken.js +282 -0
- package/lib/model/mihoyo/types.d.ts +26 -0
- package/lib/model/mihoyo/types.js +1 -0
- package/lib/model/mw.d.ts +8 -0
- package/lib/model/mw.js +13 -0
- package/lib/response/mihoyo/bbsSign.d.ts +3 -0
- package/lib/response/mihoyo/bbsSign.js +24 -0
- package/lib/response/mihoyo/bindCk.d.ts +3 -0
- package/lib/response/mihoyo/bindCk.js +61 -0
- package/lib/response/mihoyo/bindStoken.d.ts +3 -0
- package/lib/response/mihoyo/bindStoken.js +99 -0
- package/lib/response/mihoyo/bindUid.d.ts +3 -0
- package/lib/response/mihoyo/bindUid.js +60 -0
- package/lib/response/mihoyo/birthday.d.ts +3 -0
- package/lib/response/mihoyo/birthday.js +159 -0
- package/lib/response/mihoyo/buddy.d.ts +3 -0
- package/lib/response/mihoyo/buddy.js +34 -0
- package/lib/response/mihoyo/ckCheck.d.ts +3 -0
- package/lib/response/mihoyo/ckCheck.js +64 -0
- package/lib/response/mihoyo/ckHelp.d.ts +3 -0
- package/lib/response/mihoyo/ckHelp.js +25 -0
- package/lib/response/mihoyo/dailyNote.d.ts +3 -0
- package/lib/response/mihoyo/dailyNote.js +48 -0
- package/lib/response/mihoyo/delUid.d.ts +3 -0
- package/lib/response/mihoyo/delUid.js +66 -0
- package/lib/response/mihoyo/exchange.d.ts +3 -0
- package/lib/response/mihoyo/exchange.js +143 -0
- package/lib/response/mihoyo/gameSign.d.ts +3 -0
- package/lib/response/mihoyo/gameSign.js +26 -0
- package/lib/response/mihoyo/help.d.ts +3 -0
- package/lib/response/mihoyo/help.js +35 -0
- package/lib/response/mihoyo/ledger.d.ts +3 -0
- package/lib/response/mihoyo/ledger.js +99 -0
- package/lib/response/mihoyo/myCk.d.ts +3 -0
- package/lib/response/mihoyo/myCk.js +63 -0
- package/lib/response/mihoyo/mysNews.d.ts +3 -0
- package/lib/response/mihoyo/mysNews.js +108 -0
- package/lib/response/mihoyo/payLog.d.ts +3 -0
- package/lib/response/mihoyo/payLog.js +213 -0
- package/lib/response/mihoyo/playerIndex.d.ts +3 -0
- package/lib/response/mihoyo/playerIndex.js +48 -0
- package/lib/response/mihoyo/qrLogin.d.ts +3 -0
- package/lib/response/mihoyo/qrLogin.js +125 -0
- package/lib/response/mihoyo/roleCombat.d.ts +3 -0
- package/lib/response/mihoyo/roleCombat.js +33 -0
- package/lib/response/mihoyo/roleExplore.d.ts +3 -0
- package/lib/response/mihoyo/roleExplore.js +48 -0
- package/lib/response/mihoyo/sevenSaints.d.ts +3 -0
- package/lib/response/mihoyo/sevenSaints.js +107 -0
- package/lib/response/mihoyo/showUid.d.ts +3 -0
- package/lib/response/mihoyo/showUid.js +52 -0
- package/lib/response/mihoyo/spiralAbyss.d.ts +3 -0
- package/lib/response/mihoyo/spiralAbyss.js +56 -0
- package/lib/response/mihoyo/useCode.d.ts +3 -0
- package/lib/response/mihoyo/useCode.js +101 -0
- package/lib/response/mihoyo/weapon.d.ts +3 -0
- package/lib/response/mihoyo/weapon.js +36 -0
- package/lib/response/mw.d.ts +3 -0
- package/lib/response/mw.js +6 -0
- package/lib/response/router.d.ts +4 -0
- package/lib/response/router.js +136 -0
- package/package.json +71 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Yoimiya
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# 阿柠檬-米哈游
|
|
2
|
+
|
|
3
|
+
必要环境 `nodejs` 、`sql(mysql/sqlite)`、`redis` 、`chrome`
|
|
4
|
+
|
|
5
|
+
该扩展推荐使用`alemongo`或`alemondesk`作为生产环境
|
|
6
|
+
|
|
7
|
+
`alemongo` https://github.com/lemonade-lab/alemongo
|
|
8
|
+
|
|
9
|
+
`alemondesk` https://github.com/lemonade-lab/alemondesk
|
|
10
|
+
|
|
11
|
+
## 指令一览
|
|
12
|
+
|
|
13
|
+
[README_COMMAND](./README_COMMAND.md)
|
|
14
|
+
|
|
15
|
+
## 安装方式1: Git
|
|
16
|
+
|
|
17
|
+
### alemongo/alemondesk
|
|
18
|
+
|
|
19
|
+
- 地址
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
https://github.com/xiuxianjs/alemonjs-mhy.git
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
若访问受限,可使用如下加速地址
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
https://ghfast.top/https://github.com/xiuxianjs/alemonjs-mhy.git
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
- branch
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
release
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### 本地
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
git clone -b release --depth=1 https://github.com/xiuxianjs/alemonjs-mhy.git ./packages/alemonjs-mhy
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
yarn install #开始模块化
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
- alemon.config.yaml
|
|
48
|
+
|
|
49
|
+
```yaml
|
|
50
|
+
apps:
|
|
51
|
+
alemonjs-mhy: true # 启动扩展
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## 安装方式2: npm
|
|
55
|
+
|
|
56
|
+
> 暂未支持
|
|
57
|
+
|
|
58
|
+
## 开发指南
|
|
59
|
+
|
|
60
|
+
### 导出 API
|
|
61
|
+
|
|
62
|
+
```typescript
|
|
63
|
+
import {
|
|
64
|
+
// 类型
|
|
65
|
+
type MihoyoGame,
|
|
66
|
+
type StoredCookieData,
|
|
67
|
+
type StokenData,
|
|
68
|
+
type QueryResult,
|
|
69
|
+
|
|
70
|
+
// 游戏检测
|
|
71
|
+
resolveGame,
|
|
72
|
+
|
|
73
|
+
// 账号操作
|
|
74
|
+
getUserCookie,
|
|
75
|
+
getUserMainUid,
|
|
76
|
+
bindUserCookie,
|
|
77
|
+
|
|
78
|
+
// Stoken
|
|
79
|
+
getUserStoken,
|
|
80
|
+
bindStoken,
|
|
81
|
+
|
|
82
|
+
// 签到
|
|
83
|
+
performGameSign,
|
|
84
|
+
performBbsSign,
|
|
85
|
+
|
|
86
|
+
// 统一查询(推荐)
|
|
87
|
+
queryMihoyoApi,
|
|
88
|
+
|
|
89
|
+
// 底层 API
|
|
90
|
+
mysApiFetch,
|
|
91
|
+
fetchGameRoles
|
|
92
|
+
} from 'alemonjs-mhy';
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
#### `queryMihoyoApi` — 统一查询
|
|
96
|
+
|
|
97
|
+
大多数查询场景推荐使用此方法,自动处理 Cookie 读取、UID 获取、区服识别:
|
|
98
|
+
|
|
99
|
+
```typescript
|
|
100
|
+
const result = await queryMihoyoApi({
|
|
101
|
+
userId: '用户ID',
|
|
102
|
+
game: 'gs',
|
|
103
|
+
api: 'dailyNote'
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
if (result.success) {
|
|
107
|
+
console.log(result.data); // API 返回数据
|
|
108
|
+
console.log(result.uid); // 使用的 UID
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
#### `mysApiFetch` — 底层调用
|
|
113
|
+
|
|
114
|
+
需要自行传入 Cookie 和 UID,适合定制化场景:
|
|
115
|
+
|
|
116
|
+
```typescript
|
|
117
|
+
const res = await mysApiFetch({
|
|
118
|
+
uid: '100000001',
|
|
119
|
+
cookie: 'ltoken=xxx;ltuid=xxx;',
|
|
120
|
+
api: 'dailyNote',
|
|
121
|
+
game: 'gs'
|
|
122
|
+
});
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## 免责声明
|
|
126
|
+
|
|
127
|
+
- 勿用于以盈利为目的的场景
|
|
128
|
+
|
|
129
|
+
- 代码开放,无需征得特殊同意,可任意使用。能备注来源最好,但不强求
|
|
130
|
+
|
|
131
|
+
- 图片与其他素材均来自于网络,仅供交流学习使用,如有侵权请联系,会立即删除
|
|
132
|
+
|
|
133
|
+
## 引用
|
|
134
|
+
|
|
135
|
+
| Nickname | Contribution |
|
|
136
|
+
| :--------------------------------------------------------: | -------------------- |
|
|
137
|
+
| [Yunzai](https://gitee.com/le-niao/Yunzai-Bot) | 米游社API来源 |
|
|
138
|
+
| [miao](https://github.com/yoimiya-kokomi/miao-plugin) | 米游社API部分来源 |
|
|
139
|
+
| [cvs](https://github.com/ctrlcvs/xiaoyao-cvs-plugin) | 米游社SToken来源 |
|
|
140
|
+
| [Hamster](https://github.com/GardenHamster/GenshinPray) | 模拟抽卡背景素材来源 |
|
|
141
|
+
| [西风驿站](https://bbs.mihoyo.com/ys/collection/839181) | 角色攻略图来源 |
|
|
142
|
+
| [米游社友人A](https://bbs.mihoyo.com/ys/collection/428421) | 角色突破素材图来源 |
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
:root{--bg-color:rgba(60,58,58,.79);--border-radius:9px;--title-color:#3d3527d9;--title-text-shadow:2px 2px 4px #dfdfdf;--box-shadow:2px 2px 4px #3d3527d9;--box-shadow-bool:2px 2px 4px #ff0000ba;--inset-box-shadow:inset 0px 0px 21px #ffffffd9;--inset-bg-color:rgba(60,58,58,.532);--uid-background-color:linear-gradient(45deg,#585858c9,#a5a5bfd9);--font-color:#10e633dc;--nav-state-color:#00bbd4;--bool-left-color:#f3d109a6;--bool-right-color:#ff0000ba}#root[data-theme=red]{--bg-color:hsla(0,74%,74%,.79);--border-radius:9px;--title-color:#4b2f13cc;--title-text-shadow:2px 2px 4px #fff;--box-shadow:2px 2px 4px #4b2f13cc;--inset-box-shadow:inset 0px 0px 21px #ffffffd9;--inset-bg-color:hsla(0,74%,74%,.596);--box-shadow-bool:2px 2px 4px #ff0000ba;--uid-background-color:linear-gradient(45deg,hsla(0,80%,78%,.79),#a74742d9);--font-color:#10e633dc;--nav-state-color:#7dac19;--bool-left-color:#f7da2fa6;--bool-right-color:#ff6800ba}#root[data-theme=blue]{--bg-color:rgba(83,107,153,.73);--border-radius:9px;--title-color:#d4d5e0e0;--title-text-shadow:2px 2px 4px #4067ade3;--box-shadow:2px 2px 4px #d4d5e0e0;--inset-box-shadow:inset 0px 0px 21px #ffffffd9;--inset-bg-color:rgba(83,107,153,.578);--box-shadow-bool:2px 2px 4px #ff0000ba;--uid-background-color:linear-gradient(45deg,#4067ad54,#143878eb);--font-color:#10e633dc;--nav-state-color:#0097d4;--bool-left-color:#aadb03ba;--bool-right-color:#f72020ba}#root[data-theme=purple]{--bg-color:#2c447594;--border-radius:9px;--title-color:#4b6774cc;--title-text-shadow:2px 2px 4px #fff;--box-shadow:2px 2px 4px #4b6774cc;--inset-box-shadow:inset 0px 0px 21px #ffffffd9;--inset-bg-color:rgba(164,178,205,.63);--box-shadow-bool:2px 2px 4px #ff0000ba;--uid-background-color:linear-gradient(45deg,#bab3e8c9,#626288d9);--font-color:#10e633dc;--nav-state-color:#3cc7d9;--bool-left-color:#83e139ba;--bool-right-color:#f72020cc}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }
|
|
2
|
+
/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.absolute{position:absolute}.relative{position:relative}.m-0{margin:0}.block{display:block}.flex{display:flex}.hidden{display:none}.w-full{width:100%}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.break-all{word-break:break-all}.border{border-width:1px}.p-0{padding:0}.text-center{text-align:center}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}body{display:flex;flex-direction:column;margin:0;padding:0}
|
|
Binary file
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export declare const mihoyoConstants: {
|
|
2
|
+
readonly commandPrefixPattern: "(!|!|/|#|#)";
|
|
3
|
+
readonly games: {
|
|
4
|
+
readonly gs: {
|
|
5
|
+
readonly key: "gs";
|
|
6
|
+
readonly name: "原神";
|
|
7
|
+
};
|
|
8
|
+
readonly sr: {
|
|
9
|
+
readonly key: "sr";
|
|
10
|
+
readonly name: "星穹铁道";
|
|
11
|
+
};
|
|
12
|
+
readonly zzz: {
|
|
13
|
+
readonly key: "zzz";
|
|
14
|
+
readonly name: "绝区零";
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
readonly ckMaskKeepLength: 6;
|
|
18
|
+
readonly requestTimeoutMs: 10000;
|
|
19
|
+
readonly cacheSeconds: 300;
|
|
20
|
+
};
|
|
21
|
+
export declare const mihoyoRouteRules: {
|
|
22
|
+
readonly help: RegExp;
|
|
23
|
+
readonly bindCk: RegExp;
|
|
24
|
+
readonly bindUid: RegExp;
|
|
25
|
+
readonly showUid: RegExp;
|
|
26
|
+
readonly myCk: RegExp;
|
|
27
|
+
readonly delUid: RegExp;
|
|
28
|
+
readonly cookieAccept: RegExp;
|
|
29
|
+
readonly dailyNote: RegExp;
|
|
30
|
+
readonly playerIndex: RegExp;
|
|
31
|
+
readonly spiralAbyss: RegExp;
|
|
32
|
+
readonly roleExplore: RegExp;
|
|
33
|
+
readonly weapon: RegExp;
|
|
34
|
+
readonly buddy: RegExp;
|
|
35
|
+
readonly roleCombat: RegExp;
|
|
36
|
+
readonly ledger: RegExp;
|
|
37
|
+
readonly exchange: RegExp;
|
|
38
|
+
readonly useCode: RegExp;
|
|
39
|
+
readonly mysNews: RegExp;
|
|
40
|
+
readonly ckHelp: RegExp;
|
|
41
|
+
readonly ckCheck: RegExp;
|
|
42
|
+
readonly bindStoken: RegExp;
|
|
43
|
+
readonly stokenAccept: RegExp;
|
|
44
|
+
readonly myStoken: RegExp;
|
|
45
|
+
readonly delStoken: RegExp;
|
|
46
|
+
readonly gameSign: RegExp;
|
|
47
|
+
readonly bbsSign: RegExp;
|
|
48
|
+
readonly qrLogin: RegExp;
|
|
49
|
+
readonly sevenSaints: RegExp;
|
|
50
|
+
readonly birthday: RegExp;
|
|
51
|
+
readonly payLog: RegExp;
|
|
52
|
+
readonly payLogAuth: RegExp;
|
|
53
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const mihoyoConstants = {
|
|
2
|
+
commandPrefixPattern: '(!|!|/|#|#)',
|
|
3
|
+
games: {
|
|
4
|
+
gs: { key: 'gs', name: '原神' },
|
|
5
|
+
sr: { key: 'sr', name: '星穹铁道' },
|
|
6
|
+
zzz: { key: 'zzz', name: '绝区零' }
|
|
7
|
+
},
|
|
8
|
+
ckMaskKeepLength: 6,
|
|
9
|
+
requestTimeoutMs: 10000,
|
|
10
|
+
cacheSeconds: 300
|
|
11
|
+
};
|
|
12
|
+
const mihoyoRouteRules = {
|
|
13
|
+
help: /^(!|!|\/|#|#)(米游社|米哈游|mhy|mihoyo)(帮助|help|模块)$/,
|
|
14
|
+
bindCk: /^(!|!|\/|#|#)绑定c(oo)?k(ie)?$/i,
|
|
15
|
+
bindUid: /^(!|!|\/|#|#)(原神|星铁|绝区零)?绑定(uid)?(\s|\+)*((1[0-9]|[1-9])[0-9]{8}|[1-9][0-9]{7})$/i,
|
|
16
|
+
showUid: /^(!|!|\/|#|#)(原神|星铁|绝区零)?(我的)?(uid)\d{0,2}$/i,
|
|
17
|
+
myCk: /^(!|!|\/|#|#)(原神|星铁|绝区零)?(我的|删除)c(oo)?k(ie)?$/i,
|
|
18
|
+
delUid: /^(!|!|\/|#|#)(原神|星铁|绝区零)?(删除|解绑)uid(\s|\+)*(\d{1,2})?$/i,
|
|
19
|
+
cookieAccept: /(ltoken|ltoken_v2).*(ltuid|login_uid|ltmid_v2)/,
|
|
20
|
+
dailyNote: /^(!|!|\/|#|#)*(原神|星铁|绝区零)?(体力|树脂|查询体力|开拓力|电量)$/,
|
|
21
|
+
playerIndex: /^(!|!|\/|#|#)(原神|星铁|绝区零)?(角色|面板)$/,
|
|
22
|
+
spiralAbyss: /^(!|!|\/|#|#)(原神|星铁)?(上期|往期|本期)*(深渊|深境|深境螺旋|忘却之庭|虚构叙事)(上期|往期|本期)*$/,
|
|
23
|
+
roleExplore: /^(!|!|\/|#|#)(原神|星铁|绝区零)?(宝箱|成就|尘歌壶|家园|探索|探险|声望|探险度|探索度)\s*\d*$/,
|
|
24
|
+
weapon: /^(!|!|\/|#|#)(原神)?(五星|四星|5星|4星)*武器\s*\d*$/,
|
|
25
|
+
buddy: /^(!|!|\/|#|#)(绝区零)?邦布$/,
|
|
26
|
+
roleCombat: /^(!|!|\/|#|#)(幻想真境剧诗|剧诗)$/,
|
|
27
|
+
ledger: /^(!|!|\/|#|#)(原神|星铁)?(原石|星琼|札记)\s*(\d{1,2}月?|[一二三四五六七八九十]+月?)?$/,
|
|
28
|
+
exchange: /^(!|!|\/|#|#)(原神|星铁|崩铁|绝区零)?兑换码$/,
|
|
29
|
+
useCode: /^(!|!|\/|#|#)(原神|星铁|崩铁|绝区零)?(兑换码使用|cdk-u).+/i,
|
|
30
|
+
mysNews: /^(!|!|\/|#|#)(原神|星铁|绝区零|崩坏三|崩三)?(公告|资讯|活动)(列表)?\s*\d*$/,
|
|
31
|
+
ckHelp: /^(!|!|\/|#|#)(ck|cookie)(帮助|说明|教程)$/i,
|
|
32
|
+
ckCheck: /^(!|!|\/|#|#)(检查|验证|测试)c(oo)?k(ie)?$/i,
|
|
33
|
+
bindStoken: /^(!|!|\/|#|#)(绑定)?stoken$/i,
|
|
34
|
+
stokenAccept: /stoken=.+/,
|
|
35
|
+
myStoken: /^(!|!|\/|#|#)我的stoken$/i,
|
|
36
|
+
delStoken: /^(!|!|\/|#|#)删除(我的)?stoken$/i,
|
|
37
|
+
gameSign: /^(!|!|\/|#|#)*(原神|星铁|星穹铁道|崩铁|崩坏3|崩三|崩3|游戏|全部)?签到$/,
|
|
38
|
+
bbsSign: /^(!|!|\/|#|#)*(米游社|mys|社区|米游币|米币)签到$/,
|
|
39
|
+
qrLogin: /^(!|!|\/|#|#)(扫码|二维码|辅助)(登录|绑定|登陆)$/,
|
|
40
|
+
sevenSaints: /^(!|!|\/|#|#)\*?七圣(召唤)?查询/,
|
|
41
|
+
birthday: /^(!|!|\/|#|#)?(留影(叙佳期)?|(领)?(角色)?生日(卡)?)$/,
|
|
42
|
+
payLog: /^(!|!|\/|#|#)?(更新)?(充值|消费)(记录|统计)(帮助)?$/,
|
|
43
|
+
payLogAuth: /(user-game-search|bill-record-user|customer-claim|player-log|user\.mihoyo\.com).*authkey=/
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export { mihoyoConstants, mihoyoRouteRules };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface BuddyItem {
|
|
3
|
+
id: number;
|
|
4
|
+
name: string;
|
|
5
|
+
rarity: string;
|
|
6
|
+
level: number;
|
|
7
|
+
star: number;
|
|
8
|
+
}
|
|
9
|
+
export interface BuddyCardData {
|
|
10
|
+
uid: string;
|
|
11
|
+
list: BuddyItem[];
|
|
12
|
+
}
|
|
13
|
+
export interface BuddyCardProps {
|
|
14
|
+
data: BuddyCardData;
|
|
15
|
+
}
|
|
16
|
+
export default function BuddyCard({ data }: BuddyCardProps): React.JSX.Element;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import HTML from './HTML.js';
|
|
3
|
+
|
|
4
|
+
const RARITY_STYLE = {
|
|
5
|
+
S: '#c6923a',
|
|
6
|
+
A: '#a256e1',
|
|
7
|
+
B: '#5180cb'
|
|
8
|
+
};
|
|
9
|
+
const styles = {
|
|
10
|
+
card: {
|
|
11
|
+
padding: '24px',
|
|
12
|
+
background: 'linear-gradient(180deg, #f0ebe3 0%, #f5f6fb 40%)',
|
|
13
|
+
fontFamily: '"tttgbnumber", system-ui, sans-serif',
|
|
14
|
+
fontSize: '14px',
|
|
15
|
+
color: '#1e1f20'
|
|
16
|
+
},
|
|
17
|
+
header: {
|
|
18
|
+
background: 'linear-gradient(135deg, #e8d5b0, #d3bc8e)',
|
|
19
|
+
borderRadius: '14px 14px 0 0',
|
|
20
|
+
padding: '14px 20px',
|
|
21
|
+
display: 'flex',
|
|
22
|
+
justifyContent: 'space-between',
|
|
23
|
+
alignItems: 'center',
|
|
24
|
+
boxShadow: '0 4px 12px rgba(0,0,0,0.1)'
|
|
25
|
+
},
|
|
26
|
+
body: {
|
|
27
|
+
background: '#fff',
|
|
28
|
+
borderRadius: '0 0 14px 14px',
|
|
29
|
+
padding: '16px 20px',
|
|
30
|
+
boxShadow: '0 2px 8px rgba(0,0,0,0.06)'
|
|
31
|
+
},
|
|
32
|
+
count: {
|
|
33
|
+
textAlign: 'center',
|
|
34
|
+
fontSize: '13px',
|
|
35
|
+
color: '#9e8e7e',
|
|
36
|
+
padding: '4px 0 12px',
|
|
37
|
+
borderBottom: '1px solid #f0ede8',
|
|
38
|
+
marginBottom: '8px'
|
|
39
|
+
},
|
|
40
|
+
buddyRow: {
|
|
41
|
+
display: 'flex',
|
|
42
|
+
justifyContent: 'space-between',
|
|
43
|
+
alignItems: 'center',
|
|
44
|
+
padding: '6px 0',
|
|
45
|
+
borderBottom: '1px solid #f8f6f2'
|
|
46
|
+
},
|
|
47
|
+
buddyLeft: {
|
|
48
|
+
display: 'flex',
|
|
49
|
+
alignItems: 'center',
|
|
50
|
+
gap: '8px'
|
|
51
|
+
},
|
|
52
|
+
rarityBadge: {
|
|
53
|
+
fontSize: '11px',
|
|
54
|
+
padding: '1px 8px',
|
|
55
|
+
borderRadius: '4px',
|
|
56
|
+
color: '#fff',
|
|
57
|
+
fontWeight: 'bold'
|
|
58
|
+
},
|
|
59
|
+
buddyName: {
|
|
60
|
+
fontSize: '14px',
|
|
61
|
+
fontWeight: 'bold'
|
|
62
|
+
},
|
|
63
|
+
buddyInfo: {
|
|
64
|
+
fontSize: '12px',
|
|
65
|
+
color: '#6b5e4f'
|
|
66
|
+
},
|
|
67
|
+
noData: {
|
|
68
|
+
textAlign: 'center',
|
|
69
|
+
padding: '20px 0',
|
|
70
|
+
color: '#9e8e7e',
|
|
71
|
+
fontSize: '14px'
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
function StarDisplay({ count }) {
|
|
75
|
+
return React.createElement("span", { style: { color: '#c6923a', fontSize: '12px' } }, '★'.repeat(count));
|
|
76
|
+
}
|
|
77
|
+
function BuddyCard({ data }) {
|
|
78
|
+
const now = new Date();
|
|
79
|
+
const dateStr = `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, '0')}-${String(now.getDate()).padStart(2, '0')} ${String(now.getHours()).padStart(2, '0')}:${String(now.getMinutes()).padStart(2, '0')}`;
|
|
80
|
+
const buddies = data.list ?? [];
|
|
81
|
+
const sorted = [...buddies].sort((a, b) => b.level - a.level || b.star - a.star);
|
|
82
|
+
return (React.createElement(HTML, { style: { width: '450px' } },
|
|
83
|
+
React.createElement("div", { style: styles.card },
|
|
84
|
+
React.createElement("div", { style: styles.header },
|
|
85
|
+
React.createElement("div", { style: { display: 'flex', alignItems: 'center', gap: '8px' } },
|
|
86
|
+
React.createElement("span", { style: { fontSize: '20px' } }, "\uD83E\uDD16"),
|
|
87
|
+
React.createElement("span", { style: { fontSize: '18px', fontWeight: 'bold', color: '#4a3c2a' } }, "\u7EDD\u533A\u96F6 \u00B7 \u90A6\u5E03")),
|
|
88
|
+
React.createElement("span", { style: { fontSize: '13px', color: '#7a6b57' } },
|
|
89
|
+
"UID ",
|
|
90
|
+
data.uid)),
|
|
91
|
+
React.createElement("div", { style: styles.body }, sorted.length === 0 ? (React.createElement("div", { style: styles.noData }, "\u6682\u65E0\u90A6\u5E03\u6570\u636E")) : (React.createElement(React.Fragment, null,
|
|
92
|
+
React.createElement("div", { style: styles.count },
|
|
93
|
+
"\u5171 ",
|
|
94
|
+
sorted.length,
|
|
95
|
+
" \u53EA\u90A6\u5E03"),
|
|
96
|
+
sorted.map((b, i) => {
|
|
97
|
+
const color = RARITY_STYLE[b.rarity] ?? '#808080';
|
|
98
|
+
return (React.createElement("div", { key: i, style: styles.buddyRow },
|
|
99
|
+
React.createElement("div", { style: styles.buddyLeft },
|
|
100
|
+
React.createElement("span", { style: { ...styles.rarityBadge, background: color } }, b.rarity),
|
|
101
|
+
React.createElement("span", { style: { ...styles.buddyName, color } }, b.name)),
|
|
102
|
+
React.createElement("div", { style: { textAlign: 'right' } },
|
|
103
|
+
React.createElement("div", { style: styles.buddyInfo },
|
|
104
|
+
"Lv.",
|
|
105
|
+
b.level),
|
|
106
|
+
React.createElement(StarDisplay, { count: b.star }))));
|
|
107
|
+
})))),
|
|
108
|
+
React.createElement("div", { style: { textAlign: 'right', padding: '8px 4px 0', fontSize: '11px', color: '#b0a89c' } }, dateStr))));
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export { BuddyCard as default };
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import HTML from './HTML.js';
|
|
3
|
+
|
|
4
|
+
const STEPS = [
|
|
5
|
+
{ num: 1, text: '使用浏览器打开 miyoushe.com' },
|
|
6
|
+
{ num: 2, text: '登录你的米游社账号' },
|
|
7
|
+
{ num: 3, text: '按 F12 打开开发者工具' },
|
|
8
|
+
{ num: 4, text: '切换到 Console (控制台) 标签' },
|
|
9
|
+
{ num: 5, text: '输入 document.cookie 并回车', highlight: true },
|
|
10
|
+
{ num: 6, text: '复制输出的全部内容' }
|
|
11
|
+
];
|
|
12
|
+
const COMMANDS = [
|
|
13
|
+
{ cmd: '#绑定ck <Cookie>', desc: '绑定Cookie (请私聊发送)' },
|
|
14
|
+
{ cmd: '#我的ck', desc: '查看Cookie绑定状态' },
|
|
15
|
+
{ cmd: '#删除ck', desc: '删除已绑定的Cookie' },
|
|
16
|
+
{ cmd: '#检查ck', desc: '验证Cookie是否有效' },
|
|
17
|
+
{ cmd: '#绑定uid <UID>', desc: '手动绑定游戏UID' },
|
|
18
|
+
{ cmd: '#我的uid', desc: '查看已绑定的UID列表' },
|
|
19
|
+
{ cmd: '#扫码登录', desc: '扫码一键绑定Cookie+Stoken' }
|
|
20
|
+
];
|
|
21
|
+
const WARNINGS = ['请在私聊中发送Cookie,避免泄露', 'Cookie有效期约30天,过期需重新获取', '切勿将Cookie分享给他人', '退出米游社登录后Cookie将失效'];
|
|
22
|
+
function CkHelpCard() {
|
|
23
|
+
return (React.createElement(HTML, { style: { width: '500px' } },
|
|
24
|
+
React.createElement("div", { style: {
|
|
25
|
+
padding: '20px',
|
|
26
|
+
background: 'linear-gradient(180deg, #f0ebe3 0%, #f5f6fb 40%)',
|
|
27
|
+
fontFamily: '"tttgbnumber", system-ui, sans-serif',
|
|
28
|
+
fontSize: '16px',
|
|
29
|
+
color: '#1e1f20',
|
|
30
|
+
textAlign: 'left'
|
|
31
|
+
} },
|
|
32
|
+
React.createElement("div", { style: {
|
|
33
|
+
background: 'linear-gradient(135deg, #e8d5b0, #d3bc8e)',
|
|
34
|
+
borderRadius: '16px 16px 0 0',
|
|
35
|
+
padding: '16px 24px',
|
|
36
|
+
display: 'flex',
|
|
37
|
+
alignItems: 'center',
|
|
38
|
+
gap: '10px',
|
|
39
|
+
boxShadow: '0 4px 12px rgba(0,0,0,0.1)'
|
|
40
|
+
} },
|
|
41
|
+
React.createElement("span", { style: { fontSize: '28px' } }, "\uD83C\uDF6A"),
|
|
42
|
+
React.createElement("div", { style: { display: 'flex', flexDirection: 'column' } },
|
|
43
|
+
React.createElement("span", { style: { fontSize: '20px', fontWeight: 'bold', color: '#4a3a20' } }, "Cookie \u7ED1\u5B9A\u6559\u7A0B"),
|
|
44
|
+
React.createElement("span", { style: { fontSize: '12px', color: '#6b5838', marginTop: '2px' } }, "\u83B7\u53D6\u5E76\u7ED1\u5B9A\u7C73\u6E38\u793ECookie"))),
|
|
45
|
+
React.createElement("div", { style: {
|
|
46
|
+
background: '#fff',
|
|
47
|
+
borderRadius: '0 0 16px 16px',
|
|
48
|
+
padding: '24px',
|
|
49
|
+
boxShadow: '0 6px 20px rgba(0,0,0,0.08)',
|
|
50
|
+
display: 'flex',
|
|
51
|
+
flexDirection: 'column',
|
|
52
|
+
gap: '20px'
|
|
53
|
+
} },
|
|
54
|
+
React.createElement("div", null,
|
|
55
|
+
React.createElement("div", { style: {
|
|
56
|
+
fontSize: '15px',
|
|
57
|
+
fontWeight: 'bold',
|
|
58
|
+
color: '#4a3a20',
|
|
59
|
+
marginBottom: '12px',
|
|
60
|
+
display: 'flex',
|
|
61
|
+
alignItems: 'center',
|
|
62
|
+
gap: '6px'
|
|
63
|
+
} },
|
|
64
|
+
React.createElement("span", { style: { fontSize: '16px' } }, "\uD83D\uDCD6"),
|
|
65
|
+
"\u83B7\u53D6Cookie\u6B65\u9AA4"),
|
|
66
|
+
React.createElement("div", { style: { display: 'flex', flexDirection: 'column', gap: '8px' } }, STEPS.map(step => (React.createElement("div", { key: step.num, style: {
|
|
67
|
+
display: 'flex',
|
|
68
|
+
alignItems: 'center',
|
|
69
|
+
gap: '10px',
|
|
70
|
+
padding: '8px 12px',
|
|
71
|
+
background: step.highlight ? '#fdf6e3' : '#fafafa',
|
|
72
|
+
borderRadius: '8px',
|
|
73
|
+
border: step.highlight ? '1px solid #e8d5b0' : '1px solid #f0f0f0'
|
|
74
|
+
} },
|
|
75
|
+
React.createElement("div", { style: {
|
|
76
|
+
width: '24px',
|
|
77
|
+
height: '24px',
|
|
78
|
+
borderRadius: '50%',
|
|
79
|
+
background: step.highlight ? 'linear-gradient(135deg, #e8d5b0, #d3bc8e)' : '#e8e8e8',
|
|
80
|
+
color: step.highlight ? '#4a3a20' : '#666',
|
|
81
|
+
display: 'flex',
|
|
82
|
+
alignItems: 'center',
|
|
83
|
+
justifyContent: 'center',
|
|
84
|
+
fontSize: '12px',
|
|
85
|
+
fontWeight: 'bold',
|
|
86
|
+
flexShrink: 0
|
|
87
|
+
} }, step.num),
|
|
88
|
+
React.createElement("span", { style: {
|
|
89
|
+
fontSize: '13px',
|
|
90
|
+
color: step.highlight ? '#4a3a20' : '#444',
|
|
91
|
+
fontWeight: step.highlight ? 'bold' : 'normal'
|
|
92
|
+
} }, step.text)))))),
|
|
93
|
+
React.createElement("div", { style: { height: '1px', background: '#f0ebe3' } }),
|
|
94
|
+
React.createElement("div", null,
|
|
95
|
+
React.createElement("div", { style: {
|
|
96
|
+
fontSize: '15px',
|
|
97
|
+
fontWeight: 'bold',
|
|
98
|
+
color: '#4a3a20',
|
|
99
|
+
marginBottom: '12px',
|
|
100
|
+
display: 'flex',
|
|
101
|
+
alignItems: 'center',
|
|
102
|
+
gap: '6px'
|
|
103
|
+
} },
|
|
104
|
+
React.createElement("span", { style: { fontSize: '16px' } }, "\u2328\uFE0F"),
|
|
105
|
+
"\u76F8\u5173\u547D\u4EE4"),
|
|
106
|
+
React.createElement("div", { style: { display: 'flex', flexDirection: 'column', gap: '6px' } }, COMMANDS.map(item => (React.createElement("div", { key: item.cmd, style: {
|
|
107
|
+
display: 'flex',
|
|
108
|
+
alignItems: 'center',
|
|
109
|
+
gap: '8px',
|
|
110
|
+
padding: '6px 12px',
|
|
111
|
+
background: '#fafafa',
|
|
112
|
+
borderRadius: '6px'
|
|
113
|
+
} },
|
|
114
|
+
React.createElement("span", { style: {
|
|
115
|
+
fontSize: '13px',
|
|
116
|
+
fontWeight: 'bold',
|
|
117
|
+
color: '#8b6d3f',
|
|
118
|
+
minWidth: '170px'
|
|
119
|
+
} }, item.cmd),
|
|
120
|
+
React.createElement("span", { style: { fontSize: '12px', color: '#888' } }, item.desc)))))),
|
|
121
|
+
React.createElement("div", { style: { height: '1px', background: '#f0ebe3' } }),
|
|
122
|
+
React.createElement("div", null,
|
|
123
|
+
React.createElement("div", { style: {
|
|
124
|
+
fontSize: '15px',
|
|
125
|
+
fontWeight: 'bold',
|
|
126
|
+
color: '#c62828',
|
|
127
|
+
marginBottom: '10px',
|
|
128
|
+
display: 'flex',
|
|
129
|
+
alignItems: 'center',
|
|
130
|
+
gap: '6px'
|
|
131
|
+
} },
|
|
132
|
+
React.createElement("span", { style: { fontSize: '16px' } }, "\u26A0\uFE0F"),
|
|
133
|
+
"\u6CE8\u610F\u4E8B\u9879"),
|
|
134
|
+
React.createElement("div", { style: { display: 'flex', flexDirection: 'column', gap: '6px' } }, WARNINGS.map(w => (React.createElement("div", { key: w, style: {
|
|
135
|
+
display: 'flex',
|
|
136
|
+
alignItems: 'flex-start',
|
|
137
|
+
gap: '8px',
|
|
138
|
+
padding: '6px 12px',
|
|
139
|
+
background: '#fff5f5',
|
|
140
|
+
borderRadius: '6px',
|
|
141
|
+
border: '1px solid #fce4ec'
|
|
142
|
+
} },
|
|
143
|
+
React.createElement("span", { style: { color: '#c62828', fontSize: '12px', marginTop: '1px' } }, "\u2022"),
|
|
144
|
+
React.createElement("span", { style: { fontSize: '12px', color: '#c62828' } }, w))))))))));
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export { CkHelpCard as default };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface GsDailyNoteData {
|
|
3
|
+
game: 'gs';
|
|
4
|
+
uid: string;
|
|
5
|
+
current_resin: number;
|
|
6
|
+
max_resin: number;
|
|
7
|
+
resin_recovery_time: string;
|
|
8
|
+
finished_task_num: number;
|
|
9
|
+
total_task_num: number;
|
|
10
|
+
current_expedition_num: number;
|
|
11
|
+
max_expedition_num: number;
|
|
12
|
+
expeditions: Array<{
|
|
13
|
+
status: string;
|
|
14
|
+
remained_time: string;
|
|
15
|
+
}>;
|
|
16
|
+
current_home_coin: number;
|
|
17
|
+
max_home_coin: number;
|
|
18
|
+
home_coin_recovery_time: string;
|
|
19
|
+
transformer?: {
|
|
20
|
+
obtained: boolean;
|
|
21
|
+
recovery_time: {
|
|
22
|
+
reached: boolean;
|
|
23
|
+
Day: number;
|
|
24
|
+
Hour: number;
|
|
25
|
+
Minute: number;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export interface SrDailyNoteData {
|
|
30
|
+
game: 'sr';
|
|
31
|
+
uid: string;
|
|
32
|
+
current_stamina: number;
|
|
33
|
+
max_stamina: number;
|
|
34
|
+
stamina_recover_time: number;
|
|
35
|
+
current_reserve_stamina: number;
|
|
36
|
+
current_train_score: number;
|
|
37
|
+
max_train_score: number;
|
|
38
|
+
accepted_expedition_num: number;
|
|
39
|
+
total_expedition_num: number;
|
|
40
|
+
expeditions: Array<{
|
|
41
|
+
status: string;
|
|
42
|
+
remaining_time: number;
|
|
43
|
+
name: string;
|
|
44
|
+
}>;
|
|
45
|
+
}
|
|
46
|
+
export interface ZzzDailyNoteData {
|
|
47
|
+
game: 'zzz';
|
|
48
|
+
uid: string;
|
|
49
|
+
energy: {
|
|
50
|
+
progress: {
|
|
51
|
+
max: number;
|
|
52
|
+
current: number;
|
|
53
|
+
};
|
|
54
|
+
restore: number;
|
|
55
|
+
};
|
|
56
|
+
vitality: {
|
|
57
|
+
max: number;
|
|
58
|
+
current: number;
|
|
59
|
+
};
|
|
60
|
+
card_sign: string;
|
|
61
|
+
}
|
|
62
|
+
export type DailyNoteData = GsDailyNoteData | SrDailyNoteData | ZzzDailyNoteData;
|
|
63
|
+
export interface DailyNoteCardProps {
|
|
64
|
+
data: DailyNoteData;
|
|
65
|
+
}
|
|
66
|
+
export default function DailyNoteCard({ data }: DailyNoteCardProps): React.JSX.Element;
|