截流自动化的商城平台
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.

set_system.html 3.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. {layout name="layout2" /}
  2. <style>
  3. .tips{
  4. color: red;
  5. }
  6. </style>
  7. <div class="layui-form" lay-filter="layuiadmin-form-user" id="layuiadmin-form-user" style="padding: 20px 30px 0 0;">
  8. <input type="hidden" value="{$info.id}" name="id">
  9. <input type="hidden" value="{$type}" name="type">
  10. <!--通知场景-->
  11. <div class="layui-form-item">
  12. <label class="layui-form-label">通知场景:</label>
  13. <div class="layui-input-inline" style="padding-top: 8px">
  14. {$info.scene}
  15. </div>
  16. </div>
  17. <!--通知标题-->
  18. <div class="layui-form-item">
  19. <label class="layui-form-label"><span class="tips">*</span>通知标题:</label>
  20. <div class="layui-input-inline">
  21. <input type="text" name="title" value="{$info.system_notice.title | default = ''}" autocomplete="off" class="layui-input" lay-verify="required" lay-vertype="tips">
  22. </div>
  23. </div>
  24. <!--场景变量-->
  25. <div class="layui-form-item">
  26. <label class="layui-form-label">场景变量:</label>
  27. <div class="layui-input-block">
  28. {foreach $info.variable as $item => $val}
  29. <button type="button" class="layui-btn layui-btn-primary variable-btn" data-value="{$item}">{$val}</button>
  30. {/foreach}
  31. </div>
  32. </div>
  33. <div class="layui-form-item">
  34. <label class="layui-form-label"></label>
  35. <div class="layui-form-mid layui-word-aux">系统在当前场景预定义好的通知变量</div>
  36. </div>
  37. <!--通知内容-->
  38. <div class="layui-form-item">
  39. <label class="layui-form-label"><span class="tips">*</span>通知内容:</label>
  40. <div class="layui-input-block">
  41. <div class="layui-col-sm4">
  42. <textarea name="content" id="content" class="layui-textarea">{$info.system_notice.content | default = ''}</textarea>
  43. <div class="layui-form-mid layui-word-aux">支持嵌入场景变量,复制场景变量的值填入即可生效</div>
  44. </div>
  45. </div>
  46. </div>
  47. <!--app推送-->
  48. <div class="layui-form-item">
  49. <label class="layui-form-label">APP推送</label>
  50. <div class="layui-input-inline">
  51. <input type="radio" name="is_push" value="1" title="开启" {if ($info.system_notice.is_push ?? 0) == 1}checked{/if} />
  52. <input type="radio" name="is_push" value="0" title="关闭" {if ($info.system_notice.is_push ?? 0) == 0}checked{/if} />
  53. <div class="layui-form-mid layui-word-aux">开启或关闭PP推送</div>
  54. </div>
  55. </div>
  56. <!--状态-->
  57. <div class="layui-form-item">
  58. <label class="layui-form-label">状态</label>
  59. <div class="layui-input-inline">
  60. <input type="radio" name="status" value="1" title="开启" {if ($info.system_notice.status ?? 0) == 1}checked{/if} />
  61. <input type="radio" name="status" value="0" title="关闭" {if ($info.system_notice.status ?? 0) == 0}checked{/if} />
  62. <div class="layui-form-mid layui-word-aux">开启或关闭当前场景通知</div>
  63. </div>
  64. </div>
  65. <div class="layui-form-item layui-hide">
  66. <input type="button" lay-submit lay-filter="addSubmit" id="addSubmit" value="确认">
  67. </div>
  68. </div>
  69. <script>
  70. layui.config({
  71. version:"{$front_version}",
  72. base: '/static/plug/'
  73. }).extend({
  74. base: '/static/plug/layui-admin/dist/layuiadmin/'
  75. }).use(['form'], function() {
  76. var $ = layui.$
  77. ,like = layui.like
  78. ,form = layui.form;
  79. $(document).on('click', '.variable-btn', function () {
  80. var copyText = $(this).data('value');
  81. let aux = document.createElement("input");
  82. aux.setAttribute("value", '{'+copyText+'}');
  83. document.body.appendChild(aux);
  84. aux.select();
  85. document.execCommand("copy");
  86. document.body.removeChild(aux);
  87. layer.msg('已复制场景变量');
  88. });
  89. })
  90. </script>