完成项目环境的搭建以及用户的登陆

lihaobo
luoyijiucheng 6 years ago
commit 762dcd838f

31
.gitignore vendored

@ -0,0 +1,31 @@
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**
!**/src/test/**
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
### VS Code ###
.vscode/

@ -0,0 +1,117 @@
/*
* Copyright 2012-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;
public class MavenWrapperDownloader {
private static final String WRAPPER_VERSION = "0.5.5";
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";
/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";
/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if(mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if(mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}
}

Binary file not shown.

@ -0,0 +1,2 @@
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar

310
mvnw vendored

@ -0,0 +1,310 @@
#!/bin/sh
# ----------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# Maven2 Start Up Batch script
#
# Required ENV vars:
# ------------------
# JAVA_HOME - location of a JDK home dir
#
# Optional ENV vars
# -----------------
# M2_HOME - location of maven2's installed home dir
# MAVEN_OPTS - parameters passed to the Java VM when running Maven
# e.g. to debug Maven itself, use
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
# ----------------------------------------------------------------------------
if [ -z "$MAVEN_SKIP_RC" ] ; then
if [ -f /etc/mavenrc ] ; then
. /etc/mavenrc
fi
if [ -f "$HOME/.mavenrc" ] ; then
. "$HOME/.mavenrc"
fi
fi
# OS specific support. $var _must_ be set to either true or false.
cygwin=false;
darwin=false;
mingw=false
case "`uname`" in
CYGWIN*) cygwin=true ;;
MINGW*) mingw=true;;
Darwin*) darwin=true
# Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
# See https://developer.apple.com/library/mac/qa/qa1170/_index.html
if [ -z "$JAVA_HOME" ]; then
if [ -x "/usr/libexec/java_home" ]; then
export JAVA_HOME="`/usr/libexec/java_home`"
else
export JAVA_HOME="/Library/Java/Home"
fi
fi
;;
esac
if [ -z "$JAVA_HOME" ] ; then
if [ -r /etc/gentoo-release ] ; then
JAVA_HOME=`java-config --jre-home`
fi
fi
if [ -z "$M2_HOME" ] ; then
## resolve links - $0 may be a link to maven's home
PRG="$0"
# need this for relative symlinks
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG="`dirname "$PRG"`/$link"
fi
done
saveddir=`pwd`
M2_HOME=`dirname "$PRG"`/..
# make it fully qualified
M2_HOME=`cd "$M2_HOME" && pwd`
cd "$saveddir"
# echo Using m2 at $M2_HOME
fi
# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin ; then
[ -n "$M2_HOME" ] &&
M2_HOME=`cygpath --unix "$M2_HOME"`
[ -n "$JAVA_HOME" ] &&
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
[ -n "$CLASSPATH" ] &&
CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
fi
# For Mingw, ensure paths are in UNIX format before anything is touched
if $mingw ; then
[ -n "$M2_HOME" ] &&
M2_HOME="`(cd "$M2_HOME"; pwd)`"
[ -n "$JAVA_HOME" ] &&
JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
fi
if [ -z "$JAVA_HOME" ]; then
javaExecutable="`which javac`"
if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
# readlink(1) is not available as standard on Solaris 10.
readLink=`which readlink`
if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
if $darwin ; then
javaHome="`dirname \"$javaExecutable\"`"
javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
else
javaExecutable="`readlink -f \"$javaExecutable\"`"
fi
javaHome="`dirname \"$javaExecutable\"`"
javaHome=`expr "$javaHome" : '\(.*\)/bin'`
JAVA_HOME="$javaHome"
export JAVA_HOME
fi
fi
fi
if [ -z "$JAVACMD" ] ; then
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
else
JAVACMD="`which java`"
fi
fi
if [ ! -x "$JAVACMD" ] ; then
echo "Error: JAVA_HOME is not defined correctly." >&2
echo " We cannot execute $JAVACMD" >&2
exit 1
fi
if [ -z "$JAVA_HOME" ] ; then
echo "Warning: JAVA_HOME environment variable is not set."
fi
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
# traverses directory structure from process work directory to filesystem root
# first directory with .mvn subdirectory is considered project base directory
find_maven_basedir() {
if [ -z "$1" ]
then
echo "Path not specified to find_maven_basedir"
return 1
fi
basedir="$1"
wdir="$1"
while [ "$wdir" != '/' ] ; do
if [ -d "$wdir"/.mvn ] ; then
basedir=$wdir
break
fi
# workaround for JBEAP-8937 (on Solaris 10/Sparc)
if [ -d "${wdir}" ]; then
wdir=`cd "$wdir/.."; pwd`
fi
# end of workaround
done
echo "${basedir}"
}
# concatenates all lines of a file
concat_lines() {
if [ -f "$1" ]; then
echo "$(tr -s '\n' ' ' < "$1")"
fi
}
BASE_DIR=`find_maven_basedir "$(pwd)"`
if [ -z "$BASE_DIR" ]; then
exit 1;
fi
##########################################################################################
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
# This allows using the maven wrapper in projects that prohibit checking in binary data.
##########################################################################################
if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
if [ "$MVNW_VERBOSE" = true ]; then
echo "Found .mvn/wrapper/maven-wrapper.jar"
fi
else
if [ "$MVNW_VERBOSE" = true ]; then
echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
fi
if [ -n "$MVNW_REPOURL" ]; then
jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar"
else
jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar"
fi
while IFS="=" read key value; do
case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
esac
done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
if [ "$MVNW_VERBOSE" = true ]; then
echo "Downloading from: $jarUrl"
fi
wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
if $cygwin; then
wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
fi
if command -v wget > /dev/null; then
if [ "$MVNW_VERBOSE" = true ]; then
echo "Found wget ... using wget"
fi
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
wget "$jarUrl" -O "$wrapperJarPath"
else
wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath"
fi
elif command -v curl > /dev/null; then
if [ "$MVNW_VERBOSE" = true ]; then
echo "Found curl ... using curl"
fi
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
curl -o "$wrapperJarPath" "$jarUrl" -f
else
curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
fi
else
if [ "$MVNW_VERBOSE" = true ]; then
echo "Falling back to using Java to download"
fi
javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
# For Cygwin, switch paths to Windows format before running javac
if $cygwin; then
javaClass=`cygpath --path --windows "$javaClass"`
fi
if [ -e "$javaClass" ]; then
if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
if [ "$MVNW_VERBOSE" = true ]; then
echo " - Compiling MavenWrapperDownloader.java ..."
fi
# Compiling the Java class
("$JAVA_HOME/bin/javac" "$javaClass")
fi
if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
# Running the downloader
if [ "$MVNW_VERBOSE" = true ]; then
echo " - Running MavenWrapperDownloader.java ..."
fi
("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
fi
fi
fi
fi
##########################################################################################
# End of extension
##########################################################################################
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
if [ "$MVNW_VERBOSE" = true ]; then
echo $MAVEN_PROJECTBASEDIR
fi
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
[ -n "$M2_HOME" ] &&
M2_HOME=`cygpath --path --windows "$M2_HOME"`
[ -n "$JAVA_HOME" ] &&
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
[ -n "$CLASSPATH" ] &&
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
[ -n "$MAVEN_PROJECTBASEDIR" ] &&
MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
fi
# Provide a "standardized" way to retrieve the CLI args that will
# work with both Windows and non-Windows executions.
MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
export MAVEN_CMD_LINE_ARGS
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
exec "$JAVACMD" \
$MAVEN_OPTS \
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"

182
mvnw.cmd vendored

@ -0,0 +1,182 @@
@REM ----------------------------------------------------------------------------
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements. See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership. The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with the License. You may obtain a copy of the License at
@REM
@REM https://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied. See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM ----------------------------------------------------------------------------
@REM ----------------------------------------------------------------------------
@REM Maven2 Start Up Batch script
@REM
@REM Required ENV vars:
@REM JAVA_HOME - location of a JDK home dir
@REM
@REM Optional ENV vars
@REM M2_HOME - location of maven2's installed home dir
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
@REM e.g. to debug Maven itself, use
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
@REM ----------------------------------------------------------------------------
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
@echo off
@REM set title of command window
title %0
@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
@REM set %HOME% to equivalent of $HOME
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
@REM Execute a user defined script before this one
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
:skipRcPre
@setlocal
set ERROR_CODE=0
@REM To isolate internal variables from possible post scripts, we use another setlocal
@setlocal
@REM ==== START VALIDATION ====
if not "%JAVA_HOME%" == "" goto OkJHome
echo.
echo Error: JAVA_HOME not found in your environment. >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error
:OkJHome
if exist "%JAVA_HOME%\bin\java.exe" goto init
echo.
echo Error: JAVA_HOME is set to an invalid directory. >&2
echo JAVA_HOME = "%JAVA_HOME%" >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error
@REM ==== END VALIDATION ====
:init
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
@REM Fallback to current working directory if not found.
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
set EXEC_DIR=%CD%
set WDIR=%EXEC_DIR%
:findBaseDir
IF EXIST "%WDIR%"\.mvn goto baseDirFound
cd ..
IF "%WDIR%"=="%CD%" goto baseDirNotFound
set WDIR=%CD%
goto findBaseDir
:baseDirFound
set MAVEN_PROJECTBASEDIR=%WDIR%
cd "%EXEC_DIR%"
goto endDetectBaseDir
:baseDirNotFound
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
cd "%EXEC_DIR%"
:endDetectBaseDir
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
@setlocal EnableExtensions EnableDelayedExpansion
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
:endReadAdditionalConfig
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar"
FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
)
@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
if exist %WRAPPER_JAR% (
if "%MVNW_VERBOSE%" == "true" (
echo Found %WRAPPER_JAR%
)
) else (
if not "%MVNW_REPOURL%" == "" (
SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar"
)
if "%MVNW_VERBOSE%" == "true" (
echo Couldn't find %WRAPPER_JAR%, downloading it ...
echo Downloading from: %DOWNLOAD_URL%
)
powershell -Command "&{"^
"$webclient = new-object System.Net.WebClient;"^
"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
"}"^
"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
"}"
if "%MVNW_VERBOSE%" == "true" (
echo Finished downloading %WRAPPER_JAR%
)
)
@REM End of extension
@REM Provide a "standardized" way to retrieve the CLI args that will
@REM work with both Windows and non-Windows executions.
set MAVEN_CMD_LINE_ARGS=%*
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
if ERRORLEVEL 1 goto error
goto end
:error
set ERROR_CODE=1
:end
@endlocal & set ERROR_CODE=%ERROR_CODE%
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
@REM check for post script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
:skipRcPost
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
if "%MAVEN_BATCH_PAUSE%" == "on" pause
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
exit /B %ERROR_CODE%

@ -0,0 +1,159 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.1.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.yeqifu</groupId>
<artifactId>warehouse</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>warehouse</name>
<description>仓库管理系统</description>
<properties>
<java.version>1.8</java.version>
<mybatisplus.version>3.2.0</mybatisplus.version>
<druid.version>1.1.20</druid.version>
<shiro.version>1.4.0</shiro.version>
<log4j.version>1.2.17</log4j.version>
<hutool.version>4.6.8</hutool.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<!--<dependency>-->
<!--<groupId>mysql</groupId>-->
<!--<artifactId>mysql-connector-java</artifactId>-->
<!--<scope>runtime</scope>-->
<!--</dependency>-->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.26</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
<!--mybatisplus-->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>${mybatisplus.version}</version>
</dependency>
<!--mybatisplus代码生成器-->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-generator</artifactId>
<version>3.2.0</version>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-engine-core</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.29</version>
</dependency>
<dependency>
<groupId>com.ibeetl</groupId>
<artifactId>beetl</artifactId>
<version>3.0.13.RELEASE</version>
</dependency>
<!--druid-->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>${druid.version}</version>
</dependency>
<!--shiro-->
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-spring</artifactId>
<version>${shiro.version}</version>
</dependency>
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-core</artifactId>
<version>${shiro.version}</version>
</dependency>
<!--shiro和thymeleaf集成的扩展依赖为了能在页面上使用xsln:shiro的标签-->
<dependency>
<groupId>com.github.theborakompanioni</groupId>
<artifactId>thymeleaf-extras-shiro</artifactId>
<version>2.0.0</version>
</dependency>
<!--log4j-->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
</dependency>
<!--hutool-->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>${hutool.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

@ -0,0 +1,15 @@
package com.yeqifu;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
@MapperScan(basePackages = {"com.yeqifu.sys.mapper"})
public class WarehouseApplication {
public static void main(String[] args) {
SpringApplication.run(WarehouseApplication.class, args);
}
}

@ -0,0 +1,25 @@
package com.yeqifu.sys.common;
import com.yeqifu.sys.entity.User;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* @Author: -
* @Date: 2019/11/21 20:41
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ActiverUser {
private User user;
private List<String> roles;
private List<String> permission;
}

@ -0,0 +1,15 @@
package com.yeqifu.sys.common;
/**
* @Author: -
* @Date: 2019/11/21 21:39
*/
public class Constast {
/**
*
*/
public static final Integer OK=200;
public static final Integer ERROR=-1;
}

@ -0,0 +1,23 @@
package com.yeqifu.sys.common;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @Author: -
* @Date: 2019/11/21 21:35
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ResultObj {
public static final ResultObj LOGIN_SUCCESS=new ResultObj(Constast.OK,"登陆成功");
public static final ResultObj LOGIN_ERROR_PASS=new ResultObj(Constast.ERROR,"用户名或密码错误");
public static final ResultObj LOGIN_ERROR_CODE=new ResultObj(Constast.ERROR,"验证码错误");
private Integer code;
private String msg;
}

@ -0,0 +1,33 @@
package com.yeqifu.sys.common;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
/**
* @Author: -
* @Date: 2019/11/21 21:43
*/
public class WebUtils {
/**
* request
* @return
*/
public static HttpServletRequest getRequest(){
ServletRequestAttributes requestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
HttpServletRequest request = requestAttributes.getRequest();
return request;
}
/**
* session
* @return
*/
public static HttpSession getSession(){
return getRequest().getSession();
}
}

@ -0,0 +1,164 @@
package com.yeqifu.sys.config;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.Filter;
import org.apache.shiro.authc.credential.CredentialsMatcher;
import org.apache.shiro.authc.credential.HashedCredentialsMatcher;
import org.apache.shiro.mgt.SecurityManager;
import org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor;
import org.apache.shiro.spring.web.ShiroFilterFactoryBean;
import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
import org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.filter.DelegatingFilterProxy;
import com.yeqifu.sys.realm.UserRealm;
import at.pollux.thymeleaf.shiro.dialect.ShiroDialect;
import lombok.Data;
/**
* @Author: -
* @Date: 2019/11/21 21:01
*/
@Configuration
@ConditionalOnWebApplication(type = Type.SERVLET)
@ConditionalOnClass(value = { SecurityManager.class })
@ConfigurationProperties(prefix = "shiro")
@Data
public class ShiroAutoConfiguration {
private static final String SHIRO_DIALECT = "shiroDialect";
private static final String SHIRO_FILTER = "shiroFilter";
// 加密方式
private String hashAlgorithmName = "md5";
// 散列次数
private int hashIterations = 2;
// 默认的登陆页面
private String loginUrl = "/index.html";
private String[] anonUrls;
private String logOutUrl;
private String[] authcUlrs;
/**
*
*/
@Bean("credentialsMatcher")
public HashedCredentialsMatcher hashedCredentialsMatcher() {
HashedCredentialsMatcher credentialsMatcher = new HashedCredentialsMatcher();
credentialsMatcher.setHashAlgorithmName(hashAlgorithmName);
credentialsMatcher.setHashIterations(hashIterations);
return credentialsMatcher;
}
/**
* userRealm
*/
@Bean("userRealm")
public UserRealm userRealm(CredentialsMatcher credentialsMatcher) {
UserRealm userRealm = new UserRealm();
// 注入凭证匹配器
userRealm.setCredentialsMatcher(credentialsMatcher);
return userRealm;
}
/**
* SecurityManager
*/
@Bean("securityManager")
public SecurityManager securityManager(UserRealm userRealm) {
DefaultWebSecurityManager securityManager = new DefaultWebSecurityManager();
// 注入userRealm
securityManager.setRealm(userRealm);
return securityManager;
}
/**
* shiro
*/
@Bean(SHIRO_FILTER)
public ShiroFilterFactoryBean shiroFilterFactoryBean(SecurityManager securityManager) {
ShiroFilterFactoryBean factoryBean = new ShiroFilterFactoryBean();
// 设置安全管理器
factoryBean.setSecurityManager(securityManager);
// 设置未登陆的时要跳转的页面
factoryBean.setLoginUrl(loginUrl);
Map<String, String> filterChainDefinitionMap = new HashMap<>();
// 设置放行的路径
if (anonUrls != null && anonUrls.length > 0) {
for (String anon : anonUrls) {
filterChainDefinitionMap.put(anon, "anon");
}
}
// 设置登出的路径
if (null != logOutUrl) {
filterChainDefinitionMap.put(logOutUrl, "logout");
}
// 设置拦截的路径
if (authcUlrs != null && authcUlrs.length > 0) {
for (String authc : authcUlrs) {
filterChainDefinitionMap.put(authc, "authc");
}
}
Map<String, Filter> filters=new HashMap<>();
// filters.put("authc", new ShiroLoginFilter());
//配置过滤器
factoryBean.setFilters(filters);
factoryBean.setFilterChainDefinitionMap(filterChainDefinitionMap);
return factoryBean;
}
/**
* shiroweb.xml
*
* @return
*/
@Bean
public FilterRegistrationBean<DelegatingFilterProxy> delegatingFilterProxy() {
FilterRegistrationBean<DelegatingFilterProxy> filterRegistrationBean = new FilterRegistrationBean<DelegatingFilterProxy>();
DelegatingFilterProxy proxy = new DelegatingFilterProxy();
proxy.setTargetFilterLifecycle(true);
proxy.setTargetBeanName(SHIRO_FILTER);
filterRegistrationBean.setFilter(proxy);
return filterRegistrationBean;
}
/* 加入注解的使用,不加入这个注解不生效--开始 */
/**
*
* @param securityManager
* @return
*/
@Bean
public AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor(SecurityManager securityManager) {
AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor = new AuthorizationAttributeSourceAdvisor();
authorizationAttributeSourceAdvisor.setSecurityManager(securityManager);
return authorizationAttributeSourceAdvisor;
}
@Bean
public DefaultAdvisorAutoProxyCreator getDefaultAdvisorAutoProxyCreator() {
DefaultAdvisorAutoProxyCreator advisorAutoProxyCreator = new DefaultAdvisorAutoProxyCreator();
advisorAutoProxyCreator.setProxyTargetClass(true);
return advisorAutoProxyCreator;
}
/* 加入注解的使用,不加入这个注解不生效--结束 */
/**
* htmlshiro
*
* @return
*/
@Bean(name = SHIRO_DIALECT)
public ShiroDialect shiroDialect() {
return new ShiroDialect();
}
}

@ -0,0 +1,41 @@
package com.yeqifu.sys.controller;
import com.yeqifu.sys.common.ActiverUser;
import com.yeqifu.sys.common.ResultObj;
import com.yeqifu.sys.common.WebUtils;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.AuthenticationException;
import org.apache.shiro.authc.AuthenticationToken;
import org.apache.shiro.authc.UsernamePasswordToken;
import org.apache.shiro.subject.Subject;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
*
* @Author: -
* @Date: 2019/11/21 21:33
*/
@RestController
@RequestMapping("login")
public class LoginController {
@RequestMapping("login")
public ResultObj login(String loginname, String pwd){
Subject subject = SecurityUtils.getSubject();
AuthenticationToken token = new UsernamePasswordToken(loginname,pwd);
try {
subject.login(token);
ActiverUser activerUser = (ActiverUser) subject.getPrincipal();
WebUtils.getSession().setAttribute("user",activerUser.getUser());
return ResultObj.LOGIN_SUCCESS;
} catch (AuthenticationException e) {
e.printStackTrace();
return ResultObj.LOGIN_ERROR_PASS;
}
}
}

@ -0,0 +1,33 @@
package com.yeqifu.sys.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
/**
*
* @Author: -
* @Date: 2019/11/21 21:19
*/
@Controller
@RequestMapping("sys")
public class SystemController {
/**
*
* @return
*/
@RequestMapping("toLogin")
public String toLogin(){
return "system/index/login";
}
/**
*
* @return
*/
@RequestMapping("index")
public String index(){
return "system/index/index";
}
}

@ -0,0 +1,21 @@
package com.yeqifu.sys.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* InnoDB free: 9216 kB; (`deptid`) REFER `warehouse/sys_dept`(`id`) ON UPDATE CASC
* </p>
*
* @author luoyi-
* @since 2019-11-21
*/
@RestController
@RequestMapping("/sys/user")
public class UserController {
}

@ -0,0 +1,80 @@
package com.yeqifu.sys.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
* InnoDB free: 9216 kB; (`deptid`) REFER `warehouse/sys_dept`(`id`) ON UPDATE CASC
* </p>
*
* @author luoyi-
* @since 2019-11-21
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_user")
public class User implements Serializable {
private static final long serialVersionUID=1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private String name;
private String loginname;
private String pwd;
private String address;
private Integer sex;
private String remark;
private Integer deptid;
private Date hiredate;
/**
* id
*/
private Integer mgr;
/**
* 01
*/
private Integer available;
/**
*
*/
private Integer ordernum;
/**
* [012]
*/
private Integer type;
/**
*
*/
private String imgpath;
/**
*
*/
private String salt;
}

@ -0,0 +1,16 @@
package com.yeqifu.sys.mapper;
import com.yeqifu.sys.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* InnoDB free: 9216 kB; (`deptid`) REFER `warehouse/sys_dept`(`id`) ON UPDATE CASC Mapper
* </p>
*
* @author luoyi-
* @since 2019-11-21
*/
public interface UserMapper extends BaseMapper<User> {
}

@ -0,0 +1,62 @@
package com.yeqifu.sys.realm;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeqifu.sys.common.ActiverUser;
import com.yeqifu.sys.entity.User;
import com.yeqifu.sys.service.IUserService;
import org.apache.shiro.authc.AuthenticationException;
import org.apache.shiro.authc.AuthenticationInfo;
import org.apache.shiro.authc.AuthenticationToken;
import org.apache.shiro.authc.SimpleAuthenticationInfo;
import org.apache.shiro.authz.AuthorizationInfo;
import org.apache.shiro.realm.AuthorizingRealm;
import org.apache.shiro.subject.PrincipalCollection;
import org.apache.shiro.util.ByteSource;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @Author: -
* @Date: 2019/11/21 20:44
*/
public class UserRealm extends AuthorizingRealm {
@Autowired
private IUserService userService;
@Override
public String getName(){
return this.getClass().getSimpleName();
}
/**
*
* @param principalCollection
* @return
*/
@Override
protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principalCollection) {
return null;
}
/**
*
* @param authenticationToken
* @return
* @throws AuthenticationException
*/
@Override
protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken authenticationToken) throws AuthenticationException {
QueryWrapper<User> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("loginname",authenticationToken.getPrincipal().toString());
User user = userService.getOne(queryWrapper);
if (null!=user){
ActiverUser activerUser = new ActiverUser();
activerUser.setUser(user);
ByteSource credentialsSalt=ByteSource.Util.bytes(user.getSalt());
SimpleAuthenticationInfo info = new SimpleAuthenticationInfo(activerUser,user.getPwd(),credentialsSalt,this.getName());
return info;
}
return null;
}
}

@ -0,0 +1,16 @@
package com.yeqifu.sys.service;
import com.yeqifu.sys.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* InnoDB free: 9216 kB; (`deptid`) REFER `warehouse/sys_dept`(`id`) ON UPDATE CASC
* </p>
*
* @author luoyi-
* @since 2019-11-21
*/
public interface IUserService extends IService<User> {
}

@ -0,0 +1,20 @@
package com.yeqifu.sys.service.impl;
import com.yeqifu.sys.entity.User;
import com.yeqifu.sys.mapper.UserMapper;
import com.yeqifu.sys.service.IUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* InnoDB free: 9216 kB; (`deptid`) REFER `warehouse/sys_dept`(`id`) ON UPDATE CASC
* </p>
*
* @author luoyi-
* @since 2019-11-21
*/
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IUserService {
}

@ -0,0 +1,56 @@
#配置数据源
spring:
datasource:
druid:
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/warehouse?useUnicode=true&characterEncoding=utf8
username: root
password: 123456
max-active: 20
max-wait: 5000
initial-size: 1
filters: stat,log4j,wall
validation-query: SELECT 'X' #验证连接
enable: true
#监控配置
stat-view-servlet:
enabled: true
login-username: root
login-password: 123456
url-pattern: /druid/*
#thymeleaf的配置
thymeleaf:
cache: false
enabled: true
jackson:
date-format: yyyy-MM-dd HH:mm:ss
#配置mybatisplus
mybatis-plus:
mapper-locations:
-classpath: mapper/*/*Mapper.xml
global-config:
db-config:
id-type: auto
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
#shiro的配置
shiro:
hash-algorithm-name: md5
hash-iterations: 2
anon-urls:
- /index.html*
- /sys/toLogin*
- /login/login*
- /resources/**
login-url: /index.html
log-out-url: /login/logout*
authc-ulrs:
- /**
server:
port: 8088

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeqifu.sys.mapper.UserMapper">
</mapper>

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<script type="text/javascript">
window.location.href="/sys/toLogin";
</script>
</body>
</html>

@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2018 Admin
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

@ -0,0 +1,158 @@
/*公共样式*/
.header .layui-nav-child{ z-index:99999; top:60px; left: auto; right: 0;}
.seraph{ font-size:16px !important;}
.main_body{ min-width:320px; }
.layui-nav .layui-nav-item a{ cursor:pointer;}
.layui-nav .layui-nav-item>a{ color:rgba(255,255,255,1); max-height:60px;}
.layui-layer-tab .layui-layer-title span{ padding:0 !important;}
iframe{ position:absolute; height:100%; width:100%; border:none;}
.top_menu.layui-nav .layui-nav-child dd.layui-this a,.closeBox.layui-nav .layui-nav-child dd.layui-this a,.closeBox .layui-nav-child dd.layui-this,.top_menu .layui-nav-child dd.layui-this{ background:none; color:#333;}
.layui-nav .layui-nav-child a:hover,.layui-nav .layui-nav-child dd.layui-this a:hover{background-color:#5FB878;color:#fff;}
/*模拟加载层图标样式*/
.layui-layer-dialog .layui-layer-content .layui-layer-ico16{ background-size:100% 100% !important; }
/*样式改变的过渡*/
.layui-body,.layui-footer,.layui-layout-admin .layui-side,.logo,.topLevelMenus li.layui-nav-item,.topLevelMenus li.layui-nav-item:hover{ transition: all 0.3s ease-in-out;-webkit-transition: all 0.3s ease-in-out;-o-transition: all 0.3s ease-in-out;-moz-transition: all 0.3s ease-in-out;-ms-transition: all 0.3s ease-in-out; }
/*隐藏*/
*[mobile],.component .layui-select-title i.layui-edge{ display:none;}
/*打开页面动画*/
.layui-tab-item.layui-show{ animation:moveTop 1s; -webkit-animation:moveTop 1s; animation-fill-mode:both; -webkit-animation-fill-mode:both; position:relative; height:100%; -webkit-overflow-scrolling: touch; overflow:auto; }
@keyframes moveTop{
0% {opacity: 0;-webkit-transform: translateY(20px);-ms-transform: translateY(20px);transform: translateY(20px);}
100% {opacity: 1;-webkit-transform: translateY(0);-ms-transform: translateY(0);transform: translateY(0);}
}
@-o-keyframes moveTop{
0% {opacity: 0;-webkit-transform: translateY(20px);-ms-transform: translateY(20px);transform: translateY(20px);}
100% {opacity: 1;-webkit-transform: translateY(0);-ms-transform: translateY(0);transform: translateY(0);}
}
@-moz-keyframes moveTop{
0% {opacity: 0;-webkit-transform: translateY(20px);-ms-transform: translateY(20px);transform: translateY(20px);}
100% {opacity: 1;-webkit-transform: translateY(0);-ms-transform: translateY(0);transform: translateY(0);}
}
@-webkit-keyframes moveTop{
0% {opacity: 0;-webkit-transform: translateY(20px);-ms-transform: translateY(20px);transform: translateY(20px);}
100% {opacity: 1;-webkit-transform: translateY(0);-ms-transform: translateY(0);transform: translateY(0);}
}
/*锁屏*/
.admin-header-lock{width: 320px; height: 170px; padding: 20px; position: relative; text-align: center;}
.admin-header-lock-img{width:70px; height:70px; margin: 0 auto;}
.admin-header-lock-img img{width:70px; height:70px; border-radius: 100%; box-shadow:0 0 30px #44576b;}
.admin-header-lock-name{color: #009688;margin: 8px 0 15px 0;}
.input_btn{ overflow: hidden; margin-bottom: 10px; }
.admin-header-lock-input{width: 170px; color: #fff;background-color: #009688; float: left; margin:0 10px 0 40px; border:none;}
.admin-header-lock-input::-webkit-input-placeholder {color:#fff;}
.admin-header-lock-input::-moz-placeholder {color:#fff;}
.admin-header-lock-input:-ms-input-placeholder {color:#fff;}
.admin-header-lock-input:-moz-placeholder {color:#fff;}
#unlock{ float: left; }
#lock-box p{ color:#e60000; }
/*顶部*/
.header{ z-index:2000;}
.logo{ color: #fff; float: left; line-height:60px; font-size:20px; padding:0 25px; text-align: center; width:150px;}
.hideMenu{ float:left; width:20px; height:20px; margin-top:15px; font-size:17px; line-height:20px; text-align:center; padding:5px 5px; color:#fff; background-color:#1AA094; }
.hideMenu:hover{ color:#fff; }
.layui-nav cite{ margin-left: 5px;}
/*顶部右侧*/
.topLevelMenus{float:left;}
.topLevelMenus li.layui-nav-item:hover{ background-color:rgba(221,221,221,0.2);}
.layui-nav .layui-this:after{ bottom:-5px!important;}
.header .layui-nav-bar{top:60px !important;}
.topLevelMenus .layui-nav-item.layui-this{ background-color:rgba(0,0,0,0.5);}
.top_menu.layui-nav .layui-this:after{ width:0px; }
.top_menu .layui-nav-bar,.mobileTopLevelMenus .layui-nav-bar{background-color:rgba(0,0,0,0.7);}
/*左侧导航*/
.layui-nav{background-color: inherit !important;}
.showMenu.layui-layout-admin .layui-side{ left:-200px; }
.showMenu .layui-body,.showMenu .layui-footer{ left:0; }
/*左侧用户头像*/
.top_menu{ background-color:inherit !important; position:absolute; right:0;top:0; }
.layui-layout-admin .layui-side{ left:0; overflow:hidden;}
.user-photo{width: 200px; height: 120px; padding:15px 0 5px;}
.user-photo a.img{ display: block; width:80px; height:80px; margin: 0 auto 10px;}
.user-photo a.img img{ display: block; border: none; width: 100%; height: 100%; border-radius: 50%; -webkit-border-radius: 50%; -moz-border-radius: 50%; border: 4px solid #44576b; box-sizing:border-box;}
.user-photo p{ display: block; width: 100%; height: 25px; color: #ffffff; text-align: center; font-size: 12px; white-space: nowrap;line-height: 25px; overflow: hidden;}
/*左侧导航重定义*/
.layui-nav-item.layui-nav-itemed{ background-color:#2B2E37 !important;}
.layui-nav-itemed:before{ width:5px; height:100%; background-color:#009688; position:absolute; content:''; left:0; top:0;}
.layui-nav-itemed .layui-nav-child a{ padding-left:40px;}
/*左侧搜索框*/
.component{ width:180px; height:30px; margin:0 auto 5px; position:relative;}
.component .layui-input{ height:30px; line-height: 30px; font-size:12px; border:none; transition: all 0.3s; background:rgba(255,255,255,0.05); }
.component .layui-input:focus{ background:#fff; color:#000; }
.component .layui-form-select dl{ top:33px; background:#fff; }
.component .layui-icon{ position: absolute; right:8px; top:8px; color:#000; }
.component dl dd{ color:#000 !important;}
.component dl dd.layui-this{ color:#fff !important;}
.component dl dd.layui-select-tips{ color:#999 !important;}
/*layui-body*/
.layui-body{overflow:hidden; border-top:5px solid #1AA094;border-left:2px solid #1AA094; background:#fff;}
#top_tabs_box{ padding-right:138px; height:40px; border-bottom:1px solid #e2e2e2; }
#top_tabs{ position: absolute; border-bottom:none;}
.layui-tab-title .layui-this{ background-color:#1AA094; color:#fff; }
.layui-tab-title .layui-this:after{ border:none; }
.layui-tab-title li cite{ font-style: normal; padding-left:5px; }
.clildFrame.layui-tab-content{ top:41px; position:absolute; bottom:0; width:100%; padding:0;}
/*多窗口页面操作下拉*/
.closeBox{ position:absolute; right:0; background-color:#fff !important; color:#000; border-left:1px solid #e2e2e2; border-bottom:1px solid #e2e2e2; }
.closeBox .layui-nav-item{ line-height:40px; }
.closeBox .layui-nav-item>a,.closeBox .layui-nav-item>a:hover{ color:#000; }
.closeBox .layui-nav-child{ top:42px; left:-12px; }
.closeBox .layui-nav-bar{ display:none; }
.closeBox a i.caozuo{ font-size: 20px; position:absolute; top:1px; left:0; }
.closeBox a span.layui-nav-more{ border-color:#333 transparent transparent;}
.closeBox a span.layui-nav-more.layui-nav-mored{ border-color:transparent transparent #333;}
/*功能设定*/
.functionSrtting_box{ padding-top:15px;}
.functionSrtting_box .layui-form-label{ width:81px;}
.functionSrtting_box .layui-word-aux{ position:absolute;left:60px; top:9px; font-size: 12px;}
/*换肤*/
.skins_box{ padding:10px 34px 0; }
.skinBtn{ text-align:center; }
/*橙色*/
.orange .layui-layout-admin .layui-header{ background-color:orange !important; }
.orange .layui-bg-black{ background-color:#e47214 !important; }
/*蓝色*/
.blue .layui-layout-admin .layui-header{ background-color:#3396d8 !important; }
.blue .layui-bg-black,.blue .hideMenu{ background-color:#146aa2 !important; }
/*自定义*/
.skinCustom{ visibility:hidden; }
.skinCustom input{ width:48%; margin:5px 2% 5px 0; float:left; }
.orange .layui-nav-tree .layui-nav-child a,.blue .layui-nav-tree .layui-nav-child a{ color:#fff; }
.orange .top_menu.layui-nav .layui-nav-more,.blue .top_menu.layui-nav .layui-nav-more{border-color:#fff transparent transparent !important;}
.orange .top_menu.layui-nav-itemed .layui-nav-more,.orange .top_menu.layui-nav .layui-nav-mored,.blue .top_menu.layui-nav-itemed .layui-nav-more,.blue .top_menu.layui-nav .layui-nav-mored{border-color:transparent transparent #fff !important;}
/*底部*/
.footer{ text-align: center; line-height:44px;border-left: 2px solid #1AA094; z-index:999;}
/*响应式样式*/
@media screen and (max-width:1080px){
.mobileTopLevelMenus[mobile]{display:inline-block;}
.site-mobile .site-tree-mobile,.topLevelMenus[pc]{display:none !important;}
}
@media screen and (max-width: 720px){
.hideMenu{ display: none !important; }
.mobileTopLevelMenus[mobile]{ padding:0;}
.top_menu>li[pc]{ display: none !important; }
/*左侧导航*/
.layui-layout-admin .layui-side{ left:-260px; }
.site-mobile .layui-side{ left: 0; z-index:1100; }
.site-tree-mobile {display: block!important; position: fixed; z-index: 100000; bottom: 15px; left: 15px; width:40px; height:40px; line-height:40px; border-radius: 2px; text-align: center; background-color: rgba(0,0,0,.7); color: #fff;}
.site-mobile .site-mobile-shade { content: ''; position: fixed; top: 0; bottom: 0; left: 0; right: 0; background-color: rgba(0,0,0,.8); z-index: 999;}
.layui-body,.layui-layout-admin .layui-footer{ left:-2px; }
}
@media screen and (max-width:480px){
.logo{ width:120px; font-size: 18px;}
#userInfo>a{ padding:0 10px;}
.mobileTopLevelMenus[mobile] li>a{ padding:0 17px 0 15px;}
.logo,.layui-nav.top_menu{ padding:0 5px;}
.adminName,.top_menu dd[pc]{ display: none !important; }
*[mobile],.top_menu .layui-nav-item.showNotice[pc]{ display:inline-block !important; }
}
/*修改顶部高度*/
.header .layui-nav-child,.layui-body,.layui-layout-admin .layui-side,.header .layui-nav-bar{ top:50px !important;}
.header .layui-nav .layui-nav-item,.header .layui-nav .layui-nav-item>a,.header,.logo{ line-height:50px !important; max-height:50px; !important;}
.mobileTopLevelMenus{ float:left;}
.hideMenu{ margin-top: 10px;}

@ -0,0 +1,171 @@
/*公共样式*/
.childrenBody{ padding:10px;}
.layui-table-view{ margin:0 !important;}
.magb0{margin-bottom:0 !important;}
.magt0{ margin-top:0 !important;}
.magt3{ margin-top:3px !important;}
.magt10{ margin-top:10px !important;}
.magb15{ margin-bottom:15px !important;}
.magt30{ margin-top:30px !important;}
.layui-left{text-align:left;}
.layui-block{ width:100% !important;}
.layui-center{text-align:center;}
.layui-right{text-align:right;}
.layui-elem-quote.title{ padding:10px 15px; margin-bottom:0;}
.layui-bg-white{ background-color:#fff !important;}
.border{ border:1px solid #e6e6e6 !important; padding:10px; border-top:none;}
.main_btn .layui-btn{ margin:2px 5px 2px 0;}
.layui-timeline-axis{ left:-4px;}
.layui-elem-quote{ word-break: break-all;}
.icons li,.icons li:hover,.loginBody .seraph,.loginBody .seraph:hover,.loginBody .layui-form-item.layui-input-focus label,.loginBody .layui-form-item label,.loginBody .layui-form-item.layui-input-focus input,.loginBody .layui-form-item input{transition: all 0.3s ease-in-out;-webkit-transition: all 0.3s ease-in-out;}
.icons li:hover i,.icons li i{transition: font-size 0.3s ease-in-out;-webkit-transition: font-size 0.3s ease-in-out;}
.loginBody .layui-input-focus .layui-input::-webkit-input-placeholder{transition: color 0.2s linear 0.2s;-webkit-transition: color 0.2s linear 0.2s;}
.loginBody .layui-input-focus .layui-input::-moz-placeholder{transition: color 0.2s linear 0.2s;}
.loginBody .layui-input-focus .layui-input:-ms-input-placeholder{transition: color 0.2s linear 0.2s;}
.loginBody .layui-input-focus .layui-input::placeholder{transition: color 0.2s linear 0.2s;-webkit-transition: color 0.2s linear 0.2s;}
/*后台首页*/
.panel_box{ margin-bottom:5px;}
.panel{ text-align:center; height:90px;}
.panel_box a{display:block; border-radius:5px; overflow:hidden; height:80px; background-color:#f2f2f2 !important; }
.panel_icon{ width:40%; display: inline-block; line-height:80px; float:left; position:relative; height:100%;}
.panel_icon i{ font-size:40px !important; color:#fff; display: inline-block;}
.panel_word{ width:60%; display: inline-block; float:right; margin:13px 0 14px; }
.panel_word span{ font-size:25px; display:block; height:34px; }
.panel .loginTime{ font-size:15px; color:#1E9FFF; line-height:17px;}
.panel em{ font-style:normal;}
.history_box{ min-height:500px; height:500px; overflow-y:scroll; padding:10px !important;}
.history_box .layui-timeline .layui-timeline-item:last-child{ padding-bottom:0;}
@media screen and (max-width:1200px) {
.history_box { height: auto !important; overflow-y: inherit; }
}
/*修改密码*/
.pwdTips{ min-height:auto; margin:40px 0 15px 110px;}
/*个人资料*/
form input.layui-input[disabled]{ background:#f2f2f2; color:#595963!important; }
.user_right{ text-align: center; }
.user_right p{ margin:10px 0 25px; font-size: 12px; text-align: center; color: #FF5722;}
.user_right img#userFace{ width:200px; height:200px; margin-top:20px; cursor:pointer; box-shadow:0 0 50px #44576b; }
.userAddress.layui-form-item .layui-input-inline{ width:23%; }
.userAddress.layui-form-item .layui-input-inline:last-child{ margin-right:0; }
/*下拉多选*/
.layui-form-item select[multiple]+.layui-form-select dd{ padding:0;}
.layui-form-item select[multiple]+.layui-form-select .layui-form-checkbox[lay-skin=primary]{ margin:0 !important; display:block; line-height:36px !important; position:relative; padding-left:26px;}
.layui-form-item select[multiple]+.layui-form-select .layui-form-checkbox[lay-skin=primary] span{line-height:36px !important; float:none;}
.layui-form-item select[multiple]+.layui-form-select .layui-form-checkbox[lay-skin=primary] i{ position:absolute; left:10px; top:0; margin-top:9px;}
.multiSelect{ line-height:normal; height:auto; padding:4px 10px; overflow:hidden;min-height:38px; margin-top:-38px; left:0; z-index:99;position:relative;background:none;}
.multiSelect a{ padding:2px 5px; background:#908e8e; border-radius:2px; color:#fff; display:block; line-height:20px; height:20px; margin:2px 5px 2px 0; float:left;}
.multiSelect a span{ float:left;}
.multiSelect a i{ float:left; display:block; margin:2px 0 0 2px; border-radius:2px; width:8px; height:8px; background:url(../images/close.png) no-repeat center; background-size:65%; padding:4px;}
.multiSelect a i:hover{ background-color:#545556;}
/*404页面*/
.noFind{ text-align:center; padding-top:2%;}
.noFind i{ line-height:1em; font-size:12em !important; color: #393D50; display:block;}
.ufo{ text-align:center; height:100%; position:relative;}
.noFind .page_icon,.noFind .ufo_icon{ opacity:1; position:absolute; left:50%; transform:translateX(-50%); -ms-transform:translateX(-50%); -moz-transform:translateX(-50%); -webkit-transform:translateX(-50%); -o-transform:translateX(-50%);}
.noFind .page_icon{ top:300px; animation:pageGo 0.3s ease-in 0.3s forwards; -webkit-animation:pageGo 0.3s ease-in 0.3s forwards; -o-animation:pageGo 0.3s ease-in 0.3s forwards; -moz-animation:pageGo 0.3s ease-in 0.3s forwards;}
.noFind .ufo_icon{ top:100px; animation:ufo 1s ease-in 0.6s forwards; -webkit-animation:ufo 1s ease-in 0.6s forwards; -o-animation:ufo 1s ease-in 0.6s forwards; -moz-animation:ufo 1s ease-in 0.6s forwards;}
.page404{ margin-top:10%; opacity:0; font-size:0; animation:page404 0.5s ease-in 1.7s forwards; -webkit-animation:page404 0.5s ease-in 1.7s forwards; -o-animation:page404 0.5s ease-in 1.7s forwards; -moz-animation:page404 0.5s ease-in 1.7s forwards;}
.page404 p{ font-size: 20px; font-weight: 300; color: #999;}
/*页面被吸走*/
@keyframes pageGo{from{font-size: 12em; top:300px;} to{font-size:0; opacity:0; top: 100px;}}
@-moz-keyframes pageGo{from{font-size: 12em; top:300px;} to{font-size:0; opacity:0; top:100px}}
@-webkit-keyframes pageGo{from{font-size: 12em; top:300px;} to{font-size:0; opacity:0; top:100px}}
@-o-keyframes pageGo{from{font-size: 12em; top:300px;} to{font-size:0; opacity:0; top:100px}}
/*ufo飞走*/
@keyframes ufo{0%{font-size: 14em; top:100px;} 20%{font-size: 12em; top:50px;} 100%{font-size:0; opacity:0; top:-100px; left:80%;}}
@-moz-keyframes ufo{0%{font-size: 14em; top:100px;} 20%{font-size: 12em; top:50px;} 100%{font-size:0; opacity:0; top:-100px; left:80%;}}
@-webkit-keyframes ufo{0%{font-size: 14em; top:100px;} 20%{font-size: 12em; top:50px;} 100%{font-size:0; opacity:0; top:-100px; left:80%;}}
@-o-keyframes ufo{0%{font-size: 14em; top:100px;} 20%{font-size: 12em; top:50px;} 100%{font-size:0; opacity:0; top:-100px; left:80%;}}
/*404显示*/
@keyframes page404{from{opacity:0; font-size:2em;} to{opacity:1;font-size:2em;}}
@-moz-keyframes page404{from{opacity:0; font-size:2em;} to{opacity:1;font-size:2em;}}
@-webkit-keyframes page404{from{opacity:0; font-size:2em;} to{opacity:1;font-size:2em;}}
@-o-keyframes page404{from{opacity:0; font-size:2em;} to{opacity:1;font-size:2em;}}
/*图标管理*/
.iconsLength{ margin:0 5px;}
.icons li{ margin:5px 0; text-align:center; height:120px; cursor:pointer;}
.icons li i{ display:block; font-size:35px; margin:10px 0; line-height:60px; height:60px;}
.icons li:hover{ background:rgba(13,10,49,.9); border-radius:5px; color:#fff;}
.icons li:hover i{ font-size:50px;}
#copyText{ width:0;height:0; opacity:0; position:absolute; left:-9999px; top:-9999px;}
/*开发文档*/
h2.method{ font-size:18px; line-height:45px; padding-left:5px;}
/*登录*/
.loginHtml,.loginBody{ height:100%;}
.loginBody{ background:url("../images/login_bg.jpg") no-repeat center center;}
.loginBody form.layui-form{ padding:0 20px; width:300px; height:335px; position:absolute; left:50%; top:50%; margin:-150px 0 0 -150px; -webkit-box-sizing:border-box;-moz-box-sizing:border-box; -o-box-sizing:border-box; box-sizing:border-box; background:#fff;-webkit-border-radius:5px; -moz-border-radius:5px; border-radius:5px; box-shadow:0 0 50px #009688;}
.login_face{ margin:-55px auto 20px; width:100px; height:100px; -webkit-border-radius:50%; -moz-border-radius:50%; border-radius:50%; border:5px solid #fff; overflow:hidden;box-shadow:0 0 30px #009688;}
.login_face img{ width:100%;}
.loginBody .layui-form-item{ position:relative;}
.loginBody .layui-form-item label{ position:absolute; color:#757575; left:10px; top:9px; line-height:20px; background:#fff; padding:0 5px; font-size:14px; cursor:text;}
.loginBody .layui-form-item.layui-input-focus label{ top:-10px; font-size:12px; color:#ff6700;}
.loginBody .layui-form-item.layui-input-active label{ top:-10px; font-size:12px;}
.loginBody .layui-input::-webkit-input-placeholder{color:#fff;}
.loginBody .layui-input::-moz-placeholder{color:#fff;}
.loginBody .layui-input:-ms-input-placeholder{color:#fff;}
.loginBody .layui-input::placeholder{color:#fff;}
.loginBody .layui-form-item.layui-input-focus input{ border-color:#ff6700 !important;}
.loginBody .layui-input-focus .layui-input::-webkit-input-placeholder{color:#757575;}
.loginBody .layui-input-focus .layui-input::-moz-placeholder{color:#757575;}
.loginBody .layui-input-focus .layui-input:-ms-input-placeholder{color:#757575;}
.loginBody .layui-input-focus .layui-input::placeholder{color:#757575;}
.loginBody .seraph{ font-size:30px; text-align:center;}
.loginBody .seraph.icon-qq:hover{ color:#0288d1;}
.loginBody .seraph.icon-wechat:hover{ color:#00d20d;}
.loginBody .seraph.icon-sina:hover{ color:#d32f2f;}
.imgCode{ position:relative;}
#imgCode img{ position:absolute; top:1px; right:1px; cursor:pointer;}
/*用户等级*/
.layui-table-view .layui-table span.seraph{ font-size:25px !important;}
.vip1{ color:#994a2b;}
.vip2{ color:#899396;}
.vip3{ color:#bd6a08;}
.vip4{ color:#a3b8c4;}
.vip5{ color:#63c3ea;}
.vip6{ color:#b563ed;}
.vip7{ color:#ff9831;}
.vip8{ color:#A757A8;}
.vip9{ color:#0ff;}
.vip10{ color:#f00;}
/*新闻添加*/
.layui-elem-quote .layui-inline{ margin:3px 0;}
.category .layui-form-checkbox{ margin:5px 0;}
.border .layui-form-item{ margin-bottom:10px;}
.border .layui-form-label{ width:50px;}
.border .layui-form-label i{ position:absolute; top:10px; left:3px;}
.border .layui-input-block{ margin-left:80px;}
.thumbBox{ height:151px; overflow:hidden; border:1px solid #e6e6e6; border-radius:2px; cursor:pointer; position:relative; text-align:center; line-height:153px;}
.thumbImg{ max-width:100%; max-height:100%; border:none;}
.thumbBox:after{ position:absolute; width:100%; height:100%;line-height:153px; z-index:-1; text-align:center; font-size:20px; content:"缩略图"; left:0; top:0; color:#9F9F9F;}
/*图片管理*/
#Images li{ width:19%; margin:0.5% 0.5%; float: left; overflow:hidden;}
#Images li img{ width:100%; cursor:pointer; }
#Images li .operate{ display: block; height: 40px; width:100%; background:#f4f5f9; }
#Images li .operate .check{ float:left; margin-left:11px; height:18px; padding:11px 0; width:74%; position:relative;}
#Images li .operate .check .layui-form-checkbox[lay-skin=primary]{ width:100%;}
#Images li .operate .check .layui-form-checkbox[lay-skin=primary] span{ padding:0 5px 0 25px; width:100%; box-sizing:border-box;}
#Images li .operate .check .layui-form-checkbox[lay-skin=primary] i{position:absolute; left:0; top:0;}
#Images li .operate .img_del{ float:right; margin:9px 11px 0 0; font-size: 22px !important; cursor:pointer; }
#Images li .operate .img_del:hover{ color:#f00; }
@media screen and (max-width:1050px){#Images li{ width:24%;}}
@media screen and (max-width: 750px){#Images li{ width:49%;}}
@media screen and (max-width:432px){#Images li{ width:99%;}}
/*系统日志*/
.layui-btn-green{ background-color:#5FB878 !important;}
/*友情链接*/
.linkLogo{ width:80px; height:40px; overflow:hidden; border:1px solid #e6e6e6; border-radius:2px; cursor:pointer; margin:0 auto; position:relative; text-align:center; line-height:42px;}
.linkLogoImg{ max-width:90%; max-height:90%;}
.linkLogo:after{ position:absolute; width:100%; height:100%;line-height:42px; z-index:-1; text-align:center; font-size:12px; content:"上传LOGO"; left:0; top:0; color:#9F9F9F;}
.linksAdd .layui-form-label{ width:60px; padding-left:0;}
.linksAdd .layui-input-block{ margin-left:75px;}
.linksAdd .layui-input-block input{ padding:0 5px;}
/*响应式*/
@media screen and (max-width:450px) {
#userFaceBtn{ height: 30px;line-height: 30px; padding: 0 10px; font-size: 12px;}
.user_right img#userFace{ width:100px; height:100px; margin-top:0;}
.layui-col-xs12 .layui-form-label{ width:60px; padding-left:0;}
.layui-col-xs12 .layui-input-block,.layui-col-xs12 .layui-input-inline{ margin-left:75px;}
.layui-col-xs12 .layui-input-inline{ left:0 !important; width:auto !important;}
.noFind{ padding-top:0;}
*[pc]{ display:none;}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

@ -0,0 +1,259 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>layui后台管理模板 2.0</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="Access-Control-Allow-Origin" content="*">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
<link rel="icon" href="/favicon.ico">
<link rel="stylesheet" href="/resources/layui/css/layui.css" media="all" />
<link rel="stylesheet" href="/resources/css/index.css" media="all" />
</head>
<body class="main_body">
<div class="layui-layout layui-layout-admin">
<!-- 顶部 -->
<div class="layui-header header">
<div class="layui-main mag0">
<a href="#" class="logo">仓库管理</a>
<!-- 显示/隐藏菜单 -->
<a href="javascript:;" class="seraph hideMenu icon-caidan"></a>
<!-- 顶部右侧菜单 -->
<ul class="layui-nav top_menu">
<li class="layui-nav-item" pc>
<a href="javascript:;" class="clearCache"><i class="layui-icon" data-icon="&#xe640;">&#xe640;</i><cite>清除缓存</cite><span class="layui-badge-dot"></span></a>
</li>
<li class="layui-nav-item lockcms" pc>
<a href="javascript:;"><i class="seraph icon-lock"></i><cite>锁屏</cite></a>
</li>
<li class="layui-nav-item" id="userInfo">
<a href="javascript:;"><img src="/resources/images/face.jpg" class="layui-nav-img userAvatar" width="35" height="35"><cite class="adminName">驊驊龔頾</cite></a>
<dl class="layui-nav-child">
<dd><a href="javascript:;" data-url="/resouces/page/user/userInfo.html"><i class="seraph icon-ziliao" data-icon="icon-ziliao"></i><cite>个人资料</cite></a></dd>
<dd><a href="javascript:;" data-url="/resouces/page/user/changePwd.html"><i class="seraph icon-xiugai" data-icon="icon-xiugai"></i><cite>修改密码</cite></a></dd>
<dd><a href="page/login/login.html" class="signOut"><i class="seraph icon-tuichu"></i><cite>退出</cite></a></dd>
</dl>
</li>
</ul>
</div>
</div>
<!-- 左侧导航 -->
<div class="layui-side layui-bg-black">
<div class="user-photo">
<a class="img" title="我的头像" ><img src="images/face.jpg" class="userAvatar"></a>
<p>你好!<span class="userName">超级管理员</span>, 欢迎登录</p>
</div>
<!-- 搜索 -->
<div class="layui-form component">
<select name="search" id="search" lay-search lay-filter="searchPage">
<option value="">搜索页面或功能</option>
<option value="1">layer</option>
<option value="2">form</option>
</select>
<i class="layui-icon">&#xe615;</i>
</div>
<div class="navBar layui-side-scroll" id="navBar">
<ul class="layui-nav layui-nav-tree">
<li class="layui-nav-item layui-this">
<a href="javascript:;" data-url="page/main.html"><i class="layui-icon" data-icon=""></i><cite>后台首页</cite></a>
</li>
</ul>
</div>
</div>
<!-- 右侧内容 -->
<div class="layui-body layui-form">
<div class="layui-tab mag0" lay-filter="bodyTab" id="top_tabs_box">
<ul class="layui-tab-title top_tab" id="top_tabs">
<li class="layui-this" lay-id=""><i class="layui-icon">&#xe68e;</i> <cite>后台首页</cite></li>
</ul>
<ul class="layui-nav closeBox">
<li class="layui-nav-item">
<a href="javascript:;"><i class="layui-icon caozuo">&#xe643;</i> 页面操作</a>
<dl class="layui-nav-child">
<dd><a href="javascript:;" class="refresh refreshThis"><i class="layui-icon">&#xe669;</i> 刷新当前</a></dd>
<dd><a href="javascript:;" class="closePageOther"><i class="seraph icon-prohibit"></i> 关闭其他</a></dd>
<dd><a href="javascript:;" class="closePageAll"><i class="seraph icon-guanbi"></i> 关闭全部</a></dd>
</dl>
</li>
</ul>
<div class="layui-tab-content clildFrame">
<div class="layui-tab-item layui-show">
<iframe src="/resources/page/main.html"></iframe>
</div>
</div>
</div>
</div>
<!-- 底部 -->
<div class="layui-footer footer">
<p><span>copyright @2019 WHSXT</span></p>
</div>
</div>
<!-- 移动导航 -->
<div class="site-tree-mobile"><i class="layui-icon">&#xe602;</i></div>
<div class="site-mobile-shade"></div>
<script type="text/javascript" src="/resources/layui/layui.js"></script>
<script type="text/javascript" src="/resources/js/cache.js"></script>
<script type="text/javascript">
var $,tab,dataStr,layer;
layui.config({
base : "/resources/js/"
}).extend({
"bodyTab" : "bodyTab"
})
layui.use(['bodyTab','form','element','layer','jquery'],function(){
var form = layui.form,
element = layui.element;
$ = layui.$;
layer = parent.layer === undefined ? layui.layer : top.layer;
tab = layui.bodyTab({
openTabNum : "50", //最大可打开窗口数量
url : "/resources/json/navs2.json" //获取菜单json地址
});
//通过顶部菜单获取左侧二三级菜单 注:此处只做演示之用,实际开发中通过接口传参的方式获取导航数据
function getData(json){
$.getJSON(tab.tabConfig.url,function(data){
dataStr = data;
//重新渲染左侧菜单
tab.render();
})
}
//页面加载时判断左侧菜单是否显示
//通过顶部菜单获取左侧菜单
$(".topLevelMenus li,.mobileTopLevelMenus dd").click(function(){
if($(this).parents(".mobileTopLevelMenus").length != "0"){
$(".topLevelMenus li").eq($(this).index()).addClass("layui-this").siblings().removeClass("layui-this");
}else{
$(".mobileTopLevelMenus dd").eq($(this).index()).addClass("layui-this").siblings().removeClass("layui-this");
}
$(".layui-layout-admin").removeClass("showMenu");
$("body").addClass("site-mobile");
getData($(this).data("menu"));
//渲染顶部窗口
tab.tabMove();
})
//隐藏左侧导航
$(".hideMenu").click(function(){
if($(".topLevelMenus li.layui-this a").data("url")){
layer.msg("此栏目状态下左侧菜单不可展开"); //主要为了避免左侧显示的内容与顶部菜单不匹配
return false;
}
$(".layui-layout-admin").toggleClass("showMenu");
//渲染顶部窗口
tab.tabMove();
})
//通过顶部菜单获取左侧二三级菜单 注:此处只做演示之用,实际开发中通过接口传参的方式获取导航数据
getData("contentManagement");
//手机设备的简单适配
$('.site-tree-mobile').on('click', function(){
$('body').addClass('site-mobile');
});
$('.site-mobile-shade').on('click', function(){
$('body').removeClass('site-mobile');
});
// 添加新窗口
$("body").on("click",".layui-nav .layui-nav-item a:not('.mobileTopLevelMenus .layui-nav-item a')",function(){
//如果不存在子级
if($(this).siblings().length == 0){
addTab($(this));
$('body').removeClass('site-mobile'); //移动端点击菜单关闭菜单层
}
$(this).parent("li").siblings().removeClass("layui-nav-itemed");
})
//清除缓存
$(".clearCache").click(function(){
window.sessionStorage.clear();
window.localStorage.clear();
var index = layer.msg('清除缓存中,请稍候',{icon: 16,time:false,shade:0.8});
setTimeout(function(){
layer.close(index);
layer.msg("缓存清除成功!");
},1000);
})
//刷新后还原打开的窗口
if(cacheStr == "true") {
if (window.sessionStorage.getItem("menu") != null) {
menu = JSON.parse(window.sessionStorage.getItem("menu"));
curmenu = window.sessionStorage.getItem("curmenu");
var openTitle = '';
for (var i = 0; i < menu.length; i++) {
openTitle = '';
if (menu[i].icon) {
if (menu[i].icon.split("-")[0] == 'icon') {
openTitle += '<i class="seraph ' + menu[i].icon + '"></i>';
} else {
openTitle += '<i class="layui-icon">' + menu[i].icon + '</i>';
}
}
openTitle += '<cite>' + menu[i].title + '</cite>';
openTitle += '<i class="layui-icon layui-unselect layui-tab-close" data-id="' + menu[i].layId + '">&#x1006;</i>';
element.tabAdd("bodyTab", {
title: openTitle,
content: "<iframe src='" + menu[i].href + "' data-id='" + menu[i].layId + "'></frame>",
id: menu[i].layId
})
//定位到刷新前的窗口
if (curmenu != "undefined") {
if (curmenu == '' || curmenu == "null") { //定位到后台首页
element.tabChange("bodyTab", '');
} else if (JSON.parse(curmenu).title == menu[i].title) { //定位到刷新前的页面
element.tabChange("bodyTab", menu[i].layId);
}
} else {
element.tabChange("bodyTab", menu[menu.length - 1].layId);
}
}
//渲染顶部窗口
tab.tabMove();
}
}else{
window.sessionStorage.removeItem("menu");
window.sessionStorage.removeItem("curmenu");
}
})
//打开新窗口
function addTab(_this){
tab.tabAdd(_this);
}
//捐赠弹窗
function donation(){
layer.tab({
area : ['260px', '367px'],
tab : [{
title : "微信",
content : "<div style='padding:30px;overflow:hidden;background:#d2d0d0;'><img src='images/wechat.jpg'></div>"
},{
title : "支付宝",
content : "<div style='padding:30px;overflow:hidden;background:#d2d0d0;'><img src='images/alipay.jpg'></div>"
}]
})
}
//图片管理弹窗
function showImg(){
$.getJSON('json/images.json', function(json){
var res = json;
layer.photos({
photos: res,
anim: 5
});
});
}
</script>
</body>
</html>

@ -0,0 +1,54 @@
layui.define(["form","jquery"],function(exports){
var form = layui.form,
$ = layui.jquery,
Address = {
provinces : function() {
//加载省数据
var proHtml = '',that = this;
$.get("../../json/address.json", function (data) {
for (var i = 0; i < data.length; i++) {
proHtml += '<option value="' + data[i].code + '">' + data[i].name + '</option>';
}
//初始化省数据
$("select[name=province]").append(proHtml);
form.render();
form.on('select(province)', function (proData) {
$("select[name=area]").html('<option value="">请选择县/区</option>');
var value = proData.value;
if (value > 0) {
that.citys(data[$(this).index() - 1].childs);
} else {
$("select[name=city]").attr("disabled", "disabled");
}
});
})
},
//加载市数据
citys : function(citys) {
var cityHtml = '<option value="">请选择市</option>',that = this;
for (var i = 0; i < citys.length; i++) {
cityHtml += '<option value="' + citys[i].code + '">' + citys[i].name + '</option>';
}
$("select[name=city]").html(cityHtml).removeAttr("disabled");
form.render();
form.on('select(city)', function (cityData) {
var value = cityData.value;
if (value > 0) {
that.areas(citys[$(this).index() - 1].childs);
} else {
$("select[name=area]").attr("disabled", "disabled");
}
});
},
//加载县/区数据
areas : function(areas) {
var areaHtml = '<option value="">请选择县/区</option>';
for (var i = 0; i < areas.length; i++) {
areaHtml += '<option value="' + areas[i].code + '">' + areas[i].name + '</option>';
}
$("select[name=area]").html(areaHtml).removeAttr("disabled");
form.render();
}
};
exports("address",Address);
})

@ -0,0 +1,400 @@
/*
@Author: 驊驊龔頾
@Time: 2017-10
@Tittle: bodyTab
@Description: 点击对应按钮添加新窗口
*/
var tabFilter,menu=[],liIndex,curNav,delMenu,
changeRefreshStr = window.sessionStorage.getItem("changeRefresh");
layui.define(["element","jquery"],function(exports){
var element = layui.element,
$ = layui.$,
layId,
Tab = function(){
this.tabConfig = {
openTabNum : undefined, //最大可打开窗口数量
tabFilter : "bodyTab", //添加窗口的filter
url : undefined //获取菜单json地址
}
};
//生成左侧菜单
Tab.prototype.navBar = function(strData){
var data;
if(typeof(strData) == "string"){
var data = JSON.parse(strData); //部分用户解析出来的是字符串,转换一下
}else{
data = strData;
}
var ulHtml = '';
for(var i=0;i<data.length;i++){
if(data[i].spread || data[i].spread == undefined){
ulHtml += '<li class="layui-nav-item layui-nav-itemed">';
}else{
ulHtml += '<li class="layui-nav-item">';
}
if(data[i].children != undefined && data[i].children.length > 0){
ulHtml += '<a>';
if(data[i].icon != undefined && data[i].icon != ''){
if(data[i].icon.indexOf("icon-") != -1){
ulHtml += '<i class="seraph '+data[i].icon+'" data-icon="'+data[i].icon+'"></i>';
}else{
ulHtml += '<i class="layui-icon" data-icon="'+data[i].icon+'">'+data[i].icon+'</i>';
}
}
ulHtml += '<cite>'+data[i].title+'</cite>';
ulHtml += '<span class="layui-nav-more"></span>';
ulHtml += '</a>';
ulHtml += '<dl class="layui-nav-child">';
for(var j=0;j<data[i].children.length;j++){
if(data[i].children[j].target == "_blank"){
ulHtml += '<dd><a data-url="'+data[i].children[j].href+'" target="'+data[i].children[j].target+'">';
}else{
ulHtml += '<dd><a data-url="'+data[i].children[j].href+'">';
}
if(data[i].children[j].icon != undefined && data[i].children[j].icon != ''){
if(data[i].children[j].icon.indexOf("icon-") != -1){
ulHtml += '<i class="seraph '+data[i].children[j].icon+'" data-icon="'+data[i].children[j].icon+'"></i>';
}else{
ulHtml += '<i class="layui-icon" data-icon="'+data[i].children[j].icon+'">'+data[i].children[j].icon+'</i>';
}
}
ulHtml += '<cite>'+data[i].children[j].title+'</cite></a></dd>';
}
ulHtml += "</dl>";
}else{
if(data[i].target == "_blank"){
ulHtml += '<a data-url="'+data[i].href+'" target="'+data[i].target+'">';
}else{
ulHtml += '<a data-url="'+data[i].href+'">';
}
if(data[i].icon != undefined && data[i].icon != ''){
if(data[i].icon.indexOf("icon-") != -1){
ulHtml += '<i class="seraph '+data[i].icon+'" data-icon="'+data[i].icon+'"></i>';
}else{
ulHtml += '<i class="layui-icon" data-icon="'+data[i].icon+'">'+data[i].icon+'</i>';
}
}
ulHtml += '<cite>'+data[i].title+'</cite></a>';
}
ulHtml += '</li>';
}
return ulHtml;
}
//获取二级菜单数据
Tab.prototype.render = function() {
//显示左侧菜单
var _this = this;
$(".navBar ul").html('<li class="layui-nav-item layui-this"><a data-url="page/main.html"><i class="layui-icon" data-icon=""></i><cite>后台首页</cite></a></li>').append(_this.navBar(dataStr)).height($(window).height()-210);
element.init(); //初始化页面元素
$(window).resize(function(){
$(".navBar").height($(window).height()-210);
})
}
//是否点击窗口切换刷新页面
Tab.prototype.changeRegresh = function(index){
if(changeRefreshStr == "true"){
$(".clildFrame .layui-tab-item").eq(index).find("iframe")[0].contentWindow.location.reload();
}
}
//参数设置
Tab.prototype.set = function(option) {
var _this = this;
$.extend(true, _this.tabConfig, option);
return _this;
};
//通过title获取lay-id
Tab.prototype.getLayId = function(title){
$(".layui-tab-title.top_tab li").each(function(){
if($(this).find("cite").text() == title){
layId = $(this).attr("lay-id");
}
})
return layId;
}
//通过title判断tab是否存在
Tab.prototype.hasTab = function(title){
var tabIndex = -1;
$(".layui-tab-title.top_tab li").each(function(){
if($(this).find("cite").text() == title){
tabIndex = 1;
}
})
return tabIndex;
}
//右侧内容tab操作
var tabIdIndex = 0;
Tab.prototype.tabAdd = function(_this){
if(window.sessionStorage.getItem("menu")){
menu = JSON.parse(window.sessionStorage.getItem("menu"));
}
var that = this;
var openTabNum = that.tabConfig.openTabNum;
tabFilter = that.tabConfig.tabFilter;
if(_this.attr("target") == "_blank"){
window.open(_this.attr("data-url"));
}else if(_this.attr("data-url") != undefined){
var title = '';
if(_this.find("i.seraph,i.layui-icon").attr("data-icon") != undefined){
if(_this.find("i.seraph").attr("data-icon") != undefined){
title += '<i class="seraph '+_this.find("i.seraph").attr("data-icon")+'"></i>';
}else{
title += '<i class="layui-icon">'+_this.find("i.layui-icon").attr("data-icon")+'</i>';
}
}
//已打开的窗口中不存在
if(that.hasTab(_this.find("cite").text()) == -1 && _this.siblings("dl.layui-nav-child").length == 0){
if($(".layui-tab-title.top_tab li").length == openTabNum){
layer.msg('只能同时打开'+openTabNum+'个选项卡哦。不然系统会卡的!');
return;
}
tabIdIndex++;
title += '<cite>'+_this.find("cite").text()+'</cite>';
title += '<i class="layui-icon layui-unselect layui-tab-close" data-id="'+tabIdIndex+'">&#x1006;</i>';
element.tabAdd(tabFilter, {
title : title,
content :"<iframe src='"+_this.attr("data-url")+"' data-id='"+tabIdIndex+"'></iframe>",
id : new Date().getTime()
})
//当前窗口内容
var curmenu = {
"icon" : _this.find("i.seraph").attr("data-icon")!=undefined ? _this.find("i.seraph").attr("data-icon") : _this.find("i.layui-icon").attr("data-icon"),
"title" : _this.find("cite").text(),
"href" : _this.attr("data-url"),
"layId" : new Date().getTime()
}
menu.push(curmenu);
window.sessionStorage.setItem("menu",JSON.stringify(menu)); //打开的窗口
window.sessionStorage.setItem("curmenu",JSON.stringify(curmenu)); //当前的窗口
element.tabChange(tabFilter, that.getLayId(_this.find("cite").text()));
that.tabMove(); //顶部窗口是否可滚动
}else{
//当前窗口内容
var curmenu = {
"icon" : _this.find("i.seraph").attr("data-icon")!=undefined ? _this.find("i.seraph").attr("data-icon") : _this.find("i.layui-icon").attr("data-icon"),
"title" : _this.find("cite").text(),
"href" : _this.attr("data-url")
}
that.changeRegresh(_this.parent('.layui-nav-item').index());
window.sessionStorage.setItem("curmenu", JSON.stringify(curmenu)); //当前的窗口
element.tabChange(tabFilter, that.getLayId(_this.find("cite").text()));
that.tabMove(); //顶部窗口是否可滚动
}
}
}
//顶部窗口移动
Tab.prototype.tabMove = function(){
$(window).on("resize",function(event){
var topTabsBox = $("#top_tabs_box"),
topTabsBoxWidth = $("#top_tabs_box").width(),
topTabs = $("#top_tabs"),
topTabsWidth = $("#top_tabs").width(),
tabLi = topTabs.find("li.layui-this"),
top_tabs = document.getElementById("top_tabs"),
event = event || window.event;
if(topTabsWidth > topTabsBoxWidth){
if(tabLi.position().left > topTabsBoxWidth || tabLi.position().left+topTabsBoxWidth > topTabsWidth){
topTabs.css("left",topTabsBoxWidth-topTabsWidth);
}else{
topTabs.css("left",-tabLi.position().left);
}
//拖动效果
var flag = false;
var cur = {
x:0,
y:0
}
var nx,dx,x ;
function down(event){
flag = true;
var touch ;
if(event.touches){
touch = event.touches[0];
}else {
touch = event;
}
cur.x = touch.clientX;
dx = top_tabs.offsetLeft;
}
function move(event){
var self = this;
if(flag){
window.getSelection ? window.getSelection().removeAllRanges() : document.selection.empty();
var touch ;
if(event.touches){
touch = event.touches[0];
}else {
touch = event;
}
nx = touch.clientX - cur.x;
x = dx+nx;
if(x > 0){
x = 0;
}else{
if(x < topTabsBoxWidth-topTabsWidth){
x = topTabsBoxWidth-topTabsWidth;
}else{
x = dx+nx;
}
}
top_tabs.style.left = x +"px";
//阻止页面的滑动默认事件
document.addEventListener("touchmove",function(){
event.preventDefault();
},false);
}
}
//鼠标释放时候的函数
function end(){
flag = false;
}
//pc端拖动效果
topTabs.on("mousedown",down);
topTabs.on("mousemove",move);
$(document).on("mouseup",end);
//移动端拖动效果
topTabs.on("touchstart",down);
topTabs.on("touchmove",move);
topTabs.on("touchend",end);
}else{
//移除pc端拖动效果
topTabs.off("mousedown",down);
topTabs.off("mousemove",move);
topTabs.off("mouseup",end);
//移除移动端拖动效果
topTabs.off("touchstart",down);
topTabs.off("touchmove",move);
topTabs.off("touchend",end);
topTabs.removeAttr("style");
return false;
}
}).resize();
}
//切换后获取当前窗口的内容
$("body").on("click",".top_tab li",function(){
var curmenu = '';
var menu = JSON.parse(window.sessionStorage.getItem("menu"));
if(window.sessionStorage.getItem("menu")) {
curmenu = menu[$(this).index() - 1];
}
if($(this).index() == 0){
window.sessionStorage.setItem("curmenu",'');
}else{
window.sessionStorage.setItem("curmenu",JSON.stringify(curmenu));
if(window.sessionStorage.getItem("curmenu") == "undefined"){
//如果删除的不是当前选中的tab,则将curmenu设置成当前选中的tab
if(curNav != JSON.stringify(delMenu)){
window.sessionStorage.setItem("curmenu",curNav);
}else{
window.sessionStorage.setItem("curmenu",JSON.stringify(menu[liIndex-1]));
}
}
}
element.tabChange(tabFilter,$(this).attr("lay-id")).init();
bodyTab.changeRegresh($(this).index());
setTimeout(function(){
bodyTab.tabMove();
},100);
})
//删除tab
$("body").on("click",".top_tab li i.layui-tab-close",function(){
//删除tab后重置session中的menu和curmenu
liIndex = $(this).parent("li").index();
var menu = JSON.parse(window.sessionStorage.getItem("menu"));
if(menu != null) {
//获取被删除元素
delMenu = menu[liIndex - 1];
var curmenu = window.sessionStorage.getItem("curmenu") == "undefined" ? undefined : window.sessionStorage.getItem("curmenu") == "" ? '' : JSON.parse(window.sessionStorage.getItem("curmenu"));
if (JSON.stringify(curmenu) != JSON.stringify(menu[liIndex - 1])) { //如果删除的不是当前选中的tab
// window.sessionStorage.setItem("curmenu",JSON.stringify(curmenu));
curNav = JSON.stringify(curmenu);
} else {
if ($(this).parent("li").length > liIndex) {
window.sessionStorage.setItem("curmenu", curmenu);
curNav = curmenu;
} else {
window.sessionStorage.setItem("curmenu", JSON.stringify(menu[liIndex - 1]));
curNav = JSON.stringify(menu[liIndex - 1]);
}
}
menu.splice((liIndex - 1), 1);
window.sessionStorage.setItem("menu", JSON.stringify(menu));
}
element.tabDelete("bodyTab",$(this).parent("li").attr("lay-id")).init();
bodyTab.tabMove();
})
//刷新当前
$(".refresh").on("click",function(){ //此处添加禁止连续点击刷新一是为了降低服务器压力另外一个就是为了防止超快点击造成chrome本身的一些js文件的报错(不过貌似这个问题还是存在,不过概率小了很多)
if($(this).hasClass("refreshThis")){
$(this).removeClass("refreshThis");
$(".clildFrame .layui-tab-item.layui-show").find("iframe")[0].contentWindow.location.reload();
setTimeout(function(){
$(".refresh").addClass("refreshThis");
},2000)
}else{
layer.msg("您点击的速度超过了服务器的响应速度,还是等两秒再刷新吧!");
}
})
//关闭其他
$(".closePageOther").on("click",function(){
if($("#top_tabs li").length>2 && $("#top_tabs li.layui-this cite").text()!="后台首页"){
var menu = JSON.parse(window.sessionStorage.getItem("menu"));
$("#top_tabs li").each(function(){
if($(this).attr("lay-id") != '' && !$(this).hasClass("layui-this")){
element.tabDelete("bodyTab",$(this).attr("lay-id")).init();
//此处将当前窗口重新获取放入session避免一个个删除来回循环造成的不必要工作量
for(var i=0;i<menu.length;i++){
if($("#top_tabs li.layui-this cite").text() == menu[i].title){
menu.splice(0,menu.length,menu[i]);
window.sessionStorage.setItem("menu",JSON.stringify(menu));
}
}
}
})
}else if($("#top_tabs li.layui-this cite").text()=="后台首页" && $("#top_tabs li").length>1){
$("#top_tabs li").each(function(){
if($(this).attr("lay-id") != '' && !$(this).hasClass("layui-this")){
element.tabDelete("bodyTab",$(this).attr("lay-id")).init();
window.sessionStorage.removeItem("menu");
menu = [];
window.sessionStorage.removeItem("curmenu");
}
})
}else{
layer.msg("没有可以关闭的窗口了@_@");
}
//渲染顶部窗口
tab.tabMove();
})
//关闭全部
$(".closePageAll").on("click",function(){
if($("#top_tabs li").length > 1){
$("#top_tabs li").each(function(){
if($(this).attr("lay-id") != ''){
element.tabDelete("bodyTab",$(this).attr("lay-id")).init();
window.sessionStorage.removeItem("menu");
menu = [];
window.sessionStorage.removeItem("curmenu");
}
})
}else{
layer.msg("没有可以关闭的窗口了@_@");
}
//渲染顶部窗口
tab.tabMove();
})
var bodyTab = new Tab();
exports("bodyTab",function(option){
return bodyTab.set(option);
});
})

@ -0,0 +1,287 @@
var cacheStr = window.sessionStorage.getItem("cache"),
oneLoginStr = window.sessionStorage.getItem("oneLogin");
layui.use(['form','jquery',"layer"],function() {
var form = layui.form,
$ = layui.jquery,
layer = parent.layer === undefined ? layui.layer : top.layer;
//判断是否web端打开
if(!/http(s*):\/\//.test(location.href)){
layer.alert("请先将项目部署到 localhost 下再进行访问【建议通过tomcat、webstorm、hb等方式运行不建议通过iis方式运行】否则部分数据将无法显示");
}else{ //判断是否处于锁屏状态【如果关闭以后则未关闭浏览器之前不再显示】
if(window.sessionStorage.getItem("lockcms") != "true" && window.sessionStorage.getItem("showNotice") != "true"){
showNotice();
}
}
//判断是否设置过头像,如果设置过则修改顶部、左侧和个人资料中的头像,否则使用默认头像
if(window.sessionStorage.getItem('userFace') && $(".userAvatar").length > 0){
$("#userFace").attr("src",window.sessionStorage.getItem('userFace'));
$(".userAvatar").attr("src",$(".userAvatar").attr("src").split("images/")[0] + "images/" + window.sessionStorage.getItem('userFace').split("images/")[1]);
}else{
$("#userFace").attr("src","../../images/face.jpg");
}
//公告层
function showNotice(){
}
function tipsShow(){
window.sessionStorage.setItem("showNotice","true");
if($(window).width() > 432){ //如果页面宽度不足以显示顶部“系统公告”按钮,则不提示
layer.tips('系统公告躲在了这里', '#userInfo', {
tips: 3,
time : 1000
});
}
}
$(".showNotice").on("click",function(){
showNotice();
})
//锁屏
function lockPage(){
layer.open({
title : false,
type : 1,
content : '<div class="admin-header-lock" id="lock-box">'+
'<div class="admin-header-lock-img"><img src="images/face.jpg" class="userAvatar"/></div>'+
'<div class="admin-header-lock-name" id="lockUserName">驊驊龔頾</div>'+
'<div class="input_btn">'+
'<input type="password" class="admin-header-lock-input layui-input" autocomplete="off" placeholder="请输入密码解锁.." name="lockPwd" id="lockPwd" />'+
'<button class="layui-btn" id="unlock">解锁</button>'+
'</div>'+
'<p>请输入“123456”否则不会解锁成功哦</p>'+
'</div>',
closeBtn : 0,
shade : 0.9,
success : function(){
//判断是否设置过头像,如果设置过则修改顶部、左侧和个人资料中的头像,否则使用默认头像
if(window.sessionStorage.getItem('userFace') && $(".userAvatar").length > 0){
$(".userAvatar").attr("src",$(".userAvatar").attr("src").split("images/")[0] + "images/" + window.sessionStorage.getItem('userFace').split("images/")[1]);
}
}
})
$(".admin-header-lock-input").focus();
}
$(".lockcms").on("click",function(){
window.sessionStorage.setItem("lockcms",true);
lockPage();
})
// 判断是否显示锁屏
if(window.sessionStorage.getItem("lockcms") == "true"){
lockPage();
}
// 解锁
$("body").on("click","#unlock",function(){
if($(this).siblings(".admin-header-lock-input").val() == ''){
layer.msg("请输入解锁密码!");
$(this).siblings(".admin-header-lock-input").focus();
}else{
if($(this).siblings(".admin-header-lock-input").val() == "123456"){
window.sessionStorage.setItem("lockcms",false);
$(this).siblings(".admin-header-lock-input").val('');
layer.closeAll("page");
}else{
layer.msg("密码错误,请重新输入!");
$(this).siblings(".admin-header-lock-input").val('').focus();
}
}
});
$(document).on('keydown', function(event) {
var event = event || window.event;
if(event.keyCode == 13) {
$("#unlock").click();
}
});
//退出
$(".signOut").click(function(){
window.sessionStorage.removeItem("menu");
menu = [];
window.sessionStorage.removeItem("curmenu");
})
//功能设定
$(".functionSetting").click(function(){
layer.open({
title: "功能设定",
area: ["380px", "280px"],
type: "1",
content : '<div class="functionSrtting_box">'+
'<form class="layui-form">'+
'<div class="layui-form-item">'+
'<label class="layui-form-label">开启Tab缓存</label>'+
'<div class="layui-input-block">'+
'<input type="checkbox" name="cache" lay-skin="switch" lay-text="开|关">'+
'<div class="layui-word-aux">开启后刷新页面不关闭打开的Tab页</div>'+
'</div>'+
'</div>'+
'<div class="layui-form-item">'+
'<label class="layui-form-label">Tab切换刷新</label>'+
'<div class="layui-input-block">'+
'<input type="checkbox" name="changeRefresh" lay-skin="switch" lay-text="开|关">'+
'<div class="layui-word-aux">开启后切换窗口刷新当前页面</div>'+
'</div>'+
'</div>'+
'<div class="layui-form-item">'+
'<label class="layui-form-label">单一登陆</label>'+
'<div class="layui-input-block">'+
'<input type="checkbox" name="oneLogin" lay-filter="multipleLogin" lay-skin="switch" lay-text="是|否">'+
'<div class="layui-word-aux">开启后不可同时多个地方登录</div>'+
'</div>'+
'</div>'+
'<div class="layui-form-item skinBtn">'+
'<a href="javascript:;" class="layui-btn layui-btn-sm layui-btn-normal" lay-submit="" lay-filter="settingSuccess">设定完成</a>'+
'<a href="javascript:;" class="layui-btn layui-btn-sm layui-btn-primary" lay-submit="" lay-filter="noSetting">朕再想想</a>'+
'</div>'+
'</form>'+
'</div>',
success : function(index, layero){
//如果之前设置过,则设置它的值
$(".functionSrtting_box input[name=cache]").prop("checked",cacheStr=="true" ? true : false);
$(".functionSrtting_box input[name=changeRefresh]").prop("checked",changeRefreshStr=="true" ? true : false);
$(".functionSrtting_box input[name=oneLogin]").prop("checked",oneLoginStr=="true" ? true : false);
//设定
form.on("submit(settingSuccess)",function(data){
window.sessionStorage.setItem("cache",data.field.cache=="on" ? "true" : "false");
window.sessionStorage.setItem("changeRefresh",data.field.changeRefresh=="on" ? "true" : "false");
window.sessionStorage.setItem("oneLogin",data.field.oneLogin=="on" ? "true" : "false");
window.sessionStorage.removeItem("menu");
window.sessionStorage.removeItem("curmenu");
location.reload();
return false;
});
//取消设定
form.on("submit(noSetting)",function(){
layer.closeAll("page");
});
//单一登陆提示
form.on('switch(multipleLogin)', function(data){
layer.tips('温馨提示:此功能需要开发配合,所以没有功能演示,敬请谅解', data.othis,{tips: 1})
});
form.render(); //表单渲染
}
})
})
//判断是否修改过系统基本设置,去显示底部版权信息
if(window.sessionStorage.getItem("systemParameter")){
systemParameter = JSON.parse(window.sessionStorage.getItem("systemParameter"));
$(".footer p span").text(systemParameter.powerby);
}
//更换皮肤
function skins(){
var skin = window.sessionStorage.getItem("skin");
if(skin){ //如果更换过皮肤
if(window.sessionStorage.getItem("skinValue") != "自定义"){
$("body").addClass(window.sessionStorage.getItem("skin"));
}else{
$(".layui-layout-admin .layui-header").css("background-color",skin.split(',')[0]);
$(".layui-bg-black").css("background-color",skin.split(',')[1]);
$(".hideMenu").css("background-color",skin.split(',')[2]);
}
}
}
skins();
$(".changeSkin").click(function(){
layer.open({
title : "更换皮肤",
area : ["310px","280px"],
type : "1",
content : '<div class="skins_box">'+
'<form class="layui-form">'+
'<div class="layui-form-item">'+
'<input type="radio" name="skin" value="默认" title="默认" lay-filter="default" checked="">'+
'<input type="radio" name="skin" value="橙色" title="橙色" lay-filter="orange">'+
'<input type="radio" name="skin" value="蓝色" title="蓝色" lay-filter="blue">'+
'<input type="radio" name="skin" value="自定义" title="自定义" lay-filter="custom">'+
'<div class="skinCustom">'+
'<input type="text" class="layui-input topColor" name="topSkin" placeholder="顶部颜色" />'+
'<input type="text" class="layui-input leftColor" name="leftSkin" placeholder="左侧颜色" />'+
'<input type="text" class="layui-input menuColor" name="btnSkin" placeholder="顶部菜单按钮" />'+
'</div>'+
'</div>'+
'<div class="layui-form-item skinBtn">'+
'<a href="javascript:;" class="layui-btn layui-btn-sm layui-btn-normal" lay-submit="" lay-filter="changeSkin">确定更换</a>'+
'<a href="javascript:;" class="layui-btn layui-btn-sm layui-btn-primary" lay-submit="" lay-filter="noChangeSkin">朕再想想</a>'+
'</div>'+
'</form>'+
'</div>',
success : function(index, layero){
var skin = window.sessionStorage.getItem("skin");
if(window.sessionStorage.getItem("skinValue")){
$(".skins_box input[value="+window.sessionStorage.getItem("skinValue")+"]").attr("checked","checked");
};
if($(".skins_box input[value=自定义]").attr("checked")){
$(".skinCustom").css("visibility","inherit");
$(".topColor").val(skin.split(',')[0]);
$(".leftColor").val(skin.split(',')[1]);
$(".menuColor").val(skin.split(',')[2]);
};
form.render();
$(".skins_box").removeClass("layui-hide");
$(".skins_box .layui-form-radio").on("click",function(){
var skinColor;
if($(this).find("div").text() == "橙色"){
skinColor = "orange";
}else if($(this).find("div").text() == "蓝色"){
skinColor = "blue";
}else if($(this).find("div").text() == "默认"){
skinColor = "";
}
if($(this).find("div").text() != "自定义"){
$(".topColor,.leftColor,.menuColor").val('');
$("body").removeAttr("class").addClass("main_body "+skinColor+"");
$(".skinCustom").removeAttr("style");
$(".layui-bg-black,.hideMenu,.layui-layout-admin .layui-header").removeAttr("style");
}else{
$(".skinCustom").css("visibility","inherit");
}
})
var skinStr,skinColor;
$(".topColor").blur(function(){
$(".layui-layout-admin .layui-header").css("background-color",$(this).val()+" !important");
})
$(".leftColor").blur(function(){
$(".layui-bg-black").css("background-color",$(this).val()+" !important");
})
$(".menuColor").blur(function(){
$(".hideMenu").css("background-color",$(this).val()+" !important");
})
form.on("submit(changeSkin)",function(data){
if(data.field.skin != "自定义"){
if(data.field.skin == "橙色"){
skinColor = "orange";
}else if(data.field.skin == "蓝色"){
skinColor = "blue";
}else if(data.field.skin == "默认"){
skinColor = "";
}
window.sessionStorage.setItem("skin",skinColor);
}else{
skinStr = $(".topColor").val()+','+$(".leftColor").val()+','+$(".menuColor").val();
window.sessionStorage.setItem("skin",skinStr);
$("body").removeAttr("class").addClass("main_body");
}
window.sessionStorage.setItem("skinValue",data.field.skin);
layer.closeAll("page");
});
form.on("submit(noChangeSkin)",function(){
$("body").removeAttr("class").addClass("main_body "+window.sessionStorage.getItem("skin")+"");
$(".layui-bg-black,.hideMenu,.layui-layout-admin .layui-header").removeAttr("style");
skins();
layer.closeAll("page");
});
},
cancel : function(){
$("body").removeAttr("class").addClass("main_body "+window.sessionStorage.getItem("skin")+"");
$(".layui-bg-black,.hideMenu,.layui-layout-admin .layui-header").removeAttr("style");
skins();
}
})
})
})

@ -0,0 +1,58 @@
layui.config({
base : "../../js/"
}).use(['form','jquery',"address"],function() {
var form = layui.form,
$ = layui.jquery,
address = layui.address;
//判断是否设置过头像,如果设置过则修改顶部、左侧和个人资料中的头像,否则使用默认头像
if(window.sessionStorage.getItem('userFace')){
$("#userFace").attr("src",window.sessionStorage.getItem('userFace'));
$(".userAvatar").attr("src",$(".userAvatar").attr("src").split("images/")[0] + "images/" + window.sessionStorage.getItem('userFace').split("images/")[1]);
}else{
$("#userFace").attr("src","../../images/face.jpg");
}
//判断是否修改过用户信息,如果修改过则填充修改后的信息
var menuText = $("#top_tabs",parent.document).text(); //判断打开的窗口是否存在“个人资料”页面
var citys,areas;
if(window.sessionStorage.getItem('userInfo')){
//获取省信息
address.provinces();
var userInfo = JSON.parse(window.sessionStorage.getItem('userInfo'));
var citys;
$(".realName").val(userInfo.realName); //用户名
$(".userSex input[value="+userInfo.sex+"]").attr("checked","checked"); //性别
$(".userPhone").val(userInfo.userPhone); //手机号
$(".userBirthday").val(userInfo.userBirthday); //出生年月
//填充省份信息,同时调取市级信息列表
$.get("../../json/address.json", function (addressData) {
$(".userAddress select[name='province']").val(userInfo.province); //省
var value = userInfo.province;
if (value > 0) {
address.citys(addressData[$(".userAddress select[name='province'] option[value='"+userInfo.province+"']").index()-1].childs);
citys = addressData[$(".userAddress select[name='province'] option[value='"+userInfo.province+"']").index()-1].childs;
} else {
$('.userAddress select[name=city]').attr("disabled","disabled");
}
$(".userAddress select[name='city']").val(userInfo.city); //市
//填充市级信息,同时调取区县信息列表
var value = userInfo.city;
if (value > 0) {
address.areas(citys[$(".userAddress select[name=city] option[value='"+userInfo.city+"']").index()-1].childs);
} else {
$('.userAddress select[name=area]').attr("disabled","disabled");
}
$(".userAddress select[name='area']").val(userInfo.area); //区
form.render();
})
for(key in userInfo){
if(key.indexOf("like") != -1){
$(".userHobby input[name='"+key+"']").attr("checked","checked");
}
}
$(".userEmail").val(userInfo.userEmail); //用户邮箱
$(".myself").val(userInfo.myself); //自我评价
form.render();
}
})

@ -0,0 +1,167 @@
var $,tab,dataStr,layer;
layui.config({
base : "js/"
}).extend({
"bodyTab" : "bodyTab"
})
layui.use(['bodyTab','form','element','layer','jquery'],function(){
var form = layui.form,
element = layui.element;
$ = layui.$;
layer = parent.layer === undefined ? layui.layer : top.layer;
tab = layui.bodyTab({
openTabNum : "50", //最大可打开窗口数量
url : "json/navs.json" //获取菜单json地址
});
//通过顶部菜单获取左侧二三级菜单 注:此处只做演示之用,实际开发中通过接口传参的方式获取导航数据
function getData(json){
$.getJSON(tab.tabConfig.url,function(data){
if(json == "contentManagement"){
dataStr = data.contentManagement;
//重新渲染左侧菜单
tab.render();
}else if(json == "memberCenter"){
dataStr = data.memberCenter;
//重新渲染左侧菜单
tab.render();
}else if(json == "systemeSttings"){
dataStr = data.systemeSttings;
//重新渲染左侧菜单
tab.render();
}else if(json == "seraphApi"){
dataStr = data.seraphApi;
//重新渲染左侧菜单
tab.render();
}
})
}
//页面加载时判断左侧菜单是否显示
//通过顶部菜单获取左侧菜单
$(".topLevelMenus li,.mobileTopLevelMenus dd").click(function(){
if($(this).parents(".mobileTopLevelMenus").length != "0"){
$(".topLevelMenus li").eq($(this).index()).addClass("layui-this").siblings().removeClass("layui-this");
}else{
$(".mobileTopLevelMenus dd").eq($(this).index()).addClass("layui-this").siblings().removeClass("layui-this");
}
$(".layui-layout-admin").removeClass("showMenu");
$("body").addClass("site-mobile");
getData($(this).data("menu"));
//渲染顶部窗口
tab.tabMove();
})
//隐藏左侧导航
$(".hideMenu").click(function(){
if($(".topLevelMenus li.layui-this a").data("url")){
layer.msg("此栏目状态下左侧菜单不可展开"); //主要为了避免左侧显示的内容与顶部菜单不匹配
return false;
}
$(".layui-layout-admin").toggleClass("showMenu");
//渲染顶部窗口
tab.tabMove();
})
//通过顶部菜单获取左侧二三级菜单 注:此处只做演示之用,实际开发中通过接口传参的方式获取导航数据
getData("contentManagement");
//手机设备的简单适配
$('.site-tree-mobile').on('click', function(){
$('body').addClass('site-mobile');
});
$('.site-mobile-shade').on('click', function(){
$('body').removeClass('site-mobile');
});
// 添加新窗口
$("body").on("click",".layui-nav .layui-nav-item a:not('.mobileTopLevelMenus .layui-nav-item a')",function(){
//如果不存在子级
if($(this).siblings().length == 0){
addTab($(this));
$('body').removeClass('site-mobile'); //移动端点击菜单关闭菜单层
}
$(this).parent("li").siblings().removeClass("layui-nav-itemed");
})
//清除缓存
$(".clearCache").click(function(){
window.sessionStorage.clear();
window.localStorage.clear();
var index = layer.msg('清除缓存中,请稍候',{icon: 16,time:false,shade:0.8});
setTimeout(function(){
layer.close(index);
layer.msg("缓存清除成功!");
},1000);
})
//刷新后还原打开的窗口
if(cacheStr == "true") {
if (window.sessionStorage.getItem("menu") != null) {
menu = JSON.parse(window.sessionStorage.getItem("menu"));
curmenu = window.sessionStorage.getItem("curmenu");
var openTitle = '';
for (var i = 0; i < menu.length; i++) {
openTitle = '';
if (menu[i].icon) {
if (menu[i].icon.split("-")[0] == 'icon') {
openTitle += '<i class="seraph ' + menu[i].icon + '"></i>';
} else {
openTitle += '<i class="layui-icon">' + menu[i].icon + '</i>';
}
}
openTitle += '<cite>' + menu[i].title + '</cite>';
openTitle += '<i class="layui-icon layui-unselect layui-tab-close" data-id="' + menu[i].layId + '">&#x1006;</i>';
element.tabAdd("bodyTab", {
title: openTitle,
content: "<iframe src='" + menu[i].href + "' data-id='" + menu[i].layId + "'></frame>",
id: menu[i].layId
})
//定位到刷新前的窗口
if (curmenu != "undefined") {
if (curmenu == '' || curmenu == "null") { //定位到后台首页
element.tabChange("bodyTab", '');
} else if (JSON.parse(curmenu).title == menu[i].title) { //定位到刷新前的页面
element.tabChange("bodyTab", menu[i].layId);
}
} else {
element.tabChange("bodyTab", menu[menu.length - 1].layId);
}
}
//渲染顶部窗口
tab.tabMove();
}
}else{
window.sessionStorage.removeItem("menu");
window.sessionStorage.removeItem("curmenu");
}
})
//打开新窗口
function addTab(_this){
tab.tabAdd(_this);
}
//捐赠弹窗
function donation(){
layer.tab({
area : ['260px', '367px'],
tab : [{
title : "微信",
content : "<div style='padding:30px;overflow:hidden;background:#d2d0d0;'><img src='images/wechat.jpg'></div>"
},{
title : "支付宝",
content : "<div style='padding:30px;overflow:hidden;background:#d2d0d0;'><img src='images/alipay.jpg'></div>"
}]
})
}
//图片管理弹窗
function showImg(){
$.getJSON('json/images.json', function(json){
var res = json;
layer.photos({
photos: res,
anim: 5
});
});
}

@ -0,0 +1,98 @@
//获取系统时间
var newDate = '';
getLangDate();
//值小于10时在前面补0
function dateFilter(date){
if(date < 10){return "0"+date;}
return date;
}
function getLangDate(){
var dateObj = new Date(); //表示当前系统时间的Date对象
var year = dateObj.getFullYear(); //当前系统时间的完整年份值
var month = dateObj.getMonth()+1; //当前系统时间的月份值
var date = dateObj.getDate(); //当前系统时间的月份中的日
var day = dateObj.getDay(); //当前系统时间中的星期值
var weeks = ["星期日","星期一","星期二","星期三","星期四","星期五","星期六"];
var week = weeks[day]; //根据星期值,从数组中获取对应的星期字符串
var hour = dateObj.getHours(); //当前系统时间的小时值
var minute = dateObj.getMinutes(); //当前系统时间的分钟值
var second = dateObj.getSeconds(); //当前系统时间的秒钟值
var timeValue = "" +((hour >= 12) ? (hour >= 18) ? "晚上" : "下午" : "上午" ); //当前时间属于上午、晚上还是下午
newDate = dateFilter(year)+"年"+dateFilter(month)+"月"+dateFilter(date)+"日 "+" "+dateFilter(hour)+":"+dateFilter(minute)+":"+dateFilter(second);
document.getElementById("nowTime").innerHTML = "亲爱的驊驊龔頾,"+timeValue+"好! 欢迎使用layuiCMS 2.0模版。当前时间为: "+newDate+" "+week;
setTimeout("getLangDate()",1000);
}
layui.use(['form','element','layer','jquery'],function(){
var form = layui.form,
layer = parent.layer === undefined ? layui.layer : top.layer,
element = layui.element;
$ = layui.jquery;
//上次登录时间【此处应该从接口获取,实际使用中请自行更换】
$(".loginTime").html(newDate.split("日")[0]+"日</br>"+newDate.split("日")[1]);
//icon动画
$(".panel a").hover(function(){
$(this).find(".layui-anim").addClass("layui-anim-scaleSpring");
},function(){
$(this).find(".layui-anim").removeClass("layui-anim-scaleSpring");
})
$(".panel a").click(function(){
parent.addTab($(this));
})
//系统基本参数
if(window.sessionStorage.getItem("systemParameter")){
var systemParameter = JSON.parse(window.sessionStorage.getItem("systemParameter"));
fillParameter(systemParameter);
}else{
$.ajax({
url : "../json/systemParameter.json",
type : "get",
dataType : "json",
success : function(data){
fillParameter(data);
}
})
}
//填充数据方法
function fillParameter(data){
//判断字段数据是否存在
function nullData(data){
if(data == '' || data == "undefined"){
return "未定义";
}else{
return data;
}
}
$(".version").text(nullData(data.version)); //当前版本
$(".author").text(nullData(data.author)); //开发作者
$(".homePage").text(nullData(data.homePage)); //网站首页
$(".server").text(nullData(data.server)); //服务器环境
$(".dataBase").text(nullData(data.dataBase)); //数据库版本
$(".maxUpload").text(nullData(data.maxUpload)); //最大上传限制
$(".userRights").text(nullData(data.userRights));//当前用户权限
}
//最新文章列表
$.get("../json/newsList.json",function(data){
var hotNewsHtml = '';
for(var i=0;i<5;i++){
hotNewsHtml += '<tr>'
+'<td align="left"><a href="javascript:;"> '+data.data[i].newsName+'</a></td>'
+'<td>'+data.data[i].newsTime.substring(0,10)+'</td>'
+'</tr>';
}
$(".hot_news").html(hotNewsHtml);
$(".userAll span").text(data.length);
})
//用户数量
$.get("../json/userList.json",function(data){
$(".userAll span").text(data.count);
})
//外部图标
$.get(iconUrl,function(data){
$(".outIcons span").text(data.split(".icon-").length-1);
})
})

File diff suppressed because one or more lines are too long

@ -0,0 +1,193 @@
{
"title": "图片管理",
"id": "Images",
"start": 0,
"data": [
{
"src": "images/userface1.jpg",
"thumb": "images/userface1.jpg",
"alt": "美女生活照1",
"pid":"1"
},
{
"src": "images/userface2.jpg",
"thumb": "images/userface2.jpg",
"alt": "美女生活照2",
"pid":"2"
},
{
"src": "images/userface3.jpg",
"thumb": "images/userface3.jpg",
"alt": "美女生活照3",
"pid":"3"
},
{
"src": "images/userface4.jpg",
"thumb": "images/userface4.jpg",
"alt": "美女生活照4",
"pid":"4"
},
{
"src": "images/userface5.jpg",
"thumb": "images/userface5.jpg",
"alt": "美女生活照5",
"pid":"5"
},
{
"src": "images/userface1.jpg",
"thumb": "images/userface1.jpg",
"alt": "美女生活照6",
"pid":"6"
},
{
"src": "images/userface2.jpg",
"thumb": "images/userface2.jpg",
"alt": "美女生活照7",
"pid":"7"
},
{
"src": "images/userface3.jpg",
"thumb": "images/userface3.jpg",
"alt": "美女生活照8",
"pid":"8"
},
{
"src": "images/userface4.jpg",
"thumb": "images/userface4.jpg",
"alt": "美女生活照9",
"pid":"9"
},
{
"src": "images/userface5.jpg",
"thumb": "images/userface5.jpg",
"alt": "美女生活照10",
"pid":"10"
},
{
"src": "images/userface1.jpg",
"thumb": "images/userface1.jpg",
"alt": "美女生活照11",
"pid":"11"
},
{
"src": "images/userface2.jpg",
"thumb": "images/userface2.jpg",
"alt": "美女生活照12",
"pid":"12"
},
{
"src": "images/userface3.jpg",
"thumb": "images/userface3.jpg",
"alt": "美女生活照13",
"pid":"13"
},
{
"src": "images/userface4.jpg",
"thumb": "images/userface4.jpg",
"alt": "美女生活照14",
"pid":"14"
},
{
"src": "images/userface5.jpg",
"thumb": "images/userface5.jpg",
"alt": "美女生活照15",
"pid":"15"
},
{
"src": "images/userface1.jpg",
"thumb": "images/userface1.jpg",
"alt": "美女生活照16",
"pid":"16"
},
{
"src": "images/userface2.jpg",
"thumb": "images/userface2.jpg",
"alt": "美女生活照17",
"pid":"17"
},
{
"src": "images/userface3.jpg",
"thumb": "images/userface3.jpg",
"alt": "美女生活照18",
"pid":"18"
},
{
"src": "images/userface4.jpg",
"thumb": "images/userface4.jpg",
"alt": "美女生活照19",
"pid":"19"
},
{
"src": "images/userface5.jpg",
"thumb": "images/userface5.jpg",
"alt": "美女生活照20",
"pid":"20"
},
{
"src": "images/userface1.jpg",
"thumb": "images/userface1.jpg",
"alt": "美女生活照21",
"pid":"21"
},
{
"src": "images/userface2.jpg",
"thumb": "images/userface2.jpg",
"alt": "美女生活照22",
"pid":"22"
},
{
"src": "images/userface3.jpg",
"thumb": "images/userface3.jpg",
"alt": "美女生活照23",
"pid":"23"
},
{
"src": "images/userface4.jpg",
"thumb": "images/userface4.jpg",
"alt": "美女生活照24",
"pid":"24"
},
{
"src": "images/userface5.jpg",
"thumb": "images/userface5.jpg",
"alt": "美女生活照25",
"pid":"25"
},
{
"src": "images/userface1.jpg",
"thumb": "images/userface1.jpg",
"alt": "美女生活照26",
"pid":"26"
},
{
"src": "images/userface2.jpg",
"thumb": "images/userface2.jpg",
"alt": "美女生活照27",
"pid":"27"
},
{
"src": "images/userface3.jpg",
"thumb": "images/userface3.jpg",
"alt": "美女生活照28",
"pid":"28"
},
{
"src": "images/userface4.jpg",
"thumb": "images/userface4.jpg",
"alt": "美女生活照29",
"pid":"29"
},
{
"src": "images/userface5.jpg",
"thumb": "images/userface5.jpg",
"alt": "美女生活照30",
"pid":"30"
},
{
"src": "images/userface3.jpg",
"thumb": "images/userface3.jpg",
"alt": "美女生活照31",
"pid":"31"
}
]
}

@ -0,0 +1,40 @@
{
"code": 0,
"msg": "",
"count": 4,
"data": [
{
"linkId": "1",
"logo": "../../images/layui.png",
"websiteName": "layui - 经典模块化前端框架",
"websiteUrl": "http://www.layui.com",
"masterEmail": "xianxin@layui.com",
"addTime": "2017-05-14",
"showAddress": "checked"
},{
"linkId": "2",
"logo": "../../images/fly.png",
"websiteName": "fly - 前端框架官方社区",
"websiteUrl": "http://fly.layui.com",
"masterEmail": "xianxin@layui.com",
"addTime": "2017-05-14",
"showAddress": ""
},{
"linkId": "3",
"logo": "../../images/mayun.png",
"websiteName": "layuicms2.0 - 码云 - 开源中国",
"websiteUrl": "https://gitee.com/layuicms/layuicms2.0",
"masterEmail": "git@oschina.cn",
"addTime": "2017-05-14",
"showAddress": ""
},{
"linkId": "4",
"logo": "../../images/git.png",
"websiteName": "layuicms2.0 - Github",
"websiteUrl": "https://github.com/BrotherMa/layuiCMS2.0",
"masterEmail": "github@github.cn",
"addTime": "2017-05-14",
"showAddress": ""
}
]
}

@ -0,0 +1,15 @@
{
"code": 0,
"msg": "",
"data": [
{
"src": "../../images/fly.png"
},{
"src": "../../images/git.png"
},{
"src": "../../images/layui.png"
},{
"src": "../../images/mayun.png"
}
]
}

@ -0,0 +1,158 @@
{
"code": 0,
"msg": "",
"count": 15,
"data": [
{
"logId": "1",
"url": "https://gitee.com/layuicms/layuicms2.0",
"method" : "GET",
"ip": "192.169.39.11",
"timeConsuming":"125",
"isAbnormal": "正常",
"operator": "驊驊龔頾",
"operatingTime": "2017-04-14 00:00:00"
},
{
"logId": "2",
"url": "https://gitee.com/layuicms/layuicms2.0",
"method" : "POST",
"ip": "192.169.39.11",
"timeConsuming":"89",
"isAbnormal": "异常",
"operator": "驊驊龔頾",
"operatingTime": "2017-04-14 00:00:00"
},
{
"logId": "3",
"url": "https://gitee.com/layuicms/layuicms2.0",
"method" : "GET",
"ip": "192.169.39.11",
"timeConsuming":"125",
"isAbnormal": "正常",
"operator": "admin",
"operatingTime": "2017-04-14 00:00:00"
},
{
"logId": "4",
"url": "https://gitee.com/layuicms/layuicms2.0",
"method" : "GET",
"ip": "192.169.39.11",
"timeConsuming":"125",
"isAbnormal": "异常",
"operator": "admin",
"operatingTime": "2017-04-14 00:00:00"
},
{
"logId": "5",
"url": "https://gitee.com/layuicms/layuicms2.0",
"method" : "POST",
"ip": "192.169.39.11",
"timeConsuming":"55",
"newsLook": "开放浏览",
"isAbnormal": "正常",
"operator": "驊驊龔頾",
"operatingTime": "2017-04-14 00:00:00"
},
{
"logId": "6",
"url": "https://gitee.com/layuicms/layuicms2.0",
"method": "POST",
"ip": "192.169.39.11",
"timeConsuming":"125",
"isAbnormal": "正常",
"operator": "admin",
"operatingTime": "2017-04-14 00:00:00"
},
{
"logId": "7",
"url": "https://gitee.com/layuicms/layuicms2.0",
"method" : "GET",
"ip": "192.169.39.11",
"timeConsuming":"125",
"isAbnormal": "异常",
"operator": "驊驊龔頾",
"operatingTime": "2017-04-14 00:00:00"
},
{
"logId": "8",
"url": "https://gitee.com/layuicms/layuicms2.0",
"method" : "POST",
"ip": "192.169.39.11",
"timeConsuming":"15",
"isAbnormal": "正常",
"operator": "驊驊龔頾",
"operatingTime": "2017-04-14 00:00:00"
},
{
"logId": "9",
"url": "https://gitee.com/layuicms/layuicms2.0",
"method" : "GET",
"ip": "192.169.39.11",
"timeConsuming":"125",
"isAbnormal": "正常",
"operator": "admin",
"operatingTime": "2017-04-14 00:00:00"
},
{
"logId": "10",
"url": "https://gitee.com/layuicms/layuicms2.0",
"method" : "GET",
"ip": "192.169.39.11",
"timeConsuming":"25",
"isAbnormal": "异常",
"operator": "admin",
"operatingTime": "2017-04-14 00:00:00"
},
{
"logId": "11",
"url": "https://gitee.com/layuicms/layuicms2.0",
"method" : "POST",
"ip": "192.169.39.11",
"timeConsuming":"125",
"isAbnormal": "正常",
"operator": "驊驊龔頾",
"operatingTime": "2017-04-14 00:00:00"
},
{
"logId": "12",
"url": "https://gitee.com/layuicms/layuicms2.0",
"method" : "GET",
"ip": "192.169.39.11",
"timeConsuming":"125",
"isAbnormal": "正常",
"operator": "驊驊龔頾",
"operatingTime": "2017-04-14 00:00:00"
},
{
"logId": "13",
"url": "https://gitee.com/layuicms/layuicms2.0",
"method" : "GET",
"ip": "192.169.39.11",
"timeConsuming":"12",
"isAbnormal": "正常",
"operator": "admin",
"operatingTime": "2017-04-14 00:00:00"
},
{
"logId": "14",
"url": "https://gitee.com/layuicms/layuicms2.0",
"method" : "POST",
"ip": "192.169.39.11",
"timeConsuming":"125",
"isAbnormal": "异常",
"operator": "驊驊龔頾",
"operatingTime": "2017-04-14 00:00:00"
},
{
"logId": "15",
"url": "https://gitee.com/layuicms/layuicms2.0",
"method" : "GET",
"ip": "192.169.39.11",
"timeConsuming":"125",
"isAbnormal": "正常",
"operator": "驊驊龔頾",
"operatingTime": "2017-04-14 00:00:00"
}
]
}

@ -0,0 +1,94 @@
{
"contentManagement": [
{
"title": "文章列表",
"icon": "icon-text",
"href": "page/news/newsList.html",
"spread": false
},
{
"title": "图片管理",
"icon": "&#xe634;",
"href": "page/img/images.html",
"spread": false
},
{
"title": "其他页面",
"icon": "&#xe630;",
"href": "",
"spread": false,
"children": [
{
"title": "404页面",
"icon": "&#xe61c;",
"href": "page/404.html",
"spread": false
},
{
"title": "登录",
"icon": "&#xe609;",
"href": "page/login/login.html",
"spread": false,
"target": "_blank"
}
]
}
],
"memberCenter": [
{
"title": "用户中心",
"icon": "&#xe612;",
"href": "page/user/userList.html",
"spread": false
},
{
"title": "会员等级",
"icon": "icon-vip",
"href": "page/user/userGrade.html",
"spread": false
}
],
"systemeSttings": [
{
"title": "系统基本参数",
"icon": "&#xe631;",
"href": "page/systemSetting/basicParameter.html",
"spread": false
},{
"title": "系统日志",
"icon": "icon-log",
"href": "page/systemSetting/logs.html",
"spread": false
},{
"title": "友情链接",
"icon": "&#xe64c;",
"href": "page/systemSetting/linkList.html",
"spread": false
},{
"title": "图标管理",
"icon": "&#xe857;",
"href": "page/systemSetting/icons.html",
"spread": false
}
],
"seraphApi": [
{
"title": "三级联动模块",
"icon": "icon-mokuai",
"href": "page/doc/addressDoc.html",
"spread": false
},{
"title": "bodyTab模块",
"icon": "icon-mokuai",
"href": "page/doc/bodyTabDoc.html",
"spread": false
},{
"title": "三级菜单",
"icon": "icon-mokuai",
"href": "page/doc/navDoc.html",
"spread": false
}
]
}

@ -0,0 +1,35 @@
[
{
"title": "文章列表",
"icon": "icon-text",
"href": "page/news/newsList.html",
"spread": false
},
{
"title": "图片管理",
"icon": "&#xe634;",
"href": "page/img/images.html",
"spread": false
},
{
"title": "其他页面",
"icon": "&#xe630;",
"href": "",
"spread": false,
"children": [
{
"title": "404页面",
"icon": "&#xe61c;",
"href": "page/404.html",
"spread": false
},
{
"title": "登录",
"icon": "&#xe609;",
"href": "page/login/login.html",
"spread": false,
"target": "_blank"
}
]
}
]

@ -0,0 +1,8 @@
{
"code": 0,
"msg": "",
"data":{
"src": "../../images/userface1.jpg",
"title" : "文章内容图片"
}
}

@ -0,0 +1,187 @@
{
"code": 0,
"msg": "",
"count": 15,
"data": [
{
"newsId": "1",
"newsName": "css3用transition实现边框动画效果",
"newsAuthor": "驊驊龔頾",
"abstract": "css3用transition实现边框动画效果css3用transition实现边框动画效果",
"newsStatus": "0",
"newsImg":"../../images/userface1.jpg",
"newsLook": "开放浏览",
"newsTop": "",
"newsTime": "2017-04-14 00:00:00",
"content" : "css3用transition实现边框动画效果<img src='../../images/userface1.jpg' alt='文章内容图片'>css3用transition实现边框动画效果css3用transition实现边框动画效果"
},
{
"newsId": "2",
"newsName": "自定义的模块名称可以包含/吗",
"newsAuthor": "驊驊龔頾",
"abstract": "自定义的模块名称可以包含/吗自定义的模块名称可以包含/吗",
"newsStatus": "1",
"newsImg":"../../images/userface2.jpg",
"newsLook": "私密浏览",
"newsTop": "checked",
"newsTime": "2017-04-14 00:00:00",
"content" : "自定义的模块名称可以包含自定义的模块名称可<img src='../../images/userface2.jpg' alt='文章内容图片'>以包含自定义的模块名称可以包含自定义的模块名称可以包含"
},
{
"newsId": "3",
"newsName": "layui.tree如何ajax加载二级菜单",
"newsAuthor": "admin",
"abstract": "layui.tree如何ajax加载二级菜单layui.tree如何ajax加载二级菜单",
"newsStatus": "2",
"newsImg":"../../images/userface3.jpg",
"newsLook": "开放浏览",
"newsTop": "checked",
"newsTime": "2017-04-14 00:00:00",
"content" : "layui.tree如何ajax加载二级菜单layui.tree如何<img src='../../images/userface3.jpg' alt='文章内容图片'>ajax加载二级菜单layui.tree如何ajax加载二级菜单"
},
{
"newsId": "4",
"newsName": "layui.upload如何带参数像jq的data:{}那样",
"newsAuthor": "admin",
"abstract": "layui.upload如何带参数像jq的data:{}那样layui.upload如何带参数像jq的data:{}那样",
"newsStatus": "0",
"newsImg":"../../images/userface4.jpg",
"newsLook": "私密浏览",
"newsTop": "",
"newsTime": "2017-04-14 00:00:00",
"content" : "layui.upload如何带参数像jq的data:{}那样layui.upload如何带参数像jq的data:{}那样layui.upload如何带参数像jq的data:{}那样"
},
{
"newsId": "5",
"newsName": "表单元素长度应该怎么调整才美观",
"newsAuthor": "驊驊龔頾",
"abstract": "表单元素长度应该怎么调整才美观表单元素长度应该怎么调整才美观",
"newsStatus": "1",
"newsImg":"../../images/userface5.jpg",
"newsLook": "开放浏览",
"newsTop": "checked",
"newsTime": "2017-04-14 00:00:00",
"content" : "表单元素长度应该怎么调整才美观表单元素长度应该怎么调整才美观表单元素长度应该怎么调整才美观表单元素长度应该怎么调整才美观"
},
{
"newsId": "6",
"newsName": "layui 利用ajax冲获取到json 数据后 怎样进行渲染",
"newsAuthor": "admin",
"abstract": "layui 利用ajax冲获取到json 数据后 怎样进行渲染layui 利用ajax冲获取到json 数据后 怎样进行渲染",
"newsStatus": "0",
"newsImg":"../../images/userface1.jpg",
"newsLook": "私密浏览",
"newsTop": "checked",
"newsTime": "2017-04-14 00:00:00",
"content" : "layui 利用ajax冲获取到json 数据后 怎样进行渲染layui 利用ajax冲获取到json 数据后 怎样进行渲染layui 利用ajax冲获取到json 数据后 怎样进行渲染"
},
{
"newsId": "7",
"newsName": "微信页面中富文本编辑器LayEdit无法使用",
"newsAuthor": "驊驊龔頾",
"abstract": "微信页面中富文本编辑器LayEdit无法使用微信页面中富文本编辑器LayEdit无法使用",
"newsStatus": "1",
"newsImg":"../../images/userface2.jpg",
"newsLook": "开放浏览",
"newsTop": "",
"newsTime": "2017-04-14 00:00:00",
"content" : "微信页面中富文本编辑器LayEdit无法使用微信页面中富文本编辑器LayEdit无法使用微信页面中富文本编辑器LayEdit无法使用"
},
{
"newsId": "8",
"newsName": "layui 什么时候发布新的版本呀",
"newsAuthor": "驊驊龔頾",
"abstract": "layui 什么时候发布新的版本呀layui 什么时候发布新的版本呀",
"newsStatus": "2",
"newsImg":"../../images/userface3.jpg",
"newsLook": "私密浏览",
"newsTop": "checked",
"newsTime": "2017-04-14 00:00:00",
"content" : "layui 什么时候发布新的版本呀layui 什么时候发布新的版本呀layui 什么时候发布新的版本呀layui 什么时候发布新的版本呀"
},
{
"newsId": "9",
"newsName": "layui上传组件不支持上传前的图片预览嘛",
"newsAuthor": "admin",
"abstract": "layui上传组件不支持上传前的图片预览嘛layui上传组件不支持上传前的图片预览嘛",
"newsStatus": "2",
"newsImg":"../../images/userface4.jpg",
"newsLook": "私密浏览",
"newsTop": "checked",
"newsTime": "2017-04-14 00:00:00",
"content" : "layui上传组件不支持上传前的图片预览嘛layui上传组件不支持上传前的图片预览嘛layui上传组件不支持上传前的图片预览嘛"
},
{
"newsId": "10",
"newsName": "关于layer.confirm点击无法关闭的疑惑",
"newsAuthor": "admin",
"abstract": "关于layer.confirm点击无法关闭的疑惑关于layer.confirm点击无法关闭的疑惑",
"newsStatus": "1",
"newsImg":"../../images/userface5.jpg",
"newsLook": "开放浏览",
"newsTop": "",
"newsTime": "2017-04-14 00:00:00",
"content" : "关于layer.confirm点击无法关闭的疑惑关于layer.confirm点击无法关闭的疑惑关于layer.confirm点击无法关闭的疑惑"
},
{
"newsId": "11",
"newsName": "layui form表单提交成功如何拿取返回值",
"newsAuthor": "驊驊龔頾",
"abstract": "layui form表单提交成功如何拿取返回值layui form表单提交成功如何拿取返回值",
"newsStatus": "2",
"newsImg":"../../images/userface1.jpg",
"newsLook": "私密浏览",
"newsTop": "checked",
"newsTime": "2017-04-14 00:00:00",
"content" : "layui form表单提交成功如何拿取返回值layui form表单提交成功如何拿取返回值layui form表单提交成功如何拿取返回值"
},
{
"newsId": "12",
"newsName": "layer mobileV2.0 yes回调函数无法用",
"newsAuthor": "驊驊龔頾",
"abstract": "layer mobileV2.0 yes回调函数无法用layer mobileV2.0 yes回调函数无法用",
"newsStatus": "1",
"newsImg":"../../images/userface2.jpg",
"newsLook": "开放浏览",
"newsTop": "checked",
"newsTime": "2017-04-14 00:00:00",
"content" : "layer mobileV2.0 yes回调函数无法用layer mobileV2.0 yes回调函数无法用layer mobileV2.0 yes回调函数无法用"
},
{
"newsId": "13",
"newsName": "关于layer中自带的btn回调弹层页面的内容",
"newsAuthor": "admin",
"abstract": "关于layer中自带的btn回调弹层页面的内容关于layer中自带的btn回调弹层页面的内容",
"newsStatus": "1",
"newsImg":"../../images/userface3.jpg",
"newsLook": "私密浏览",
"newsTop": "",
"newsTime": "2017-04-14 00:00:00",
"content" : "关于layer中自带的btn回调弹层页面的内容关于layer中自带的btn回调弹层页面的内容关于layer中自带的btn回调弹层页面的内容"
},
{
"newsId": "14",
"newsName": "被编辑器 layedit 图片上传搞崩溃了",
"newsAuthor": "驊驊龔頾",
"abstract": "被编辑器 layedit 图片上传搞崩溃了被编辑器 layedit 图片上传搞崩溃了",
"newsStatus": "0",
"newsImg":"../../images/userface4.jpg",
"newsLook": "私密浏览",
"newsTop": "checked",
"newsTime": "2017-04-14 00:00:00",
"content" : "被编辑器 layedit 图片上传搞崩溃了被编辑器 layedit 图片上传搞崩溃了被编辑器 layedit 图片上传搞崩溃了"
},
{
"newsId": "15",
"newsName": "element.tabChange()方法运行了,但是页面并没有产生效果",
"newsAuthor": "驊驊龔頾",
"abstract": "element.tabChange()方法运行了但是页面并没有产生效果element.tabChange()方法运行了,但是页面并没有产生效果",
"newsStatus": "2",
"newsImg":"../../images/userface5.jpg",
"newsLook": "开放浏览",
"newsTop": "checked",
"newsTime": "2017-04-14 00:00:00",
"content" : "element.tabChange()方法运行了但是页面并没有产生效果element.tabChange()方法运行了,但是页面并没有产生效果"
}
]
}

@ -0,0 +1,14 @@
{
"cmsName": "layuiCMS后台管理模版",
"version": "v2.0",
"author": "驊驊龔頾",
"homePage": "index.html",
"server": "windows",
"dataBase": "8.00.2039",
"maxUpload": "2M",
"userRights": "超级管理员",
"description": "这是马哥闲来无事做的一套基于layui的cms模版纯静态页面不包含数据库",
"powerby": "copyright @2017 驊驊龔頾",
"record": "京ICP备14040xxx号-1",
"keywords": "layuicms,马哥,layuicms2.0,后台模版,请叫我马哥,驊驊龔頾"
}

@ -0,0 +1,63 @@
{
"code": 0,
"msg": "",
"count": 1000,
"data": [
{
"id": 1,
"gradeIcon": "icon-vip1",
"gradeName": "倔强青铜",
"gradePoint": "0",
"gradeGold": "0",
"gradeValue": "0"
},
{
"id": 2,
"gradeIcon": "icon-vip2",
"gradeName": "秩序白银",
"gradePoint": "100",
"gradeGold": "200",
"gradeValue": "500"
},
{
"id": 3,
"gradeIcon": "icon-vip3",
"gradeName": "荣耀黄金",
"gradePoint": "300",
"gradeGold": "300",
"gradeValue": "1000"
},
{
"id": 4,
"gradeIcon": "icon-vip4",
"gradeName": "尊贵铂金",
"gradePoint": "800",
"gradeGold": "400",
"gradeValue": "2000"
},
{
"id": 5,
"gradeIcon": "icon-vip5",
"gradeName": "永恒钻石",
"gradePoint": "1500",
"gradeGold": "500",
"gradeValue": "5000"
},
{
"id": 6,
"gradeIcon": "icon-vip6",
"gradeName": "至尊星耀",
"gradePoint": "3000",
"gradeGold": "600",
"gradeValue": "10000"
},
{
"id": 7,
"gradeIcon": "icon-vip7",
"gradeName": "最强王者",
"gradePoint": "5000",
"gradeGold": "700",
"gradeValue": "35000"
}
]
}

@ -0,0 +1,36 @@
{
"code": 0,
"msg": "",
"count": 3,
"data": [
{
"usersId": "1",
"userName": "驊驊龔頾",
"userEmail": "mage@layui.com",
"userSex": "男",
"userStatus": "0",
"userGrade": "4",
"userEndTime": "2018-01-31 10:00",
"userDesc" : "layuiCMS作者原名请叫我马哥"
},{
"usersId": "2",
"userName": "贤心",
"userEmail": "xianxin@layui.com",
"userSex": "保密",
"userStatus": "0",
"userGrade": "3",
"userEndTime": "2018-01-14 15:35",
"userDesc" : "layui框架作者性别至今是个谜。。。"
},
{
"usersId": "3",
"userName": "纸飞机",
"userEmail": "fly@layui.com",
"userSex": "男",
"userStatus": "1",
"userGrade": "2",
"userEndTime": "2018-01-25 16:25",
"userDesc" : "fly社区管理员据传与layui作者有奸情故帐号被封。"
}
]
}

@ -0,0 +1,17 @@
{
"code": 0,
"msg": "",
"data": [
{
"src": "../../images/userface1.jpg"
},{
"src": "../../images/userface2.jpg"
},{
"src": "../../images/userface3.jpg"
},{
"src": "../../images/userface4.jpg"
},{
"src": "../../images/userface5.jpg"
}
]
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1,2 @@
/** layui-v2.5.5 MIT License By https://www.layui.com */
html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none}

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 277 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save