@round2ai/r2-cli 1.0.12-beta.0 → 1.0.12
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/README.md +24 -7
- package/dist/README.md +24 -7
- package/dist/pages/login.html +219 -57
- package/dist/pages/xianyu-auth.html +244 -67
- package/dist/r2-cli.js +41 -40
- package/package.json +1 -1
- package/scripts/install-skills.js +30 -2
- package/skills/r2-auth/SKILL.md +1 -1
- package/skills/r2-goods/SKILL.md +82 -352
- package/skills/r2-goods/references/r2-goods-hangup.md +284 -0
- package/skills/r2-goods/references/r2-goods-listing.md +137 -0
- package/skills/r2-goods/references/r2-goods-query.md +63 -0
- package/skills/r2-shared/SKILL.md +40 -17
|
@@ -1,67 +1,244 @@
|
|
|
1
|
-
<!
|
|
2
|
-
<html lang="zh-CN"
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="zh-CN">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
|
6
|
+
<title>闲鱼店铺授权</title>
|
|
7
|
+
<style>
|
|
8
|
+
* {
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
margin: 0;
|
|
11
|
+
padding: 0;
|
|
12
|
+
}
|
|
13
|
+
:root {
|
|
14
|
+
--primary: #ffe60f;
|
|
15
|
+
--primary-light: #ffe60f1a;
|
|
16
|
+
--primary-dark: #ffe60fcc;
|
|
17
|
+
--text: #1a1a1a;
|
|
18
|
+
--text-muted: #8c8c8c;
|
|
19
|
+
--bg: #f7f8fa;
|
|
20
|
+
--card: #fff;
|
|
21
|
+
--border: #e8e8e8;
|
|
22
|
+
--radius: 16px;
|
|
23
|
+
--shadow: 0 2px 16px #ffe60f1a;
|
|
24
|
+
--success: #52c41a;
|
|
25
|
+
--error: #ff4d4f;
|
|
26
|
+
--info: #1890ff;
|
|
27
|
+
}
|
|
28
|
+
body {
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
align-items: center;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
min-height: 100vh;
|
|
34
|
+
font-family:
|
|
35
|
+
system-ui,
|
|
36
|
+
-apple-system,
|
|
37
|
+
"Segoe UI",
|
|
38
|
+
Roboto,
|
|
39
|
+
sans-serif;
|
|
40
|
+
background: var(--bg);
|
|
41
|
+
color: var(--text);
|
|
42
|
+
}
|
|
43
|
+
.card {
|
|
44
|
+
background: var(--card);
|
|
45
|
+
border-radius: var(--radius);
|
|
46
|
+
padding: 40px 32px 32px;
|
|
47
|
+
box-shadow: var(--shadow);
|
|
48
|
+
border: 1px solid var(--border);
|
|
49
|
+
text-align: center;
|
|
50
|
+
max-width: 360px;
|
|
51
|
+
width: 90%;
|
|
52
|
+
transition: all 0.3s ease;
|
|
53
|
+
}
|
|
54
|
+
.brand {
|
|
55
|
+
margin-bottom: 24px;
|
|
56
|
+
}
|
|
57
|
+
.brand-name {
|
|
58
|
+
font-size: 22px;
|
|
59
|
+
font-weight: 700;
|
|
60
|
+
color: var(--text);
|
|
61
|
+
letter-spacing: 2px;
|
|
62
|
+
}
|
|
63
|
+
.brand-sub {
|
|
64
|
+
font-size: 10px;
|
|
65
|
+
color: var(--text-muted);
|
|
66
|
+
margin-top: 4px;
|
|
67
|
+
letter-spacing: 3px;
|
|
68
|
+
text-transform: uppercase;
|
|
69
|
+
font-weight: 500;
|
|
70
|
+
}
|
|
71
|
+
img#qr {
|
|
72
|
+
max-width: 200px;
|
|
73
|
+
border-radius: 12px;
|
|
74
|
+
transition: all 0.3s ease;
|
|
75
|
+
}
|
|
76
|
+
img#qr.dimmed {
|
|
77
|
+
opacity: 0.15;
|
|
78
|
+
filter: blur(4px);
|
|
79
|
+
transform: scale(0.95);
|
|
80
|
+
}
|
|
81
|
+
.status-text {
|
|
82
|
+
font-size: 16px;
|
|
83
|
+
font-weight: 600;
|
|
84
|
+
color: var(--text);
|
|
85
|
+
margin-top: 16px;
|
|
86
|
+
}
|
|
87
|
+
.hint {
|
|
88
|
+
color: var(--text-muted);
|
|
89
|
+
font-size: 13px;
|
|
90
|
+
margin-top: 6px;
|
|
91
|
+
}
|
|
92
|
+
.scan-hint {
|
|
93
|
+
color: var(--text-muted);
|
|
94
|
+
font-size: 12px;
|
|
95
|
+
margin-top: 16px;
|
|
96
|
+
}
|
|
97
|
+
.auth-btn {
|
|
98
|
+
display: inline-block;
|
|
99
|
+
margin-top: 16px;
|
|
100
|
+
padding: 10px 32px;
|
|
101
|
+
border-radius: 8px;
|
|
102
|
+
background: var(--primary);
|
|
103
|
+
color: var(--text);
|
|
104
|
+
font-size: 14px;
|
|
105
|
+
font-weight: 600;
|
|
106
|
+
text-decoration: none;
|
|
107
|
+
letter-spacing: 1px;
|
|
108
|
+
transition: all 0.2s ease;
|
|
109
|
+
}
|
|
110
|
+
.auth-btn:hover {
|
|
111
|
+
background: var(--primary-dark);
|
|
112
|
+
transform: translateY(-1px);
|
|
113
|
+
box-shadow: 0 4px 12px #ffe60f33;
|
|
114
|
+
}
|
|
115
|
+
.status-icon {
|
|
116
|
+
font-size: 56px;
|
|
117
|
+
margin-bottom: 8px;
|
|
118
|
+
animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
|
119
|
+
}
|
|
120
|
+
@keyframes popIn {
|
|
121
|
+
0% {
|
|
122
|
+
transform: scale(0);
|
|
123
|
+
opacity: 0;
|
|
124
|
+
}
|
|
125
|
+
100% {
|
|
126
|
+
transform: scale(1);
|
|
127
|
+
opacity: 1;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
.success-bg .card {
|
|
131
|
+
border-color: var(--success);
|
|
132
|
+
box-shadow: 0 2px 16px rgba(82, 196, 26, 0.12);
|
|
133
|
+
}
|
|
134
|
+
.success-bg .status-text {
|
|
135
|
+
color: var(--success);
|
|
136
|
+
}
|
|
137
|
+
.expired-bg .card {
|
|
138
|
+
border-color: var(--error);
|
|
139
|
+
box-shadow: 0 2px 16px rgba(255, 77, 79, 0.1);
|
|
140
|
+
}
|
|
141
|
+
.expired-bg .status-text {
|
|
142
|
+
color: var(--error);
|
|
143
|
+
}
|
|
144
|
+
.scanning-bg .card {
|
|
145
|
+
border-color: var(--info);
|
|
146
|
+
box-shadow: 0 2px 16px rgba(24, 144, 255, 0.1);
|
|
147
|
+
}
|
|
148
|
+
.scanning-bg .status-text {
|
|
149
|
+
color: var(--info);
|
|
150
|
+
}
|
|
151
|
+
.pulse {
|
|
152
|
+
display: inline-block;
|
|
153
|
+
width: 6px;
|
|
154
|
+
height: 6px;
|
|
155
|
+
border-radius: 50%;
|
|
156
|
+
background: var(--info);
|
|
157
|
+
animation: pulse 1.4s infinite;
|
|
158
|
+
margin-right: 6px;
|
|
159
|
+
vertical-align: middle;
|
|
160
|
+
}
|
|
161
|
+
@keyframes pulse {
|
|
162
|
+
0% {
|
|
163
|
+
opacity: 1;
|
|
164
|
+
transform: scale(1);
|
|
165
|
+
}
|
|
166
|
+
50% {
|
|
167
|
+
opacity: 0.4;
|
|
168
|
+
transform: scale(0.8);
|
|
169
|
+
}
|
|
170
|
+
100% {
|
|
171
|
+
opacity: 1;
|
|
172
|
+
transform: scale(1);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
</style>
|
|
176
|
+
</head>
|
|
177
|
+
<body>
|
|
178
|
+
<div class="card" id="app">
|
|
179
|
+
<div class="brand">
|
|
180
|
+
<div class="brand-name">闲鱼授权</div>
|
|
181
|
+
<div class="brand-sub">Round2AI</div>
|
|
182
|
+
</div>
|
|
183
|
+
<img id="qr" src="./qr.png" alt="闲鱼店铺授权" />
|
|
184
|
+
<p class="status-text" id="statusText">请扫码授权</p>
|
|
185
|
+
<p class="scan-hint">支持 浏览器 / 微信 扫码</p>
|
|
186
|
+
<a class="auth-btn" id="auth-btn" style="display: none" href="#" target="_blank">点击授权</a>
|
|
187
|
+
<p class="hint" id="hint"></p>
|
|
188
|
+
</div>
|
|
189
|
+
<script>
|
|
190
|
+
const qr = document.getElementById("qr"),
|
|
191
|
+
st = document.getElementById("statusText"),
|
|
192
|
+
ht = document.getElementById("hint"),
|
|
193
|
+
app = document.getElementById("app"),
|
|
194
|
+
bd = document.body;
|
|
195
|
+
const states = {
|
|
196
|
+
waiting: { icon: "", text: "请扫码授权", hint: "", bg: "", dim: false },
|
|
197
|
+
scanning: { icon: "", text: '<span class="pulse"></span>处理中...', hint: "等待确认中...", bg: "scanning-bg", dim: true },
|
|
198
|
+
success: { icon: "✅", text: "授权成功!", hint: "可关闭此页面", bg: "success-bg", dim: true },
|
|
199
|
+
expired: { icon: "⏰", text: "二维码已过期", hint: "请重新获取", bg: "expired-bg", dim: true },
|
|
200
|
+
};
|
|
201
|
+
function render(s) {
|
|
202
|
+
const d = states[s] || states.waiting;
|
|
203
|
+
bd.className = d.bg;
|
|
204
|
+
if (d.icon) {
|
|
205
|
+
qr.style.display = "none";
|
|
206
|
+
app.innerHTML =
|
|
207
|
+
'<div class="brand"><div class="brand-name">闲鱼授权</div><div class="brand-sub">Round2AI</div></div><div class="status-icon">' +
|
|
208
|
+
d.icon +
|
|
209
|
+
'</div><p class="status-text">' +
|
|
210
|
+
d.text +
|
|
211
|
+
"</p>" +
|
|
212
|
+
(d.hint ? '<p class="hint">' + d.hint + "</p>" : "");
|
|
213
|
+
} else {
|
|
214
|
+
qr.style.display = "";
|
|
215
|
+
qr.classList.toggle("dimmed", d.dim);
|
|
216
|
+
st.innerHTML = d.text;
|
|
217
|
+
ht.textContent = d.hint;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
fetch("./config")
|
|
221
|
+
.then(function (r) {
|
|
222
|
+
return r.json();
|
|
223
|
+
})
|
|
224
|
+
.then(function (data) {
|
|
225
|
+
if (data.authUrl) {
|
|
226
|
+
var btn = document.getElementById("auth-btn");
|
|
227
|
+
btn.href = data.authUrl;
|
|
228
|
+
btn.style.display = "";
|
|
229
|
+
}
|
|
230
|
+
})
|
|
231
|
+
.catch(function () {});
|
|
232
|
+
const es = new EventSource("./events");
|
|
233
|
+
es.onmessage = function (e) {
|
|
234
|
+
try {
|
|
235
|
+
const d = JSON.parse(e.data);
|
|
236
|
+
if (d.status) render(d.status);
|
|
237
|
+
} catch (ex) {}
|
|
238
|
+
};
|
|
239
|
+
es.onerror = function () {
|
|
240
|
+
es.close();
|
|
241
|
+
};
|
|
242
|
+
</script>
|
|
243
|
+
</body>
|
|
244
|
+
</html>
|