You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

61 regels
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. <button class="layui-btn" lay-submit lay-filter="submit">确认发布</button>
  23. </div>
  24. </div>
  25. </div>
  26. </form>
  27. </div>
  28. </div>
  29. </div>
  30. </div>
  31. </div>
  32. <script>
  33. var config = {
  34. api: {
  35. submit: '/manage/content/ad/position/add.json'
  36. },
  37. done: function () {
  38. layui.form.verify({
  39. adkey: function (value, elem) {
  40. if (!new RegExp("^[a-zA-Z0-9]+$").test(value)) {
  41. return '仅能使用字母和数字,不能使用其他字符';
  42. }
  43. if (/^([0-9])/.test(value)) {
  44. return '不能使用数字起头';
  45. }
  46. }
  47. });
  48. },
  49. fields: [
  50. {name: '标题', key: 'title', type: 'text',},
  51. {name: '标识', key: 'key', type: 'text', verify: 'adkey'},
  52. {name: '宽', key: 'width', type: 'num', value: 0},
  53. {name: '高', key: 'height', type: 'num', value: 0},
  54. {name: '描述', key: 'intro', type: 'textarea',},
  55. {name: '状态', key: 'status', type: 'switch', extra: '正常|隐藏'},
  56. ],
  57. };
  58. layui.use('curd/addOrEdit', layui.factory('curd/addOrEdit'));
  59. </script>