| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <include file="public@header"/>
- </head>
- <body>
- <div class="wrap">
- <form method="post" class="form-horizontal js-ajax-form margin-top-20" action="#">
- <div class="form-group">
- <label for="input-password" class="col-sm-2 control-label"><span class="form-required">*</span>登录密码</label>
- <input type="password" class="form-control" id="input-password" style="width: 200px;display: inline-block;" name="password" placeholder="请输入登录密码确认">
- </div>
- <div class="form-group">
- <div class="col-sm-offset-2 col-sm-10 text-center margin-top-20">
- <input type="hidden" name="id" value="{$id}"/>
- <button type="button" class="btn btn-primary" onclick="return condtion();">确认注销</button>
- </div>
- </div>
- </form>
- </div>
- <link href="__STATIC__/js/city/layui/css/layui.css" rel="stylesheet"/>
- <script src="__STATIC__/js/city/layui/layui.js" type="text/javascript"></script>
- <script src="__STATIC__/js/admin.js"></script>
- <script type="text/javascript">
- function condtion() {
- if ($('#input-password').val() == '') {
- alert('请输入登录密码二次确认');
- return false;
- }
- if (confirm('确定要注销该账号吗?')) {
- $.ajax({
- type: 'post',
- url: "{:url('/User/admin_index/dologout',array('id'=>$id))}",
- data: {password: $('#input-password').val()},
- success: function (data) {
- if (data.code == 1) {
- alert(data.msg);
- var index = parent.layer.getFrameIndex(window.name);
- parent.layer.close(index);
- } else {
- console.log(9999)
- alert(data.msg);
- }
- return false;
- },
- fail: function (data) {
- alert(data.msg);
- }
- });
- return false;
- } else {
- return false;
- }
- }
- </script>
- </body>
- </html>
|