add java source files
This commit is contained in:
parent
b996976903
commit
6599ab4570
|
@ -0,0 +1,34 @@
|
|||
package com.example.demo;
|
||||
|
||||
import com.alibaba.druid.pool.DruidDataSource;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
|
||||
@SpringBootApplication
|
||||
@EnableTransactionManagement //开启事务管理
|
||||
@ComponentScan("com.example.demo")
|
||||
@MapperScan("com.example.demo.mapper")//与dao层的@Mapper二选一写上即可(主要作用是扫包)
|
||||
public class DemoApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
SpringApplication.run(DemoApplication.class, args);
|
||||
}
|
||||
|
||||
|
||||
@Bean(destroyMethod = "close", initMethod = "init")
|
||||
@ConfigurationProperties(prefix = "spring.datasource")
|
||||
public DataSource druidDataSource() {
|
||||
DruidDataSource druidDataSource = new DruidDataSource();
|
||||
return druidDataSource;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,114 @@
|
|||
package com.example.demo.controller;
|
||||
|
||||
import com.example.demo.entity.User;
|
||||
import com.example.demo.service.UserService;
|
||||
import com.example.demo.util.Json;
|
||||
import com.example.demo.util.Tool;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.http.HttpSession;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static java.lang.System.out;
|
||||
|
||||
@Controller
|
||||
@RequestMapping(value = "/user")//设置访问改控制类的"别名"
|
||||
public class UserController {
|
||||
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
||||
/*
|
||||
**返回标准的Json格式数据其中包括(是否成功、状态码、消息、内容)
|
||||
* 该方法是由于公司很多童鞋写接口时没有一个标准的定义,天马行空的编写数据接口导致调用时效率极低,因此自己写了一个标准的
|
||||
* 接口调用方法,仅供大家参考
|
||||
* @param statu
|
||||
* @param code
|
||||
* @param message
|
||||
* @author lgf
|
||||
* */
|
||||
@RequestMapping("/getAllUser")
|
||||
@ResponseBody
|
||||
private void getAllUser(HttpServletResponse response)throws Exception {
|
||||
List<User> users = userService.getAllUser();
|
||||
if(users.isEmpty()){
|
||||
Json.toJson(new Tool(false,7000,"没有数据",null),response);
|
||||
return;
|
||||
}
|
||||
List<User> listuser = new ArrayList<User>();
|
||||
for (User entity : users) {
|
||||
User user = new User();
|
||||
user.setId(entity.getId());
|
||||
user.setName(entity.getName());
|
||||
user.setAge(entity.getAge());
|
||||
user.setSex(entity.getSex());
|
||||
listuser.add(entity);
|
||||
}
|
||||
Tool result = new Tool(true,200,"成功",listuser);
|
||||
Json.toJson(result,response);
|
||||
|
||||
}
|
||||
@RequestMapping("/find")
|
||||
@ResponseBody
|
||||
private User find() {
|
||||
User users = userService.getAllUserByName("小芳");
|
||||
return users;
|
||||
}
|
||||
@RequestMapping("/checkLogin")
|
||||
@ResponseBody
|
||||
private User checkLogin() {
|
||||
User users = new User();
|
||||
return users;
|
||||
}
|
||||
/*
|
||||
**登录调用方法跳转登录页面
|
||||
* @author lgf
|
||||
* */
|
||||
@RequestMapping("/login")
|
||||
//@GetMapping("/login")
|
||||
private String index() {
|
||||
return "Login2.html";
|
||||
}
|
||||
/*
|
||||
**登录成功响应方法
|
||||
* @param message
|
||||
* @author lgf
|
||||
* */
|
||||
@RequestMapping(value="/success",method = {RequestMethod.POST, RequestMethod.GET})
|
||||
private String ok() {
|
||||
return "success";
|
||||
}
|
||||
/*
|
||||
**输入账号密码登录校验方法
|
||||
* @param message
|
||||
* @author lgf
|
||||
* */
|
||||
@RequestMapping(value="/loginPage",method = {RequestMethod.POST, RequestMethod.GET})
|
||||
private ModelAndView login(HttpServletRequest request, HttpSession session) {
|
||||
ModelAndView mav=new ModelAndView();
|
||||
//out.print("ajax进入后台!!");
|
||||
String name = request.getParameter("username");
|
||||
String id = request.getParameter("pwd");
|
||||
User tname = userService.loginPage(name,id);
|
||||
out.print(tname);
|
||||
if (tname == null) {
|
||||
mav.clear();
|
||||
mav.setViewName("Login2");
|
||||
return mav;
|
||||
} else {
|
||||
session.setAttribute("tname", tname.getName());
|
||||
out.print(tname.getName());
|
||||
//验证通过跳转首页
|
||||
mav.setViewName("homePage");
|
||||
return mav;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
package com.example.demo.entity;
|
||||
|
||||
public class User {
|
||||
|
||||
private String id;
|
||||
private String name;
|
||||
private String sex;
|
||||
private String age ;
|
||||
// private String memo;
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public void setSex(String sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public String getAge() {
|
||||
return age;
|
||||
}
|
||||
|
||||
public void setAge(String age) {
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
/* public String getMemo() {
|
||||
return memo;
|
||||
}
|
||||
|
||||
public void setMemo(String memo) {
|
||||
this.memo = memo;
|
||||
}*/
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.example.demo.mapper;
|
||||
|
||||
import com.example.demo.entity.User;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
//@Mapper //声明是一个Mapper,与springbootApplication中的@MapperScan二选一写上即可
|
||||
@Repository
|
||||
public interface UserMapper {
|
||||
|
||||
List<User> getAllUser();
|
||||
@Select("select name,id from user where name=#{name}")
|
||||
User getAllUserByName(@Param("name") String name);
|
||||
User loginPage(String name,String id);
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
package com.example.demo.service;
|
||||
|
||||
import com.example.demo.entity.User;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface UserService {
|
||||
List<User> getAllUser();
|
||||
User getAllUserByName(String name);
|
||||
User loginPage(String name,String id);
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
package com.example.demo.service.impl;
|
||||
|
||||
import com.example.demo.entity.User;
|
||||
import com.example.demo.mapper.UserMapper;
|
||||
import com.example.demo.service.UserService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Service(value = "userService")
|
||||
public class UserServiceImpl implements UserService {
|
||||
|
||||
@Resource
|
||||
private UserMapper userMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public List<User> getAllUser() {
|
||||
return userMapper.getAllUser();
|
||||
}
|
||||
|
||||
@Override
|
||||
public User getAllUserByName(String name) {
|
||||
return userMapper.getAllUserByName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public User loginPage(String name, String id) {
|
||||
return userMapper.loginPage(name,id);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
package com.example.demo.util;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.PrintWriter;
|
||||
|
||||
public class Json {
|
||||
/*
|
||||
**返回标准的Json格式数据其中包括(是否成功、状态码、消息、内容)
|
||||
* @param statu
|
||||
* @param code
|
||||
* @param message
|
||||
* @author lgf
|
||||
* */
|
||||
public static void toJson(Tool result, HttpServletResponse response)throws Exception{
|
||||
response.setContentType("text/json");
|
||||
response.setHeader("Cache-Control","no-cache");
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
PrintWriter writer = response.getWriter();
|
||||
|
||||
String json = JSONObject.toJSONString(result,
|
||||
SerializerFeature.WriteMapNullValue,
|
||||
SerializerFeature.WriteNullNumberAsZero,
|
||||
SerializerFeature.WriteNullListAsEmpty,
|
||||
SerializerFeature.WriteNullStringAsEmpty,
|
||||
SerializerFeature.WriteNullBooleanAsFalse,
|
||||
SerializerFeature.DisableCircularReferenceDetect);
|
||||
writer.write(json);
|
||||
writer.close();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.example.demo.util;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.util.MimeType;
|
||||
|
||||
import java.nio.charset.Charset;
|
||||
|
||||
@ConfigurationProperties(prefix = "spring.thymeleaf")
|
||||
public class ThymeleafProperties {
|
||||
private static final Charset DEFAULT_ENCODING = Charset.forName("UTF-8");
|
||||
|
||||
private static final MimeType DEFAULT_CONTENT_TYPE = MimeType.valueOf("text/html");
|
||||
|
||||
public static final String DEFAULT_PREFIX = "classpath:/templates/";
|
||||
|
||||
public static final String DEFAULT_SUFFIX = ".html";
|
||||
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
package com.example.demo.util;
|
||||
|
||||
public class Tool {
|
||||
private Integer code;//状态码
|
||||
private Boolean isSuccess;//是否成功/状态
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(Integer code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public Boolean getSuccess() {
|
||||
return isSuccess;
|
||||
}
|
||||
|
||||
public void setSuccess(Boolean success) {
|
||||
isSuccess = success;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public Object getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(Object result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
private String message;//消息
|
||||
private Object result;//数据对象
|
||||
/*
|
||||
* 构造函数*/
|
||||
public Tool(){
|
||||
super();
|
||||
}
|
||||
/**
|
||||
*返回标准的Json格式数据其中包括(是否成功、状态码、消息、内容)
|
||||
* @param statu
|
||||
* @param code
|
||||
* @param message
|
||||
*/
|
||||
public Tool(Boolean success,Integer code,String message,Object result ){
|
||||
super();
|
||||
this.isSuccess=success;
|
||||
this.code=code;
|
||||
this.message=message;
|
||||
this.result=result;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
|
|
@ -0,0 +1,37 @@
|
|||
#服务器端口和项目名称配置
|
||||
server:
|
||||
port: 8081
|
||||
#数据库配置
|
||||
spring:
|
||||
datasource:
|
||||
name: springboot
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://localhost:3306/springboot?useUnicode=true&characterEncoding=utf-8&userSSL=false&serverTimezone=GMT%2B8
|
||||
username: root
|
||||
password: 123456
|
||||
# 使用druid数据源
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
filters: stat
|
||||
maxActive: 20
|
||||
initialSize: 1
|
||||
maxWait: 60000
|
||||
minIdle: 1
|
||||
timeBetweenEvictionRunsMillis: 60000
|
||||
minEvictableIdleTimeMillis: 300000
|
||||
validationQuery: select 'x'
|
||||
testWhileIdle: true
|
||||
testOnBorrow: false
|
||||
testOnReturn: false
|
||||
poolPreparedStatements: true
|
||||
maxOpenPreparedStatements: 20
|
||||
# 这里我使用了devtool热部署技术,这样就不需要每次都重启服务!!-->
|
||||
debug: true
|
||||
spring:
|
||||
devtools:
|
||||
restart:
|
||||
enabled: true #设置开启热部署
|
||||
freemarker:
|
||||
cache: false #页面不加载缓存,修改即时生效
|
||||
#配置Mapper.xml映射文件
|
||||
mybatis:
|
||||
mapper-locations: classpath*:mybatis/mapper/*.xml
|
|
@ -0,0 +1,16 @@
|
|||
<?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.example.demo.mapper.UserMapper">
|
||||
|
||||
<select id="getAllUser" resultType="com.example.demo.entity.User">
|
||||
SELECT * FROM user
|
||||
</select>
|
||||
<!-- <select id="getAllUserByName" parameterType="String" resultType="com.example.demo.entity.User">
|
||||
SELECT name,id FROM user where name=#{value}
|
||||
</select>-->
|
||||
<select id="loginPage" parameterType="String" resultType="com.example.demo.entity.User">
|
||||
SELECT name FROM user where name=#{0} and id=#{1}
|
||||
</select>
|
||||
</mapper>
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,145 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<script
|
||||
src="http://code.jquery.com/jquery-latest.js"></script>
|
||||
<meta charset="utf-8" />
|
||||
<title>用户登录系统</title><base target="_blank" />
|
||||
<style>
|
||||
*{
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
}
|
||||
a{color:White}
|
||||
body{
|
||||
font-family:Arial, Helvetica, sans-serif;
|
||||
background:url(http://keleyi.com/keleyi/phtml/divcss/21/images/grass.jpg) no-repeat center;
|
||||
font-size:13px;
|
||||
}
|
||||
img{
|
||||
border:0;
|
||||
}
|
||||
.lg{width:468px; height:468px; margin:100px auto; background:url(http://keleyi.com/keleyi/phtml/divcss/21/images/login_bg.png) no-repeat;}
|
||||
.lg_top{ height:200px; width:468px;}
|
||||
.lg_main{width:400px; height:180px; margin:0 25px;}
|
||||
.lg_m_1{
|
||||
width:290px;
|
||||
height:100px;
|
||||
padding:60px 55px 20px 55px;
|
||||
}
|
||||
.ur{
|
||||
height:37px;
|
||||
border:0;
|
||||
color:#666;
|
||||
width:236px;
|
||||
margin:4px 28px;
|
||||
background:url(http://keleyi.com/keleyi/phtml/divcss/21/images/user.png) no-repeat;
|
||||
padding-left:10px;
|
||||
font-size:16pt;
|
||||
font-family:Arial, Helvetica, sans-serif;
|
||||
}
|
||||
.pw{
|
||||
height:37px;
|
||||
border:0;
|
||||
color:#666;
|
||||
width:236px;
|
||||
margin:4px 28px;
|
||||
background:url(http://keleyi.com/keleyi/phtml/divcss/21/images/password.png) no-repeat;
|
||||
padding-left:10px;
|
||||
font-size:16pt;
|
||||
font-family:Arial, Helvetica, sans-serif;
|
||||
}
|
||||
.bn{width:330px; height:72px; background:url(http://keleyi.com/keleyi/phtml/divcss/21/images/enter.png) no-repeat; border:0; display:block; font-size:18px; color:#FFF; font-family:Arial, Helvetica, sans-serif; font-weight:bolder;}
|
||||
.lg_foot{
|
||||
height:80px;
|
||||
width:330px;
|
||||
padding: 6px 68px 0 68px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body class="b">
|
||||
<div class="lg">
|
||||
<form action="#" method="POST">
|
||||
<div class="lg_top"></div>
|
||||
<div class="lg_main">
|
||||
<div class="lg_m_1">
|
||||
|
||||
<input name="username" id="username" class="ur" />
|
||||
<input name="password" id="password" type="password" class="pw" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="lg_foot">
|
||||
<input type="button" value="点这里登录" class="bn" id="bn" /></div>
|
||||
</form>
|
||||
</div>
|
||||
<div style="text-align:center;">
|
||||
<p><a href="http://keleyi.com/">首页</a> <a href="http://keleyi.com/keleyi/phtml/">特效库</a> <a href="http://keleyi.com/a/bjae/6asac24d.htm">原文</a></p>
|
||||
</div>
|
||||
</body>
|
||||
<script type="text/javascript">
|
||||
|
||||
$("#bn").click(function(){
|
||||
var username=$("#username").val();
|
||||
var password=$("#password").val();
|
||||
console.log(username);
|
||||
console.log(password);
|
||||
var error="";
|
||||
if (username.length=="") {
|
||||
error+="用户名不能为空";
|
||||
error+="\n";
|
||||
|
||||
}
|
||||
if (password.length=="") {
|
||||
error+="密码不能为空";
|
||||
error+="\n";
|
||||
}
|
||||
if (error!="") {
|
||||
alert(error);
|
||||
}
|
||||
else{
|
||||
/* debugger */
|
||||
$.ajax({
|
||||
type:'POST',
|
||||
/* dataType:'json', */
|
||||
dataType:'json',
|
||||
url:'http://localhost:8080/panhai/login',
|
||||
contentType:'application/json;charset=UTF-8',
|
||||
|
||||
data:JSON.stringify({"username":username,"password":password}),
|
||||
|
||||
success:function(data){//返回json结果
|
||||
|
||||
//username==data.username&&password==data.password
|
||||
if(username==data.username&&password==data.password){
|
||||
//alert("用户名密码错误");//JSON.stringify(data)
|
||||
window.location.href="success.html?username="+data.username;
|
||||
//data.username
|
||||
}
|
||||
|
||||
else {
|
||||
//debugger;
|
||||
alert("用户名密码,错误");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
/* console.log({"username":username,"password":password}); */
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
</html>
|
|
@ -0,0 +1,268 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title></title>
|
||||
|
||||
</head>
|
||||
<style>
|
||||
#title{
|
||||
border-left: 0.2em solid #00397c;
|
||||
font-family: "Microsoft YaHei", "Hiragino Sans GB", Arial-normal, "open sans", "Helvetica Neue", Helvetica, sans-serif;
|
||||
font-size: 16px;
|
||||
font-weight: bold;color: #00397c;
|
||||
}
|
||||
ul li {list-style: none;display: inline-block;text-align: center;color: #FFFFFF;font-size: 16px;padding: 0; float:left;width:30%}
|
||||
#xsdlxx1,#xsdlxx {width: 100%;text-align: center;margin-top:0}
|
||||
u {text-decoration: none;}
|
||||
div ul li div u {font-size: 18px;}
|
||||
.data-info {font-size: 19px;font-weight: bold;}
|
||||
.p-title {color: #FFFFFF;font-size: 16px;font-weight: bold;padding: 1% 0px 1% 3%;}
|
||||
#card-infor {width: 100%;height: 90%;position: relative;}
|
||||
#card1,#card2,#card3 {width: 100%;height: 3%;border-radius: 10px;position: relative;margin: 7px auto;}
|
||||
#xsyc-data li,#tqyc-data li {width: 40%;}
|
||||
.warn {color: #fd4200;}
|
||||
a {text-decoration: none;color: #FFFFFF;font-size: 12px;}
|
||||
a:hover {cursor: pointer;}
|
||||
#lxgd tr td {color: #ff4301;}th {font-weight: normal;background-color: #0067b4;border-right: 1px solid #0067b4;color: #FFFFFF;width: 24%;}
|
||||
</style>
|
||||
<body style="width:100%;height:98%;background:#F0F0F0;">
|
||||
<div id="main" style="width:99%;height: 98%;position: absolute;top: 0%;left: 0%;">
|
||||
<div id="left-space" style="width:1%;height:100%;float: left;"></div>
|
||||
<div id="left" style="width:69%;height:100%;float: left;">
|
||||
<div id="left-one" style="width:100%;height:50%;float: right;background:white;">
|
||||
<div id="left-content" style="width:100%;height:10%;float: right;">
|
||||
<label id="title"> 汉东省</label>
|
||||
</div>
|
||||
<div id="left-content" style="width:100%;height:90%;float:left;background:white;">
|
||||
<div id="left-content1" style="float:left;width:20%;height:100%;">
|
||||
内容1
|
||||
</div>
|
||||
<div id="left-content2" style="position: relative;width:50%;height:100%;float:left;">
|
||||
内容2
|
||||
</div>
|
||||
<div id="left-content3" style="position: relative;width:30%;height:100%;float:left;">
|
||||
内容3
|
||||
</div>
|
||||
</div>
|
||||
<div if="right-space" style="width:100%;height:2%;float: right;background:#F0F0F0;"></div>
|
||||
</div>
|
||||
<div id="right-space" style="width:100%;height:2%;float: right;background:#F0F0F0;"></div>
|
||||
<div id="left-two" style="width:100%;height:48%;float: left;">
|
||||
<div id="left-content4" style="float:left;width:100%;height:5%;background:white;">
|
||||
<label id="title"> 彩票数据</label>
|
||||
</div>
|
||||
<div id="card-infor" style="float:left;width:40%;height:95%;background:white;">
|
||||
<div id="card1" style="float:left;width:100%;height:30%;background:#555DFD;">
|
||||
<p class="p-title">亏损信息</p>
|
||||
<div id="xsdlxx">
|
||||
<ul id="xsdlxx-data">
|
||||
<li>
|
||||
<div id="xs">
|
||||
<label id="xsl" class="data-info">3.83</label>
|
||||
<a href="#">%</a>
|
||||
<br> <u>亏损率</u>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div id="xs">
|
||||
<label id="gdl" class="data-info">0.91</label>
|
||||
<a href="#">亿元</a>
|
||||
<br> <u>购买数</u>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div id="xs">
|
||||
<label id="sdl" class="data-info">0.87</label>
|
||||
<a href="#">亿元</a>
|
||||
<br> <u>中奖数</u>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="card2" style="float:left;width:100%;height:30%;background:#569FFE;">
|
||||
<p class="p-title">亏损数</p>
|
||||
<div id="xsyc">
|
||||
<ul id="xsyc-data">
|
||||
<li>
|
||||
<div id="xlycyc">
|
||||
<label id="xsl" class="data-info warn">3.83</label>
|
||||
<a href="#">数</a>
|
||||
<br> <u>异常</u>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div id="xlyczc">
|
||||
<label id="gdl" class="data-info">0.91</label>
|
||||
<a href="#">数</a>
|
||||
<br> <u>正常</u>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="card2" style="float:left;width:100%;height:30%;background:#018963;">
|
||||
<p class="p-title">全省亏损数</p>
|
||||
<div id="tqyc">
|
||||
<ul id="tqyc-data">
|
||||
<li>
|
||||
<div id="tqycyc">
|
||||
<label id="xsl" class="data-info warn">3.83</label>
|
||||
<a href="#">数</a>
|
||||
<br> <u>异常</u>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div id="tqyczc">
|
||||
<label id="gdl" class="data-info">0.91</label>
|
||||
<a href="#">数</a>
|
||||
<br> <u>正常</u>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="left-xsEchart" style="position: relative;width:60%;height:95%;float:left;background:white;">
|
||||
内容2
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="right" style="width:29%;height:100%;float: right;background:red;">
|
||||
<div id="right-one" style="width:100%;height:50%;float:right;background:white;">
|
||||
<div id="right-content" style="float:left;width:100%;height:10%;">
|
||||
<label id="title"> 工单数据</label>
|
||||
</div>
|
||||
<div id="right-content1" style="float:left;width:100%;height:40%;background:white;">
|
||||
<table id="lxgd" style="background:#0067b4;height:12%;width:100%;align:center;font-size:12;font-weight: normal">
|
||||
<thead>
|
||||
<th>工单类型</th>
|
||||
<th>总数</th>
|
||||
<th>未处理</th>
|
||||
<th>处理率</th>
|
||||
</thead>
|
||||
<tr>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="right-content2" style="position: relative;width:100%;height:50%;float:left;background:white;">
|
||||
内容2
|
||||
</div>
|
||||
</div>
|
||||
<div if="right-space" style="width:100%;height:2%;float: right;background:#F0F0F0;"></div>
|
||||
<div if="right-two" style="width:100%;height:48%;float: right;background:white;">
|
||||
<div style="float:left;width:100%;height:10%;">
|
||||
<label id="title"> 指标数据</label>
|
||||
</div>
|
||||
<div id="right-gjzbEchart" style="float:left;width:100%;height:90%;">
|
||||
内容1
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script src="../js/echarts.js"></script>
|
||||
<script src="../js/demo.js"></script>
|
||||
<script src="../js/gjzb.js"></script>
|
||||
<script src="../js/xjgds.js"></script>
|
||||
<script type="text/javascript">
|
||||
function newTab(text, url) {
|
||||
openPage({
|
||||
text: text,
|
||||
link: url,
|
||||
target: "tab"
|
||||
});
|
||||
window.location.reload(true);
|
||||
}
|
||||
var zx_Chart = echarts.init(document.getElementById("left-xsEchart"));
|
||||
option = {
|
||||
title : {
|
||||
text: ' 亏损率(%)'
|
||||
},
|
||||
tooltip : {
|
||||
trigger: 'axis'
|
||||
},
|
||||
legend: {
|
||||
data:['亏损率','亏损合格率','合格率']
|
||||
},
|
||||
toolbox: {
|
||||
show : true,
|
||||
feature : {
|
||||
mark : {show: true},
|
||||
dataView : {show: true, readOnly: false},
|
||||
magicType : {show: true, type: ['line', 'bar']},
|
||||
restore : {show: true},
|
||||
saveAsImage : {show: true}
|
||||
}
|
||||
},
|
||||
calculable : true,
|
||||
xAxis : [
|
||||
{
|
||||
type : 'category',
|
||||
boundaryGap : false,
|
||||
data : ['周一','周二','周三','周四','周五','周六','周日']
|
||||
}
|
||||
],
|
||||
yAxis : [
|
||||
{
|
||||
type : 'value',
|
||||
axisLabel : {
|
||||
formatter: '{value} °C'
|
||||
}
|
||||
}
|
||||
],
|
||||
series : [
|
||||
{
|
||||
name:'亏损率',
|
||||
type:'line',
|
||||
data:[11, 11, 15, 13, 12, 13, 10],
|
||||
markPoint : {
|
||||
data : [
|
||||
{type : 'max', name: '最大值'},
|
||||
{type : 'min', name: '最小值'}
|
||||
]
|
||||
},
|
||||
markLine : {
|
||||
data : [
|
||||
{type : 'average', name: '平均值'}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
name:'合格率',
|
||||
type:'line',
|
||||
data:[1, -2, 2, 5, 3, 2, 0],
|
||||
markPoint : {
|
||||
data : [
|
||||
{name : '周最低', value : -2, xAxis: 1, yAxis: -1.5}
|
||||
]
|
||||
},
|
||||
markLine : {
|
||||
data : [
|
||||
{type : 'average', name : '平均值'}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
name:'合格率',
|
||||
type:'line',
|
||||
data:[3, -2, 5, 0, 6, 0, 4],
|
||||
markPoint : {
|
||||
data : [
|
||||
{name : '周最低', value : -2, xAxis: 1, yAxis: -1.5}
|
||||
]
|
||||
},
|
||||
markLine : {
|
||||
data : [
|
||||
{type : 'average', name : '平均值'}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
zx_Chart.setOption(option);
|
||||
</script>
|
||||
</html>
|
Binary file not shown.
After Width: | Height: | Size: 284 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 86 KiB |
Binary file not shown.
After Width: | Height: | Size: 912 B |
Binary file not shown.
After Width: | Height: | Size: 751 B |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,97 @@
|
|||
var gjzb=echarts.init(document.getElementById("right-gjzbEchart"));
|
||||
|
||||
|
||||
option = {
|
||||
color: [ '#0068b7', '#006699', '#4cabce', '#e5323e' ],//统计图颜色系列值
|
||||
tooltip : {
|
||||
trigger: 'axis'
|
||||
},
|
||||
grid: {
|
||||
borderWidth: 0,
|
||||
x: 70,
|
||||
y: 10,
|
||||
top: 65,
|
||||
left: 45,
|
||||
right: 30,
|
||||
bottom: 70,
|
||||
//barWidth:1,
|
||||
textStyle: {
|
||||
color: "#fff"
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
data:['蒸发量','降水量','平均温度']
|
||||
},
|
||||
toolbox: {
|
||||
show : false,
|
||||
feature : {
|
||||
mark : {show: false},
|
||||
dataView : {show: true, readOnly: false},
|
||||
magicType: {show: true, type: ['line','bar']},
|
||||
restore : {show: false},
|
||||
saveAsImage : {show: true}
|
||||
}
|
||||
},
|
||||
calculable : true,
|
||||
xAxis : [
|
||||
{
|
||||
type : 'category',
|
||||
data : ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月']
|
||||
}
|
||||
],
|
||||
yAxis : [
|
||||
{
|
||||
type : 'value',
|
||||
name : '降水量',
|
||||
axisLabel : {
|
||||
formatter: '{value}\r\nkW·h'
|
||||
}
|
||||
},
|
||||
{
|
||||
type : 'value',
|
||||
name : '降水率',
|
||||
axisLabel : {
|
||||
formatter: '{value}\r\n%'
|
||||
}
|
||||
}
|
||||
],
|
||||
series : [
|
||||
{
|
||||
name:'蒸发量',
|
||||
type:'bar',
|
||||
data:[2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3]/*,
|
||||
barMaxWidth: 0,
|
||||
large: false,
|
||||
barMinHeight: 1,
|
||||
itemStyle: {color: "#e5323e",
|
||||
normal :{
|
||||
label: {
|
||||
show: true,
|
||||
distance: 0,
|
||||
fontWeight: 'bolder',
|
||||
position: 'top',
|
||||
color: '#0068b7',
|
||||
fontSize: 20,
|
||||
formatter: function(value, index) {
|
||||
return value.value+"%";
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
},
|
||||
{
|
||||
name:'降水量',
|
||||
type:'bar',
|
||||
//barWidth:0,
|
||||
data:[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3]
|
||||
},
|
||||
{
|
||||
name:'平均温度',
|
||||
type:'line',
|
||||
yAxisIndex: 1,
|
||||
data:[-4.0, 6.2, -3.3, 4.5, -9.3, 10.2, 20.3, 23.4, -23.0, 16.5, -12.0, 6.2]
|
||||
}
|
||||
]
|
||||
|
||||
};
|
||||
gjzb.setOption(option);
|
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,90 @@
|
|||
var xjgds1=echarts.init(document.getElementById("left-content1"));
|
||||
var xjgds2=echarts.init(document.getElementById("left-content3"));
|
||||
option = {
|
||||
tooltip : {
|
||||
trigger: 'item',
|
||||
formatter: "{a} <br/>{b} : {c} ({d}%)"
|
||||
},
|
||||
legend: {
|
||||
orient : 'vertical',
|
||||
x : 'left',
|
||||
data:['直接访问','邮件营销','联盟广告','视频广告','搜索引擎']
|
||||
},
|
||||
toolbox: {
|
||||
show : false,
|
||||
feature : {
|
||||
mark : {show: true},
|
||||
dataView : {show: true, readOnly: false},
|
||||
magicType : {
|
||||
show: true,
|
||||
type: ['pie', 'funnel'],
|
||||
option: {
|
||||
funnel: {
|
||||
x: '25%',
|
||||
width: '50%',
|
||||
funnelAlign: 'left',
|
||||
max: 1548
|
||||
}
|
||||
}
|
||||
},
|
||||
restore : {show: true},
|
||||
saveAsImage : {show: true}
|
||||
}
|
||||
},
|
||||
calculable : true,
|
||||
series : [
|
||||
{
|
||||
name:'访问来源',
|
||||
type:'pie',
|
||||
radius : '55%',
|
||||
center: ['50%', '60%'],
|
||||
data:[
|
||||
{value:335, name:'直接访问'},
|
||||
{value:310, name:'邮件营销'},
|
||||
{value:234, name:'联盟广告'},
|
||||
{value:135, name:'视频广告'},
|
||||
{value:1548, name:'搜索引擎'}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
option1 = {
|
||||
color: ['#3398DB'],
|
||||
tooltip : {
|
||||
trigger: 'axis',
|
||||
axisPointer : { // 坐标轴指示器,坐标轴触发有效
|
||||
type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
left: '1%',
|
||||
right: '2%',
|
||||
bottom: '1%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis : [
|
||||
{
|
||||
type : 'category',
|
||||
data : ['Sat', 'Sun'],
|
||||
axisTick: {
|
||||
alignWithLabel: true
|
||||
}
|
||||
}
|
||||
],
|
||||
yAxis : [
|
||||
{
|
||||
type : 'value'
|
||||
}
|
||||
],
|
||||
series : [
|
||||
{
|
||||
name:'直接访问',
|
||||
type:'bar',
|
||||
barWidth: '40%',
|
||||
data:[10, 52]
|
||||
}
|
||||
]
|
||||
};
|
||||
xjgds1.setOption(option1);
|
||||
xjgds2.setOption(option);
|
|
@ -0,0 +1,212 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>login</title>
|
||||
<style type="text/css">
|
||||
*{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
#wrap {
|
||||
height: 719px;
|
||||
width: 100;
|
||||
background-image: url(../images/login.jpg);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
position: relative;
|
||||
}
|
||||
#head {
|
||||
height: 80px;
|
||||
width: 100;
|
||||
background-color: white;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
}
|
||||
#foot {
|
||||
width: 100;
|
||||
height: 126px;
|
||||
background-color: white;
|
||||
position: relative;
|
||||
}
|
||||
#wrap .logGet {
|
||||
height: 408px;
|
||||
width: 368px;
|
||||
position: absolute;
|
||||
background-color: #FFFFFF;
|
||||
top: 20%;
|
||||
right: 10%;
|
||||
}
|
||||
#submit{
|
||||
width: 100%;
|
||||
height: 45px;
|
||||
background-color: #ee7700;
|
||||
border: none;
|
||||
color: white;
|
||||
font-size: 18px;
|
||||
}
|
||||
.logGet .logD.logDtip .p1 {
|
||||
display: inline-block;
|
||||
font-size: 28px;
|
||||
margin-top: 30px;
|
||||
width: 86%;
|
||||
}
|
||||
#wrap .logGet .logD.logDtip {
|
||||
width: 86%;
|
||||
border-bottom: 1px solid #ee7700;
|
||||
margin-bottom: 60px;
|
||||
margin-top: 0px;
|
||||
margin-right: auto;
|
||||
margin-left: auto;
|
||||
}
|
||||
.logGet .lgD img {
|
||||
position: absolute;
|
||||
top: 12px;
|
||||
left: 8px;
|
||||
}
|
||||
.logGet .lgD input {
|
||||
width: 100%;
|
||||
height: 42px;
|
||||
text-indent: 2.5rem;
|
||||
}
|
||||
#wrap .logGet .lgD {
|
||||
width: 86%;
|
||||
position: relative;
|
||||
margin-bottom: 30px;
|
||||
margin-top: 30px;
|
||||
margin-right: auto;
|
||||
margin-left: auto;
|
||||
}
|
||||
#wrap .logGet .logC {
|
||||
width: 86%;
|
||||
margin-top: 0px;
|
||||
margin-right: auto;
|
||||
margin-bottom: 0px;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
|
||||
.title {
|
||||
font-family: 微软雅黑;
|
||||
font-size: 26px;
|
||||
color: black;
|
||||
position: absolute;
|
||||
background-color: white;
|
||||
top: 50%;
|
||||
left: 7%;
|
||||
transform: translate(-50%, -50%); /* 使用css3的transform来实现 */
|
||||
font-size: 36px;
|
||||
height: 40px;
|
||||
width: 30%;
|
||||
}
|
||||
|
||||
.copyright {
|
||||
font-family: "宋体";
|
||||
color: black;
|
||||
position: absolute;
|
||||
background-color: white;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%); /* 使用css3的transform来实现 */
|
||||
height: 60px;
|
||||
width: 40%;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
|
||||
#foot .copyright .img {
|
||||
width: 100%;
|
||||
height: 24px;
|
||||
position: relative;
|
||||
}
|
||||
.copyright .img .icon {
|
||||
display: inline-block;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
margin-left: 22px;
|
||||
vertical-align: middle;
|
||||
background-image: url(%E7%94%B5%E5%AD%90%E9%82%AE%E4%BB%B6.png);
|
||||
background-repeat: no-repeat;
|
||||
vertical-align: middle;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.copyright .img .icon1 {
|
||||
display: inline-block;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
margin-left: 22px;
|
||||
vertical-align: middle;
|
||||
background-image: url(%E5%9C%B0%E5%9D%80.png);
|
||||
background-repeat: no-repeat;
|
||||
vertical-align: middle;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.copyright .img .icon2 {
|
||||
display: inline-block;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
margin-left: 22px;
|
||||
vertical-align: middle;
|
||||
background-repeat: no-repeat;
|
||||
vertical-align: middle;
|
||||
margin-right: 5px;
|
||||
}
|
||||
#foot .copyright p {
|
||||
height: 24px;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body style="width: 100%;height: 100%">
|
||||
|
||||
<div class="header" id="head">
|
||||
<div class="title">娱乐管理系统</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="wrap" id="wrap">
|
||||
<div class="logGet">
|
||||
<form action="./loginPage" method="post">
|
||||
<!-- 头部提示信息 -->
|
||||
<div class="logD logDtip">
|
||||
<p class="p1">登录</p>
|
||||
</div>
|
||||
<!-- 输入框 -->
|
||||
<div class="lgD">
|
||||
<img src="../images/name.png" width="20" height="20" alt=""/>
|
||||
<input type="text"
|
||||
placeholder="输入用户名" name="username"/>
|
||||
</div>
|
||||
<div class="lgD">
|
||||
<img src="../images/pwd.png" width="20" height="20" alt=""/>
|
||||
<input type="password"
|
||||
placeholder="输入用户密码" name="pwd"/>
|
||||
</div>
|
||||
<div class="logC">
|
||||
<input type="submit" id="submit"/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer" id="foot">
|
||||
<div class="copyright">
|
||||
<p>Copyright © 2019 Qunar.com Inc. All Rights Reserved.</p>
|
||||
<div class="img">
|
||||
<i class="icon1"></i><span>联系地址:贵州省南明区</span>
|
||||
</div>
|
||||
|
||||
<div class="img">
|
||||
<i class="icon2"></i><span>联系电话:183****</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,85 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<title>layout 后台大布局 - Layui</title>
|
||||
<link rel="stylesheet" href="../css/layui.css">
|
||||
</head>
|
||||
<body class="layui-layout-body">
|
||||
<div class="layui-layout layui-layout-admin">
|
||||
<div class="layui-header">
|
||||
<div class="layui-logo">layui 后台布局</div>
|
||||
<!-- 头部区域(可配合layui已有的水平导航) -->
|
||||
<ul class="layui-nav layui-layout-left">
|
||||
<li class="layui-nav-item"><a href="">控制台</a></li>
|
||||
<li class="layui-nav-item"><a href="">商品管理</a></li>
|
||||
<li class="layui-nav-item"><a href="">用户</a></li>
|
||||
<li class="layui-nav-item">
|
||||
<a href="javascript:;">其它系统</a>
|
||||
<dl class="layui-nav-child">
|
||||
<dd><a href="">邮件管理</a></dd>
|
||||
<dd><a href="">消息管理</a></dd>
|
||||
<dd><a href="">授权管理</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="layui-nav layui-layout-right">
|
||||
<li class="layui-nav-item">
|
||||
<a href="javascript:;">
|
||||
<img src="http://t.cn/RCzsdCq" class="layui-nav-img">
|
||||
罗帅帅
|
||||
</a>
|
||||
<dl class="layui-nav-child">
|
||||
<dd><a href="">基本资料</a></dd>
|
||||
<dd><a href="">安全设置</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li class="layui-nav-item"><a href="">退了</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="layui-side layui-bg-black">
|
||||
<div class="layui-side-scroll">
|
||||
<!-- 左侧导航区域(可配合layui已有的垂直导航) -->
|
||||
<ul class="layui-nav layui-nav-tree" lay-filter="test">
|
||||
<li class="layui-nav-item layui-nav-itemed">
|
||||
<a class="" href="javascript:;">所有商品</a>
|
||||
<dl class="layui-nav-child">
|
||||
<dd><a href="javascript:;">列表一</a></dd>
|
||||
<dd><a href="javascript:;">列表二</a></dd>
|
||||
<dd><a href="javascript:;">列表三</a></dd>
|
||||
<dd><a href="">超链接</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li class="layui-nav-item">
|
||||
<a href="javascript:;">解决方案</a>
|
||||
<dl class="layui-nav-child">
|
||||
<dd><a href="javascript:;">列表一</a></dd>
|
||||
<dd><a href="javascript:;">列表二</a></dd>
|
||||
<dd><a href="">超链接</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li class="layui-nav-item"><a href="">云市场</a></li>
|
||||
<li class="layui-nav-item"><a href="">发布商品</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-body">
|
||||
<!-- 内容主体区域 -->
|
||||
<iframe id="content" src="../html/index.html" frameborder="0" style="width: 100%; height: 100%;">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="../js/layui.js"></script>
|
||||
<script>
|
||||
//JavaScript代码区域
|
||||
layui.use('element', function(){
|
||||
var element = layui.element;
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,57 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script
|
||||
src="../js/jquery-2.1.1.min.js"></script>
|
||||
<meta charset="UTF-8">
|
||||
<title>Insert title here</title>
|
||||
</head>
|
||||
<body>
|
||||
成功登陆
|
||||
|
||||
<marquee direction="left" behavior="alternate"><span id="name"></span>
|
||||
</marquee>
|
||||
</body>
|
||||
<script type="text/javascript">
|
||||
|
||||
$(function(){
|
||||
|
||||
var url=window.location.href;
|
||||
var records=url.split("=");
|
||||
|
||||
//var obj=eval('(' + records[1] + ')');
|
||||
document.getElementById("name").innerHTML= records[1];;
|
||||
// $("#name").html(obj.username) ;
|
||||
|
||||
// console.log(records);
|
||||
// alert( records[1]);
|
||||
}
|
||||
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<!-- <script type="text/javascript">
|
||||
$(function(){
|
||||
$.ajax({
|
||||
type:'GET',
|
||||
/* dataType:'json', */
|
||||
dataType:'text',
|
||||
url:'http://localhost:8080/panhai/d',
|
||||
contentType:'application/json;charset=UTF-8',
|
||||
|
||||
/* data:JSON.stringify({"username":username,"password":password}), */
|
||||
|
||||
success:function(data){//返回json结果
|
||||
|
||||
alert(data);
|
||||
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
})
|
||||
</script> -->
|
||||
</html>
|
|
@ -0,0 +1,16 @@
|
|||
package com.example.demo;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
public class DemoApplicationTests {
|
||||
|
||||
@Test
|
||||
public void contextLoads() {
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue