Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 

60 Zeilen
2.3 KiB

  1. <title>编辑新闻</title>
  2. <div class="layui-card layadmin-header">
  3. <div class="layui-breadcrumb" lay-filter="breadcrumb">
  4. <a lay-href="">主页</a>
  5. <a><cite>运营设置</cite></a>
  6. <a><cite>新闻管理</cite></a>
  7. <a><cite>编辑新闻</cite></a>
  8. </div>
  9. </div>
  10. <div class="layui-fluid">
  11. <div class="layui-row layui-col-space15">
  12. <div class="layui-col-md12">
  13. <div class="layui-card">
  14. <div class="layui-card-header">编辑新闻</div>
  15. <div class="layui-card-body" pad15>
  16. <form class="layui-form" wid100 lay-filter="LAY-info-form">
  17. <div class="layui-fields">
  18. </div>
  19. <div class="layui-submit">
  20. <div class="layui-form-item">
  21. <div class="layui-input-block">
  22. <input type="hidden" name="id">
  23. <button class="layui-btn" lay-submit lay-filter="submit">确认修改</button>
  24. </div>
  25. </div>
  26. </div>
  27. </form>
  28. </div>
  29. </div>
  30. </div>
  31. </div>
  32. </div>
  33. <script>
  34. var config;
  35. layui.admin.req({
  36. url: '/manage/data/response.json',
  37. method: 'POST',
  38. data: {news_category: 'select'},
  39. success: function (res) {
  40. config = {
  41. api: {
  42. submit: '/manage/content/news/news/edit.json'
  43. },
  44. fields: [
  45. {name: 'id', key: 'id', type: 'hide',},
  46. {name: '分类', key: 'category_id', type: 'select', extra: res.data.news_category.select},
  47. {name: '标题', key: 'title', type: 'text',},
  48. {name: '置顶', key: 'is_top', type: 'switch', extra: '是|否'},
  49. {name: '推荐', key: 'is_good', type: 'switch', extra: '是|否'},
  50. {name: '状态', key: 'status', type: 'switch', extra: '显示|隐藏'},
  51. {name: '内容', key: 'content', type: 'editor',},
  52. ],
  53. };
  54. layui.use('curd/addOrEdit', layui.factory('curd/addOrEdit'));
  55. }
  56. });
  57. </script>