deeke-script-app 1.7.2 → 1.7.4
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/deekeScript.schema.json +363 -174
- package/package.json +6 -6
- package/script/index.js +1 -0
- package/script/task/douyin_zan.js +81 -30
- package/script/task/dy.js +13 -6
- package/script/task/dyApp.js +4 -4
- package/script/task/dyCity.js +1 -1
- package/script/task/tool.js +16 -7
- package/test.json +68 -2
package/deekeScript.schema.json
CHANGED
|
@@ -4,7 +4,12 @@
|
|
|
4
4
|
"description": "DeekeScript Android 项目配置文件,用于动态渲染页面",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"required": ["name", "versionCode", "versionName", "icon", "host", "switchSetting", "groups", "bottomMenus", "settingLists", "apis"],
|
|
7
|
+
"additionalProperties": false,
|
|
7
8
|
"properties": {
|
|
9
|
+
"$schema": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "JSON Schema 引用路径"
|
|
12
|
+
},
|
|
8
13
|
"name": {
|
|
9
14
|
"type": "string",
|
|
10
15
|
"description": "App安装成功之后,在手机上的名称"
|
|
@@ -43,6 +48,7 @@
|
|
|
43
48
|
"type": "object",
|
|
44
49
|
"description": "功能开关设置",
|
|
45
50
|
"required": ["alipay"],
|
|
51
|
+
"additionalProperties": false,
|
|
46
52
|
"properties": {
|
|
47
53
|
"alipay": {
|
|
48
54
|
"type": "boolean",
|
|
@@ -56,6 +62,7 @@
|
|
|
56
62
|
"items": {
|
|
57
63
|
"type": "object",
|
|
58
64
|
"required": ["title", "methods"],
|
|
65
|
+
"additionalProperties": false,
|
|
59
66
|
"properties": {
|
|
60
67
|
"title": {
|
|
61
68
|
"type": "string",
|
|
@@ -87,6 +94,7 @@
|
|
|
87
94
|
"items": {
|
|
88
95
|
"type": "object",
|
|
89
96
|
"required": ["title", "icon", "type"],
|
|
97
|
+
"additionalProperties": false,
|
|
90
98
|
"properties": {
|
|
91
99
|
"title": {
|
|
92
100
|
"type": "string",
|
|
@@ -114,6 +122,7 @@
|
|
|
114
122
|
"items": {
|
|
115
123
|
"type": "object",
|
|
116
124
|
"required": ["title", "icon", "type"],
|
|
125
|
+
"additionalProperties": false,
|
|
117
126
|
"properties": {
|
|
118
127
|
"title": {
|
|
119
128
|
"type": "string",
|
|
@@ -161,6 +170,7 @@
|
|
|
161
170
|
"items": {
|
|
162
171
|
"type": "object",
|
|
163
172
|
"required": ["type", "url"],
|
|
173
|
+
"additionalProperties": false,
|
|
164
174
|
"properties": {
|
|
165
175
|
"type": {
|
|
166
176
|
"type": "string",
|
|
@@ -179,6 +189,7 @@
|
|
|
179
189
|
"method": {
|
|
180
190
|
"type": "object",
|
|
181
191
|
"required": ["title", "icon"],
|
|
192
|
+
"additionalProperties": false,
|
|
182
193
|
"properties": {
|
|
183
194
|
"title": {
|
|
184
195
|
"type": "string",
|
|
@@ -220,6 +231,7 @@
|
|
|
220
231
|
"activity": {
|
|
221
232
|
"type": "object",
|
|
222
233
|
"description": "活动配置",
|
|
234
|
+
"additionalProperties": false,
|
|
223
235
|
"properties": {
|
|
224
236
|
"notice": {
|
|
225
237
|
"type": "string",
|
|
@@ -238,6 +250,7 @@
|
|
|
238
250
|
"description": "活动功能组",
|
|
239
251
|
"items": {
|
|
240
252
|
"type": "object",
|
|
253
|
+
"additionalProperties": false,
|
|
241
254
|
"properties": {
|
|
242
255
|
"title": {
|
|
243
256
|
"type": "string"
|
|
@@ -261,6 +274,7 @@
|
|
|
261
274
|
"settingPage": {
|
|
262
275
|
"type": "object",
|
|
263
276
|
"required": ["params"],
|
|
277
|
+
"additionalProperties": false,
|
|
264
278
|
"properties": {
|
|
265
279
|
"params": {
|
|
266
280
|
"type": "array",
|
|
@@ -272,217 +286,392 @@
|
|
|
272
286
|
}
|
|
273
287
|
},
|
|
274
288
|
"param": {
|
|
275
|
-
"
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
"
|
|
280
|
-
"
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
"
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
"
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
"
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
"description": "标签文本"
|
|
303
|
-
},
|
|
304
|
-
"name": {
|
|
305
|
-
"type": "string",
|
|
306
|
-
"description": "参数名称(用于存储和获取值)"
|
|
307
|
-
},
|
|
308
|
-
"value": {
|
|
309
|
-
"description": "默认值(类型根据type而定)"
|
|
310
|
-
},
|
|
311
|
-
"hint": {
|
|
312
|
-
"type": "string",
|
|
313
|
-
"description": "提示文本"
|
|
314
|
-
},
|
|
315
|
-
"notice": {
|
|
316
|
-
"type": "string",
|
|
317
|
-
"description": "通知文本"
|
|
318
|
-
},
|
|
319
|
-
"title": {
|
|
320
|
-
"type": "string",
|
|
321
|
-
"description": "标题(用于notice类型)"
|
|
322
|
-
},
|
|
323
|
-
"min": {
|
|
324
|
-
"type": "number",
|
|
325
|
-
"description": "最小值(用于numberRange类型)"
|
|
326
|
-
},
|
|
327
|
-
"max": {
|
|
328
|
-
"type": "number",
|
|
329
|
-
"description": "最大值(用于numberRange类型)"
|
|
330
|
-
},
|
|
331
|
-
"step": {
|
|
332
|
-
"type": "number",
|
|
333
|
-
"description": "步长(用于numberRange类型)"
|
|
334
|
-
},
|
|
335
|
-
"options": {
|
|
336
|
-
"type": "array",
|
|
337
|
-
"description": "选项列表(用于radio、select类型)",
|
|
338
|
-
"items": {
|
|
339
|
-
"type": "object",
|
|
340
|
-
"properties": {
|
|
341
|
-
"label": {
|
|
342
|
-
"type": "string"
|
|
343
|
-
},
|
|
344
|
-
"value": {
|
|
345
|
-
"type": "string"
|
|
346
|
-
}
|
|
289
|
+
"oneOf": [
|
|
290
|
+
{
|
|
291
|
+
"type": "object",
|
|
292
|
+
"required": ["type", "title"],
|
|
293
|
+
"additionalProperties": false,
|
|
294
|
+
"properties": {
|
|
295
|
+
"type": {
|
|
296
|
+
"type": "string",
|
|
297
|
+
"const": "notice"
|
|
298
|
+
},
|
|
299
|
+
"title": {
|
|
300
|
+
"type": "string",
|
|
301
|
+
"description": "标题"
|
|
302
|
+
},
|
|
303
|
+
"hidden": {
|
|
304
|
+
"type": "boolean",
|
|
305
|
+
"description": "是否隐藏",
|
|
306
|
+
"default": false
|
|
307
|
+
},
|
|
308
|
+
"textColor": {
|
|
309
|
+
"type": "string",
|
|
310
|
+
"description": "文本颜色",
|
|
311
|
+
"pattern": "^#[0-9A-Fa-f]{6}$"
|
|
312
|
+
},
|
|
313
|
+
"textSize": {
|
|
314
|
+
"type": "number",
|
|
315
|
+
"description": "文本大小"
|
|
347
316
|
}
|
|
348
317
|
}
|
|
349
318
|
},
|
|
350
|
-
|
|
351
|
-
"type": "
|
|
352
|
-
"
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
319
|
+
{
|
|
320
|
+
"type": "object",
|
|
321
|
+
"required": ["type", "label", "name", "min", "max", "value"],
|
|
322
|
+
"additionalProperties": false,
|
|
323
|
+
"properties": {
|
|
324
|
+
"type": {
|
|
325
|
+
"type": "string",
|
|
326
|
+
"const": "numberRange"
|
|
327
|
+
},
|
|
328
|
+
"label": {
|
|
329
|
+
"type": "string",
|
|
330
|
+
"description": "标签文本"
|
|
331
|
+
},
|
|
332
|
+
"name": {
|
|
333
|
+
"type": "string",
|
|
334
|
+
"description": "参数名称(用于存储和获取值)"
|
|
335
|
+
},
|
|
336
|
+
"min": {
|
|
337
|
+
"type": "number",
|
|
338
|
+
"description": "最小值"
|
|
339
|
+
},
|
|
340
|
+
"max": {
|
|
341
|
+
"type": "number",
|
|
342
|
+
"description": "最大值"
|
|
343
|
+
},
|
|
344
|
+
"value": {
|
|
345
|
+
"type": "number",
|
|
346
|
+
"description": "默认值"
|
|
347
|
+
},
|
|
348
|
+
"step": {
|
|
349
|
+
"type": "number",
|
|
350
|
+
"description": "步长"
|
|
351
|
+
},
|
|
352
|
+
"hidden": {
|
|
353
|
+
"type": "boolean",
|
|
354
|
+
"description": "是否隐藏",
|
|
355
|
+
"default": false
|
|
356
|
+
}
|
|
366
357
|
}
|
|
367
358
|
},
|
|
368
|
-
"columnCount": {
|
|
369
|
-
"type": "number",
|
|
370
|
-
"description": "列数(用于checkboxGroup类型)"
|
|
371
|
-
},
|
|
372
|
-
"lines": {
|
|
373
|
-
"type": "number",
|
|
374
|
-
"description": "行数(用于textArea类型)"
|
|
375
|
-
},
|
|
376
|
-
"textColor": {
|
|
377
|
-
"type": "string",
|
|
378
|
-
"description": "文本颜色(用于notice类型)",
|
|
379
|
-
"pattern": "^#[0-9A-Fa-f]{6}$"
|
|
380
|
-
},
|
|
381
|
-
"textSize": {
|
|
382
|
-
"type": "number",
|
|
383
|
-
"description": "文本大小(用于notice类型)"
|
|
384
|
-
},
|
|
385
|
-
"hidden": {
|
|
386
|
-
"type": "boolean",
|
|
387
|
-
"description": "是否隐藏",
|
|
388
|
-
"default": false
|
|
389
|
-
}
|
|
390
|
-
},
|
|
391
|
-
"allOf": [
|
|
392
359
|
{
|
|
393
|
-
"
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
360
|
+
"type": "object",
|
|
361
|
+
"required": ["type", "label", "name"],
|
|
362
|
+
"additionalProperties": false,
|
|
363
|
+
"properties": {
|
|
364
|
+
"type": {
|
|
365
|
+
"type": "string",
|
|
366
|
+
"const": "textArea"
|
|
367
|
+
},
|
|
368
|
+
"label": {
|
|
369
|
+
"type": "string",
|
|
370
|
+
"description": "标签文本"
|
|
371
|
+
},
|
|
372
|
+
"name": {
|
|
373
|
+
"type": "string",
|
|
374
|
+
"description": "参数名称(用于存储和获取值)"
|
|
375
|
+
},
|
|
376
|
+
"value": {
|
|
377
|
+
"type": "string",
|
|
378
|
+
"description": "默认值"
|
|
379
|
+
},
|
|
380
|
+
"hint": {
|
|
381
|
+
"type": "string",
|
|
382
|
+
"description": "提示文本"
|
|
383
|
+
},
|
|
384
|
+
"notice": {
|
|
385
|
+
"type": "string",
|
|
386
|
+
"description": "通知文本"
|
|
387
|
+
},
|
|
388
|
+
"lines": {
|
|
389
|
+
"type": "number",
|
|
390
|
+
"description": "行数"
|
|
391
|
+
},
|
|
392
|
+
"hidden": {
|
|
393
|
+
"type": "boolean",
|
|
394
|
+
"description": "是否隐藏",
|
|
395
|
+
"default": false
|
|
398
396
|
}
|
|
399
|
-
},
|
|
400
|
-
"then": {
|
|
401
|
-
"required": ["label", "name", "min", "max", "value"]
|
|
402
397
|
}
|
|
403
398
|
},
|
|
404
399
|
{
|
|
405
|
-
"
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
400
|
+
"type": "object",
|
|
401
|
+
"required": ["type", "label", "name", "children", "values"],
|
|
402
|
+
"additionalProperties": false,
|
|
403
|
+
"properties": {
|
|
404
|
+
"type": {
|
|
405
|
+
"type": "string",
|
|
406
|
+
"const": "checkboxGroup"
|
|
407
|
+
},
|
|
408
|
+
"label": {
|
|
409
|
+
"type": "string",
|
|
410
|
+
"description": "标签文本"
|
|
411
|
+
},
|
|
412
|
+
"name": {
|
|
413
|
+
"type": "string",
|
|
414
|
+
"description": "参数名称(用于存储和获取值)"
|
|
415
|
+
},
|
|
416
|
+
"children": {
|
|
417
|
+
"type": "array",
|
|
418
|
+
"description": "子选项",
|
|
419
|
+
"items": {
|
|
420
|
+
"type": "string"
|
|
409
421
|
}
|
|
422
|
+
},
|
|
423
|
+
"values": {
|
|
424
|
+
"type": "array",
|
|
425
|
+
"description": "值列表",
|
|
426
|
+
"items": {
|
|
427
|
+
"type": "string"
|
|
428
|
+
}
|
|
429
|
+
},
|
|
430
|
+
"columnCount": {
|
|
431
|
+
"type": "number",
|
|
432
|
+
"description": "列数"
|
|
433
|
+
},
|
|
434
|
+
"hidden": {
|
|
435
|
+
"type": "boolean",
|
|
436
|
+
"description": "是否隐藏",
|
|
437
|
+
"default": false
|
|
410
438
|
}
|
|
411
|
-
},
|
|
412
|
-
"then": {
|
|
413
|
-
"required": ["label", "name"]
|
|
414
439
|
}
|
|
415
440
|
},
|
|
416
441
|
{
|
|
417
|
-
"
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
442
|
+
"type": "object",
|
|
443
|
+
"required": ["type", "label", "name"],
|
|
444
|
+
"additionalProperties": false,
|
|
445
|
+
"properties": {
|
|
446
|
+
"type": {
|
|
447
|
+
"type": "string",
|
|
448
|
+
"const": "number"
|
|
449
|
+
},
|
|
450
|
+
"label": {
|
|
451
|
+
"type": "string",
|
|
452
|
+
"description": "标签文本"
|
|
453
|
+
},
|
|
454
|
+
"name": {
|
|
455
|
+
"type": "string",
|
|
456
|
+
"description": "参数名称(用于存储和获取值)"
|
|
457
|
+
},
|
|
458
|
+
"value": {
|
|
459
|
+
"type": "number",
|
|
460
|
+
"description": "默认值(数字类型)"
|
|
461
|
+
},
|
|
462
|
+
"hint": {
|
|
463
|
+
"type": "string",
|
|
464
|
+
"description": "提示文本"
|
|
465
|
+
},
|
|
466
|
+
"notice": {
|
|
467
|
+
"type": "string",
|
|
468
|
+
"description": "通知文本"
|
|
469
|
+
},
|
|
470
|
+
"hidden": {
|
|
471
|
+
"type": "boolean",
|
|
472
|
+
"description": "是否隐藏",
|
|
473
|
+
"default": false
|
|
422
474
|
}
|
|
423
|
-
},
|
|
424
|
-
"then": {
|
|
425
|
-
"required": ["label", "name", "children", "values"]
|
|
426
475
|
}
|
|
427
476
|
},
|
|
428
477
|
{
|
|
429
|
-
"
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
478
|
+
"type": "object",
|
|
479
|
+
"required": ["type", "label", "name"],
|
|
480
|
+
"additionalProperties": false,
|
|
481
|
+
"properties": {
|
|
482
|
+
"type": {
|
|
483
|
+
"type": "string",
|
|
484
|
+
"const": "digit"
|
|
485
|
+
},
|
|
486
|
+
"label": {
|
|
487
|
+
"type": "string",
|
|
488
|
+
"description": "标签文本"
|
|
489
|
+
},
|
|
490
|
+
"name": {
|
|
491
|
+
"type": "string",
|
|
492
|
+
"description": "参数名称(用于存储和获取值)"
|
|
493
|
+
},
|
|
494
|
+
"value": {
|
|
495
|
+
"type": "integer",
|
|
496
|
+
"description": "默认值(整数类型)"
|
|
497
|
+
},
|
|
498
|
+
"hint": {
|
|
499
|
+
"type": "string",
|
|
500
|
+
"description": "提示文本"
|
|
501
|
+
},
|
|
502
|
+
"notice": {
|
|
503
|
+
"type": "string",
|
|
504
|
+
"description": "通知文本"
|
|
505
|
+
},
|
|
506
|
+
"hidden": {
|
|
507
|
+
"type": "boolean",
|
|
508
|
+
"description": "是否隐藏",
|
|
509
|
+
"default": false
|
|
434
510
|
}
|
|
435
|
-
},
|
|
436
|
-
"then": {
|
|
437
|
-
"required": ["label", "name"]
|
|
438
511
|
}
|
|
439
512
|
},
|
|
440
513
|
{
|
|
441
|
-
"
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
514
|
+
"type": "object",
|
|
515
|
+
"required": ["type", "label", "name", "min", "max", "value"],
|
|
516
|
+
"additionalProperties": false,
|
|
517
|
+
"properties": {
|
|
518
|
+
"type": {
|
|
519
|
+
"type": "string",
|
|
520
|
+
"const": "digitRange"
|
|
521
|
+
},
|
|
522
|
+
"label": {
|
|
523
|
+
"type": "string",
|
|
524
|
+
"description": "标签文本"
|
|
525
|
+
},
|
|
526
|
+
"name": {
|
|
527
|
+
"type": "string",
|
|
528
|
+
"description": "参数名称(用于存储和获取值)"
|
|
529
|
+
},
|
|
530
|
+
"min": {
|
|
531
|
+
"type": "integer",
|
|
532
|
+
"description": "最小值(整数)"
|
|
533
|
+
},
|
|
534
|
+
"max": {
|
|
535
|
+
"type": "integer",
|
|
536
|
+
"description": "最大值(整数)"
|
|
537
|
+
},
|
|
538
|
+
"value": {
|
|
539
|
+
"type": "integer",
|
|
540
|
+
"description": "默认值(整数)"
|
|
541
|
+
},
|
|
542
|
+
"step": {
|
|
543
|
+
"type": "integer",
|
|
544
|
+
"description": "步长(整数)"
|
|
545
|
+
},
|
|
546
|
+
"hidden": {
|
|
547
|
+
"type": "boolean",
|
|
548
|
+
"description": "是否隐藏",
|
|
549
|
+
"default": false
|
|
446
550
|
}
|
|
447
|
-
},
|
|
448
|
-
"then": {
|
|
449
|
-
"required": ["label", "name"]
|
|
450
551
|
}
|
|
451
552
|
},
|
|
452
553
|
{
|
|
453
|
-
"
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
554
|
+
"type": "object",
|
|
555
|
+
"required": ["type", "label", "name"],
|
|
556
|
+
"additionalProperties": false,
|
|
557
|
+
"properties": {
|
|
558
|
+
"type": {
|
|
559
|
+
"type": "string",
|
|
560
|
+
"const": "switch"
|
|
561
|
+
},
|
|
562
|
+
"label": {
|
|
563
|
+
"type": "string",
|
|
564
|
+
"description": "标签文本"
|
|
565
|
+
},
|
|
566
|
+
"name": {
|
|
567
|
+
"type": "string",
|
|
568
|
+
"description": "参数名称(用于存储和获取值)"
|
|
569
|
+
},
|
|
570
|
+
"value": {
|
|
571
|
+
"type": "boolean",
|
|
572
|
+
"description": "默认值(布尔类型)"
|
|
573
|
+
},
|
|
574
|
+
"hint": {
|
|
575
|
+
"type": "string",
|
|
576
|
+
"description": "提示文本"
|
|
577
|
+
},
|
|
578
|
+
"notice": {
|
|
579
|
+
"type": "string",
|
|
580
|
+
"description": "通知文本"
|
|
581
|
+
},
|
|
582
|
+
"hidden": {
|
|
583
|
+
"type": "boolean",
|
|
584
|
+
"description": "是否隐藏",
|
|
585
|
+
"default": false
|
|
458
586
|
}
|
|
459
|
-
},
|
|
460
|
-
"then": {
|
|
461
|
-
"required": ["label", "name"]
|
|
462
587
|
}
|
|
463
588
|
},
|
|
464
589
|
{
|
|
465
|
-
"
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
590
|
+
"type": "object",
|
|
591
|
+
"required": ["type", "label", "name"],
|
|
592
|
+
"additionalProperties": false,
|
|
593
|
+
"properties": {
|
|
594
|
+
"type": {
|
|
595
|
+
"type": "string",
|
|
596
|
+
"const": "text"
|
|
597
|
+
},
|
|
598
|
+
"label": {
|
|
599
|
+
"type": "string",
|
|
600
|
+
"description": "标签文本"
|
|
601
|
+
},
|
|
602
|
+
"name": {
|
|
603
|
+
"type": "string",
|
|
604
|
+
"description": "参数名称(用于存储和获取值)"
|
|
605
|
+
},
|
|
606
|
+
"value": {
|
|
607
|
+
"type": "string",
|
|
608
|
+
"description": "默认值"
|
|
609
|
+
},
|
|
610
|
+
"hint": {
|
|
611
|
+
"type": "string",
|
|
612
|
+
"description": "提示文本"
|
|
613
|
+
},
|
|
614
|
+
"notice": {
|
|
615
|
+
"type": "string",
|
|
616
|
+
"description": "通知文本"
|
|
617
|
+
},
|
|
618
|
+
"lines": {
|
|
619
|
+
"type": "number",
|
|
620
|
+
"description": "行数(用于多行文本)"
|
|
621
|
+
},
|
|
622
|
+
"hidden": {
|
|
623
|
+
"type": "boolean",
|
|
624
|
+
"description": "是否隐藏",
|
|
625
|
+
"default": false
|
|
470
626
|
}
|
|
471
|
-
},
|
|
472
|
-
"then": {
|
|
473
|
-
"required": ["label", "name"]
|
|
474
627
|
}
|
|
475
628
|
},
|
|
476
629
|
{
|
|
477
|
-
"
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
630
|
+
"type": "object",
|
|
631
|
+
"required": ["type", "label", "name"],
|
|
632
|
+
"additionalProperties": false,
|
|
633
|
+
"properties": {
|
|
634
|
+
"type": {
|
|
635
|
+
"type": "string",
|
|
636
|
+
"enum": ["radio", "select"]
|
|
637
|
+
},
|
|
638
|
+
"label": {
|
|
639
|
+
"type": "string",
|
|
640
|
+
"description": "标签文本"
|
|
641
|
+
},
|
|
642
|
+
"name": {
|
|
643
|
+
"type": "string",
|
|
644
|
+
"description": "参数名称(用于存储和获取值)"
|
|
645
|
+
},
|
|
646
|
+
"value": {
|
|
647
|
+
"type": "string",
|
|
648
|
+
"description": "默认值"
|
|
649
|
+
},
|
|
650
|
+
"options": {
|
|
651
|
+
"type": "array",
|
|
652
|
+
"description": "选项列表",
|
|
653
|
+
"items": {
|
|
654
|
+
"type": "object",
|
|
655
|
+
"additionalProperties": false,
|
|
656
|
+
"properties": {
|
|
657
|
+
"label": {
|
|
658
|
+
"type": "string"
|
|
659
|
+
},
|
|
660
|
+
"value": {
|
|
661
|
+
"type": "string"
|
|
662
|
+
}
|
|
663
|
+
}
|
|
481
664
|
}
|
|
665
|
+
},
|
|
666
|
+
"dataFrom": {
|
|
667
|
+
"type": "string",
|
|
668
|
+
"description": "数据来源(如:role)"
|
|
669
|
+
},
|
|
670
|
+
"hidden": {
|
|
671
|
+
"type": "boolean",
|
|
672
|
+
"description": "是否隐藏",
|
|
673
|
+
"default": false
|
|
482
674
|
}
|
|
483
|
-
},
|
|
484
|
-
"then": {
|
|
485
|
-
"required": ["title"]
|
|
486
675
|
}
|
|
487
676
|
}
|
|
488
677
|
]
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "deeke-script-app",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.4",
|
|
4
4
|
"description": "DeekeScript应用",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"build": "
|
|
8
|
-
"build-zip": "
|
|
9
|
-
"build-obfuscator": "
|
|
10
|
-
"build-obfuscator-zip": "
|
|
7
|
+
"build": "cpx \"src/**/*\" script",
|
|
8
|
+
"build-zip": "cpx \"src/**/*\" script && ts-node --esm ./deekeScriptZipBuild",
|
|
9
|
+
"build-obfuscator": "cpx \"src/**/*\" script && ts-node --esm ./gulpfile",
|
|
10
|
+
"build-obfuscator-zip": "cpx \"src/**/*\" script && ts-node --esm ./gulpfile && ts-node --esm ./deekeScriptZipBuild",
|
|
11
11
|
"postinstall": "ts-node --esm init",
|
|
12
12
|
"update-types": "node update-types.js"
|
|
13
13
|
},
|
|
@@ -41,4 +41,4 @@
|
|
|
41
41
|
"socket.io": "^4.8.1",
|
|
42
42
|
"ts-node": "^10.9.2"
|
|
43
43
|
}
|
|
44
|
-
}
|
|
44
|
+
}
|
package/script/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//这个文件不用编写代码
|
|
@@ -1,38 +1,89 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
|
|
2
|
+
let newTask = {
|
|
3
|
+
log(){
|
|
4
|
+
Log.log(arguments);
|
|
5
|
+
console.log(arguments);
|
|
4
6
|
},
|
|
5
7
|
comment() {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
console.log(
|
|
9
|
-
Gesture.click(
|
|
10
|
-
console.log(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
//注释
|
|
9
|
+
let tag = UiSelector().id('com.ss.android.ugc.aweme:id/comment_container').isVisibleToUser(true).findOne();
|
|
10
|
+
console.log(tag);
|
|
11
|
+
Gesture.click(tag.bounds().left + Math.random() * tag.bounds().width(), tag.bounds().centerY());
|
|
12
|
+
console.log('打开评论窗口');
|
|
13
|
+
System.sleep(1200);
|
|
14
|
+
|
|
15
|
+
let inputTag = UiSelector().className('android.widget.EditText').editable(true).findOne();
|
|
16
|
+
console.log(inputTag);
|
|
17
|
+
Gesture.click(inputTag.bounds().left + Math.random() * inputTag.bounds().width(), inputTag.bounds().centerY());
|
|
18
|
+
console.log('开始输入评论');
|
|
19
|
+
System.sleep(500);
|
|
20
|
+
|
|
21
|
+
let iptTag = UiSelector().className('android.widget.EditText').editable(true).findOne();
|
|
22
|
+
console.log(iptTag);
|
|
23
|
+
Log.log(iptTag);
|
|
24
|
+
iptTag.setText('太棒了');
|
|
25
|
+
System.sleep(500);
|
|
26
|
+
|
|
27
|
+
let sendTag = UiSelector().id('com.ss.android.ugc.aweme:id/dqq').text('发送').findOne();
|
|
28
|
+
console.log(sendTag);
|
|
29
|
+
|
|
30
|
+
Gesture.click(sendTag.bounds().centerX(), sendTag.bounds().centerY());
|
|
31
|
+
System.sleep(500);
|
|
32
|
+
Gesture.back();
|
|
33
|
+
System.sleep(500);
|
|
14
34
|
},
|
|
35
|
+
|
|
15
36
|
backHome() {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
let
|
|
19
|
-
|
|
20
|
-
|
|
37
|
+
console.log('开始返回主页');
|
|
38
|
+
let homeTag;
|
|
39
|
+
let backMaxCount = 5;
|
|
40
|
+
do {
|
|
41
|
+
homeTag = UiSelector().id('com.ss.android.ugc.aweme:id/x_t').isVisibleToUser(true).findOne();
|
|
42
|
+
if (homeTag) {
|
|
43
|
+
console.log('在首页');
|
|
44
|
+
}
|
|
45
|
+
Gesture.back();
|
|
46
|
+
console.log('返回');
|
|
47
|
+
System.sleep(1000);
|
|
48
|
+
} while (!homeTag && --backMaxCount >= 0);
|
|
21
49
|
},
|
|
50
|
+
|
|
22
51
|
run() {
|
|
23
|
-
console.log(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
52
|
+
console.log('开始进入应用');
|
|
53
|
+
App.launch('com.ss.android.ugc.aweme');
|
|
54
|
+
System.sleep(2000);
|
|
55
|
+
let zanCount = Storage.getInteger('task_douyin_zan_count');
|
|
56
|
+
let commentCount = Storage.getInteger('task_douyin_zan_comment');
|
|
57
|
+
|
|
58
|
+
console.log('配置:' + zanCount + ' 赞,' + commentCount + ' 评论');
|
|
59
|
+
while (zanCount > 0 || commentCount > 0) {
|
|
60
|
+
try {
|
|
61
|
+
console.log('zanCount: ' + zanCount + ' commentCount: ' + commentCount);
|
|
62
|
+
if (--zanCount >= 0) {
|
|
63
|
+
let tag = UiSelector().id('com.ss.android.ugc.aweme:id/fd9').isVisibleToUser(true).findOne();
|
|
64
|
+
console.log('点赞tag', tag);
|
|
65
|
+
Gesture.click(tag.bounds().left + Math.random() * tag.bounds().width(), tag.bounds().centerY());
|
|
66
|
+
System.sleep(1000);
|
|
67
|
+
console.log('点赞完成');
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (--commentCount >= 0) {
|
|
71
|
+
this.comment();
|
|
72
|
+
System.sleep(1000);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
let tag = UiSelector().id('com.ss.android.ugc.aweme:id/viewpager').desc('视频').scrollable(true).findOne();
|
|
77
|
+
tag.scrollForward();
|
|
78
|
+
System.sleep(3000);
|
|
79
|
+
} catch (e) {
|
|
80
|
+
console.log(e);
|
|
81
|
+
this.backHome();
|
|
82
|
+
}
|
|
34
83
|
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
84
|
+
},
|
|
85
|
+
}
|
|
37
86
|
|
|
38
|
-
Log.setFile("douyin_zan.js.log")
|
|
87
|
+
Log.setFile("douyin_zan.js.log");
|
|
88
|
+
newTask.run();
|
|
89
|
+
FloatDialogs.show('抖音任务完成');
|
package/script/task/dy.js
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
let
|
|
2
|
-
toker_view_video_keywords: Storage.get("toker_view_video_keywords"),
|
|
3
|
-
toker_view_video_second: Storage.getInteger("toker_view_video_second"),
|
|
4
|
-
toker_run_sex: Storage.getArray("toker_run_sex")
|
|
5
|
-
};
|
|
1
|
+
let dyApp = require("./dyApp");
|
|
6
2
|
|
|
7
|
-
|
|
3
|
+
let tag = UiSelector().id('name').findOne();
|
|
4
|
+
|
|
5
|
+
// console.log(tag.click());
|
|
6
|
+
let config = {
|
|
7
|
+
toker_view_video_keywords: Storage.get('toker_view_video_keywords'),
|
|
8
|
+
toker_view_video_second: Storage.getInteger('toker_view_video_second'),
|
|
9
|
+
toker_run_sex: Storage.getArray('toker_run_sex'),
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
console.log(config, dyApp.getName());//获取json文件中的配置参数
|
|
13
|
+
|
|
14
|
+
FloatDialogs.show('提示', '请编写业务代码');
|
package/script/task/dyApp.js
CHANGED
package/script/task/dyCity.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
FloatDialogs.show(
|
|
1
|
+
FloatDialogs.show('提示', '请编写业务代码');
|
package/script/task/tool.js
CHANGED
|
@@ -1,10 +1,19 @@
|
|
|
1
|
-
let
|
|
2
|
-
intoApp() {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
let myTask = {
|
|
2
|
+
intoApp() {
|
|
3
|
+
//打开并进入App
|
|
4
|
+
},
|
|
5
|
+
|
|
6
|
+
backApp() {
|
|
7
|
+
//退出当前App
|
|
8
|
+
},
|
|
9
|
+
|
|
10
|
+
task(){
|
|
11
|
+
//任务代码
|
|
12
|
+
},
|
|
13
|
+
|
|
5
14
|
run() {
|
|
6
|
-
FloatDialogs.show(
|
|
15
|
+
FloatDialogs.show('提示', '请编写业务代码');
|
|
7
16
|
}
|
|
8
|
-
}
|
|
17
|
+
}
|
|
9
18
|
|
|
10
|
-
|
|
19
|
+
myTask.run();
|
package/test.json
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./deekeScript.schema.json",
|
|
3
3
|
"name": "test",
|
|
4
|
-
"version": "1.0.0",
|
|
5
|
-
"description": "test",
|
|
6
4
|
"versionCode": "100",
|
|
7
5
|
"versionName": "名称",
|
|
8
6
|
"debug": true,
|
|
@@ -27,6 +25,74 @@
|
|
|
27
25
|
"label": "标题",
|
|
28
26
|
"name": "title",
|
|
29
27
|
"type": "number"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"type": "notice",
|
|
31
|
+
"title": "提示"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"type": "switch",
|
|
35
|
+
"label": "标题",
|
|
36
|
+
"name": "title",
|
|
37
|
+
"value": true
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"type": "number",
|
|
41
|
+
"label": "标题",
|
|
42
|
+
"name": "title",
|
|
43
|
+
"value": 3223
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"type": "digit",
|
|
47
|
+
"label": "标题",
|
|
48
|
+
"name": "title",
|
|
49
|
+
"value": 32
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"type": "numberRange",
|
|
53
|
+
"label": "标题",
|
|
54
|
+
"name": "title",
|
|
55
|
+
"value": 32,
|
|
56
|
+
"min": 0,
|
|
57
|
+
"max": 100,
|
|
58
|
+
"step": 1
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"type": "textArea",
|
|
62
|
+
"label": "标题",
|
|
63
|
+
"name": "title",
|
|
64
|
+
"value": "32",
|
|
65
|
+
"lines": 3
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"type": "checkboxGroup",
|
|
69
|
+
"label": "标题",
|
|
70
|
+
"name": "title",
|
|
71
|
+
"children": ["1", "2", "3"],
|
|
72
|
+
"values": ["1", "2", "3"]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"type": "digitRange",
|
|
76
|
+
"label": "标题",
|
|
77
|
+
"name": "title",
|
|
78
|
+
"value": 32,
|
|
79
|
+
"min": 0,
|
|
80
|
+
"max": 100,
|
|
81
|
+
"step": 1
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"type": "radio",
|
|
85
|
+
"label": "标题",
|
|
86
|
+
"name": "title",
|
|
87
|
+
"value": "1",
|
|
88
|
+
"dataFrom": "role",
|
|
89
|
+
"options": []
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"type": "text",
|
|
93
|
+
"label": "标题",
|
|
94
|
+
"name": "title",
|
|
95
|
+
"value": "32"
|
|
30
96
|
}
|
|
31
97
|
]
|
|
32
98
|
}
|