Merge pull request 'jsp' (#2) from pnc6jztsp/youxi:master into master

master
ps2hc5nfx 2 years ago
commit 4f92fee6eb

@ -0,0 +1,136 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="copyright" content="All Rights Reserved, Copyright (C) 2013, 游戏周边商城, Ltd." />
<title>后台管理主页</title>
<link rel="stylesheet" type="text/css" href="../resources/admin/easyui/easyui/1.3.4/themes/default/easyui.css" />
<link rel="stylesheet" type="text/css" href="../resources/admin/easyui/css/wu.css" />
<link rel="stylesheet" type="text/css" href="../resources/admin/easyui/css/icon.css" />
<script type="text/javascript" src="../resources/admin/easyui/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="../resources/admin/easyui/easyui/1.3.4/jquery.easyui.min.js"></script>
<script type="text/javascript" src="../resources/admin/easyui/easyui/1.3.4/locale/easyui-lang-zh_CN.js"></script>
<script>
var pc;
//不要放在$(function(){});中
$.parser.onComplete = function () {
if (pc) clearTimeout(pc);
pc = setTimeout(closes, 1000);
}
function closes() {
$('#loading').fadeOut('normal', function () {
$(this).remove();
});
}
</script>
</head>
<body class="easyui-layout">
<div id="loading" style="position:absolute;z-index:1000;top:0px;left:0px;width:100%;height:100%;background:#FFFFFF;text-align :center;padding-top:6%;">
<img src="../resources/admin/easyui/images/loading.jpg" width="50%">
</div>
<!-- begin of header -->
<div class="wu-header" data-options="region:'north',border:false,split:true">
<div class="wu-header-left">
<h1>【游戏周边商城】后台管理系统</h1>
</div>
<div class="wu-header-right">
<p><strong class="easyui-tooltip" title="0条未读消息">${role.name}:${admin.username}</strong>,欢迎您!</p>
<p><a href="../home/index" target="_blank">网站首页</a>|<a href="logout">安全退出</a></p>
</div>
</div>
<!-- end of header -->
<!-- begin of sidebar -->
<div class="wu-sidebar" data-options="region:'west',split:true,border:true,title:'导航菜单'">
<div class="easyui-accordion" data-options="border:false,fit:true">
<c:forEach items="${topMenuList }" var="topMenu">
<div title="${topMenu.name }" data-options="iconCls:'${topMenu.icon }'" style="padding:5px;">
<ul class="easyui-tree wu-side-tree">
<c:forEach items="${secondMenuList }" var="secondMenu">
<c:if test="${secondMenu.parentId == topMenu.id }">
<li iconCls="${secondMenu.icon }"><a href="javascript:void(0)" data-icon="${secondMenu.icon }" data-link="${secondMenu.url }?_mid=${secondMenu.id }" iframe="1">${secondMenu.name }</a></li>
</c:if>
</c:forEach>
</ul>
</div>
</c:forEach>
</div>
</div>
<!-- end of sidebar -->
<!-- begin of main -->
<div class="wu-main" data-options="region:'center'">
<div id="wu-tabs" class="easyui-tabs" data-options="border:false,fit:true">
<div title="首页" data-options="href:'welcome',closable:false,iconCls:'icon-tip',cls:'pd3'"></div>
</div>
</div>
<!-- end of main -->
<!-- begin of footer -->
<div class="wu-footer" data-options="region:'south',border:true,split:true">
&copy;
</div>
<!-- end of footer -->
<script type="text/javascript">
$(function(){
$('.wu-side-tree a').bind("click",function(){
var title = $(this).text();
var url = $(this).attr('data-link');
var iconCls = $(this).attr('data-icon');
var iframe = $(this).attr('iframe')==1?true:false;
addTab(title,url,iconCls,iframe);
});
})
/**
* Name 添加菜单选项
* Param title 名称
* Param href 链接
* Param iconCls 图标样式
* Param iframe 链接跳转方式true为iframefalse为href
*/
function addTab(title, href, iconCls, iframe){
var tabPanel = $('#wu-tabs');
if(!tabPanel.tabs('exists',title)){
var content = '<iframe scrolling="auto" frameborder="0" src="'+ href +'" style="width:100%;height:100%;"></iframe>';
if(iframe){
tabPanel.tabs('add',{
title:title,
content:content,
iconCls:iconCls,
fit:true,
cls:'pd3',
closable:true
});
}
else{
tabPanel.tabs('add',{
title:title,
href:href,
iconCls:iconCls,
fit:true,
cls:'pd3',
closable:true
});
}
}
else
{
tabPanel.tabs('select',title);
}
}
/**
* Name 移除菜单选项
*/
function removeTab(){
var tabPanel = $('#wu-tabs');
var tab = tabPanel.tabs('getSelected');
if (tab){
var index = tabPanel.tabs('getTabIndex', tab);
tabPanel.tabs('close', index);
}
}
</script>
</body>
</html>

@ -0,0 +1,118 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<!-- saved from url=(0051)http://demo1.mycodes.net/denglu/HTML5_yonghudenglu/ -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>游戏周边商城后台管理员登录</title>
<meta name="description" content="particles.js is a lightweight JavaScript library for creating particles.">
<meta name="author" content="Vincent Garreau">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" media="screen" href="../resources/admin/login/css/style.css">
<link rel="stylesheet" type="text/css" href="../resources/admin/login/css/reset.css">
<body>
<div id="particles-js">
<div class="login" style="display: block;">
<div class="login-top">
登录
</div>
<div class="login-center clearfix">
<div class="login-center-img"><img src="../resources/admin/login/images/name.png"></div>
<div class="login-center-input">
<input type="text" name="username" id="username" value="" placeholder="请输入您的用户名" onfocus="this.placeholder=&#39;&#39;" onblur="this.placeholder=&#39;请输入您的用户名&#39;">
<div class="login-center-input-text">用户名</div>
</div>
</div>
<div class="login-center clearfix">
<div class="login-center-img"><img src="../resources/admin/login/images/password.png"></div>
<div class="login-center-input">
<input type="password" name="password" id="password" value="" placeholder="请输入您的密码" onfocus="this.placeholder=&#39;&#39;" onblur="this.placeholder=&#39;请输入您的密码&#39;">
<div class="login-center-input-text">密码</div>
</div>
</div>
<div class="login-center clearfix">
<div class="login-center-img"><img src="../resources/admin/login/images/cpacha.png"></div>
<div class="login-center-input">
<input style="width:50%;" type="text" name="cpacha" id="cpacha" value="" placeholder="请输入验证码" onfocus="this.placeholder=&#39;&#39;" onblur="this.placeholder=&#39;请输入验证码&#39;">
<div class="login-center-input-text">验证码</div>
<img id="cpacha-img" title="点击切换验证码" style="cursor:pointer;" src="get_cpacha?vl=4&w=150&h=40&type=loginCpacha" width="110px" height="30px" onclick="changeCpacha()">
</div>
</div>
<div class="login-button">
登录
</div>
</div>
<div class="sk-rotating-plane"></div>
<canvas class="particles-js-canvas-el" width="1147" height="952" style="width: 100%; height: 100%;"></canvas></div>
<!-- scripts -->
<script src="../resources/admin/login/js/particles.min.js"></script>
<script src="../resources/admin/login/js/app.js"></script>
<script src="../resources/admin/login/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript">
function hasClass(elem, cls) {
cls = cls || '';
if (cls.replace(/\s/g, '').length == 0) return false; //当cls没有参数时返回false
return new RegExp(' ' + cls + ' ').test(' ' + elem.className + ' ');
}
function addClass(ele, cls) {
if (!hasClass(ele, cls)) {
ele.className = ele.className == '' ? cls : ele.className + ' ' + cls;
}
}
function removeClass(ele, cls) {
if (hasClass(ele, cls)) {
var newClass = ' ' + ele.className.replace(/[\t\r\n]/g, '') + ' ';
while (newClass.indexOf(' ' + cls + ' ') >= 0) {
newClass = newClass.replace(' ' + cls + ' ', ' ');
}
ele.className = newClass.replace(/^\s+|\s+$/g, '');
}
}
function changeCpacha(){
$("#cpacha-img").attr("src",'get_cpacha?vl=4&w=150&h=40&type=loginCpacha&t=' + new Date().getTime());
}
document.querySelector(".login-button").onclick = function(){
var username = $("#username").val();
var password = $("#password").val();
var cpacha = $("#cpacha").val();
if(username == '' || username == 'undefined'){
alert("请填写用户名!");
return;
}
if(password == '' || password == 'undefined'){
alert("请填写密码!");
return;
}
if(cpacha == '' || cpacha == 'undefined'){
alert("请填写验证码!");
return;
}
addClass(document.querySelector(".login"), "active")
addClass(document.querySelector(".sk-rotating-plane"), "active")
document.querySelector(".login").style.display = "none"
$.ajax({
url:'login',
data:{username:username,password:password,cpacha:cpacha},
type:'post',
dataType:'json',
success:function(data){
if(data.type == 'success'){
window.parent.location = 'index';
}else{
removeClass(document.querySelector(".login"), "active");
removeClass(document.querySelector(".sk-rotating-plane"), "active");
document.querySelector(".login").style.display = "block";
alert(data.msg);
changeCpacha();
}
}
});
}
</script>
</body></html>
Loading…
Cancel
Save