deeke-script-app 1.9.5 → 2.0.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.
Files changed (131) hide show
  1. package/deekeScript.json +700 -699
  2. package/deekeScript.schema.json +826 -821
  3. package/jsconfig.json +12 -25
  4. package/package.json +17 -43
  5. package/src/task/dy.js +14 -14
  6. package/.vscode/settings.json +0 -9
  7. package/@deekeScript/@type/Class/Global.d.ts +0 -2
  8. package/@deekeScript/@type/Class/Rect.d.ts +0 -16
  9. package/@deekeScript/@type/Class/UiSelector.d.ts +0 -201
  10. package/@deekeScript/@type/Class/WebSocket.d.ts +0 -49
  11. package/@deekeScript/@type/README.md +0 -19
  12. package/@deekeScript/@type/interface/Access.d.ts +0 -199
  13. package/@deekeScript/@type/interface/App.d.ts +0 -106
  14. package/@deekeScript/@type/interface/Audio.d.ts +0 -96
  15. package/@deekeScript/@type/interface/Console.d.ts +0 -220
  16. package/@deekeScript/@type/interface/DeekeScript.d.ts +0 -83
  17. package/@deekeScript/@type/interface/DeekeScriptJson.d.ts +0 -13
  18. package/@deekeScript/@type/interface/Device.d.ts +0 -275
  19. package/@deekeScript/@type/interface/DeviceApp.d.ts +0 -97
  20. package/@deekeScript/@type/interface/DeviceHardware.d.ts +0 -36
  21. package/@deekeScript/@type/interface/DeviceKiosk.d.ts +0 -30
  22. package/@deekeScript/@type/interface/DevicePolicy.d.ts +0 -27
  23. package/@deekeScript/@type/interface/Dialogs.d.ts +0 -41
  24. package/@deekeScript/@type/interface/Encrypt.d.ts +0 -58
  25. package/@deekeScript/@type/interface/Engines.d.ts +0 -39
  26. package/@deekeScript/@type/interface/Files.d.ts +0 -283
  27. package/@deekeScript/@type/interface/FloatDialogs.d.ts +0 -71
  28. package/@deekeScript/@type/interface/ForegroundServiceBridge.d.ts +0 -31
  29. package/@deekeScript/@type/interface/Gesture.d.ts +0 -54
  30. package/@deekeScript/@type/interface/Hid.d.ts +0 -342
  31. package/@deekeScript/@type/interface/Http.d.ts +0 -94
  32. package/@deekeScript/@type/interface/Images.d.ts +0 -71
  33. package/@deekeScript/@type/interface/Intent.d.ts +0 -12
  34. package/@deekeScript/@type/interface/Java.d.ts +0 -7
  35. package/@deekeScript/@type/interface/KeyBoards.d.ts +0 -63
  36. package/@deekeScript/@type/interface/Log.d.ts +0 -16
  37. package/@deekeScript/@type/interface/MediaStore.d.ts +0 -146
  38. package/@deekeScript/@type/interface/NotificationBridge.d.ts +0 -28
  39. package/@deekeScript/@type/interface/SocketIOClient.d.ts +0 -76
  40. package/@deekeScript/@type/interface/Storage.d.ts +0 -119
  41. package/@deekeScript/@type/interface/System.d.ts +0 -142
  42. package/@deekeScript/@type/interface/Threads.d.ts +0 -103
  43. package/@deekeScript/@type/interface/UiObject.d.ts +0 -202
  44. package/README.md +0 -67
  45. package/deekeScriptZipBuild +0 -48
  46. package/gulpfile +0 -17
  47. package/images/test/ad.png +0 -0
  48. package/images/test/add.png +0 -0
  49. package/images/test/ai-back.png +0 -0
  50. package/images/test/anchor_focus.png +0 -0
  51. package/images/test/auto-2.png +0 -0
  52. package/images/test/back.png +0 -0
  53. package/images/test/barrage.png +0 -0
  54. package/images/test/clear_fans.png +0 -0
  55. package/images/test/close.png +0 -0
  56. package/images/test/comment-2.png +0 -0
  57. package/images/test/delete.png +0 -0
  58. package/images/test/edit.png +0 -0
  59. package/images/test/fans-inc.png +0 -0
  60. package/images/test/fans.png +0 -0
  61. package/images/test/friend.png +0 -0
  62. package/images/test/grab.png +0 -0
  63. package/images/test/hot.png +0 -0
  64. package/images/test/into.png +0 -0
  65. package/images/test/invite.png +0 -0
  66. package/images/test/live-zan.png +0 -0
  67. package/images/test/live.png +0 -0
  68. package/images/test/member.png +0 -0
  69. package/images/test/msg_back.png +0 -0
  70. package/images/test/new_user.png +0 -0
  71. package/images/test/notice-2.png +0 -0
  72. package/images/test/openai-icon.png +0 -0
  73. package/images/test/precise-user.png +0 -0
  74. package/images/test/private-2.png +0 -0
  75. package/images/test/qingsong.png +0 -0
  76. package/images/test/robot.png +0 -0
  77. package/images/test/rocket.png +0 -0
  78. package/images/test/score_live.png +0 -0
  79. package/images/test/sett.png +0 -0
  80. package/images/test/show.png +0 -0
  81. package/images/test/show_password.png +0 -0
  82. package/images/test/speech-say.png +0 -0
  83. package/images/test/statistics.png +0 -0
  84. package/images/test/task.png +0 -0
  85. package/images/test/team-buy.png +0 -0
  86. package/images/test/tuandui.png +0 -0
  87. package/images/test/user-get.png +0 -0
  88. package/images/test/vertical.png +0 -0
  89. package/images/test/weixin.png +0 -0
  90. package/images/test/xhs-fans.png +0 -0
  91. package/images/test/xhs-wanneng.png +0 -0
  92. package/images/test/xhs-zan.png +0 -0
  93. package/images/test/zan-1.png +0 -0
  94. package/images/test/zan.png +0 -0
  95. package/init +0 -32
  96. package/init.lock +0 -0
  97. package/music/music.mp3 +0 -0
  98. package/script/index.js +0 -1
  99. package/script/statistics/statistics.js +0 -120
  100. package/script/task/douyin_zan.js +0 -89
  101. package/script/task/dy.js +0 -14
  102. package/script/task/dyApp.js +0 -7
  103. package/script/task/dyCity.js +0 -1
  104. package/script/task/exec_js.js +0 -4
  105. package/script/task/tool.js +0 -19
  106. package/script/task.html +0 -15
  107. package/src/index.js +0 -1
  108. package/test.json +0 -133
  109. package/uglify-config.json +0 -16
  110. package/update-types.js +0 -137
  111. /package/{images → src/images}/test/ai.png +0 -0
  112. /package/{images → src/images}/test/app.png +0 -0
  113. /package/{images → src/images}/test/cancel_focus.png +0 -0
  114. /package/{images → src/images}/test/cancel_zan.png +0 -0
  115. /package/{images → src/images}/test/city.png +0 -0
  116. /package/{images → src/images}/test/clear.png +0 -0
  117. /package/{images → src/images}/test/finger.png +0 -0
  118. /package/{images → src/images}/test/home-top.png +0 -0
  119. /package/{images → src/images}/test/home.png +0 -0
  120. /package/{images → src/images}/test/jubao.png +0 -0
  121. /package/{images → src/images}/test/kefu.png +0 -0
  122. /package/{images → src/images}/test/manual.png +0 -0
  123. /package/{images → src/images}/test/notice.png +0 -0
  124. /package/{images → src/images}/test/score.png +0 -0
  125. /package/{images → src/images}/test/setting-top.png +0 -0
  126. /package/{images → src/images}/test/setting.png +0 -0
  127. /package/{images → src/images}/test/speech.png +0 -0
  128. /package/{images → src/images}/test/tool.png +0 -0
  129. /package/{images → src/images}/test/update.png +0 -0
  130. /package/{images → src/images}/test/upload.png +0 -0
  131. /package/{images → src/images}/test/view_back.png +0 -0
@@ -1,822 +1,827 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "title": "DeekeScript 配置文件",
4
- "description": "DeekeScript Android 项目配置文件,用于动态渲染页面",
5
- "type": "object",
6
- "required": [
7
- "name",
8
- "packageName",
9
- "versionCode",
10
- "versionName",
11
- "icon",
12
- "host",
13
- "switchSetting",
14
- "bottomMenusHidden",
15
- "groups",
16
- "bottomMenus",
17
- "settingLists",
18
- "apis"
19
- ],
20
- "additionalProperties": false,
21
- "properties": {
22
- "$schema": {
23
- "type": "string",
24
- "description": "JSON Schema 引用路径"
25
- },
26
- "name": {
27
- "type": "string",
28
- "description": "App安装成功之后,在手机上的名称"
29
- },
30
- "packageName": {
31
- "type": "string",
32
- "description": "包名,如:cn.deeke.script"
33
- },
34
- "versionCode": {
35
- "type": "string",
36
- "description": "版本号(软件自动升级凭证,当前版本号大于或者等于后台上传的版本号,则无法升级)"
37
- },
38
- "versionName": {
39
- "type": "string",
40
- "description": "版本名称,尽量和版本号统一(版本号100,则配置为1.0.0)"
41
- },
42
- "icon": {
43
- "type": "string",
44
- "description": "图标建议采用200*200像素的,清晰度大的"
45
- },
46
- "head": {
47
- "type": "string",
48
- "description": "App中用户设置页面的头像,无设置页可以不填"
49
- },
50
- "settingTopBg": {
51
- "type": "string",
52
- "description": "设置页面顶部背景图"
53
- },
54
- "debug": {
55
- "type": "boolean",
56
- "description": "默认为true(不需要激活码也可以启动脚本),如果需要激活才能使用APP,请设置为false",
57
- "default": true
58
- },
59
- "host": {
60
- "type": "string",
61
- "description": "接口请求域名",
62
- "format": "uri"
63
- },
64
- "bottomMenusHidden": {
65
- "type": "boolean",
66
- "default": false,
67
- "description": "是否隐藏底部菜单"
68
- },
69
- "switchSetting": {
70
- "type": "object",
71
- "description": "功能开关设置",
72
- "required": [
73
- "alipay"
74
- ],
75
- "additionalProperties": false,
76
- "properties": {
77
- "alipay": {
78
- "type": "boolean",
79
- "description": "支持支付宝支付"
80
- }
81
- }
82
- },
83
- "hooks": {
84
- "type": "object",
85
- "description": "生命周期钩子函数配置",
86
- "additionalProperties": false,
87
- "properties": {
88
- "app_start_before": {
89
- "type": "string",
90
- "description": "应用启动前执行的钩子函数文件路径"
91
- },
92
- "app_start": {
93
- "type": "string",
94
- "description": "应用启动时执行的钩子函数文件路径"
95
- },
96
- "app_active_after": {
97
- "type": "string",
98
- "description": "应用激活后执行的钩子函数文件路径"
99
- }
100
- }
101
- },
102
- "groups": {
103
- "type": "array",
104
- "description": "主界面的功能组,每组都会包含若干个功能",
105
- "items": {
106
- "type": "object",
107
- "required": [
108
- "title",
109
- "methods"
110
- ],
111
- "additionalProperties": false,
112
- "properties": {
113
- "title": {
114
- "type": "string",
115
- "description": "App主界面的功能名称"
116
- },
117
- "titleHidden": {
118
- "type": "boolean",
119
- "description": "App主界面功能组标题是否隐藏,默认不隐藏",
120
- "default": false
121
- },
122
- "hidden": {
123
- "type": "boolean",
124
- "description": "是否隐藏当前功能组,默认不隐藏",
125
- "default": false
126
- },
127
- "methods": {
128
- "type": "array",
129
- "description": "当前功能组下的功能列表",
130
- "items": {
131
- "$ref": "#/definitions/method"
132
- }
133
- }
134
- }
135
- }
136
- },
137
- "bottomMenus": {
138
- "type": "array",
139
- "description": "App中底部菜单,可以使用系统内置的,也可以自定义",
140
- "items": {
141
- "type": "object",
142
- "required": [
143
- "title",
144
- "icon",
145
- "type"
146
- ],
147
- "additionalProperties": false,
148
- "properties": {
149
- "title": {
150
- "type": "string",
151
- "description": "菜单标题,可使用 {NAME} 占位符"
152
- },
153
- "icon": {
154
- "type": "string",
155
- "description": "菜单图标路径"
156
- },
157
- "banner": {
158
- "type": "string",
159
- "description": "横幅图片路径"
160
- },
161
- "type": {
162
- "type": "string",
163
- "description": "菜单类型",
164
- "enum": [
165
- "home",
166
- "speech",
167
- "setting"
168
- ]
169
- }
170
- }
171
- }
172
- },
173
- "settingLists": {
174
- "type": "array",
175
- "description": "App中设置页的列表项,可以使用系统内置的,也可以自定义",
176
- "items": {
177
- "type": "object",
178
- "required": [
179
- "title",
180
- "icon",
181
- "type"
182
- ],
183
- "additionalProperties": false,
184
- "properties": {
185
- "title": {
186
- "type": "string",
187
- "description": "设置项标题"
188
- },
189
- "icon": {
190
- "type": "string",
191
- "description": "设置项图标路径"
192
- },
193
- "type": {
194
- "type": "string",
195
- "description": "设置项类型",
196
- "enum": [
197
- "customerService",
198
- "notice",
199
- "settingService",
200
- "statistics",
201
- "uploadLog",
202
- "updateApp",
203
- "clear",
204
- "qiwei",
205
- "execJs"
206
- ]
207
- },
208
- "description": {
209
- "type": "string",
210
- "description": "设置项描述"
211
- },
212
- "file": {
213
- "type": "string",
214
- "description": "文件路径(用于 notice 类型)"
215
- },
216
- "url": {
217
- "type": "string",
218
- "description": "接口URL"
219
- },
220
- "jsFile": {
221
- "type": "string",
222
- "description": "JavaScript文件路径"
223
- },
224
- "hidden": {
225
- "type": "boolean",
226
- "description": "是否隐藏",
227
- "default": false
228
- },
229
- "settingPage": {
230
- "$ref": "#/definitions/settingPage"
231
- }
232
- }
233
- }
234
- },
235
- "apis": {
236
- "type": "array",
237
- "description": "设置相关api,比如激活码api,验证激活码是否有效api等",
238
- "items": {
239
- "type": "object",
240
- "required": [
241
- "type",
242
- "url"
243
- ],
244
- "additionalProperties": false,
245
- "properties": {
246
- "type": {
247
- "type": "string",
248
- "description": "API类型",
249
- "enum": [
250
- "bind",
251
- "checkBind",
252
- "aiSpeechToken",
253
- "config",
254
- "getToken",
255
- "createOrder"
256
- ]
257
- },
258
- "url": {
259
- "type": "string",
260
- "description": "API接口路径"
261
- }
262
- }
263
- }
264
- }
265
- },
266
- "definitions": {
267
- "method": {
268
- "type": "object",
269
- "required": [
270
- "title",
271
- "icon"
272
- ],
273
- "additionalProperties": false,
274
- "properties": {
275
- "title": {
276
- "type": "string",
277
- "description": "App主界面的功能名称"
278
- },
279
- "icon": {
280
- "type": "string",
281
- "description": "App主界面的功能图标"
282
- },
283
- "jsFile": {
284
- "type": "string",
285
- "description": "功能实际执行的代码所在文件"
286
- },
287
- "settingPage": {
288
- "$ref": "#/definitions/settingPage"
289
- },
290
- "hidden": {
291
- "type": "boolean",
292
- "description": "属性值,当为true的时候,则界面上不再显示此功能模块",
293
- "default": false
294
- },
295
- "runType": {
296
- "type": "string",
297
- "description": "如果为floatSwitch则需要手动点击右侧悬浮窗执行",
298
- "enum": [
299
- "floatSwitch"
300
- ]
301
- },
302
- "packageName": {
303
- "type": "string",
304
- "description": "包名,和runType配合使用"
305
- },
306
- "columns": {
307
- "type": "number",
308
- "description": "每行被等分为24,8则表示当前groups一行放3个功能图标"
309
- },
310
- "autoOpen": {
311
- "type": "boolean",
312
- "description": "是否自动打开界面(需要和packageName配合使用)"
313
- },
314
- "activity": {
315
- "type": "object",
316
- "description": "活动配置",
317
- "additionalProperties": false,
318
- "properties": {
319
- "notice": {
320
- "type": "string",
321
- "description": "活动提示"
322
- },
323
- "title": {
324
- "type": "string",
325
- "description": "活动标题"
326
- },
327
- "minVersion": {
328
- "type": "number",
329
- "description": "最小版本号"
330
- },
331
- "groups": {
332
- "type": "array",
333
- "description": "活动功能组",
334
- "items": {
335
- "type": "object",
336
- "additionalProperties": false,
337
- "properties": {
338
- "title": {
339
- "type": "string"
340
- },
341
- "titleHidden": {
342
- "type": "boolean"
343
- },
344
- "methods": {
345
- "type": "array",
346
- "items": {
347
- "$ref": "#/definitions/method"
348
- }
349
- }
350
- }
351
- }
352
- }
353
- }
354
- }
355
- }
356
- },
357
- "settingPage": {
358
- "type": "object",
359
- "required": [
360
- "params"
361
- ],
362
- "additionalProperties": false,
363
- "properties": {
364
- "params": {
365
- "type": "array",
366
- "description": "需要用户设置的参数",
367
- "items": {
368
- "$ref": "#/definitions/param"
369
- }
370
- }
371
- }
372
- },
373
- "param": {
374
- "oneOf": [
375
- {
376
- "type": "object",
377
- "required": [
378
- "type",
379
- "title"
380
- ],
381
- "additionalProperties": false,
382
- "properties": {
383
- "type": {
384
- "type": "string",
385
- "const": "notice"
386
- },
387
- "title": {
388
- "type": "string",
389
- "description": "标题"
390
- },
391
- "hidden": {
392
- "type": "boolean",
393
- "description": "是否隐藏",
394
- "default": false
395
- },
396
- "textColor": {
397
- "type": "string",
398
- "description": "文本颜色",
399
- "pattern": "^#[0-9A-Fa-f]{6}$"
400
- },
401
- "textSize": {
402
- "type": "number",
403
- "description": "文本大小"
404
- }
405
- }
406
- },
407
- {
408
- "type": "object",
409
- "required": [
410
- "type",
411
- "label",
412
- "name",
413
- "min",
414
- "max",
415
- "value"
416
- ],
417
- "additionalProperties": false,
418
- "properties": {
419
- "type": {
420
- "type": "string",
421
- "const": "numberRange"
422
- },
423
- "label": {
424
- "type": "string",
425
- "description": "标签文本"
426
- },
427
- "name": {
428
- "type": "string",
429
- "description": "参数名称(用于存储和获取值)"
430
- },
431
- "min": {
432
- "type": "number",
433
- "description": "最小值"
434
- },
435
- "max": {
436
- "type": "number",
437
- "description": "最大值"
438
- },
439
- "value": {
440
- "type": "number",
441
- "description": "默认值"
442
- },
443
- "step": {
444
- "type": "number",
445
- "description": "步长"
446
- },
447
- "hidden": {
448
- "type": "boolean",
449
- "description": "是否隐藏",
450
- "default": false
451
- }
452
- }
453
- },
454
- {
455
- "type": "object",
456
- "required": [
457
- "type",
458
- "label",
459
- "name"
460
- ],
461
- "additionalProperties": false,
462
- "properties": {
463
- "type": {
464
- "type": "string",
465
- "const": "textArea"
466
- },
467
- "label": {
468
- "type": "string",
469
- "description": "标签文本"
470
- },
471
- "name": {
472
- "type": "string",
473
- "description": "参数名称(用于存储和获取值)"
474
- },
475
- "value": {
476
- "type": "string",
477
- "description": "默认值"
478
- },
479
- "hint": {
480
- "type": "string",
481
- "description": "提示文本"
482
- },
483
- "notice": {
484
- "type": "string",
485
- "description": "通知文本"
486
- },
487
- "lines": {
488
- "type": "number",
489
- "description": "行数"
490
- },
491
- "hidden": {
492
- "type": "boolean",
493
- "description": "是否隐藏",
494
- "default": false
495
- }
496
- }
497
- },
498
- {
499
- "type": "object",
500
- "required": [
501
- "type",
502
- "label",
503
- "name",
504
- "children",
505
- "values"
506
- ],
507
- "additionalProperties": false,
508
- "properties": {
509
- "type": {
510
- "type": "string",
511
- "const": "checkboxGroup"
512
- },
513
- "label": {
514
- "type": "string",
515
- "description": "标签文本"
516
- },
517
- "name": {
518
- "type": "string",
519
- "description": "参数名称(用于存储和获取值)"
520
- },
521
- "children": {
522
- "type": "array",
523
- "description": "子选项",
524
- "items": {
525
- "type": "string"
526
- }
527
- },
528
- "values": {
529
- "type": "array",
530
- "description": "值列表",
531
- "items": {
532
- "type": "string"
533
- }
534
- },
535
- "columnCount": {
536
- "type": "number",
537
- "description": "列数"
538
- },
539
- "hidden": {
540
- "type": "boolean",
541
- "description": "是否隐藏",
542
- "default": false
543
- }
544
- }
545
- },
546
- {
547
- "type": "object",
548
- "required": [
549
- "type",
550
- "label",
551
- "name"
552
- ],
553
- "additionalProperties": false,
554
- "properties": {
555
- "type": {
556
- "type": "string",
557
- "const": "number"
558
- },
559
- "label": {
560
- "type": "string",
561
- "description": "标签文本"
562
- },
563
- "name": {
564
- "type": "string",
565
- "description": "参数名称(用于存储和获取值)"
566
- },
567
- "value": {
568
- "type": "number",
569
- "description": "默认值(数字类型)"
570
- },
571
- "hint": {
572
- "type": "string",
573
- "description": "提示文本"
574
- },
575
- "notice": {
576
- "type": "string",
577
- "description": "通知文本"
578
- },
579
- "hidden": {
580
- "type": "boolean",
581
- "description": "是否隐藏",
582
- "default": false
583
- }
584
- }
585
- },
586
- {
587
- "type": "object",
588
- "required": [
589
- "type",
590
- "label",
591
- "name"
592
- ],
593
- "additionalProperties": false,
594
- "properties": {
595
- "type": {
596
- "type": "string",
597
- "const": "digit"
598
- },
599
- "label": {
600
- "type": "string",
601
- "description": "标签文本"
602
- },
603
- "name": {
604
- "type": "string",
605
- "description": "参数名称(用于存储和获取值)"
606
- },
607
- "value": {
608
- "type": "integer",
609
- "description": "默认值(整数类型)"
610
- },
611
- "hint": {
612
- "type": "string",
613
- "description": "提示文本"
614
- },
615
- "notice": {
616
- "type": "string",
617
- "description": "通知文本"
618
- },
619
- "hidden": {
620
- "type": "boolean",
621
- "description": "是否隐藏",
622
- "default": false
623
- }
624
- }
625
- },
626
- {
627
- "type": "object",
628
- "required": [
629
- "type",
630
- "label",
631
- "name",
632
- "min",
633
- "max",
634
- "value"
635
- ],
636
- "additionalProperties": false,
637
- "properties": {
638
- "type": {
639
- "type": "string",
640
- "const": "digitRange"
641
- },
642
- "label": {
643
- "type": "string",
644
- "description": "标签文本"
645
- },
646
- "name": {
647
- "type": "string",
648
- "description": "参数名称(用于存储和获取值)"
649
- },
650
- "min": {
651
- "type": "integer",
652
- "description": "最小值(整数)"
653
- },
654
- "max": {
655
- "type": "integer",
656
- "description": "最大值(整数)"
657
- },
658
- "value": {
659
- "type": "integer",
660
- "description": "默认值(整数)"
661
- },
662
- "step": {
663
- "type": "integer",
664
- "description": "步长(整数)"
665
- },
666
- "hidden": {
667
- "type": "boolean",
668
- "description": "是否隐藏",
669
- "default": false
670
- }
671
- }
672
- },
673
- {
674
- "type": "object",
675
- "required": [
676
- "type",
677
- "label",
678
- "name"
679
- ],
680
- "additionalProperties": false,
681
- "properties": {
682
- "type": {
683
- "type": "string",
684
- "const": "switch"
685
- },
686
- "label": {
687
- "type": "string",
688
- "description": "标签文本"
689
- },
690
- "name": {
691
- "type": "string",
692
- "description": "参数名称(用于存储和获取值)"
693
- },
694
- "value": {
695
- "type": "boolean",
696
- "description": "默认值(布尔类型)"
697
- },
698
- "hint": {
699
- "type": "string",
700
- "description": "提示文本"
701
- },
702
- "notice": {
703
- "type": "string",
704
- "description": "通知文本"
705
- },
706
- "hidden": {
707
- "type": "boolean",
708
- "description": "是否隐藏",
709
- "default": false
710
- },
711
- "childrenParams": {
712
- "type": "array",
713
- "description": "子表单参数列表(仅在 switch 类型下使用,当 switch 开启时显示)",
714
- "items": {
715
- "$ref": "#/definitions/param"
716
- }
717
- }
718
- }
719
- },
720
- {
721
- "type": "object",
722
- "required": [
723
- "type",
724
- "label",
725
- "name"
726
- ],
727
- "additionalProperties": false,
728
- "properties": {
729
- "type": {
730
- "type": "string",
731
- "const": "text"
732
- },
733
- "label": {
734
- "type": "string",
735
- "description": "标签文本"
736
- },
737
- "name": {
738
- "type": "string",
739
- "description": "参数名称(用于存储和获取值)"
740
- },
741
- "value": {
742
- "type": "string",
743
- "description": "默认值"
744
- },
745
- "hint": {
746
- "type": "string",
747
- "description": "提示文本"
748
- },
749
- "notice": {
750
- "type": "string",
751
- "description": "通知文本"
752
- },
753
- "lines": {
754
- "type": "number",
755
- "description": "行数(用于多行文本)"
756
- },
757
- "hidden": {
758
- "type": "boolean",
759
- "description": "是否隐藏",
760
- "default": false
761
- }
762
- }
763
- },
764
- {
765
- "type": "object",
766
- "required": [
767
- "type",
768
- "label",
769
- "name"
770
- ],
771
- "additionalProperties": false,
772
- "properties": {
773
- "type": {
774
- "type": "string",
775
- "enum": [
776
- "radio",
777
- "select"
778
- ]
779
- },
780
- "label": {
781
- "type": "string",
782
- "description": "标签文本"
783
- },
784
- "name": {
785
- "type": "string",
786
- "description": "参数名称(用于存储和获取值)"
787
- },
788
- "value": {
789
- "type": "string",
790
- "description": "默认值"
791
- },
792
- "options": {
793
- "type": "array",
794
- "description": "选项列表",
795
- "items": {
796
- "type": "object",
797
- "additionalProperties": false,
798
- "properties": {
799
- "label": {
800
- "type": "string"
801
- },
802
- "value": {
803
- "type": "string"
804
- }
805
- }
806
- }
807
- },
808
- "dataFrom": {
809
- "type": "string",
810
- "description": "数据来源(如:role)"
811
- },
812
- "hidden": {
813
- "type": "boolean",
814
- "description": "是否隐藏",
815
- "default": false
816
- }
817
- }
818
- }
819
- ]
820
- }
821
- }
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "DeekeScript 配置文件",
4
+ "description": "DeekeScript Android 项目配置文件,用于动态渲染页面",
5
+ "type": "object",
6
+ "required": [
7
+ "name",
8
+ "packageName",
9
+ "versionCode",
10
+ "versionName",
11
+ "icon",
12
+ "host",
13
+ "switchSetting",
14
+ "bottomMenusHidden",
15
+ "groups",
16
+ "bottomMenus",
17
+ "settingLists",
18
+ "apis"
19
+ ],
20
+ "additionalProperties": false,
21
+ "properties": {
22
+ "$schema": {
23
+ "type": "string",
24
+ "description": "JSON Schema 引用路径"
25
+ },
26
+ "name": {
27
+ "type": "string",
28
+ "description": "App安装成功之后,在手机上的名称"
29
+ },
30
+ "packageName": {
31
+ "type": "string",
32
+ "description": "包名,如:cn.deeke.script"
33
+ },
34
+ "versionCode": {
35
+ "type": "string",
36
+ "description": "版本号(软件自动升级凭证,当前版本号大于或者等于后台上传的版本号,则无法升级)"
37
+ },
38
+ "versionName": {
39
+ "type": "string",
40
+ "description": "版本名称,尽量和版本号统一(版本号100,则配置为1.0.0)"
41
+ },
42
+ "icon": {
43
+ "type": "string",
44
+ "description": "图标建议采用200*200像素的,清晰度大的"
45
+ },
46
+ "head": {
47
+ "type": "string",
48
+ "description": "App中用户设置页面的头像,无设置页可以不填"
49
+ },
50
+ "settingTopBg": {
51
+ "type": "string",
52
+ "description": "设置页面顶部背景图"
53
+ },
54
+ "debug": {
55
+ "type": "boolean",
56
+ "description": "默认为true(不需要激活码也可以启动脚本),如果需要激活才能使用APP,请设置为false",
57
+ "default": true
58
+ },
59
+ "host": {
60
+ "type": "string",
61
+ "description": "接口请求域名",
62
+ "format": "uri"
63
+ },
64
+ "bottomMenusHidden": {
65
+ "type": "boolean",
66
+ "default": false,
67
+ "description": "是否隐藏底部菜单"
68
+ },
69
+ "switchSetting": {
70
+ "type": "object",
71
+ "description": "功能开关设置",
72
+ "required": [
73
+ "alipay",
74
+ "showAd"
75
+ ],
76
+ "additionalProperties": false,
77
+ "properties": {
78
+ "alipay": {
79
+ "type": "boolean",
80
+ "description": "支持支付宝支付"
81
+ },
82
+ "showAd": {
83
+ "type": "boolean",
84
+ "description": "是否展示开屏广告"
85
+ }
86
+ }
87
+ },
88
+ "hooks": {
89
+ "type": "object",
90
+ "description": "生命周期钩子函数配置",
91
+ "additionalProperties": false,
92
+ "properties": {
93
+ "app_start_before": {
94
+ "type": "string",
95
+ "description": "应用启动前执行的钩子函数文件路径"
96
+ },
97
+ "app_start": {
98
+ "type": "string",
99
+ "description": "应用启动时执行的钩子函数文件路径"
100
+ },
101
+ "app_active_after": {
102
+ "type": "string",
103
+ "description": "应用激活后执行的钩子函数文件路径"
104
+ }
105
+ }
106
+ },
107
+ "groups": {
108
+ "type": "array",
109
+ "description": "主界面的功能组,每组都会包含若干个功能",
110
+ "items": {
111
+ "type": "object",
112
+ "required": [
113
+ "title",
114
+ "methods"
115
+ ],
116
+ "additionalProperties": false,
117
+ "properties": {
118
+ "title": {
119
+ "type": "string",
120
+ "description": "App主界面的功能名称"
121
+ },
122
+ "titleHidden": {
123
+ "type": "boolean",
124
+ "description": "App主界面功能组标题是否隐藏,默认不隐藏",
125
+ "default": false
126
+ },
127
+ "hidden": {
128
+ "type": "boolean",
129
+ "description": "是否隐藏当前功能组,默认不隐藏",
130
+ "default": false
131
+ },
132
+ "methods": {
133
+ "type": "array",
134
+ "description": "当前功能组下的功能列表",
135
+ "items": {
136
+ "$ref": "#/definitions/method"
137
+ }
138
+ }
139
+ }
140
+ }
141
+ },
142
+ "bottomMenus": {
143
+ "type": "array",
144
+ "description": "App中底部菜单,可以使用系统内置的,也可以自定义",
145
+ "items": {
146
+ "type": "object",
147
+ "required": [
148
+ "title",
149
+ "icon",
150
+ "type"
151
+ ],
152
+ "additionalProperties": false,
153
+ "properties": {
154
+ "title": {
155
+ "type": "string",
156
+ "description": "菜单标题,可使用 {NAME} 占位符"
157
+ },
158
+ "icon": {
159
+ "type": "string",
160
+ "description": "菜单图标路径"
161
+ },
162
+ "banner": {
163
+ "type": "string",
164
+ "description": "横幅图片路径"
165
+ },
166
+ "type": {
167
+ "type": "string",
168
+ "description": "菜单类型",
169
+ "enum": [
170
+ "home",
171
+ "speech",
172
+ "setting"
173
+ ]
174
+ }
175
+ }
176
+ }
177
+ },
178
+ "settingLists": {
179
+ "type": "array",
180
+ "description": "App中设置页的列表项,可以使用系统内置的,也可以自定义",
181
+ "items": {
182
+ "type": "object",
183
+ "required": [
184
+ "title",
185
+ "icon",
186
+ "type"
187
+ ],
188
+ "additionalProperties": false,
189
+ "properties": {
190
+ "title": {
191
+ "type": "string",
192
+ "description": "设置项标题"
193
+ },
194
+ "icon": {
195
+ "type": "string",
196
+ "description": "设置项图标路径"
197
+ },
198
+ "type": {
199
+ "type": "string",
200
+ "description": "设置项类型",
201
+ "enum": [
202
+ "customerService",
203
+ "notice",
204
+ "settingService",
205
+ "statistics",
206
+ "uploadLog",
207
+ "updateApp",
208
+ "clear",
209
+ "qiwei",
210
+ "execJs"
211
+ ]
212
+ },
213
+ "description": {
214
+ "type": "string",
215
+ "description": "设置项描述"
216
+ },
217
+ "file": {
218
+ "type": "string",
219
+ "description": "文件路径(用于 notice 类型)"
220
+ },
221
+ "url": {
222
+ "type": "string",
223
+ "description": "接口URL"
224
+ },
225
+ "jsFile": {
226
+ "type": "string",
227
+ "description": "JavaScript文件路径"
228
+ },
229
+ "hidden": {
230
+ "type": "boolean",
231
+ "description": "是否隐藏",
232
+ "default": false
233
+ },
234
+ "settingPage": {
235
+ "$ref": "#/definitions/settingPage"
236
+ }
237
+ }
238
+ }
239
+ },
240
+ "apis": {
241
+ "type": "array",
242
+ "description": "设置相关api,比如激活码api,验证激活码是否有效api等",
243
+ "items": {
244
+ "type": "object",
245
+ "required": [
246
+ "type",
247
+ "url"
248
+ ],
249
+ "additionalProperties": false,
250
+ "properties": {
251
+ "type": {
252
+ "type": "string",
253
+ "description": "API类型",
254
+ "enum": [
255
+ "bind",
256
+ "checkBind",
257
+ "aiSpeechToken",
258
+ "config",
259
+ "getToken",
260
+ "createOrder"
261
+ ]
262
+ },
263
+ "url": {
264
+ "type": "string",
265
+ "description": "API接口路径"
266
+ }
267
+ }
268
+ }
269
+ }
270
+ },
271
+ "definitions": {
272
+ "method": {
273
+ "type": "object",
274
+ "required": [
275
+ "title",
276
+ "icon"
277
+ ],
278
+ "additionalProperties": false,
279
+ "properties": {
280
+ "title": {
281
+ "type": "string",
282
+ "description": "App主界面的功能名称"
283
+ },
284
+ "icon": {
285
+ "type": "string",
286
+ "description": "App主界面的功能图标"
287
+ },
288
+ "jsFile": {
289
+ "type": "string",
290
+ "description": "功能实际执行的代码所在文件"
291
+ },
292
+ "settingPage": {
293
+ "$ref": "#/definitions/settingPage"
294
+ },
295
+ "hidden": {
296
+ "type": "boolean",
297
+ "description": "属性值,当为true的时候,则界面上不再显示此功能模块",
298
+ "default": false
299
+ },
300
+ "runType": {
301
+ "type": "string",
302
+ "description": "如果为floatSwitch则需要手动点击右侧悬浮窗执行",
303
+ "enum": [
304
+ "floatSwitch"
305
+ ]
306
+ },
307
+ "packageName": {
308
+ "type": "string",
309
+ "description": "包名,和runType配合使用"
310
+ },
311
+ "columns": {
312
+ "type": "number",
313
+ "description": "每行被等分为24,8则表示当前groups一行放3个功能图标"
314
+ },
315
+ "autoOpen": {
316
+ "type": "boolean",
317
+ "description": "是否自动打开界面(需要和packageName配合使用)"
318
+ },
319
+ "activity": {
320
+ "type": "object",
321
+ "description": "活动配置",
322
+ "additionalProperties": false,
323
+ "properties": {
324
+ "notice": {
325
+ "type": "string",
326
+ "description": "活动提示"
327
+ },
328
+ "title": {
329
+ "type": "string",
330
+ "description": "活动标题"
331
+ },
332
+ "minVersion": {
333
+ "type": "number",
334
+ "description": "最小版本号"
335
+ },
336
+ "groups": {
337
+ "type": "array",
338
+ "description": "活动功能组",
339
+ "items": {
340
+ "type": "object",
341
+ "additionalProperties": false,
342
+ "properties": {
343
+ "title": {
344
+ "type": "string"
345
+ },
346
+ "titleHidden": {
347
+ "type": "boolean"
348
+ },
349
+ "methods": {
350
+ "type": "array",
351
+ "items": {
352
+ "$ref": "#/definitions/method"
353
+ }
354
+ }
355
+ }
356
+ }
357
+ }
358
+ }
359
+ }
360
+ }
361
+ },
362
+ "settingPage": {
363
+ "type": "object",
364
+ "required": [
365
+ "params"
366
+ ],
367
+ "additionalProperties": false,
368
+ "properties": {
369
+ "params": {
370
+ "type": "array",
371
+ "description": "需要用户设置的参数",
372
+ "items": {
373
+ "$ref": "#/definitions/param"
374
+ }
375
+ }
376
+ }
377
+ },
378
+ "param": {
379
+ "oneOf": [
380
+ {
381
+ "type": "object",
382
+ "required": [
383
+ "type",
384
+ "title"
385
+ ],
386
+ "additionalProperties": false,
387
+ "properties": {
388
+ "type": {
389
+ "type": "string",
390
+ "const": "notice"
391
+ },
392
+ "title": {
393
+ "type": "string",
394
+ "description": "标题"
395
+ },
396
+ "hidden": {
397
+ "type": "boolean",
398
+ "description": "是否隐藏",
399
+ "default": false
400
+ },
401
+ "textColor": {
402
+ "type": "string",
403
+ "description": "文本颜色",
404
+ "pattern": "^#[0-9A-Fa-f]{6}$"
405
+ },
406
+ "textSize": {
407
+ "type": "number",
408
+ "description": "文本大小"
409
+ }
410
+ }
411
+ },
412
+ {
413
+ "type": "object",
414
+ "required": [
415
+ "type",
416
+ "label",
417
+ "name",
418
+ "min",
419
+ "max",
420
+ "value"
421
+ ],
422
+ "additionalProperties": false,
423
+ "properties": {
424
+ "type": {
425
+ "type": "string",
426
+ "const": "numberRange"
427
+ },
428
+ "label": {
429
+ "type": "string",
430
+ "description": "标签文本"
431
+ },
432
+ "name": {
433
+ "type": "string",
434
+ "description": "参数名称(用于存储和获取值)"
435
+ },
436
+ "min": {
437
+ "type": "number",
438
+ "description": "最小值"
439
+ },
440
+ "max": {
441
+ "type": "number",
442
+ "description": "最大值"
443
+ },
444
+ "value": {
445
+ "type": "number",
446
+ "description": "默认值"
447
+ },
448
+ "step": {
449
+ "type": "number",
450
+ "description": "步长"
451
+ },
452
+ "hidden": {
453
+ "type": "boolean",
454
+ "description": "是否隐藏",
455
+ "default": false
456
+ }
457
+ }
458
+ },
459
+ {
460
+ "type": "object",
461
+ "required": [
462
+ "type",
463
+ "label",
464
+ "name"
465
+ ],
466
+ "additionalProperties": false,
467
+ "properties": {
468
+ "type": {
469
+ "type": "string",
470
+ "const": "textArea"
471
+ },
472
+ "label": {
473
+ "type": "string",
474
+ "description": "标签文本"
475
+ },
476
+ "name": {
477
+ "type": "string",
478
+ "description": "参数名称(用于存储和获取值)"
479
+ },
480
+ "value": {
481
+ "type": "string",
482
+ "description": "默认值"
483
+ },
484
+ "hint": {
485
+ "type": "string",
486
+ "description": "提示文本"
487
+ },
488
+ "notice": {
489
+ "type": "string",
490
+ "description": "通知文本"
491
+ },
492
+ "lines": {
493
+ "type": "number",
494
+ "description": "行数"
495
+ },
496
+ "hidden": {
497
+ "type": "boolean",
498
+ "description": "是否隐藏",
499
+ "default": false
500
+ }
501
+ }
502
+ },
503
+ {
504
+ "type": "object",
505
+ "required": [
506
+ "type",
507
+ "label",
508
+ "name",
509
+ "children",
510
+ "values"
511
+ ],
512
+ "additionalProperties": false,
513
+ "properties": {
514
+ "type": {
515
+ "type": "string",
516
+ "const": "checkboxGroup"
517
+ },
518
+ "label": {
519
+ "type": "string",
520
+ "description": "标签文本"
521
+ },
522
+ "name": {
523
+ "type": "string",
524
+ "description": "参数名称(用于存储和获取值)"
525
+ },
526
+ "children": {
527
+ "type": "array",
528
+ "description": "子选项",
529
+ "items": {
530
+ "type": "string"
531
+ }
532
+ },
533
+ "values": {
534
+ "type": "array",
535
+ "description": "值列表",
536
+ "items": {
537
+ "type": "string"
538
+ }
539
+ },
540
+ "columnCount": {
541
+ "type": "number",
542
+ "description": "列数"
543
+ },
544
+ "hidden": {
545
+ "type": "boolean",
546
+ "description": "是否隐藏",
547
+ "default": false
548
+ }
549
+ }
550
+ },
551
+ {
552
+ "type": "object",
553
+ "required": [
554
+ "type",
555
+ "label",
556
+ "name"
557
+ ],
558
+ "additionalProperties": false,
559
+ "properties": {
560
+ "type": {
561
+ "type": "string",
562
+ "const": "number"
563
+ },
564
+ "label": {
565
+ "type": "string",
566
+ "description": "标签文本"
567
+ },
568
+ "name": {
569
+ "type": "string",
570
+ "description": "参数名称(用于存储和获取值)"
571
+ },
572
+ "value": {
573
+ "type": "number",
574
+ "description": "默认值(数字类型)"
575
+ },
576
+ "hint": {
577
+ "type": "string",
578
+ "description": "提示文本"
579
+ },
580
+ "notice": {
581
+ "type": "string",
582
+ "description": "通知文本"
583
+ },
584
+ "hidden": {
585
+ "type": "boolean",
586
+ "description": "是否隐藏",
587
+ "default": false
588
+ }
589
+ }
590
+ },
591
+ {
592
+ "type": "object",
593
+ "required": [
594
+ "type",
595
+ "label",
596
+ "name"
597
+ ],
598
+ "additionalProperties": false,
599
+ "properties": {
600
+ "type": {
601
+ "type": "string",
602
+ "const": "digit"
603
+ },
604
+ "label": {
605
+ "type": "string",
606
+ "description": "标签文本"
607
+ },
608
+ "name": {
609
+ "type": "string",
610
+ "description": "参数名称(用于存储和获取值)"
611
+ },
612
+ "value": {
613
+ "type": "integer",
614
+ "description": "默认值(整数类型)"
615
+ },
616
+ "hint": {
617
+ "type": "string",
618
+ "description": "提示文本"
619
+ },
620
+ "notice": {
621
+ "type": "string",
622
+ "description": "通知文本"
623
+ },
624
+ "hidden": {
625
+ "type": "boolean",
626
+ "description": "是否隐藏",
627
+ "default": false
628
+ }
629
+ }
630
+ },
631
+ {
632
+ "type": "object",
633
+ "required": [
634
+ "type",
635
+ "label",
636
+ "name",
637
+ "min",
638
+ "max",
639
+ "value"
640
+ ],
641
+ "additionalProperties": false,
642
+ "properties": {
643
+ "type": {
644
+ "type": "string",
645
+ "const": "digitRange"
646
+ },
647
+ "label": {
648
+ "type": "string",
649
+ "description": "标签文本"
650
+ },
651
+ "name": {
652
+ "type": "string",
653
+ "description": "参数名称(用于存储和获取值)"
654
+ },
655
+ "min": {
656
+ "type": "integer",
657
+ "description": "最小值(整数)"
658
+ },
659
+ "max": {
660
+ "type": "integer",
661
+ "description": "最大值(整数)"
662
+ },
663
+ "value": {
664
+ "type": "integer",
665
+ "description": "默认值(整数)"
666
+ },
667
+ "step": {
668
+ "type": "integer",
669
+ "description": "步长(整数)"
670
+ },
671
+ "hidden": {
672
+ "type": "boolean",
673
+ "description": "是否隐藏",
674
+ "default": false
675
+ }
676
+ }
677
+ },
678
+ {
679
+ "type": "object",
680
+ "required": [
681
+ "type",
682
+ "label",
683
+ "name"
684
+ ],
685
+ "additionalProperties": false,
686
+ "properties": {
687
+ "type": {
688
+ "type": "string",
689
+ "const": "switch"
690
+ },
691
+ "label": {
692
+ "type": "string",
693
+ "description": "标签文本"
694
+ },
695
+ "name": {
696
+ "type": "string",
697
+ "description": "参数名称(用于存储和获取值)"
698
+ },
699
+ "value": {
700
+ "type": "boolean",
701
+ "description": "默认值(布尔类型)"
702
+ },
703
+ "hint": {
704
+ "type": "string",
705
+ "description": "提示文本"
706
+ },
707
+ "notice": {
708
+ "type": "string",
709
+ "description": "通知文本"
710
+ },
711
+ "hidden": {
712
+ "type": "boolean",
713
+ "description": "是否隐藏",
714
+ "default": false
715
+ },
716
+ "childrenParams": {
717
+ "type": "array",
718
+ "description": "子表单参数列表(仅在 switch 类型下使用,当 switch 开启时显示)",
719
+ "items": {
720
+ "$ref": "#/definitions/param"
721
+ }
722
+ }
723
+ }
724
+ },
725
+ {
726
+ "type": "object",
727
+ "required": [
728
+ "type",
729
+ "label",
730
+ "name"
731
+ ],
732
+ "additionalProperties": false,
733
+ "properties": {
734
+ "type": {
735
+ "type": "string",
736
+ "const": "text"
737
+ },
738
+ "label": {
739
+ "type": "string",
740
+ "description": "标签文本"
741
+ },
742
+ "name": {
743
+ "type": "string",
744
+ "description": "参数名称(用于存储和获取值)"
745
+ },
746
+ "value": {
747
+ "type": "string",
748
+ "description": "默认值"
749
+ },
750
+ "hint": {
751
+ "type": "string",
752
+ "description": "提示文本"
753
+ },
754
+ "notice": {
755
+ "type": "string",
756
+ "description": "通知文本"
757
+ },
758
+ "lines": {
759
+ "type": "number",
760
+ "description": "行数(用于多行文本)"
761
+ },
762
+ "hidden": {
763
+ "type": "boolean",
764
+ "description": "是否隐藏",
765
+ "default": false
766
+ }
767
+ }
768
+ },
769
+ {
770
+ "type": "object",
771
+ "required": [
772
+ "type",
773
+ "label",
774
+ "name"
775
+ ],
776
+ "additionalProperties": false,
777
+ "properties": {
778
+ "type": {
779
+ "type": "string",
780
+ "enum": [
781
+ "radio",
782
+ "select"
783
+ ]
784
+ },
785
+ "label": {
786
+ "type": "string",
787
+ "description": "标签文本"
788
+ },
789
+ "name": {
790
+ "type": "string",
791
+ "description": "参数名称(用于存储和获取值)"
792
+ },
793
+ "value": {
794
+ "type": "string",
795
+ "description": "默认值"
796
+ },
797
+ "options": {
798
+ "type": "array",
799
+ "description": "选项列表",
800
+ "items": {
801
+ "type": "object",
802
+ "additionalProperties": false,
803
+ "properties": {
804
+ "label": {
805
+ "type": "string"
806
+ },
807
+ "value": {
808
+ "type": "string"
809
+ }
810
+ }
811
+ }
812
+ },
813
+ "dataFrom": {
814
+ "type": "string",
815
+ "description": "数据来源(如:role)"
816
+ },
817
+ "hidden": {
818
+ "type": "boolean",
819
+ "description": "是否隐藏",
820
+ "default": false
821
+ }
822
+ }
823
+ }
824
+ ]
825
+ }
826
+ }
822
827
  }