koishi-plugin-rocom 1.0.12 → 1.0.13

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.
Files changed (42) hide show
  1. package/lib/client.d.ts +17 -1
  2. package/lib/client.js +121 -21
  3. package/lib/commands/merchant.js +340 -89
  4. package/lib/commands/query.js +22 -6
  5. package/lib/index.d.ts +4 -0
  6. package/lib/index.js +480 -122
  7. package/lib/render-templates/home/img/rocomuid/a_title.png +0 -0
  8. package/lib/render-templates/home/img/rocomuid/banner_bg.png +0 -0
  9. package/lib/render-templates/home/img/rocomuid/bg.jpg +0 -0
  10. package/lib/render-templates/home/img/rocomuid/img_head.png +0 -0
  11. package/lib/render-templates/home/img/rocomuid/jindu_bar.png +0 -0
  12. package/lib/render-templates/home/img/rocomuid/jindu_tc.png +0 -0
  13. package/lib/render-templates/home/img/rocomuid/level_icon.png +0 -0
  14. package/lib/render-templates/home/img/rocomuid/pet_bg.png +0 -0
  15. package/lib/render-templates/home/img/rocomuid/plant_bg.png +0 -0
  16. package/lib/render-templates/home/img/rocomuid/star_1.png +0 -0
  17. package/lib/render-templates/home/img/rocomuid/star_8.png +0 -0
  18. package/lib/render-templates/home/img/rocomuid/star_9.png +0 -0
  19. package/lib/render-templates/home/img/rocomuid/title_fg.png +0 -0
  20. package/lib/render-templates/home/img/rocomuid/top_bg.png +0 -0
  21. package/lib/render-templates/home/img/rocomuid/touxiang_mask.png +0 -0
  22. package/lib/render-templates/home/index.html +81 -97
  23. package/lib/render-templates/home/style.css +316 -375
  24. package/lib/render-templates/yuanxing-shangren/CHANGELOG.md +138 -0
  25. package/lib/render-templates/yuanxing-shangren/README.md +86 -0
  26. package/lib/render-templates/yuanxing-shangren/img/coin.png +0 -0
  27. package/lib/render-templates/yuanxing-shangren/img//345/272/225/351/203/250/344/277/241/346/201/257/346/241/206.png +0 -0
  28. package/lib/render-templates/yuanxing-shangren/img//346/240/207/351/242/230.png +0 -0
  29. package/lib/render-templates/yuanxing-shangren/img//347/203/255/351/224/200.png +0 -0
  30. package/lib/render-templates/yuanxing-shangren/img//347/274/226/345/217/267/350/203/214/346/231/257/346/241/206.png +0 -0
  31. package/lib/render-templates/yuanxing-shangren/index.html +198 -170
  32. package/lib/render-templates/yuanxing-shangren/index.html.backup +356 -0
  33. package/lib/render-templates/yuanxing-shangren/merchant.html +461 -0
  34. package/lib/render-templates/yuanxing-shangren/style.css +201 -256
  35. package/lib/render-templates/yuanxing-shangren/today.html +461 -0
  36. package/lib/render-templates/yuanxing-shangren/today.style.css +366 -0
  37. package/lib/render.js +11 -4
  38. package/lib/subscription-send.js +4 -5
  39. package/lib/ttf/rocom_skill_origin.ttf +0 -0
  40. package/lib/ttf//351/200/240/345/255/227/345/267/245/346/210/277/345/220/257/351/273/221/344/275/223.ttf +0 -0
  41. package/lib/types.d.ts +4 -0
  42. package/package.json +1 -1
@@ -0,0 +1,461 @@
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.0">
6
+ <title>远行商人</title>
7
+ <style>
8
+ @font-face {
9
+ font-family: 'RocoName';
10
+ src: url('{{_res_path}}ttf/dundun.xHd_Ee5-.woff2') format('woff2');
11
+ font-weight: normal; font-style: normal;
12
+ }
13
+ @font-face {
14
+ font-family: 'RocoProduct';
15
+ src: url('{{_res_path}}ttf/造字工房启黑体.ttf') format('truetype');
16
+ font-weight: normal; font-style: normal;
17
+ }
18
+
19
+ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
20
+
21
+ body {
22
+ display: flex;
23
+ justify-content: center;
24
+ align-items: flex-start;
25
+ min-height: 100vh;
26
+ background: #1a1a2e;
27
+ -webkit-font-smoothing: antialiased;
28
+ }
29
+
30
+ .page {
31
+ position: relative;
32
+ width: 1080px;
33
+ height: {{pageHeight}}px;
34
+ background: #f4eee0;
35
+ overflow: visible;
36
+ zoom: 0.5;
37
+ }
38
+
39
+ .title-bg {
40
+ position: absolute;
41
+ left: 20px;
42
+ top: 21px;
43
+ width: 1041px;
44
+ height: 535px;
45
+ object-fit: contain;
46
+ z-index: 2;
47
+ }
48
+
49
+ .time-group {
50
+ position: absolute;
51
+ left: 372px;
52
+ top: 447px;
53
+ display: flex;
54
+ align-items: flex-end;
55
+ gap: 0;
56
+ z-index: 3;
57
+ overflow: visible;
58
+ }
59
+ .time-date {
60
+ font-family: 'RocoProduct', sans-serif;
61
+ font-size: 32px;
62
+ color: #817873;
63
+ letter-spacing: -0.05em;
64
+ line-height: 1;
65
+ filter: url(#timeStroke10);
66
+ overflow: visible;
67
+ position: relative;
68
+ left: -30px;
69
+ z-index: 2;
70
+ }
71
+ .time-range {
72
+ font-family: 'RocoProduct', sans-serif;
73
+ font-size: 50px;
74
+ color: #f0c946;
75
+ letter-spacing: -0.05em;
76
+ line-height: 1;
77
+ filter: url(#timeStroke10);
78
+ overflow: visible;
79
+ position: relative;
80
+ z-index: 1;
81
+ }
82
+
83
+ .goods-card {
84
+ position: absolute;
85
+ left: 20px;
86
+ width: 1043px;
87
+ height: 308px;
88
+ overflow: visible;
89
+ }
90
+ .goods-card.ended {
91
+ opacity: 0.5;
92
+ }
93
+ .goods-card.ended .goods-name {
94
+ color: #878070;
95
+ }
96
+ .goods-card.ended .goods-name-shadow {
97
+ color: #c8c2b8;
98
+ }
99
+ .goods-card.ended .price-value {
100
+ background: linear-gradient(to bottom, #878070, #878070);
101
+ -webkit-background-clip: text;
102
+ background-clip: text;
103
+ }
104
+ .goods-card.ended .price-sep,
105
+ .goods-card.ended .price-unit {
106
+ color: #878070;
107
+ }
108
+
109
+ .goods-card-bg {
110
+ position: absolute;
111
+ left: 0; top: 0;
112
+ width: 1043px;
113
+ height: 308px;
114
+ border-radius: 15px;
115
+ background: #cec8bc;
116
+ }
117
+
118
+ .goods-name-wrap {
119
+ position: absolute;
120
+ top: -8px;
121
+ left: -22px;
122
+ width: 800px;
123
+ text-align: center;
124
+ transform: scaleX(1.1);
125
+ transform-origin: center center;
126
+ overflow: visible;
127
+ }
128
+ .goods-name-shadow {
129
+ position: absolute;
130
+ left: 50%;
131
+ top: 4px;
132
+ transform: translateX(-50%);
133
+ font-family: 'RocoProduct', sans-serif;
134
+ font-size: 150px;
135
+ color: #f4eee0;
136
+ letter-spacing: 2px;
137
+ line-height: 1;
138
+ white-space: nowrap;
139
+ pointer-events: none;
140
+ filter: url(#imgStroke11NoOffset);
141
+ overflow: visible;
142
+ }
143
+ .goods-name {
144
+ position: relative;
145
+ font-family: 'RocoProduct', sans-serif;
146
+ font-size: 150px;
147
+ color: #3f3832;
148
+ letter-spacing: 2px;
149
+ line-height: 1;
150
+ white-space: nowrap;
151
+ }
152
+
153
+ .goods-img-wrap {
154
+ position: absolute;
155
+ left: 725px;
156
+ top: 31px;
157
+ width: 296px;
158
+ height: 246px;
159
+ z-index: 1;
160
+ overflow: visible;
161
+ }
162
+ .goods-img {
163
+ width: 100%;
164
+ height: 100%;
165
+ object-fit: contain;
166
+ filter: url(#imgStroke11);
167
+ overflow: visible;
168
+ }
169
+ .hot-badge {
170
+ position: absolute;
171
+ top: 0;
172
+ right: 0;
173
+ width: 37.5%;
174
+ height: 37.5%;
175
+ z-index: 2;
176
+ object-fit: contain;
177
+ }
178
+
179
+ .num-badge {
180
+ position: absolute;
181
+ left: 745px;
182
+ top: -15px;
183
+ width: 74px;
184
+ height: 53px;
185
+ z-index: 2;
186
+ }
187
+ .num-badge-bg {
188
+ position: absolute;
189
+ left: 0; top: 0;
190
+ width: 100%; height: 100%;
191
+ object-fit: contain;
192
+ }
193
+ .num-badge-text {
194
+ position: absolute;
195
+ left: 0; top: 0;
196
+ width: 100%; height: 100%;
197
+ display: flex;
198
+ align-items: center;
199
+ justify-content: center;
200
+ font-family: 'RocoName', sans-serif;
201
+ font-size: 28px;
202
+ color: #f5efe3;
203
+ letter-spacing: -0.05em;
204
+ z-index: 1;
205
+ padding-top: 2px;
206
+ }
207
+
208
+ .price-group {
209
+ position: absolute;
210
+ left: 181px;
211
+ top: 134px;
212
+ width: 393px;
213
+ display: flex;
214
+ justify-content: center;
215
+ align-items: center;
216
+ z-index: 1;
217
+ }
218
+ .price-inner {
219
+ display: flex;
220
+ align-items: flex-end;
221
+ overflow: visible;
222
+ }
223
+ .coin-icon {
224
+ width: 91px;
225
+ height: 90px;
226
+ object-fit: contain;
227
+ position: relative;
228
+ filter: url(#imgStroke11NoOffset);
229
+ overflow: visible;
230
+ }
231
+
232
+ .price-value-wrap {
233
+ position: relative;
234
+ display: inline-block;
235
+ margin-left: -2px;
236
+ overflow: visible;
237
+ z-index: 1;
238
+ }
239
+ .price-shadow {
240
+ position: absolute;
241
+ left: 2px; top: 4px;
242
+ font-family: 'RocoName', sans-serif;
243
+ font-size: 120px;
244
+ color: #f4eee0;
245
+ line-height: 1;
246
+ letter-spacing: -0.1em;
247
+ transform: scaleX(1.1);
248
+ transform-origin: left center;
249
+ white-space: nowrap;
250
+ pointer-events: none;
251
+ filter: url(#imgStroke11NoOffset);
252
+ overflow: visible;
253
+ }
254
+
255
+ .price-value {
256
+ font-family: 'RocoName', sans-serif;
257
+ font-size: 120px;
258
+ background: linear-gradient(to bottom, #d07338, #dd9036);
259
+ -webkit-background-clip: text;
260
+ -webkit-text-fill-color: transparent;
261
+ background-clip: text;
262
+ letter-spacing: -0.1em;
263
+ line-height: 1;
264
+ transform: scaleX(1.1);
265
+ transform-origin: left center;
266
+ position: relative;
267
+ display: block;
268
+ }
269
+
270
+ .price-sep {
271
+ font-family: 'RocoName', sans-serif;
272
+ font-size: 120px;
273
+ color: #837f76;
274
+ line-height: 1;
275
+ margin-left: 9px;
276
+ position: relative;
277
+ overflow: visible;
278
+ z-index: 2;
279
+ }
280
+ .price-sep::after {
281
+ content: attr(data-text);
282
+ position: absolute;
283
+ left: 2px;
284
+ top: 4px;
285
+ color: #f4eee0;
286
+ z-index: -1;
287
+ pointer-events: none;
288
+ filter: url(#imgStroke11NoOffset);
289
+ }
290
+
291
+ .price-unit {
292
+ font-family: 'RocoName', sans-serif;
293
+ font-size: 50px;
294
+ color: #837f76;
295
+ line-height: 1;
296
+ position: relative;
297
+ bottom: 15px;
298
+ margin-left: -8px;
299
+ overflow: visible;
300
+ }
301
+ .price-unit::after {
302
+ content: attr(data-text);
303
+ position: absolute;
304
+ left: 2px;
305
+ top: 4px;
306
+ color: #f4eee0;
307
+ z-index: -1;
308
+ pointer-events: none;
309
+ filter: url(#imgStroke11NoOffset);
310
+ }
311
+
312
+ .limit-area {
313
+ position: absolute;
314
+ left: 377px;
315
+ top: 243px;
316
+ min-width: 393px;
317
+ width: auto;
318
+ height: 54px;
319
+ z-index: 1;
320
+ transform: translateX(-50%);
321
+ }
322
+ .limit-btn {
323
+ position: absolute;
324
+ left: 0; top: 0;
325
+ width: 100%; height: 100%;
326
+ border-radius: 14px;
327
+ background: #878070;
328
+ border: none;
329
+ box-shadow: 0 0 0 8px #f4ede5;
330
+ }
331
+ .limit-text {
332
+ position: relative;
333
+ left: 0; top: 0;
334
+ width: 100%; height: 100%;
335
+ display: flex;
336
+ align-items: center;
337
+ justify-content: center;
338
+ font-family: 'RocoName', sans-serif;
339
+ font-size: 36px;
340
+ color: #fdf7e9;
341
+ letter-spacing: 0;
342
+ white-space: nowrap;
343
+ padding: 0 20px;
344
+ }
345
+
346
+ .bottom-img {
347
+ position: absolute;
348
+ left: 0;
349
+ width: 1080px;
350
+ height: 160px;
351
+ object-fit: contain;
352
+ z-index: 2;
353
+ }
354
+
355
+ .goods-card-empty {
356
+ display: flex;
357
+ align-items: center;
358
+ justify-content: center;
359
+ }
360
+ .goods-empty-text {
361
+ position: relative;
362
+ z-index: 1;
363
+ font-family: 'RocoProduct', sans-serif;
364
+ font-size: 64px;
365
+ color: #878070;
366
+ text-align: center;
367
+ letter-spacing: 4px;
368
+ }
369
+ </style>
370
+ </head>
371
+ <body>
372
+
373
+ <svg style="position:absolute;width:0;height:0;">
374
+ <defs>
375
+ <filter id="imgStroke11" x="-10%" y="-10%" width="120%" height="120%"
376
+ color-interpolation-filters="sRGB">
377
+ <feFlood flood-color="#f4eee0" result="color"/>
378
+ <feMorphology in="SourceAlpha" operator="dilate" radius="11" result="dilated"/>
379
+ <feComposite in="color" in2="dilated" operator="in" result="outline"/>
380
+ <feOffset in="outline" dx="3" dy="3" result="offset"/>
381
+ <feMerge>
382
+ <feMergeNode in="offset"/>
383
+ <feMergeNode in="SourceGraphic"/>
384
+ </feMerge>
385
+ </filter>
386
+ <filter id="imgStroke11NoOffset" x="-10%" y="-10%" width="120%" height="120%"
387
+ color-interpolation-filters="sRGB">
388
+ <feFlood flood-color="#f4eee0" result="color"/>
389
+ <feMorphology in="SourceAlpha" operator="dilate" radius="11" result="dilated"/>
390
+ <feComposite in="color" in2="dilated" operator="in" result="outline"/>
391
+ <feMerge>
392
+ <feMergeNode in="outline"/>
393
+ <feMergeNode in="SourceGraphic"/>
394
+ </feMerge>
395
+ </filter>
396
+ <filter id="timeStroke10" x="-10%" y="-10%" width="120%" height="120%"
397
+ color-interpolation-filters="sRGB">
398
+ <feFlood flood-color="#3f3832" result="color"/>
399
+ <feMorphology in="SourceAlpha" operator="dilate" radius="10" result="dilated"/>
400
+ <feComposite in="color" in2="dilated" operator="in" result="outline"/>
401
+ <feMerge>
402
+ <feMergeNode in="outline"/>
403
+ <feMergeNode in="SourceGraphic"/>
404
+ </feMerge>
405
+ </filter>
406
+ </defs>
407
+ </svg>
408
+
409
+ <div id="container" class="page">
410
+ <img class="title-bg" src="{{_res_path}}render/yuanxing-shangren/img/标题.png" alt="标题">
411
+
412
+ <div class="time-group">
413
+ <span class="time-date">{{dateStr}}</span>
414
+ <span class="time-range">{{timeRange}}</span>
415
+ </div>
416
+
417
+ {{if goods && goods.length > 0}}
418
+ {{each goods item}}
419
+ <div class="goods-card{{if item.isEnded}} ended{{/if}}" style="top: {{item.top}}px">
420
+ <div class="goods-card-bg"></div>
421
+ <div class="goods-name-wrap">
422
+ <span class="goods-name-shadow">{{item.goods_name}}</span>
423
+ <span class="goods-name">{{item.goods_name}}</span>
424
+ </div>
425
+ <div class="num-badge">
426
+ <img class="num-badge-bg" src="{{_res_path}}render/yuanxing-shangren/img/编号背景框.png" alt="">
427
+ <div class="num-badge-text">{{item.num}}</div>
428
+ </div>
429
+ <div class="goods-img-wrap">
430
+ <img class="goods-img" src="{{item.iconUrl}}" alt="{{item.goods_name}}">
431
+ {{if item.isHot}}<img class="hot-badge" src="{{_res_path}}render/yuanxing-shangren/img/热销.png" alt="热销">{{/if}}
432
+ </div>
433
+ <div class="price-group">
434
+ <img class="coin-icon" src="{{_res_path}}render/yuanxing-shangren/img/coin.png" alt="coin">
435
+ <div class="price-inner">
436
+ <span class="price-value-wrap">
437
+ <span class="price-shadow">{{item.price}}</span>
438
+ <span class="price-value">{{item.price}}</span>
439
+ </span>
440
+ <span class="price-sep" data-text="/">/</span>
441
+ <span class="price-unit" data-text="个">个</span>
442
+ </div>
443
+ </div>
444
+ <div class="limit-area">
445
+ <div class="limit-btn"></div>
446
+ <div class="limit-text">{{item.remainingStr}}</div>
447
+ </div>
448
+ </div>
449
+ {{/each}}
450
+ {{else}}
451
+ <div class="goods-card goods-card-empty" style="top: 592px">
452
+ <div class="goods-card-bg"></div>
453
+ <div class="goods-empty-text">暂无商品</div>
454
+ </div>
455
+ {{/if}}
456
+
457
+ <img class="bottom-img" src="{{_res_path}}render/yuanxing-shangren/img/底部信息框.png" alt="底部信息框" style="top: {{bottomFrameTop}}px">
458
+ </div>
459
+
460
+ </body>
461
+ </html>