mm_os 2.8.2 → 2.8.3

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 (284) hide show
  1. package/package.json +1 -1
  2. package/demo/app/dev/README.md +0 -1
  3. package/demo/app/dev/app.js +0 -149
  4. package/demo/app/dev/app.json +0 -12
  5. package/demo/app/dev/event_api/client/event.json +0 -11
  6. package/demo/app/dev/event_api/client/main.js +0 -19
  7. package/demo/app/dev/event_api/manage/event.json +0 -19
  8. package/demo/app/dev/event_api/manage/main.js +0 -26
  9. package/demo/app/dev/plugin/doc/static/api_list.html +0 -144
  10. package/demo/app/dev/plugin/doc/static/api_view.html +0 -692
  11. package/demo/app/dev/plugin/doc/static/index.html +0 -138
  12. package/demo/app/dev/plugin/doc/static/request_test.html +0 -311
  13. package/demo/app/dev/plugin/main/api_dev_client/api/api.json +0 -11
  14. package/demo/app/dev/plugin/main/api_dev_client/api/index.js +0 -54
  15. package/demo/app/dev/plugin/main/api_dev_client/api/param.json +0 -31
  16. package/demo/app/dev/plugin/main/api_dev_client/app/api.json +0 -13
  17. package/demo/app/dev/plugin/main/api_dev_client/app/index.js +0 -13
  18. package/demo/app/dev/plugin/main/api_dev_client/app/param.json +0 -147
  19. package/demo/app/dev/plugin/main/api_dev_client/app/sql.json +0 -28
  20. package/demo/app/dev/plugin/main/api_dev_client/auto/api.json +0 -37
  21. package/demo/app/dev/plugin/main/api_dev_client/auto/auto_db.js +0 -70
  22. package/demo/app/dev/plugin/main/api_dev_client/auto/auto_file.js +0 -32
  23. package/demo/app/dev/plugin/main/api_dev_client/auto/index.js +0 -51
  24. package/demo/app/dev/plugin/main/api_dev_client/auto/param.json +0 -51
  25. package/demo/app/dev/plugin/main/api_dev_client/com.js +0 -349
  26. package/demo/app/dev/plugin/main/api_dev_client/db/api.json +0 -10
  27. package/demo/app/dev/plugin/main/api_dev_client/db/index.js +0 -71
  28. package/demo/app/dev/plugin/main/api_dev_client/db/param.json +0 -31
  29. package/demo/app/dev/plugin/main/api_dev_client/dict/api.json +0 -10
  30. package/demo/app/dev/plugin/main/api_dev_client/dict/index.js +0 -49
  31. package/demo/app/dev/plugin/main/api_dev_client/dict/param.json +0 -29
  32. package/demo/app/dev/plugin/main/api_dev_client/event/api.json +0 -10
  33. package/demo/app/dev/plugin/main/api_dev_client/event/index.js +0 -31
  34. package/demo/app/dev/plugin/main/api_dev_client/event/param.json +0 -31
  35. package/demo/app/dev/plugin/main/api_dev_client/help/api.json +0 -10
  36. package/demo/app/dev/plugin/main/api_dev_client/help/index.js +0 -14
  37. package/demo/app/dev/plugin/main/api_dev_client/help/param.json +0 -31
  38. package/demo/app/dev/plugin/main/api_dev_client/nav/api.json +0 -10
  39. package/demo/app/dev/plugin/main/api_dev_client/nav/index.js +0 -36
  40. package/demo/app/dev/plugin/main/api_dev_client/nav/param.json +0 -36
  41. package/demo/app/dev/plugin/main/api_dev_client/plugin/api.json +0 -10
  42. package/demo/app/dev/plugin/main/api_dev_client/plugin/index.js +0 -13
  43. package/demo/app/dev/plugin/main/api_dev_client/plugin/param.json +0 -31
  44. package/demo/app/dev/plugin/main/api_dev_client/source/api.json +0 -10
  45. package/demo/app/dev/plugin/main/api_dev_client/source/index.js +0 -14
  46. package/demo/app/dev/plugin/main/api_dev_client/source/param.json +0 -31
  47. package/demo/app/dev/plugin/main/api_dev_client/sql/api.json +0 -10
  48. package/demo/app/dev/plugin/main/api_dev_client/sql/index.js +0 -13
  49. package/demo/app/dev/plugin/main/api_dev_client/sql/param.json +0 -31
  50. package/demo/app/dev/plugin/main/api_dev_client/task/api.json +0 -16
  51. package/demo/app/dev/plugin/main/api_dev_client/task/index.js +0 -13
  52. package/demo/app/dev/plugin/main/api_dev_client/task/param.json +0 -31
  53. package/demo/app/dev/plugin/main/api_dev_client/translate/api.json +0 -39
  54. package/demo/app/dev/plugin/main/api_dev_client/translate/index.js +0 -43
  55. package/demo/app/dev/plugin/main/api_dev_client/translate/param.json +0 -130
  56. package/demo/app/dev/plugin/main/api_dev_client/translate/sql.json +0 -62
  57. package/demo/app/dev/plugin/main/api_dev_client/ui/api.json +0 -10
  58. package/demo/app/dev/plugin/main/api_dev_client/ui/index.js +0 -146
  59. package/demo/app/dev/plugin/main/api_dev_client/ui/param.json +0 -31
  60. package/demo/app/dev/plugin/main/api_dev_client/view/api.json +0 -10
  61. package/demo/app/dev/plugin/main/api_dev_client/view/index.js +0 -100
  62. package/demo/app/dev/plugin/main/api_dev_client/view/param.json +0 -29
  63. package/demo/app/dev/plugin/main/api_dev_client/view/tpl/block/nav.vue +0 -12
  64. package/demo/app/dev/plugin/main/api_dev_client/view/tpl/block/obj.vue +0 -12
  65. package/demo/app/dev/plugin/main/api_dev_client/view/tpl/block/post.vue +0 -12
  66. package/demo/app/dev/plugin/main/api_dev_client/view/tpl/block/query.vue +0 -12
  67. package/demo/app/dev/plugin/main/api_dev_client/view/tpl/page/edit.vue +0 -39
  68. package/demo/app/dev/plugin/main/api_dev_client/view/tpl/page/list.vue +0 -12
  69. package/demo/app/dev/plugin/main/api_dev_client/view/tpl/page/search.vue +0 -12
  70. package/demo/app/dev/plugin/main/api_dev_client/view/tpl/page/table.vue +0 -12
  71. package/demo/app/dev/plugin/main/api_dev_client/view/tpl/page/type.vue +0 -12
  72. package/demo/app/dev/plugin/main/api_dev_client/view/tpl/page/view.vue +0 -56
  73. package/demo/app/dev/plugin/main/api_dev_client/view/tpl/view.json +0 -48
  74. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/api.json +0 -37
  75. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/auto_db.js +0 -120
  76. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/copy/copy.js +0 -101
  77. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/copy/copy_framework.js +0 -118
  78. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/copy/copy_template.js +0 -78
  79. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/copy_file.js +0 -97
  80. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/create/common.js +0 -198
  81. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/create/django_server.js +0 -104
  82. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/create/helper.js +0 -161
  83. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/create/koa_art_server.js +0 -102
  84. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/create/mini_app_home.js +0 -415
  85. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/create/razor.js +0 -0
  86. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/create/springboot.js +0 -0
  87. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/create/thinkphp.js +0 -0
  88. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/create/uni_app_home.js +0 -418
  89. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/create/vue_cli_admin.js +0 -78
  90. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/create/vue_cli_home.js +0 -112
  91. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/create_file.js +0 -97
  92. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/db/add_data.js +0 -221
  93. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/db/create_table.js +0 -162
  94. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/db/set_auth_table.js +0 -86
  95. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/index.js +0 -524
  96. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/param.json +0 -37
  97. package/demo/app/route/app.js +0 -131
  98. package/demo/app/route/app.json +0 -11
  99. package/demo/app/route/event_api/client/event.json +0 -10
  100. package/demo/app/route/event_api/client/main.js +0 -19
  101. package/demo/app/route/event_api/manage/event.json +0 -18
  102. package/demo/app/route/event_api/manage/main.js +0 -70
  103. package/demo/app/route/plugin/main/api_route_client/pass/api.json +0 -37
  104. package/demo/app/route/plugin/main/api_route_client/pass/index.js +0 -33
  105. package/demo/app/route/plugin/main/api_route_client/pass/param.json +0 -50
  106. package/demo/app/route/plugin/main/index.js +0 -144
  107. package/demo/app/route/plugin/main/plugin.json +0 -20
  108. package/demo/app/sys/app.js +0 -169
  109. package/demo/app/sys/app.json +0 -11
  110. package/demo/app/sys/event_api/api/before.js +0 -80
  111. package/demo/app/sys/event_api/api/check.js +0 -103
  112. package/demo/app/sys/event_api/api/event.json +0 -31
  113. package/demo/app/sys/event_api/api/main.js +0 -19
  114. package/demo/app/sys/event_api/apis/before.js +0 -80
  115. package/demo/app/sys/event_api/apis/event.json +0 -21
  116. package/demo/app/sys/event_api/apis/main.js +0 -19
  117. package/demo/app/sys/event_api/client/event.json +0 -10
  118. package/demo/app/sys/event_api/client/main.js +0 -17
  119. package/demo/app/sys/event_api/doc/event.json +0 -18
  120. package/demo/app/sys/event_api/doc/main.js +0 -67
  121. package/demo/app/sys/event_api/img/event.json +0 -11
  122. package/demo/app/sys/event_api/img/main.js +0 -90
  123. package/demo/app/sys/event_api/manage/event.json +0 -10
  124. package/demo/app/sys/event_api/manage/main.js +0 -19
  125. package/demo/app/sys/event_api/upload/event.json +0 -10
  126. package/demo/app/sys/event_api/upload/main.js +0 -17
  127. package/demo/app/sys/plugin/app_admin/index.js +0 -127
  128. package/demo/app/sys/plugin/app_admin/plugin.json +0 -20
  129. package/demo/app/sys/plugin/main/api_client/config/api.json +0 -39
  130. package/demo/app/sys/plugin/main/api_client/config/index.js +0 -37
  131. package/demo/app/sys/plugin/main/api_client/config/param.json +0 -27
  132. package/demo/app/sys/plugin/main/api_client/config/sql.json +0 -70
  133. package/demo/app/sys/plugin/main/api_client/lang/api.json +0 -37
  134. package/demo/app/sys/plugin/main/api_client/lang/index.js +0 -27
  135. package/demo/app/sys/plugin/main/api_client/lang/param.json +0 -22
  136. package/demo/app/sys/plugin/main/api_client/nav/api.json +0 -15
  137. package/demo/app/sys/plugin/main/api_client/nav/index.js +0 -39
  138. package/demo/app/sys/plugin/main/api_client/nav/param.json +0 -87
  139. package/demo/app/sys/plugin/main/api_client/query/api.json +0 -35
  140. package/demo/app/sys/plugin/main/api_client/query/index.js +0 -48
  141. package/demo/app/sys/plugin/main/api_client/theme/api.json +0 -37
  142. package/demo/app/sys/plugin/main/api_client/theme/index.js +0 -30
  143. package/demo/app/sys/plugin/main/api_client/theme/param.json +0 -31
  144. package/demo/app/sys/plugin/main/api_client/translate/api.json +0 -39
  145. package/demo/app/sys/plugin/main/api_client/translate/index.js +0 -21
  146. package/demo/app/sys/plugin/main/api_client/translate/param.json +0 -130
  147. package/demo/app/sys/plugin/main/api_client/translate/sql.json +0 -62
  148. package/demo/app/sys/plugin/main/api_upload/image/api.json +0 -15
  149. package/demo/app/sys/plugin/main/api_upload/image/index.js +0 -62
  150. package/demo/app/sys/plugin/main/api_upload/image/param.json +0 -9
  151. package/demo/app/sys/plugin/main/task/task_demo/index.js +0 -37
  152. package/demo/app/sys/plugin/main/task/task_demo/task.json +0 -24
  153. package/demo/app/sys/plugin/user/index.js +0 -127
  154. package/demo/app/sys/plugin/user/plugin.json +0 -20
  155. package/demo/app/sys/plugin/user/static/img/logo.png +0 -0
  156. package/demo/app/sys/static/img/avatar_1674484608066.png +0 -0
  157. package/demo/app/sys/static/img/avatar_1674633778171.jpeg +0 -0
  158. package/demo/app/sys/static/img/avatar_1674962702334.jpeg +0 -0
  159. package/demo/app/sys/static/img/avatar_1675075431736.jpeg +0 -0
  160. package/demo/app/sys/static/img/avatar_1675497065533.jpeg +0 -0
  161. package/demo/app/sys/static/img/avatar_1685352550990.jpeg +0 -0
  162. package/demo/app/sys/static/img/avatar_1685353685992.jpeg +0 -0
  163. package/demo/app/sys/static/img/avatar_1685353956587.jpeg +0 -0
  164. package/demo/app/sys/static/img/avatar_1685353971148.jpeg +0 -0
  165. package/demo/app/sys/static/img/avatar_1685353983723.jpeg +0 -0
  166. package/demo/app/sys/static/img/avatar_1685354014745.jpeg +0 -0
  167. package/demo/app/sys/static/img/avatar_1685354122355.jpeg +0 -0
  168. package/demo/app/sys/static/img/avatar_1685357983520.jpeg +0 -0
  169. package/demo/app/sys/static/img/avatar_1685358453383.jpeg +0 -0
  170. package/demo/app/sys/static/img/avatar_1685416570438.jpeg +0 -0
  171. package/demo/app/sys/static/img/avatar_1685512675830.png +0 -0
  172. package/demo/app/sys/static/img/avatar_1685939425608.jpeg +0 -0
  173. package/demo/app/sys/static/img/avatar_1685939886560.jpeg +0 -0
  174. package/demo/app/sys/static/img/avatar_1686106313194.png +0 -0
  175. package/demo/app/sys/static/img/avatar_1686371876175.png +0 -0
  176. package/demo/app/sys/static/img/avatar_1686372033596.png +0 -0
  177. package/demo/app/sys/static/img/avatar_1688215220669.png +0 -0
  178. package/demo/app/sys/static/img/avatar_1688531184690.png +0 -0
  179. package/demo/app/sys/static/img/avatar_1688531233080.png +0 -0
  180. package/demo/app/sys/static/img/avatar_1688548526909.png +0 -0
  181. package/demo/app/sys/static/img/avatar_1688549213411.png +0 -0
  182. package/demo/app/sys/static/img/avatar_1688549511977.png +0 -0
  183. package/demo/app/sys/static/img/avatar_1688549685464.png +0 -0
  184. package/demo/app/sys/static/img/avatar_1688608623049.png +0 -0
  185. package/demo/app/sys/static/img/avatar_1688638500476.png +0 -0
  186. package/demo/app/sys/static/img/avatar_1688638515195.png +0 -0
  187. package/demo/app/sys/static/img/avatar_1688638539928.png +0 -0
  188. package/demo/app/sys/static/img/avatar_1688638557960.png +0 -0
  189. package/demo/app/sys/static/img/avatar_1688638761798.png +0 -0
  190. package/demo/app/sys/static/img/avatar_1688638943140.png +0 -0
  191. package/demo/app/sys/static/img/avatar_1688639068330.png +0 -0
  192. package/demo/app/sys/static/img/image_1685357101273.jpeg +0 -0
  193. package/demo/app/sys/static/img/logo.png +0 -0
  194. package/demo/app/user/app.js +0 -148
  195. package/demo/app/user/app.json +0 -11
  196. package/demo/app/user/event_api/client/event.json +0 -10
  197. package/demo/app/user/event_api/client/main.js +0 -18
  198. package/demo/app/user/event_api/manage/event.json +0 -10
  199. package/demo/app/user/event_api/manage/main.js +0 -19
  200. package/demo/app/user/plugin/main/api_user_client/account/api.json +0 -39
  201. package/demo/app/user/plugin/main/api_user_client/account/index.js +0 -53
  202. package/demo/app/user/plugin/main/api_user_client/account/param.json +0 -130
  203. package/demo/app/user/plugin/main/api_user_client/base/api.json +0 -27
  204. package/demo/app/user/plugin/main/api_user_client/base/index.js +0 -84
  205. package/demo/app/user/plugin/main/api_user_client/base/param.json +0 -130
  206. package/demo/app/user/plugin/main/api_user_client/core/api.json +0 -20
  207. package/demo/app/user/plugin/main/api_user_client/core/forgot.js +0 -14
  208. package/demo/app/user/plugin/main/api_user_client/core/password.js +0 -14
  209. package/demo/app/user/plugin/main/api_user_client/core/sign_out.js +0 -26
  210. package/demo/app/user/plugin/main/api_user_client/core/state.js +0 -21
  211. package/demo/app/user/plugin/main/api_user_client/count/api.json +0 -27
  212. package/demo/app/user/plugin/main/api_user_client/count/chongzhi.js +0 -103
  213. package/demo/app/user/plugin/main/api_user_client/count/index.js +0 -40
  214. package/demo/app/user/plugin/main/api_user_client/count/param.json +0 -40
  215. package/demo/app/user/plugin/main/api_user_client/forgot/api.json +0 -37
  216. package/demo/app/user/plugin/main/api_user_client/forgot/index - /345/211/257/346/234/254.jsbat" +0 -41
  217. package/demo/app/user/plugin/main/api_user_client/forgot/index.js +0 -36
  218. package/demo/app/user/plugin/main/api_user_client/forgot/param.json +0 -56
  219. package/demo/app/user/plugin/main/api_user_client/oauth/WXBizDataCrypt.js +0 -33
  220. package/demo/app/user/plugin/main/api_user_client/oauth/api.json +0 -31
  221. package/demo/app/user/plugin/main/api_user_client/oauth/index.js +0 -16
  222. package/demo/app/user/plugin/main/api_user_client/oauth/oauth.js +0 -270
  223. package/demo/app/user/plugin/main/api_user_client/oauth/oauth.json +0 -88
  224. package/demo/app/user/plugin/main/api_user_client/oauth/param.json +0 -111
  225. package/demo/app/user/plugin/main/api_user_client/password/api.json +0 -21
  226. package/demo/app/user/plugin/main/api_user_client/password/index.js +0 -56
  227. package/demo/app/user/plugin/main/api_user_client/password/param.json +0 -44
  228. package/demo/app/user/plugin/main/api_user_client/phone_code/aliyun.js +0 -230
  229. package/demo/app/user/plugin/main/api_user_client/phone_code/api.json +0 -37
  230. package/demo/app/user/plugin/main/api_user_client/phone_code/index.js +0 -18
  231. package/demo/app/user/plugin/main/api_user_client/phone_code/index.js_ +0 -230
  232. package/demo/app/user/plugin/main/api_user_client/phone_code/param.json +0 -58
  233. package/demo/app/user/plugin/main/api_user_client/phone_code/phone_code.js +0 -278
  234. package/demo/app/user/plugin/main/api_user_client/realname/api.json +0 -21
  235. package/demo/app/user/plugin/main/api_user_client/realname/index.js +0 -48
  236. package/demo/app/user/plugin/main/api_user_client/realname/param.json +0 -74
  237. package/demo/app/user/plugin/main/api_user_client/servicer/api.json +0 -29
  238. package/demo/app/user/plugin/main/api_user_client/servicer/index.js +0 -19
  239. package/demo/app/user/plugin/main/api_user_client/servicer/param.json +0 -41
  240. package/demo/app/user/plugin/main/api_user_client/servicer/sql.json +0 -113
  241. package/demo/app/user/plugin/main/api_user_client/set_address/api.json +0 -37
  242. package/demo/app/user/plugin/main/api_user_client/set_address/index.js +0 -101
  243. package/demo/app/user/plugin/main/api_user_client/set_address/param.json +0 -165
  244. package/demo/app/user/plugin/main/api_user_client/set_avatar/api.json +0 -35
  245. package/demo/app/user/plugin/main/api_user_client/set_avatar/index.js +0 -77
  246. package/demo/app/user/plugin/main/api_user_client/set_info/api.json +0 -35
  247. package/demo/app/user/plugin/main/api_user_client/set_info/index.js +0 -47
  248. package/demo/app/user/plugin/main/api_user_client/set_nickname/api.json +0 -35
  249. package/demo/app/user/plugin/main/api_user_client/set_nickname/index.js +0 -49
  250. package/demo/app/user/plugin/main/api_user_client/set_pay_password/api.json +0 -21
  251. package/demo/app/user/plugin/main/api_user_client/set_pay_password/index.js +0 -67
  252. package/demo/app/user/plugin/main/api_user_client/sign_in/api.json +0 -11
  253. package/demo/app/user/plugin/main/api_user_client/sign_in/index.js +0 -275
  254. package/demo/app/user/plugin/main/api_user_client/sign_in/param.json +0 -125
  255. package/demo/app/user/plugin/main/api_user_client/sign_in/state.js +0 -37
  256. package/demo/app/user/plugin/main/api_user_client/sign_up/api.json +0 -12
  257. package/demo/app/user/plugin/main/api_user_client/sign_up/index.js +0 -110
  258. package/demo/app/user/plugin/main/api_user_client/sign_up/param.json +0 -65
  259. package/demo/app/user/plugin/main/api_user_client/sign_up_in/api.json +0 -37
  260. package/demo/app/user/plugin/main/api_user_client/sign_up_in/index.js +0 -110
  261. package/demo/app/user/plugin/main/api_user_client/sign_up_in/param.json +0 -34
  262. package/demo/app/user/plugin/main/api_user_client/token/api.json +0 -25
  263. package/demo/app/user/plugin/main/api_user_client/token/index.js +0 -20
  264. package/demo/app/user/plugin/main/api_user_client/token/param.json +0 -16
  265. package/demo/app/user/plugin/main/api_user_manage/account_base/api.json +0 -37
  266. package/demo/app/user/plugin/main/api_user_manage/account_base/index.js +0 -40
  267. package/demo/app/user/plugin/main/api_user_manage/account_base/param.json +0 -130
  268. package/demo/app/user/plugin/main/api_user_manage/invitation_code/api.json +0 -37
  269. package/demo/app/user/plugin/main/api_user_manage/invitation_code/index.js +0 -106
  270. package/demo/app/user/plugin/main/api_user_manage/invitation_code/param.json +0 -130
  271. package/demo/app/user/plugin/main/api_user_manage/update_team/api.json +0 -35
  272. package/demo/app/user/plugin/main/api_user_manage/update_team/index.js +0 -218
  273. package/demo/app/user/plugin/main/api_user_manage/update_team/param.json +0 -130
  274. package/demo/app/user/static/img/logo.png +0 -0
  275. package/demo/app/ws/app.js +0 -122
  276. package/demo/app/ws/app.json +0 -11
  277. package/demo/app/ws/event_api/client/event.json +0 -10
  278. package/demo/app/ws/event_api/client/main.js +0 -17
  279. package/demo/app/ws/socket/ws/index.js +0 -43
  280. package/demo/app/ws/socket/ws/socket.json +0 -14
  281. package/demo/config/development.json +0 -95
  282. package/demo/config/face.sql +0 -3824
  283. package/demo/config/local.json +0 -80
  284. package/demo/index.js +0 -19
@@ -1,349 +0,0 @@
1
- /**
2
- * @description 开发者通用接口函数类
3
- * @class
4
- */
5
- class dev {
6
- /**
7
- * @param {string} type
8
- * @constructor
9
- */
10
- constructor(type) {
11
- this.type = type;
12
- }
13
- }
14
-
15
- /**
16
- * @description 添加配置
17
- * @param {Object} req HTTP请求上文
18
- * @return {Object} 返回添加结果
19
- */
20
- dev.prototype.add = async function(req, db) {
21
- var body = "";
22
- var q = req.query;
23
- var scope = q["scope"];
24
- if (scope) {
25
- var cs = $.pool[this.type][scope];
26
- if (cs) {
27
- if (this.add_before) {
28
- this.add_before(req, cs);
29
- }
30
- var obj = req.body;
31
- var msg = cs.add(obj);
32
- if (msg) {
33
- return $.ret.bl(false, "添加失败" + msg);
34
- } else {
35
- return $.ret.bl(true, "添加成功");
36
- }
37
- } else {
38
- return $.ret.error(30002, "错误的作用域(scope)");
39
- }
40
- } else {
41
- return $.ret.error(30000, "缺少作用域(scope)参数");
42
- }
43
- if (this.add_after) {
44
- this.add_after(req, body);
45
- }
46
- return body;
47
- };
48
-
49
- /**
50
- * @description 删除配置
51
- * @param {Object} req HTTP请求上文
52
- * @param {Object} db 数据管理器
53
- * @return {Object} 返回保存结果
54
- */
55
- dev.prototype.del = async function(req, db) {
56
- var body = "";
57
- var q = req.query;
58
- var scope = q["scope"];
59
- if (scope) {
60
- var name = q["name"];
61
- var cs = $.pool[this.type][scope];
62
- if (cs) {
63
- if (this.del_before) {
64
- this.del_before(req, cs);
65
- }
66
- if (name) {
67
- var file = cs.del(name, q["remove"]);
68
- if (file) {
69
- return $.ret.bl(true, "删除成功。文件路径:" + file);
70
- } else {
71
- return $.ret.bl(false, "删除失败,配置" + name + "不存在");
72
- }
73
- } else {
74
- return $.ret.error(30000, "该删除的名称(name)不能为空");
75
- }
76
- } else {
77
- return $.ret.error(50002, "该作用域(scope)不存在");
78
- }
79
- } else {
80
- return $.ret.error(30000, "缺少作用域(scope)参数");
81
- }
82
- if (this.del_after) {
83
- this.del_after(req, body);
84
- }
85
- return body;
86
- };
87
-
88
- /**
89
- * @description 修改配置
90
- * @param {Object} req HTTP请求上文
91
- * @param {Object} db 数据管理器
92
- * @return {Object} 返回保存结果
93
- */
94
- dev.prototype.set = async function(req, db) {
95
- var body = "";
96
- var q = req.query;
97
- var scope = q["scope"];
98
- if (scope) {
99
- var cs = $.pool[this.type][scope];
100
- if (cs) {
101
- if (this.set_before) {
102
- this.set_before(req, cs);
103
- }
104
- var obj = req.body;
105
- if (cs.set(obj)) {
106
- var bl = cs.save(obj.name);
107
- if (bl) {
108
- return $.ret.bl(true, "修改成功");
109
- } else {
110
- return $.ret.bl(true, "修改成功,但文件保存失败");
111
- }
112
- } else {
113
- return $.ret.bl(false, "修改失败");
114
- }
115
- } else {
116
- return $.ret.error(30002, "错误的作用域(scope)");
117
- }
118
- } else {
119
- return $.ret.error(30000, "缺少作用域(scope)参数");
120
- }
121
- if (this.set_after) {
122
- this.set_after(req, body);
123
- }
124
- return body;
125
- };
126
-
127
- /**
128
- * @description 查询配置
129
- * @param {Object} req HTTP请求上文
130
- * @param {Object} db 数据管理器
131
- * @return {Object} 返回保存结果
132
- */
133
- dev.prototype.get = async function(req, db) {
134
- var body = "";
135
- var q = req.query;
136
- var scope = q["scope"];
137
- if (scope) {
138
- var name = q["name"];
139
- var cs = $.pool[this.type][scope];
140
- if (cs) {
141
- if (this.get_before) {
142
- this.get_before(req, cs);
143
- }
144
- if (name) {
145
- var config = cs.get(name);
146
- if (config) {
147
- body = $.ret.body(config);
148
- } else {
149
- body = $.ret.error(10002, "配置" + name + "不存在");
150
- }
151
- } else {
152
- var lt = cs.list;
153
- var list = [];
154
- var len = lt.length;
155
- for (var i = 0; i < len; i++) {
156
- var cg = lt[i].config;
157
- list.push({
158
- name: cg.name,
159
- title: cg.title,
160
- description: cg.description
161
- });
162
- }
163
- body = $.ret.body({
164
- scope: name,
165
- list: list
166
- });
167
- }
168
- } else {
169
- body = $.ret.error(50002, "该作用域(scope)不存在");
170
- }
171
- } else {
172
- var dict = $.pool[this.type];
173
- if (dict) {
174
- var list = [];
175
- for(var k in dict){
176
- list.push({
177
- name: k,
178
- title: dict[k].title
179
- });
180
- }
181
- body = $.ret.body({
182
- "scope": list
183
- });
184
- } else {
185
- body = $.ret.error(10000, "脚本错误,不存在的作用域(scope)");
186
- }
187
- }
188
- if (this.get_after) {
189
- this.get_after(req, body);
190
- }
191
- return body;
192
- };
193
-
194
- /**
195
- * @description 更新配置
196
- * @param {Object} req HTTP请求上文
197
- * @param {Object} db 数据管理器
198
- * @return {Object} 返回保存结果
199
- */
200
- dev.prototype.update = async function(req, db) {
201
- var body = "";
202
- var q = req.query;
203
- var scope = q["scope"];
204
- if (scope) {
205
- var cs = $.pool[this.type][scope];
206
- if (cs) {
207
- if (this.update_before) {
208
- this.update_before(req, cs);
209
- }
210
- var name = q["name"];
211
- if (name) {
212
- var file = cs.del(name);
213
- if (file) {
214
- var msg = cs.load_file(file);
215
- if (msg) {
216
- return $.ret.bl(false, msg);
217
- } else {
218
- return $.ret.bl(true, "更新成功");
219
- }
220
- } else {
221
- return $.ret.bl(false, '更新失败,' + name + "配置不存在");
222
- }
223
- } else {
224
- var dir = q["dir"];
225
- if (dir) {
226
- try {
227
- cs.update(dir);
228
- return $.ret.bl(true, '全部更新成功');
229
- } catch (e) {
230
-
231
- }
232
- return $.ret.error(10000, '业务逻辑错误');
233
- } else {
234
- return $.ret.error(50002, "更新的名称(name)不能为空");
235
- }
236
- }
237
- } else {
238
- return $.ret.error(50002, "该作用域(scope)不存在");
239
- }
240
- } else {
241
- return $.ret.error(30000, "缺少作用域(scope)参数");
242
- }
243
- if (this.update_after) {
244
- this.update_after(req, body);
245
- }
246
- return body;
247
- };
248
-
249
- /**
250
- * @description 加载配置
251
- * @param {Object} req HTTP请求上文
252
- * @param {Object} db 数据管理器
253
- * @return {Object} 返回加载结果
254
- */
255
- dev.prototype.load = function(req, db) {
256
- var body = "";
257
- var q = req.query;
258
- var scope = q["scope"];
259
- if (scope) {
260
- var cs = $.pool[this.type][scope];
261
- if (cs) {
262
- if (this.load_before) {
263
- this.load_before(req, cs);
264
- }
265
- var file = q["file"];
266
- if (file) {
267
- var msg = load_file(file);
268
- if (msg) {
269
- return $.ret.bl(false, msg);
270
- } else {
271
- return $.ret.bl(true);
272
- }
273
- } else {
274
- return $.ret.error(30000, "该加载的文件(file)不能为空");
275
- }
276
- } else {
277
- return $.ret.error(50002, "该作用域(scope)不存在");
278
- }
279
- } else {
280
- return $.ret.error(30000, "缺少作用域(scope)参数");
281
- }
282
- if (this.load_after) {
283
- this.load_after(req, body);
284
- }
285
- return body;
286
- };
287
-
288
- /**
289
- * @description 保存配置
290
- * @param {Object} req HTTP请求上文
291
- * @param {Object} db 数据管理器
292
- * @return {Object} 返回保存结果
293
- */
294
- dev.prototype.save = async function(req, db) {
295
- var body = "";
296
- var q = req.query;
297
- var scope = q["scope"];
298
- if (scope) {
299
- var name = q["name"];
300
- var cs = $.pool[this.type][scope];
301
- if (cs) {
302
- if (this.save_before) {
303
- this.save_before(req, cs);
304
- }
305
- if (name) {
306
- var bl = cs.save(name);
307
- if (bl) {
308
- return $.ret.bl(true, "保存成功");
309
- } else {
310
- return $.ret.bl(false, name + '配置不存在');
311
- }
312
- } else {
313
- return $.ret.error(30000, "名称(name)不能为空");
314
- }
315
- } else {
316
- return $.ret.error(50002, "该作用域(scope)不存在");
317
- }
318
- } else {
319
- return $.ret.error(30000, "缺少作用域(scope)参数");
320
- }
321
- if (this.save_after) {
322
- this.save_after(req, body);
323
- }
324
- return body;
325
- };
326
-
327
- /**
328
- * @description 接口主函数
329
- * @param {Object} ctx HTTP上下文
330
- * @param {Object} db 数据管理器, 如: { next: async function{}, ret: {} }
331
- * @return {Object} 执行结果
332
- */
333
- dev.prototype.main = async function(ctx, db) {
334
- // 获取请求参数
335
- var req = ctx.request;
336
- var method = req.query["method"];
337
- if (!method) {
338
- method = "get";
339
- }
340
- var ret;
341
- if (this[method]) {
342
- ret = await this[method](req, db);
343
- } else {
344
- ret = $.ret.error(70001, "错误的操作方式");
345
- }
346
- return ret;
347
- };
348
-
349
- exports.dev = dev;
@@ -1,10 +0,0 @@
1
- {
2
- "path": "/api/dev_db",
3
- "type": "api",
4
- "name": "dev_db_main",
5
- "title": "管理数据库的接口",
6
- "cache": 0,
7
- "func_file": "./index.js",
8
- "method": "ALL",
9
- "param_path": "./param.json"
10
- }
@@ -1,71 +0,0 @@
1
- const dev = require('../com.js').dev;
2
-
3
-
4
-
5
- // 是否启用数据库管理器
6
- if ($.config.sys.db_admin) {
7
- // 创建数据库管理器
8
- var db = $.db_admin('sys');
9
- db.update();
10
- }
11
- var dev_class = new dev('db');
12
-
13
- /**
14
- * @description 更新配置文件
15
- * @param {Object} req HTTP上文
16
- * @param {Object} db 数据管理器,如: { next: async function{}, ret: {} }
17
- * @return {Object} 执行结果
18
- */
19
- dev_class.update_config = async function(req, db) {
20
- var q = req.query;
21
- var scope = q["scope"];
22
- if (!scope) {
23
- scope = "sys";
24
- }
25
- var pool = $.pool.db[scope];
26
- if (!pool) {
27
- return $.ret.error(10000, '作用域(scope)不存在!');
28
- }
29
- var msg = await pool.update_config(db, q["name"], q["table"], q["cover"]);
30
- if (msg) {
31
- return $.ret.bl(false, msg);
32
- } else {
33
- return $.ret.bl(true, '更新成功');
34
- }
35
- };
36
-
37
-
38
- /**
39
- * @description 更新数据库
40
- * @param {Object} req HTTP上文
41
- * @param {Object} db 数据管理器,如: { next: async function{}, ret: {} }
42
- * @return {Object} 执行结果
43
- */
44
- dev_class.update_db = async function(req, db) {
45
- var q = req.query;
46
- var scope = q["scope"];
47
- if (!scope) {
48
- scope = "sys";
49
- }
50
- var pool = $.pool.db[scope];
51
- if (pool) {
52
- var msg = await pool.update_db(db, q["name"], q["table"], q["all"]);
53
- if (msg) {
54
- return $.ret.bl(false, msg);
55
- } else {
56
- return $.ret.bl(true, '更新成功');
57
- }
58
- } else {
59
- return $.ret.bl(false, '作用域不存在');
60
- }
61
- };
62
-
63
- /**
64
- * @description 接口主函数
65
- * @param {Object} ctx HTTP上下文
66
- * @param {Object} db 数据管理器,如: { next: async function{}, ret: {} }
67
- * @return {Object} 执行结果
68
- */
69
- exports.main = async function(ctx, db) {
70
- return await dev_class.main(ctx, db);
71
- };
@@ -1,31 +0,0 @@
1
- {
2
- "name": "dev_db",
3
-
4
- "get": {
5
- "query": [
6
- "method",
7
- "scope",
8
- "name"
9
- ],
10
- "query_required": []
11
- },
12
- "list": [{
13
- "name": "method",
14
- "title": "执行方式",
15
- "description": "add增、del删、get改、set查、update更新、load载入、save保存、update_config更新配置文件、update_db更新数据库",
16
- "type": "string"
17
- },
18
- {
19
- "name": "scope",
20
- "title": "作用域",
21
- "description": "一般为sys系统,自定义机制输入自定义作用域名",
22
- "type": "string"
23
- },
24
- {
25
- "name": "name",
26
- "title": "名称",
27
- "description": "选择要操作的配置文件名称",
28
- "type": "string"
29
- }
30
- ]
31
- }
@@ -1,10 +0,0 @@
1
- {
2
- "path": "/api/dev_dict",
3
- "type": "api",
4
- "name": "dev_event_main",
5
- "title": "管理数据字典的接口",
6
- "cache": 0,
7
- "func_file": "./index.js",
8
- "method": "ALL",
9
- "param_path": "./param.json"
10
- }
@@ -1,49 +0,0 @@
1
- var methods = {
2
- async get(ctx, db) {
3
- var dict = {};
4
- var dt = $.pool.api;
5
- for (var k in dt) {
6
- var lt = dt[k].list;
7
- for (var i = 0; i < lt.length; i++) {
8
- var pm = lt[i].param;
9
- if (pm && pm.config && pm.config.list.length > 0) {
10
- var list = pm.config.list;
11
- for (var n = 0; n < list.length; n++) {
12
- var o = list[n];
13
- dict[o.name] = o;
14
- }
15
- }
16
- }
17
- }
18
- return dict;
19
- },
20
- async set(ctx, db) {
21
-
22
- },
23
- async save(ctx, db) {
24
-
25
- },
26
- async update(ctx, db) {
27
-
28
- }
29
- }
30
-
31
-
32
- /**
33
- * @description 接口主函数
34
- * @param {Object} ctx HTTP上下文
35
- * @param {Object} db 数据管理器,如: { next: async function{}, ret: {} }
36
- * @return {Object} 执行结果
37
- */
38
- exports.main = async function(ctx, db) {
39
- var req = ctx.request;
40
- var q = req.query;
41
- if (!q.method) {
42
- return $.ret.error(10000, "方法(method)参数不能为空");
43
- }
44
- var func = methods[q.method];
45
- if (!func) {
46
- return $.ret.error(50000, "方法不存在");
47
- }
48
- return await func(ctx, db);
49
- };
@@ -1,29 +0,0 @@
1
- {
2
- "name": "dev_event",
3
- "get": {
4
- "query": [
5
- "scope",
6
- "name"
7
- ],
8
- "query_required": ["method"]
9
- },
10
- "list": [{
11
- "name": "method",
12
- "title": "执行方式",
13
- "description": "add增、del删、get改、set查、update更新、load载入、save保存",
14
- "type": "string"
15
- },
16
- {
17
- "name": "scope",
18
- "title": "作用域",
19
- "description": "一般为sys系统,自定义机制输入自定义作用域名",
20
- "type": "string"
21
- },
22
- {
23
- "name": "name",
24
- "title": "名称",
25
- "description": "选择要操作的配置文件名称",
26
- "type": "string"
27
- }
28
- ]
29
- }
@@ -1,10 +0,0 @@
1
- {
2
- "path": "/api/dev_event",
3
- "type": "api",
4
- "name": "dev_event_main",
5
- "title": "管理事件的接口",
6
- "cache": 0,
7
- "func_file": "./index.js",
8
- "method": "ALL",
9
- "param_path": "./param.json"
10
- }
@@ -1,31 +0,0 @@
1
- const dev = require('../com.js').dev;
2
-
3
- var dev_class = new dev('event');
4
-
5
-
6
- /**
7
- * @description
8
- * @param {Object} req HTTP请求上文
9
- * @param {Object} cs 池
10
- */
11
- dev_class.get_before = function(req, cs) {
12
- if (!req.query["stage"]) {
13
- req.query["stage"] = "main";
14
- }
15
- var key = "list_" + req.query["stage"];
16
- var list = cs[key];
17
- if (!list) {
18
- list = [];
19
- }
20
- cs.list = list;
21
- }
22
-
23
- /**
24
- * @description 接口主函数
25
- * @param {Object} ctx HTTP上下文
26
- * @param {Object} db 数据管理器,如: { next: async function{}, ret: {} }
27
- * @return {Object} 执行结果
28
- */
29
- exports.main = async function(ctx, db) {
30
- return await dev_class.main(ctx, db);
31
- };
@@ -1,31 +0,0 @@
1
- {
2
- "name": "dev_event",
3
-
4
- "get": {
5
- "query": [
6
- "method",
7
- "scope",
8
- "name"
9
- ],
10
- "query_required": []
11
- },
12
- "list": [{
13
- "name": "method",
14
- "title": "执行方式",
15
- "description": "add增、del删、get改、set查、update更新、load载入、save保存",
16
- "type": "string"
17
- },
18
- {
19
- "name": "scope",
20
- "title": "作用域",
21
- "description": "一般为sys系统,自定义机制输入自定义作用域名",
22
- "type": "string"
23
- },
24
- {
25
- "name": "name",
26
- "title": "名称",
27
- "description": "选择要操作的配置文件名称",
28
- "type": "string"
29
- }
30
- ]
31
- }
@@ -1,10 +0,0 @@
1
- {
2
- "path": "/api/dev_help",
3
- "type": "api",
4
- "name": "dev_help_main",
5
- "title": "查看帮助的接口",
6
- "cache": 0,
7
- "func_file": "./index.js",
8
- "method": "ALL",
9
- "param_path": "./param.json"
10
- }
@@ -1,14 +0,0 @@
1
- /**
2
- * @description 接口主函数
3
- * @param {Object} ctx HTTP上下文
4
- * @param {Object} db 数据管理器,如: { next: async function{}, ret: {} }
5
- * @return {Object} 执行结果
6
- */
7
- async function main(ctx, db) {
8
- // 获取请求参数
9
- var req = ctx.request;
10
- var q = req.query;
11
- return "hello world" + JSON.stringify(q);
12
- };
13
-
14
- exports.main = main;
@@ -1,31 +0,0 @@
1
- {
2
- "name": "dev_help",
3
-
4
- "get": {
5
- "query": [
6
- "method",
7
- "scope",
8
- "name"
9
- ],
10
- "query_required": []
11
- },
12
- "list": [{
13
- "name": "method",
14
- "title": "执行方式",
15
- "description": "add增、del删、get改、set查、update更新、load载入、save保存",
16
- "type": "string"
17
- },
18
- {
19
- "name": "scope",
20
- "title": "作用域",
21
- "description": "一般为sys系统,自定义机制输入自定义作用域名",
22
- "type": "string"
23
- },
24
- {
25
- "name": "name",
26
- "title": "名称",
27
- "description": "选择要操作的配置文件名称",
28
- "type": "string"
29
- }
30
- ]
31
- }
@@ -1,10 +0,0 @@
1
- {
2
- "path": "/api/dev_nav",
3
- "type": "api",
4
- "name": "dev_nav_main",
5
- "title": "管理路由导航的接口",
6
- "cache": 0,
7
- "func_file": "./index.js",
8
- "method": "ALL",
9
- "param_path": "./param.json"
10
- }