123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title></title>
- <meta name="renderer" content="webkit">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
- <link rel="stylesheet" href="../../static/css/font.css">
- <link rel="stylesheet" href="../../static/css/weadmin.css">
- <link rel="stylesheet" href="../../static/css/style.css">
- <!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
- <!--[if lt IE 9]>
- <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
- <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
- <![endif]-->
- <style>
- html{
- overflow-y: auto;
- }
- .layui-form-label{
- width: 100px;
- }
- .layui-input-block{
- margin-left: 138px;
- }
- .w-e-toolbar{
- padding: 0 !important;
- }
- .w-e-toolbar .w-e-menu{
- padding: 5px 4px !important;
- }
- .options{
- line-height: 38px;
- }
- .options span{
- margin: 0 10px;
- font-size: 16px;
- color: #333;
- cursor: pointer;
- }
- </style>
- </head>
- <body>
- <div class="weadmin-body">
- <form class="layui-form">
- <div class="layui-form-item">
- <label class="layui-form-label">
- 手机用户:
- </label>
- <div class="layui-input-block options">
- <span style="margin: 0">所有人可见</span>
- <span>用户组</span>
- <span>密码</span>
- </div>
- <div class="layui-input-block">
- <div class="option_content">
- <textarea name="desc" placeholder="点击选择用户组" class="layui-textarea hides textarea"></textarea>
- <span class="textareaID" style="display: none;"></span>
- <input type="text" placeholder="请输入四位密码" class="layui-input hides passInput">
- </div>
- </div>
- </div>
- </form>
- <div class="layui-form-item" style="text-align: center;padding-top: 50px">
- <button class="layui-btn JurisdictionSubmit">提交</button>
- </div>
- <span class="text" style="display: none"></span>
- </div>
- <script src="../../lib/layui/layui.js" charset="utf-8"></script>
- <script src="../../static/js/config.js"></script>
- <script>
- layui.use(['form','layer','jquery','laydate'], function(){
- var form = layui.form,
- $ = layui.jquery,
- laydate= layui.laydate,
- layer = layui.layer;
- form.render();
- var indexType = '',permissionValue = '',index;
- $("body").on("click",'.options>span',function () {
- index = $(this).index();
- indexType = index +1;
- if (index == 0) {
- $(".textarea").hide();
- $('.passInput').hide();
- permissionValue = "";
- } else if (index == 1) {
- $(".textarea").show();
- $('.passInput').hide();
- permissionValue = $('.textareaID').html();
- }else if (index == 2) {
- $(".textarea").hide();
- $('.passInput').show();
- permissionValue = $('.passInput').val();
- }
- });
- $('body').on("click",'.JurisdictionSubmit',function () {
- if (index == 0) {
- permissionValue = "";
- } else if (index == 1) {
- permissionValue = $('.textareaID').html();
- }else if (index == 2) {
- permissionValue = $('.passInput').val();
- }
- $.ajax({
- url:urlF+'api/page/v1/setPagePermission',
- type:'post',
- data:{
- id:sessionStorage.getItem("QRcodeID"),
- permissionType:indexType,
- permissionValue:permissionValue,
- _method:'put'
- },
- dataType:'json',
- success:function (res) {
- console.log(res,'res')
- },
- error:function () {
- }
- })
- });
- $("body").on("click",'.textarea',function () {
- parent.userGroup();
- })
- });
- </script>
- </body>
- </html>
|