Jurisdiction.html 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title></title>
  6. <meta name="renderer" content="webkit">
  7. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  8. <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  9. <link rel="stylesheet" href="../../static/css/font.css">
  10. <link rel="stylesheet" href="../../static/css/weadmin.css">
  11. <link rel="stylesheet" href="../../static/css/style.css">
  12. <!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
  13. <!--[if lt IE 9]>
  14. <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
  15. <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
  16. <![endif]-->
  17. <style>
  18. html{
  19. overflow-y: auto;
  20. }
  21. .layui-form-label{
  22. width: 100px;
  23. }
  24. .layui-input-block{
  25. margin-left: 138px;
  26. }
  27. .w-e-toolbar{
  28. padding: 0 !important;
  29. }
  30. .w-e-toolbar .w-e-menu{
  31. padding: 5px 4px !important;
  32. }
  33. .options{
  34. line-height: 38px;
  35. }
  36. .options span{
  37. margin: 0 10px;
  38. font-size: 16px;
  39. color: #333;
  40. cursor: pointer;
  41. }
  42. </style>
  43. </head>
  44. <body>
  45. <div class="weadmin-body">
  46. <form class="layui-form">
  47. <div class="layui-form-item">
  48. <label class="layui-form-label">
  49. 手机用户:
  50. </label>
  51. <div class="layui-input-block options">
  52. <span style="margin: 0">所有人可见</span>
  53. <span>用户组</span>
  54. <span>密码</span>
  55. </div>
  56. <div class="layui-input-block">
  57. <div class="option_content">
  58. <textarea name="desc" placeholder="点击选择用户组" class="layui-textarea hides textarea"></textarea>
  59. <span class="textareaID" style="display: none;"></span>
  60. <input type="text" placeholder="请输入四位密码" class="layui-input hides passInput">
  61. </div>
  62. </div>
  63. </div>
  64. </form>
  65. <div class="layui-form-item" style="text-align: center;padding-top: 50px">
  66. <button class="layui-btn JurisdictionSubmit">提交</button>
  67. </div>
  68. <span class="text" style="display: none"></span>
  69. </div>
  70. <script src="../../lib/layui/layui.js" charset="utf-8"></script>
  71. <script src="../../static/js/config.js"></script>
  72. <script>
  73. layui.use(['form','layer','jquery','laydate'], function(){
  74. var form = layui.form,
  75. $ = layui.jquery,
  76. laydate= layui.laydate,
  77. layer = layui.layer;
  78. form.render();
  79. var indexType = '',permissionValue = '',index;
  80. $("body").on("click",'.options>span',function () {
  81. index = $(this).index();
  82. indexType = index +1;
  83. if (index == 0) {
  84. $(".textarea").hide();
  85. $('.passInput').hide();
  86. permissionValue = "";
  87. } else if (index == 1) {
  88. $(".textarea").show();
  89. $('.passInput').hide();
  90. permissionValue = $('.textareaID').html();
  91. }else if (index == 2) {
  92. $(".textarea").hide();
  93. $('.passInput').show();
  94. permissionValue = $('.passInput').val();
  95. }
  96. });
  97. $('body').on("click",'.JurisdictionSubmit',function () {
  98. if (index == 0) {
  99. permissionValue = "";
  100. } else if (index == 1) {
  101. permissionValue = $('.textareaID').html();
  102. }else if (index == 2) {
  103. permissionValue = $('.passInput').val();
  104. }
  105. $.ajax({
  106. url:urlF+'api/page/v1/setPagePermission',
  107. type:'post',
  108. data:{
  109. id:sessionStorage.getItem("QRcodeID"),
  110. permissionType:indexType,
  111. permissionValue:permissionValue,
  112. _method:'put'
  113. },
  114. dataType:'json',
  115. success:function (res) {
  116. console.log(res,'res')
  117. },
  118. error:function () {
  119. }
  120. })
  121. });
  122. $("body").on("click",'.textarea',function () {
  123. parent.userGroup();
  124. })
  125. });
  126. </script>
  127. </body>
  128. </html>