1 Star 0 Fork 0

魏先生new/movieweb

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
admmain.html 6.52 KB
一键复制 编辑 原始数据 按行查看 历史
weiliming125 提交于 2021-10-14 19:41 . 点播系统前端
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap-theme.min.css" integrity="sha384-6pzBo3FDv/PJ8r2KRkGHifhEocL+1X2rVCTTkUfGk7/0pbek5mMa1upzvWbrUbOZ" crossorigin="anonymous">
<script src="static/js/jquery-3.4.1.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script>
<meta charset="utf-8">
<title></title>
<style>
*{margin: 0;padding: 0;}
.mid{
margin: 0 auto;
}
.main1{
border-radius: 3px;
margin-top: 20px;
width: 96%;
height: 100%;
-moz-box-shadow: 5px 5px 5px #888888; /* 老的 Firefox */
box-shadow: 5px 5px 5px #888888;
background-color: #e2e2e2;
}
.main2{
width: 100%;
height: 80px;
line-height: 80px;
}
.main3{
width: 100%;
}
.main4{
width: 100%;
height: 50px;
line-height: 50px;
}
.left{
float: left;
width: 100px;
height: 49px;
border: 1px solid #d0d0d0;
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
margin-left: 10px;
text-align: center;
line-height: 50px;
}
.right{
float: left;
width: 100px;
height: 49px;
border: 1px solid #d0d0d0;
border-left: none;
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
text-align: center;
line-height: 50px;
}
.mainp1{
font-size: 40px;
margin: 10px 10px;
}
.mainp2{
font-size: 30px;
margin: 10px 10px;
color: #545454;
}
.all{
width: 100%;
height: 100%;
margin-top: 30px;
}
.mr{
float: right;
}
tr{
height: 40px;
}
td th{
font-size: 20px;
}
.left:hover{
background-color: #d0d0d0;
}
.right:hover{
background-color: #d0d0d0;
cursor: pointer;
}
a{
cursor: pointer;
}
</style>
</head>
<body>
<div class="main1 mid" id="admmain">
<div class="main2">
<span class="mainp1">电影上架</span><span class="mainp2">全部电影</span>
</div>
<div class="main3">
<div class="main4">
<a href="page1.html" style="color: #000000;"><div class="left">上传</div></a>
<div class="right">刷新</div>
<input type="search" style="height: 30px;width: 250px;float: right;border: none;outline: none;margin-right: 30px;border-top-right-radius: 3px;border-bottom-right-radius: 3px;" placeholder="搜索电影名" v-model="Name">
<button style="background-color: #3B9970;border: none;outline:none;width: 60px;color: white;float: right;height: 30px;line-height: 30px;border-top-left-radius: 3px;border-bottom-left-radius: 3px;" @click="sherh()">搜索</button>
</div>
<table class="table table-hover all">
<tr>
<th style="width: 10%;text-align: center;line-height: 40px;">ID</th>
<th style="width: 20%;text-align: center;line-height: 40px;">电影名字</th>
<th style="width: 20%;text-align: center;line-height: 40px;">电影地区</th>
<th style="width: 20%;text-align: center;line-height: 40px;">电影状态</th>
<th style="width: 20%;text-align: center;line-height: 40px;">电影属性</th>
<th style="width: 10%;text-align: center;line-height: 40px;">下架/上架</th>
</tr>
<template v-for="movie,index in movies">
<tr>
<td style="width: 10%;text-align: center;line-height: 40px;">{{index+1}}</td>
<td style="width: 20%;text-align: center;line-height: 40px;">{{movie.movieName}}</td>
<td style="width: 20%;text-align: center;line-height: 40px;">{{movie.addr}}</td>
<td style="width: 20%;text-align: center;line-height: 40px;" v-if="movie.strust==1">已上架</td>
<td style="width: 20%;text-align: center;line-height: 40px;" v-else>已下架</td>
<td style="width: 20%;text-align: center;line-height: 40px;"><span v-for="type,dex in movie.movieTypes" >&nbsp;&nbsp;{{type.typeName}}</span>
<td style="width: 20%;text-align: center;line-height: 40px;" v-if="movie.strust==1"><button style="background-color: firebrick;border: none;outline:none;width: 60px;color: white;" @click="submit(movie.movieId,movie.strust)" >下架</button></td>
<td style="width: 20%;text-align: center;line-height: 40px;" v-else ><button style="background-color: #3B9970;border: none;outline:none;width: 60px;color: white;" @click="submit(movie.movieId,movie.strust)" >上架</button></td>
</tr>
</template>
</table>
</div>
</div>
<div style="width: 100%;height: 100px;"></div>
</body>
<script type="text/javascript" src="static/js/vue.js"></script>
<script type="text/javascript" src="static/js/axios.min.js"></script>
<script type="text/javascript" src="static/js/base.js"></script>
<script type="text/javascript" src="static/js/cookie_utils.js"></script>
<script>
var burl=Baseurl+"/movieupdate/all";
var hurl=Baseurl+"/movieupdate/byname";
var hurl1=Baseurl+"/movieLaod/update";
var token=getCookieValue("token");
var vm=new Vue({
el:"#admmain",
data:{
movies:[],
Name:""
},
created() {
axios({
method:"get",
url:burl,
headers:{
//设置请求头
token:token
}
}).then((res)=>{
var vo=res.data;
if(vo.code==10001){
vm.movies={};
vm.movies=vo.data;
console.log(vo.data);
}else{
if(vo.code==20002){
setTimeout(function(){
window.location.href="adminload.html";
},50)
}else{
alert("暂时还没有电影!");
}
}
});
},
methods:{
sherh:function(){
axios({
method:"get",
url:hurl+"/"+vm.Name,
headers:{
//设置请求头
token:token
}
}).then((res)=>{
var vo=res.data;
if(vo.code==10001){
vm.movies=[];
vm.movies=vo.data;
}else{
alert("没有该电影!");
}
});
},
submit:function(movieId,starut){
axios({
method:"put",
url:hurl1,
params:{
//设置请求⾏传值
movieId:movieId,
starut:starut
},
headers:{
//设置请求头
token:token
}
}).then((res)=>{
var vo=res.data;
if(vo.code==10001){
alert(vo.msg);
setTimeout(function(){
window.location.href="admmain.html";
},50)
}else{
alert(vo.msg);
}
});
}
}
})
</script>
</html>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mr-wei-new/movieweb.git
git@gitee.com:mr-wei-new/movieweb.git
mr-wei-new
movieweb
movieweb
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385