config.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. declare(strict_types=1);
  3. return json_decode(<<<'JSON'
  4. [
  5. {
  6. "type": "checkbox",
  7. "field": "pay_type",
  8. "title": "支付方式",
  9. "info": "这里可以开启关闭支付方式",
  10. "effect": {
  11. "fetch": {
  12. "action": "{{API_BASE_URL}}/admin/payment",
  13. "method": "GET",
  14. "dataType": "json",
  15. "headers": {
  16. "Authorization": "Bearer {{API_TOKEN}}"
  17. },
  18. "query": {},
  19. "data": {},
  20. "parse": "[[FORM-CREATE-PREFIX-function (res, rule, api){\nreturn res.data.map(item => ({\n value: item.id,\n label: item.name\n}))\n}-FORM-CREATE-SUFFIX]]",
  21. "beforeFetch": "",
  22. "onError": "",
  23. "to": "options"
  24. }
  25. },
  26. "$required": false,
  27. "props": {
  28. "_optionType": 1
  29. },
  30. "_fc_id": "id_Fpr6mdk6u0kpafc",
  31. "name": "ref_Forzmdk6u0kpagc",
  32. "display": true,
  33. "hidden": false,
  34. "_fc_drag_tag": "checkbox"
  35. },
  36. {
  37. "type": "checkbox",
  38. "field": "supported_envs",
  39. "title": "支持的小程序环境",
  40. "info": "选择在此插件中支持的小程序环境",
  41. "options": [
  42. {
  43. "value": "develop",
  44. "label": "开发版"
  45. },
  46. {
  47. "value": "trial",
  48. "label": "体验版"
  49. },
  50. {
  51. "value": "release",
  52. "label": "正式版"
  53. }
  54. ],
  55. "$required": false,
  56. "props": {
  57. "_optionType": 1
  58. },
  59. "_fc_id": "id_supported_envs_checkbox",
  60. "name": "ref_supported_envs",
  61. "display": true,
  62. "hidden": false,
  63. "_fc_drag_tag": "checkbox"
  64. }
  65. ]
  66. JSON,true);