262 lines
9.1 KiB
HTML
262 lines
9.1 KiB
HTML
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<script src="../assets/js/jquery-3.4.1.min.js"></script>
|
|
<script src="../assets/js/ajax.js"></script>
|
|
<title>词汇江湖-删除诗词</title>
|
|
<link rel="shortcut icon" href="bitbug_favicon.ico" />
|
|
</head>
|
|
|
|
<body onload="usermessage()">
|
|
|
|
</body>
|
|
|
|
|
|
</html>
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" maximum-scale=1 , user-scalable=0”>
|
|
<title>词汇江湖-删除分类</title>
|
|
<link rel="shortcut icon" href="bitbug_favicon.ico" />
|
|
<!-- 引入所需要的css -->
|
|
<!-- 引入页面所需要的css -->
|
|
<link rel="stylesheet" href="../assets/css/style.css">
|
|
<link rel="stylesheet" href="../assets/css/header.css">
|
|
<link rel="stylesheet" href="../assets/css/footer.css">
|
|
<link rel="stylesheet" href="../assets/css/main.css">
|
|
<link rel="stylesheet" href="../assets/css/base.css">
|
|
<!--<link rel="stylesheet" href="../assets/css/bootstrap.css">-->
|
|
<link rel="stylesheet" href="../assets/iconfont/iconfont.css">
|
|
<!-- 引入所需要的js文件 -->
|
|
<link rel="stylesheet" href="../assets/bootstrap-3.4.1-dist/css/bootstrap.min.css">
|
|
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
|
|
<script src="../assets/js/jquery-3.4.1.min.js"></script>
|
|
<script src="../assets/bootstrap-3.4.1-dist/js/bootstrap.min.js"></script>
|
|
<!-- 引入所需要的js文件 -->
|
|
|
|
<script src="../assets/js/ajax.js"></script>
|
|
<!-- 头部导航所需要的css -->
|
|
|
|
<!-- 头部导航所需要的css -->
|
|
<style>
|
|
|
|
body {
|
|
background: url(../assets/images/bg5.png);
|
|
background-size: 100% 100%;
|
|
background-repeat: no-repeat;
|
|
}
|
|
.w {
|
|
margin: 0 auto;
|
|
width: 1200px;
|
|
}
|
|
</style>
|
|
|
|
|
|
|
|
|
|
</head>
|
|
|
|
<body onload="usermessage()">
|
|
<div id="header"></div>
|
|
|
|
<button type="button" data-target=".bs-example-modal-lg">Launch modal</button>
|
|
<div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" style="margin-top:100px;">
|
|
<div class="modal-dialog modal-lg" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
|
<h4 class="modal-title" id="exampleModalLabel"></h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<form>
|
|
<h3>删除诗词</h3>
|
|
<div class="form-group">
|
|
<label for="recipient-name" class="control-label">诗词名称:</label>
|
|
<input type="text" class="form-control" id="shciname" readonly="readonly" style="cursor:no-drop">
|
|
<!--<p class="form-control" id="shciname" ></p>-->
|
|
<input type="hidden" class="form-control" id="shciId">
|
|
<input type="hidden" class="form-control" id="shicileixing" readonly="readonly" style="cursor:no-drop">
|
|
|
|
<!--<p class="form-control" id="shciId" ></p>-->
|
|
</div>
|
|
|
|
</form>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal" onclick="cancel()">取消</button>
|
|
<button type="button" class="btn btn-primary" onclick="shanchu()">删除诗词</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|
|
<script>
|
|
$(function() {
|
|
$('#header').load('./common/header.html');
|
|
|
|
})
|
|
$(document).ready(function() {
|
|
$(".bs-example-modal-lg").modal('show');
|
|
keyboard: true
|
|
});
|
|
$('.bs-example-modal-lg').on('hidden.bs.modal', function(e) {
|
|
window.onload = cancel();
|
|
})
|
|
// var id = document.location.href; //获取页面完整链接
|
|
// if (id.search('#') == -1) {
|
|
// var saveurl = 'http://127.0.0.1:82/consumer/add/dynasty/'+type+'/'
|
|
|
|
// window.onload = function() {
|
|
// fenleishi();
|
|
// var saveurl = 'http://127.0.0.1:82/consumer/add/dynasty/'+type+'/'
|
|
// }
|
|
// } else {
|
|
// var saveurl = 'http://127.0.0.1:82/consumer/add/poem/'+type+'/'
|
|
// window.onload = function() {
|
|
// fenleici()
|
|
// var saveurl = 'http://127.0.0.1:82/consumer/add/poem/'+type+'/'
|
|
// }
|
|
// }
|
|
var id = document.location.href; //获取页面完整链接
|
|
if (id.search('#') == -1) {
|
|
//删除诗
|
|
window.onload = function() {
|
|
fenleishi();
|
|
}
|
|
} else {
|
|
window.onload = function() {
|
|
fenleici();
|
|
}
|
|
}
|
|
|
|
// function shanchushi() {
|
|
// var id = document.location.href; //获取页面完整链接
|
|
// var ID = id.split("?"); //截取?后的参数
|
|
// console.log(ID[1]); //打印验证数字是否正确
|
|
// var userId = sessionStorage.getItem('userId');
|
|
// var userToken = sessionStorage.getItem("yq_token");
|
|
// console.log(userId);
|
|
// $.ajax({
|
|
// undefined,
|
|
// headers: {
|
|
// undefined,
|
|
// "token": userToken //此处放置请求到的用户token
|
|
// },
|
|
// url: 'http://127.0.0.1:82/consumer/delete/dynastyId/' + ID[1] + '/',
|
|
// // 请求方式
|
|
// type: 'GET',
|
|
// //成功回调
|
|
// success: function(data) {
|
|
// if (data.code == 200) {
|
|
// alert("删除成功");
|
|
// window.location.href = "./guanli.html";
|
|
// } else {
|
|
// alert("删除失败,请稍后再试");
|
|
// window.location.href = "./guanli.html";
|
|
// }
|
|
|
|
|
|
|
|
|
|
// },
|
|
// error: function(data) {
|
|
// alert: ("网络错误,请稍后再试");
|
|
|
|
// }
|
|
// });
|
|
// };
|
|
|
|
// function shanchuci() {
|
|
// var id = document.location.href; //获取页面完整链接
|
|
// var ID = id.split("#"); //截取?后的参数
|
|
// console.log(ID[1]); //打印验证数字是否正确
|
|
// var userId = sessionStorage.getItem('userId');
|
|
// var userToken = sessionStorage.getItem("yq_token");
|
|
// console.log(userId);
|
|
// $.ajax({
|
|
// undefined,
|
|
// headers: {
|
|
// undefined,
|
|
// "token": userToken //此处放置请求到的用户token
|
|
// },
|
|
// url: 'http://127.0.0.1:82/consumer/delete/poemId/' + ID[1] + '/',
|
|
// // 请求方式
|
|
// type: 'GET',
|
|
// //成功回调
|
|
// success: function(data) {
|
|
// if (data.code == 200) {
|
|
// alert("删除成功");
|
|
// window.location.href = "./guanli.html"
|
|
|
|
// } else {
|
|
// alert("删除失败,请稍后再试");
|
|
// window.location.href = "./guanli.html"
|
|
|
|
// }
|
|
// },
|
|
// error: function(data) {
|
|
// alert("网络错误,请稍后再试");
|
|
|
|
// }
|
|
// });
|
|
// };
|
|
|
|
function shanchu() {
|
|
var id = document.location.href; //获取页面完整链接
|
|
var userId = window.sessionStorage.getItem('userId');
|
|
var userToken = window.sessionStorage.getItem("yq_token");
|
|
|
|
if (id.search('#') == -1) {
|
|
var dynastyId = document.getElementById("shciId").value;
|
|
var shanchuurl = 'http://127.0.0.1:82/consumer/delete/dynastyId/' + dynastyId + '/'
|
|
|
|
|
|
|
|
} else {
|
|
var poemId = document.getElementById("shciId").value;
|
|
var shanchuurl = 'http://127.0.0.1:82/consumer/delete/poemId/' + poemId + '/'
|
|
}
|
|
$.ajax({
|
|
undefined,
|
|
headers: {
|
|
undefined,
|
|
"token": userToken //此处放置请求到的用户token
|
|
},
|
|
url: shanchuurl,
|
|
dataType: "json",
|
|
type: "get",
|
|
success: function(data) {
|
|
if (data.code = 200) {
|
|
alert("删除成功");
|
|
window.location.href = "../user/guanli.html"
|
|
} else {
|
|
alert("删除失败");
|
|
window.location.href = "../user/guanli.html"
|
|
}
|
|
},
|
|
error: function(data) {
|
|
alert("网络错误,请稍后重试");
|
|
window.location.href = "../user/guanli.html"
|
|
}
|
|
});
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
</html> |