mm_os 2.7.9 → 2.8.1

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 (288) hide show
  1. package/README.md +1 -1
  2. package/demo/app/dev/README.md +1 -0
  3. package/demo/app/dev/app.js +149 -0
  4. package/demo/app/dev/app.json +12 -0
  5. package/demo/app/dev/event_api/client/event.json +11 -0
  6. package/demo/app/dev/event_api/client/main.js +19 -0
  7. package/demo/app/dev/event_api/manage/event.json +19 -0
  8. package/demo/app/dev/event_api/manage/main.js +26 -0
  9. package/demo/app/dev/plugin/doc/static/api_list.html +144 -0
  10. package/demo/app/dev/plugin/doc/static/api_view.html +692 -0
  11. package/demo/app/dev/plugin/doc/static/index.html +138 -0
  12. package/demo/app/dev/plugin/doc/static/request_test.html +311 -0
  13. package/demo/app/dev/plugin/main/api_dev_client/api/api.json +11 -0
  14. package/demo/app/dev/plugin/main/api_dev_client/api/index.js +54 -0
  15. package/demo/app/dev/plugin/main/api_dev_client/api/param.json +31 -0
  16. package/demo/app/dev/plugin/main/api_dev_client/app/api.json +13 -0
  17. package/demo/app/dev/plugin/main/api_dev_client/app/index.js +13 -0
  18. package/demo/app/dev/plugin/main/api_dev_client/app/param.json +147 -0
  19. package/demo/app/dev/plugin/main/api_dev_client/app/sql.json +28 -0
  20. package/demo/app/dev/plugin/main/api_dev_client/auto/api.json +37 -0
  21. package/demo/app/dev/plugin/main/api_dev_client/auto/auto_db.js +70 -0
  22. package/demo/app/dev/plugin/main/api_dev_client/auto/auto_file.js +32 -0
  23. package/demo/app/dev/plugin/main/api_dev_client/auto/index.js +51 -0
  24. package/demo/app/dev/plugin/main/api_dev_client/auto/param.json +51 -0
  25. package/demo/app/dev/plugin/main/api_dev_client/com.js +349 -0
  26. package/demo/app/dev/plugin/main/api_dev_client/db/api.json +10 -0
  27. package/demo/app/dev/plugin/main/api_dev_client/db/index.js +71 -0
  28. package/demo/app/dev/plugin/main/api_dev_client/db/param.json +31 -0
  29. package/demo/app/dev/plugin/main/api_dev_client/dict/api.json +10 -0
  30. package/demo/app/dev/plugin/main/api_dev_client/dict/index.js +49 -0
  31. package/demo/app/dev/plugin/main/api_dev_client/dict/param.json +29 -0
  32. package/demo/app/dev/plugin/main/api_dev_client/event/api.json +10 -0
  33. package/demo/app/dev/plugin/main/api_dev_client/event/index.js +31 -0
  34. package/demo/app/dev/plugin/main/api_dev_client/event/param.json +31 -0
  35. package/demo/app/dev/plugin/main/api_dev_client/help/api.json +10 -0
  36. package/demo/app/dev/plugin/main/api_dev_client/help/index.js +14 -0
  37. package/demo/app/dev/plugin/main/api_dev_client/help/param.json +31 -0
  38. package/demo/app/dev/plugin/main/api_dev_client/nav/api.json +10 -0
  39. package/demo/app/dev/plugin/main/api_dev_client/nav/index.js +36 -0
  40. package/demo/app/dev/plugin/main/api_dev_client/nav/param.json +36 -0
  41. package/demo/app/dev/plugin/main/api_dev_client/plugin/api.json +10 -0
  42. package/demo/app/dev/plugin/main/api_dev_client/plugin/index.js +13 -0
  43. package/demo/app/dev/plugin/main/api_dev_client/plugin/param.json +31 -0
  44. package/demo/app/dev/plugin/main/api_dev_client/source/api.json +10 -0
  45. package/demo/app/dev/plugin/main/api_dev_client/source/index.js +14 -0
  46. package/demo/app/dev/plugin/main/api_dev_client/source/param.json +31 -0
  47. package/demo/app/dev/plugin/main/api_dev_client/sql/api.json +10 -0
  48. package/demo/app/dev/plugin/main/api_dev_client/sql/index.js +13 -0
  49. package/demo/app/dev/plugin/main/api_dev_client/sql/param.json +31 -0
  50. package/demo/app/dev/plugin/main/api_dev_client/task/api.json +16 -0
  51. package/demo/app/dev/plugin/main/api_dev_client/task/index.js +13 -0
  52. package/demo/app/dev/plugin/main/api_dev_client/task/param.json +31 -0
  53. package/demo/app/dev/plugin/main/api_dev_client/translate/api.json +39 -0
  54. package/demo/app/dev/plugin/main/api_dev_client/translate/index.js +43 -0
  55. package/demo/app/dev/plugin/main/api_dev_client/translate/param.json +130 -0
  56. package/demo/app/dev/plugin/main/api_dev_client/translate/sql.json +62 -0
  57. package/demo/app/dev/plugin/main/api_dev_client/ui/api.json +10 -0
  58. package/demo/app/dev/plugin/main/api_dev_client/ui/index.js +146 -0
  59. package/demo/app/dev/plugin/main/api_dev_client/ui/param.json +31 -0
  60. package/demo/app/dev/plugin/main/api_dev_client/view/api.json +10 -0
  61. package/demo/app/dev/plugin/main/api_dev_client/view/index.js +100 -0
  62. package/demo/app/dev/plugin/main/api_dev_client/view/param.json +29 -0
  63. package/demo/app/dev/plugin/main/api_dev_client/view/tpl/block/nav.vue +12 -0
  64. package/demo/app/dev/plugin/main/api_dev_client/view/tpl/block/obj.vue +12 -0
  65. package/demo/app/dev/plugin/main/api_dev_client/view/tpl/block/post.vue +12 -0
  66. package/demo/app/dev/plugin/main/api_dev_client/view/tpl/block/query.vue +12 -0
  67. package/demo/app/dev/plugin/main/api_dev_client/view/tpl/page/edit.vue +39 -0
  68. package/demo/app/dev/plugin/main/api_dev_client/view/tpl/page/list.vue +12 -0
  69. package/demo/app/dev/plugin/main/api_dev_client/view/tpl/page/search.vue +12 -0
  70. package/demo/app/dev/plugin/main/api_dev_client/view/tpl/page/table.vue +12 -0
  71. package/demo/app/dev/plugin/main/api_dev_client/view/tpl/page/type.vue +12 -0
  72. package/demo/app/dev/plugin/main/api_dev_client/view/tpl/page/view.vue +56 -0
  73. package/demo/app/dev/plugin/main/api_dev_client/view/tpl/view.json +48 -0
  74. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/api.json +37 -0
  75. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/auto_db.js +120 -0
  76. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/copy/copy.js +101 -0
  77. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/copy/copy_framework.js +118 -0
  78. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/copy/copy_template.js +78 -0
  79. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/copy_file.js +97 -0
  80. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/create/common.js +198 -0
  81. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/create/django_server.js +104 -0
  82. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/create/helper.js +161 -0
  83. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/create/koa_art_server.js +102 -0
  84. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/create/mini_app_home.js +415 -0
  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 +418 -0
  89. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/create/vue_cli_admin.js +78 -0
  90. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/create/vue_cli_home.js +112 -0
  91. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/create_file.js +97 -0
  92. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/db/add_data.js +221 -0
  93. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/db/create_table.js +162 -0
  94. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/db/set_auth_table.js +86 -0
  95. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/index.js +524 -0
  96. package/demo/app/dev/plugin/main/api_dev_manage/auto_subject/param.json +37 -0
  97. package/demo/app/proxy/event_api/all/event.json +20 -0
  98. package/demo/app/proxy/event_api/all/main.js +50 -0
  99. package/demo/app/route/app.js +131 -0
  100. package/demo/app/route/app.json +11 -0
  101. package/demo/app/route/event_api/client/event.json +10 -0
  102. package/demo/app/route/event_api/client/main.js +19 -0
  103. package/demo/app/route/event_api/manage/event.json +18 -0
  104. package/demo/app/route/event_api/manage/main.js +70 -0
  105. package/demo/app/route/plugin/main/api_route_client/pass/api.json +37 -0
  106. package/demo/app/route/plugin/main/api_route_client/pass/index.js +33 -0
  107. package/demo/app/route/plugin/main/api_route_client/pass/param.json +50 -0
  108. package/demo/app/route/plugin/main/index.js +144 -0
  109. package/demo/app/route/plugin/main/plugin.json +20 -0
  110. package/demo/app/sys/app.js +169 -0
  111. package/demo/app/sys/app.json +11 -0
  112. package/demo/app/sys/event_api/api/before.js +80 -0
  113. package/demo/app/sys/event_api/api/check.js +103 -0
  114. package/demo/app/sys/event_api/api/event.json +31 -0
  115. package/demo/app/sys/event_api/api/main.js +19 -0
  116. package/demo/app/sys/event_api/apis/before.js +80 -0
  117. package/demo/app/sys/event_api/apis/event.json +21 -0
  118. package/demo/app/sys/event_api/apis/main.js +19 -0
  119. package/demo/app/sys/event_api/client/event.json +10 -0
  120. package/demo/app/sys/event_api/client/main.js +17 -0
  121. package/demo/app/sys/event_api/doc/event.json +18 -0
  122. package/demo/app/sys/event_api/doc/main.js +67 -0
  123. package/demo/app/sys/event_api/img/event.json +11 -0
  124. package/demo/app/sys/event_api/img/main.js +90 -0
  125. package/demo/app/sys/event_api/manage/event.json +10 -0
  126. package/demo/app/sys/event_api/manage/main.js +19 -0
  127. package/demo/app/sys/event_api/upload/event.json +10 -0
  128. package/demo/app/sys/event_api/upload/main.js +17 -0
  129. package/demo/app/sys/plugin/app_admin/index.js +127 -0
  130. package/demo/app/sys/plugin/app_admin/plugin.json +20 -0
  131. package/demo/app/sys/plugin/main/api_client/config/api.json +39 -0
  132. package/demo/app/sys/plugin/main/api_client/config/index.js +37 -0
  133. package/demo/app/sys/plugin/main/api_client/config/param.json +27 -0
  134. package/demo/app/sys/plugin/main/api_client/config/sql.json +70 -0
  135. package/demo/app/sys/plugin/main/api_client/lang/api.json +37 -0
  136. package/demo/app/sys/plugin/main/api_client/lang/index.js +27 -0
  137. package/demo/app/sys/plugin/main/api_client/lang/param.json +22 -0
  138. package/demo/app/sys/plugin/main/api_client/nav/api.json +15 -0
  139. package/demo/app/sys/plugin/main/api_client/nav/index.js +39 -0
  140. package/demo/app/sys/plugin/main/api_client/nav/param.json +87 -0
  141. package/demo/app/sys/plugin/main/api_client/query/api.json +35 -0
  142. package/demo/app/sys/plugin/main/api_client/query/index.js +48 -0
  143. package/demo/app/sys/plugin/main/api_client/theme/api.json +37 -0
  144. package/demo/app/sys/plugin/main/api_client/theme/index.js +30 -0
  145. package/demo/app/sys/plugin/main/api_client/theme/param.json +31 -0
  146. package/demo/app/sys/plugin/main/api_client/translate/api.json +39 -0
  147. package/demo/app/sys/plugin/main/api_client/translate/index.js +21 -0
  148. package/demo/app/sys/plugin/main/api_client/translate/param.json +130 -0
  149. package/demo/app/sys/plugin/main/api_client/translate/sql.json +62 -0
  150. package/demo/app/sys/plugin/main/api_upload/image/api.json +15 -0
  151. package/demo/app/sys/plugin/main/api_upload/image/index.js +62 -0
  152. package/demo/app/sys/plugin/main/api_upload/image/param.json +9 -0
  153. package/demo/app/sys/plugin/main/task/task_demo/index.js +37 -0
  154. package/demo/app/sys/plugin/main/task/task_demo/task.json +24 -0
  155. package/demo/app/sys/plugin/user/index.js +127 -0
  156. package/demo/app/sys/plugin/user/plugin.json +20 -0
  157. package/demo/app/sys/plugin/user/static/img/logo.png +0 -0
  158. package/demo/app/sys/static/img/avatar_1674484608066.png +0 -0
  159. package/demo/app/sys/static/img/avatar_1674633778171.jpeg +0 -0
  160. package/demo/app/sys/static/img/avatar_1674962702334.jpeg +0 -0
  161. package/demo/app/sys/static/img/avatar_1675075431736.jpeg +0 -0
  162. package/demo/app/sys/static/img/avatar_1675497065533.jpeg +0 -0
  163. package/demo/app/sys/static/img/avatar_1685352550990.jpeg +0 -0
  164. package/demo/app/sys/static/img/avatar_1685353685992.jpeg +0 -0
  165. package/demo/app/sys/static/img/avatar_1685353956587.jpeg +0 -0
  166. package/demo/app/sys/static/img/avatar_1685353971148.jpeg +0 -0
  167. package/demo/app/sys/static/img/avatar_1685353983723.jpeg +0 -0
  168. package/demo/app/sys/static/img/avatar_1685354014745.jpeg +0 -0
  169. package/demo/app/sys/static/img/avatar_1685354122355.jpeg +0 -0
  170. package/demo/app/sys/static/img/avatar_1685357983520.jpeg +0 -0
  171. package/demo/app/sys/static/img/avatar_1685358453383.jpeg +0 -0
  172. package/demo/app/sys/static/img/avatar_1685416570438.jpeg +0 -0
  173. package/demo/app/sys/static/img/avatar_1685512675830.png +0 -0
  174. package/demo/app/sys/static/img/avatar_1685939425608.jpeg +0 -0
  175. package/demo/app/sys/static/img/avatar_1685939886560.jpeg +0 -0
  176. package/demo/app/sys/static/img/avatar_1686106313194.png +0 -0
  177. package/demo/app/sys/static/img/avatar_1686371876175.png +0 -0
  178. package/demo/app/sys/static/img/avatar_1686372033596.png +0 -0
  179. package/demo/app/sys/static/img/avatar_1688215220669.png +0 -0
  180. package/demo/app/sys/static/img/avatar_1688531184690.png +0 -0
  181. package/demo/app/sys/static/img/avatar_1688531233080.png +0 -0
  182. package/demo/app/sys/static/img/avatar_1688548526909.png +0 -0
  183. package/demo/app/sys/static/img/avatar_1688549213411.png +0 -0
  184. package/demo/app/sys/static/img/avatar_1688549511977.png +0 -0
  185. package/demo/app/sys/static/img/avatar_1688549685464.png +0 -0
  186. package/demo/app/sys/static/img/avatar_1688608623049.png +0 -0
  187. package/demo/app/sys/static/img/avatar_1688638500476.png +0 -0
  188. package/demo/app/sys/static/img/avatar_1688638515195.png +0 -0
  189. package/demo/app/sys/static/img/avatar_1688638539928.png +0 -0
  190. package/demo/app/sys/static/img/avatar_1688638557960.png +0 -0
  191. package/demo/app/sys/static/img/avatar_1688638761798.png +0 -0
  192. package/demo/app/sys/static/img/avatar_1688638943140.png +0 -0
  193. package/demo/app/sys/static/img/avatar_1688639068330.png +0 -0
  194. package/demo/app/sys/static/img/image_1685357101273.jpeg +0 -0
  195. package/demo/app/sys/static/img/logo.png +0 -0
  196. package/demo/app/user/app.js +148 -0
  197. package/demo/app/user/app.json +11 -0
  198. package/demo/app/user/event_api/client/event.json +10 -0
  199. package/demo/app/user/event_api/client/main.js +18 -0
  200. package/demo/app/user/event_api/manage/event.json +10 -0
  201. package/demo/app/user/event_api/manage/main.js +19 -0
  202. package/demo/app/user/plugin/main/api_user_client/account/api.json +39 -0
  203. package/demo/app/user/plugin/main/api_user_client/account/index.js +53 -0
  204. package/demo/app/user/plugin/main/api_user_client/account/param.json +130 -0
  205. package/demo/app/user/plugin/main/api_user_client/base/api.json +27 -0
  206. package/demo/app/user/plugin/main/api_user_client/base/index.js +84 -0
  207. package/demo/app/user/plugin/main/api_user_client/base/param.json +130 -0
  208. package/demo/app/user/plugin/main/api_user_client/core/api.json +20 -0
  209. package/demo/app/user/plugin/main/api_user_client/core/forgot.js +14 -0
  210. package/demo/app/user/plugin/main/api_user_client/core/password.js +14 -0
  211. package/demo/app/user/plugin/main/api_user_client/core/sign_out.js +26 -0
  212. package/demo/app/user/plugin/main/api_user_client/core/state.js +21 -0
  213. package/demo/app/user/plugin/main/api_user_client/count/api.json +27 -0
  214. package/demo/app/user/plugin/main/api_user_client/count/chongzhi.js +103 -0
  215. package/demo/app/user/plugin/main/api_user_client/count/index.js +40 -0
  216. package/demo/app/user/plugin/main/api_user_client/count/param.json +40 -0
  217. package/demo/app/user/plugin/main/api_user_client/forgot/api.json +37 -0
  218. package/demo/app/user/plugin/main/api_user_client/forgot/index - /345/211/257/346/234/254.jsbat" +41 -0
  219. package/demo/app/user/plugin/main/api_user_client/forgot/index.js +36 -0
  220. package/demo/app/user/plugin/main/api_user_client/forgot/param.json +56 -0
  221. package/demo/app/user/plugin/main/api_user_client/oauth/WXBizDataCrypt.js +33 -0
  222. package/demo/app/user/plugin/main/api_user_client/oauth/api.json +31 -0
  223. package/demo/app/user/plugin/main/api_user_client/oauth/index.js +16 -0
  224. package/demo/app/user/plugin/main/api_user_client/oauth/oauth.js +270 -0
  225. package/demo/app/user/plugin/main/api_user_client/oauth/oauth.json +88 -0
  226. package/demo/app/user/plugin/main/api_user_client/oauth/param.json +111 -0
  227. package/demo/app/user/plugin/main/api_user_client/password/api.json +21 -0
  228. package/demo/app/user/plugin/main/api_user_client/password/index.js +56 -0
  229. package/demo/app/user/plugin/main/api_user_client/password/param.json +44 -0
  230. package/demo/app/user/plugin/main/api_user_client/phone_code/aliyun.js +230 -0
  231. package/demo/app/user/plugin/main/api_user_client/phone_code/api.json +37 -0
  232. package/demo/app/user/plugin/main/api_user_client/phone_code/index.js +18 -0
  233. package/demo/app/user/plugin/main/api_user_client/phone_code/index.js_ +230 -0
  234. package/demo/app/user/plugin/main/api_user_client/phone_code/param.json +58 -0
  235. package/demo/app/user/plugin/main/api_user_client/phone_code/phone_code.js +278 -0
  236. package/demo/app/user/plugin/main/api_user_client/realname/api.json +21 -0
  237. package/demo/app/user/plugin/main/api_user_client/realname/index.js +48 -0
  238. package/demo/app/user/plugin/main/api_user_client/realname/param.json +74 -0
  239. package/demo/app/user/plugin/main/api_user_client/servicer/api.json +29 -0
  240. package/demo/app/user/plugin/main/api_user_client/servicer/index.js +19 -0
  241. package/demo/app/user/plugin/main/api_user_client/servicer/param.json +41 -0
  242. package/demo/app/user/plugin/main/api_user_client/servicer/sql.json +113 -0
  243. package/demo/app/user/plugin/main/api_user_client/set_address/api.json +37 -0
  244. package/demo/app/user/plugin/main/api_user_client/set_address/index.js +101 -0
  245. package/demo/app/user/plugin/main/api_user_client/set_address/param.json +165 -0
  246. package/demo/app/user/plugin/main/api_user_client/set_avatar/api.json +35 -0
  247. package/demo/app/user/plugin/main/api_user_client/set_avatar/index.js +77 -0
  248. package/demo/app/user/plugin/main/api_user_client/set_info/api.json +35 -0
  249. package/demo/app/user/plugin/main/api_user_client/set_info/index.js +47 -0
  250. package/demo/app/user/plugin/main/api_user_client/set_nickname/api.json +35 -0
  251. package/demo/app/user/plugin/main/api_user_client/set_nickname/index.js +49 -0
  252. package/demo/app/user/plugin/main/api_user_client/set_pay_password/api.json +21 -0
  253. package/demo/app/user/plugin/main/api_user_client/set_pay_password/index.js +67 -0
  254. package/demo/app/user/plugin/main/api_user_client/sign_in/api.json +11 -0
  255. package/demo/app/user/plugin/main/api_user_client/sign_in/index.js +275 -0
  256. package/demo/app/user/plugin/main/api_user_client/sign_in/param.json +125 -0
  257. package/demo/app/user/plugin/main/api_user_client/sign_in/state.js +37 -0
  258. package/demo/app/user/plugin/main/api_user_client/sign_up/api.json +12 -0
  259. package/demo/app/user/plugin/main/api_user_client/sign_up/index.js +110 -0
  260. package/demo/app/user/plugin/main/api_user_client/sign_up/param.json +65 -0
  261. package/demo/app/user/plugin/main/api_user_client/sign_up_in/api.json +37 -0
  262. package/demo/app/user/plugin/main/api_user_client/sign_up_in/index.js +110 -0
  263. package/demo/app/user/plugin/main/api_user_client/sign_up_in/param.json +34 -0
  264. package/demo/app/user/plugin/main/api_user_client/token/api.json +25 -0
  265. package/demo/app/user/plugin/main/api_user_client/token/index.js +20 -0
  266. package/demo/app/user/plugin/main/api_user_client/token/param.json +16 -0
  267. package/demo/app/user/plugin/main/api_user_manage/account_base/api.json +37 -0
  268. package/demo/app/user/plugin/main/api_user_manage/account_base/index.js +40 -0
  269. package/demo/app/user/plugin/main/api_user_manage/account_base/param.json +130 -0
  270. package/demo/app/user/plugin/main/api_user_manage/invitation_code/api.json +37 -0
  271. package/demo/app/user/plugin/main/api_user_manage/invitation_code/index.js +106 -0
  272. package/demo/app/user/plugin/main/api_user_manage/invitation_code/param.json +130 -0
  273. package/demo/app/user/plugin/main/api_user_manage/update_team/api.json +35 -0
  274. package/demo/app/user/plugin/main/api_user_manage/update_team/index.js +218 -0
  275. package/demo/app/user/plugin/main/api_user_manage/update_team/param.json +130 -0
  276. package/demo/app/user/static/img/logo.png +0 -0
  277. package/demo/app/ws/app.js +122 -0
  278. package/demo/app/ws/app.json +11 -0
  279. package/demo/app/ws/event_api/client/event.json +10 -0
  280. package/demo/app/ws/event_api/client/main.js +17 -0
  281. package/demo/app/ws/socket/ws/index.js +43 -0
  282. package/demo/app/ws/socket/ws/socket.json +14 -0
  283. package/demo/config/development.json +95 -0
  284. package/demo/config/face.sql +3824 -0
  285. package/demo/config/local.json +80 -0
  286. package/demo/index.js +19 -0
  287. package/package.json +59 -58
  288. package/cache/test/main/config.json +0 -7
@@ -0,0 +1,349 @@
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;
@@ -0,0 +1,10 @@
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
+ }
@@ -0,0 +1,71 @@
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
+ };
@@ -0,0 +1,31 @@
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
+ }
@@ -0,0 +1,10 @@
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
+ }
@@ -0,0 +1,49 @@
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
+ };
@@ -0,0 +1,29 @@
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
+ }
@@ -0,0 +1,10 @@
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
+ }
@@ -0,0 +1,31 @@
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
+ };
@@ -0,0 +1,31 @@
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
+ }
@@ -0,0 +1,10 @@
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
+ }
@@ -0,0 +1,14 @@
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;
@@ -0,0 +1,31 @@
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
+ }
@@ -0,0 +1,10 @@
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
+ }