template.php 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <?php
  2. return [
  3. 'list' => [
  4. 'field' => [
  5. 'name',
  6. 'key',
  7. 'type',
  8. 'method',
  9. 'cdate',
  10. 'status' => [
  11. 'type' => 'switch',
  12. 'show' => '{status}',
  13. 'active_value' => 1,
  14. 'inactive_value' => 2,
  15. ],
  16. ],
  17. 'button' => [
  18. '新增' => 'add',
  19. ],
  20. 'data_button' => [
  21. '设置' => 'edit',
  22. ],
  23. 'search' => [
  24. 'name',
  25. 'key',
  26. 'status',
  27. ]
  28. ],
  29. 'update' => [
  30. 'tab' => [
  31. '基本设置' => 'name,key,content,type,msg/template_code',
  32. '功能设置' => 'method,msg/template_sms,msg/template_email',
  33. ],
  34. 'field' => [
  35. 'name',
  36. 'key',
  37. 'content' => [
  38. 'type' => 'textarea',
  39. 'autosize' => ['minRows' => 2],
  40. 'desc' => '变量用大括号包含即可,如:{name}',
  41. ],
  42. 'type' => 'radio',
  43. 'msg/template_code' => [
  44. 'name' => '验证码设置',
  45. 'where' => ['template_id' => 'id'],
  46. 'default' => [[]],
  47. # 默认使用表格形式展示,可以改成每行展示
  48. 'type' => 'line',
  49. ],
  50. 'method' => 'checkbox',
  51. 'msg/template_sms' => [
  52. 'name' => '短信设置',
  53. 'where' => ['template_id' => 'id'],
  54. 'default' => [[]],
  55. # 默认使用表格形式展示,可以改成每行展示
  56. 'type' => 'line',
  57. ],
  58. 'msg/template_email' => [
  59. 'name' => '邮件设置',
  60. 'where' => ['template_id' => 'id'],
  61. 'default' => [[]],
  62. # 默认使用表格形式展示,可以改成每行展示
  63. 'type' => 'line',
  64. ],
  65. ],
  66. 'control' => [
  67. 'msg/template_code' => [
  68. 'type' => 2,
  69. ],
  70. 'msg/template_sms' => [
  71. 'method' => ['sms'],
  72. ],
  73. 'msg/template_email' => [
  74. 'method' => ['email'],
  75. ],
  76. ],
  77. ],
  78. ];