other.html 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. {extend name="common/base"/}
  2. <!-- 主体 -->
  3. {block name="body"}
  4. <form class="layui-form p-4">
  5. <h3 class="pb-3">其他配置</h3>
  6. <table class="layui-table layui-table-form">
  7. <tr>
  8. <td class="layui-td-gray">开发者</td>
  9. <td>
  10. <input type="hidden" value="{$id}" name="id">
  11. <input type="text" name="author" autocomplete="off" placeholder="请输入开发者" lay-reqText="请输入开发者"
  12. class="layui-input" {notempty name="$config.author" } value="{$config.author}" {/notempty}>
  13. </td>
  14. <td class="layui-td-gray-2">开发版本号
  15. </td>
  16. <td>
  17. <input type="text" name="version" autocomplete="off" placeholder="请输入版本号" lay-reqText="请输入版本号"
  18. class="layui-input" {notempty name="$config.version" } value="{$config.version}" {/notempty}>
  19. </td>
  20. </tr>
  21. <tr>
  22. <td class="layui-td-gray-3">系统文本编辑器</td>
  23. <td colspan="3">
  24. {empty name="$config.editor"}
  25. <input type="radio" name="editor" value="1" title="富文本编辑器(TinyMCE)" checked>
  26. <input type="radio" name="editor" value="2" title="Markdown编辑器(Editor.md)">
  27. {else/}
  28. <input type="radio" name="editor" value="1" title="富文本编辑器(TinyMCE)" {eq name="$config.editor" value="1"
  29. }checked{/eq}>
  30. <input type="radio" name="editor" value="2" title="Markdown编辑器(Editor.md)" {eq name="$config.editor"
  31. value="2" }checked{/eq}>
  32. {/empty}
  33. </td>
  34. </tr>
  35. <tr>
  36. <td colspan="4">
  37. <span style="margin-left:20px; color: red">注意:切换编辑器后,文章内容对应的文本内容可能需要重新编辑。</span>
  38. </td>
  39. </tr>
  40. </table>
  41. <div class="py-3">
  42. <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform">立即提交</button>
  43. <button type="reset" class="layui-btn layui-btn-primary">重置</button>
  44. </div>
  45. </form>
  46. {/block}
  47. <!-- /主体 -->
  48. <!-- 脚本 -->
  49. {block name="script"}
  50. <script>
  51. const moduleInit = ['tool'];
  52. function gouguInit() {
  53. var form = layui.form, tool = layui.tool;
  54. //监听提交
  55. form.on('submit(webform)', function (data) {
  56. let callback = function (e) {
  57. layer.msg(e.msg);
  58. if (e.code == 0) {
  59. parent.layui.tool.close(1000);
  60. }
  61. }
  62. tool.post("/admin/conf/edit", data.field, callback);
  63. return false;
  64. });
  65. }
  66. </script>
  67. {/block}
  68. <!-- /脚本 -->