Commit 15f3aa91 by admin

添加错误反馈

parent edefa1bc
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="change4weixin">
<wb-module deploy-name="change4weixin-3.0.1-SNAPSHOT">
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.3.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-4.3.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-4.3.xsd
">
<!-- 开启注解处理器 -->
<context:annotation-config />
<!-- 开启组件自动扫描,扫描路径由base-package属性指定 -->
<context:component-scan base-package="com.zhiwei">
<context:exclude-filter type="annotation"
expression="org.springframework.stereotype.Controller" />
</context:component-scan>
<context:property-placeholder
ignore-unresolvable="true" location="classpath:datasource.properties" />
</beans>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.3.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-4.3.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd
">
<context:annotation-config />
<context:component-scan base-package="com.zhiwei.servlet" />
<mvc:default-servlet-handler />
<mvc:annotation-driven />
<!-- ViewResolver -->
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver" >
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView" />
<property name="prefix" value="/" />
<property name="suffix" value=".html" />
</bean>
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<property name="maxUploadSize" value="104857600"/>
<property name="maxInMemorySize" value="4096"/>
</bean>
</beans>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
<display-name>change4weixin</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>
<servlet>
<servlet-name>java</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:servletContext.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>java</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
</web-app>
\ No newline at end of file
!function() {
function o(w, v, i) {
return w.getAttribute(v) || i
}
function j(i) {
return document.getElementsByTagName(i)
}
function l() {
var i = j("script")
, w = i.length
, v = i[w - 1];
return {
l: w,
z: o(v, "zIndex", 1),
o: o(v, "opacity", 1),
c: o(v, "color", "255,255,153"),
n: o(v, "count", 190)
}
}
function k() {
r = u.width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth,
n = u.height = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight
pp.height = n
pp.width = r
if ($(window).width() <= 1280) {
$('#sidebar').addClass('mobile');
e.clearRect(0, 0, r, n);
t = []
} else {
$('#sidebar').removeClass('mobile');
}
}
function b() {
e.clearRect(0, 0, r, n);
var w = [f].concat(t);
var x, v, A, B, z, y;
t.forEach(function(i) {
i.x += i.xa,
i.y += i.ya,
i.xa *= i.x > r || i.x < 0 ? -1 : 1,
i.ya *= i.y > n || i.y < 0 ? -1 : 1,
e.fillRect(i.x - 0.5, i.y - 0.5, 1, 1);
for (v = 0; v < w.length; v++) {
x = w[v];
if (i !== x && null !== x.x && null !== x.y) {
B = i.x - x.x,
z = i.y - x.y,
y = B * B + z * z;
// if (y < x.max) {
// if (x === f && y >= x.max / 2) {
// i.x -= 0.03 * B,
// i.y -= 0.03 * z
// }
// A = (x.max - y) / x.max,
// e.beginPath(),
// e.lineWidth = A / 2,
// e.strokeStyle = "rgba(" + s.c + "," + (A + 0.2) + ")",
// e.moveTo(i.x, i.y),
// e.lineTo(x.x, x.y),
// e.stroke()
// }
y < x.max && (x === f && y >= x.max / 2 && (i.x -= 0.03 * B,
i.y -= 0.03* z),
A = (x.max - y) / x.max,
e.beginPath(),
e.lineWidth = A / 2,
e.strokeStyle = "rgba(" + s.c + "," + (A + 0.2) + ")",
e.moveTo(i.x, i.y),
e.lineTo(x.x, x.y),
e.stroke())
}
}
w.splice(w.indexOf(i), 1)
}),
m(b)
}
var pp = document.getElementById('c_n149')
var u = document.createElement("canvas"), s = l(), c = "c_n" + s.l, e = u.getContext("2d"), r, n, m = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(i) {
window.setTimeout(i, 1000 / 45)
}
, a = Math.random, f = {
x: null,
y: null,
max: 20000
};
u.id = c;
u.style.cssText = "position:fixed;top:0;left:0;z-index:" + s.z + ";opacity:" + s.o;
j("body")[0].appendChild(u);
k(),
window.onresize = k;
window.onmousemove = function(i) {
i = i || window.event,
f.x = i.clientX,
f.y = i.clientY
}
,
window.onmouseout = function() {
f.x = null,
f.y = null
}
;
for (var t = [], p = 0; s.n > p; p++) {
var h = a() * r
, g = a() * n
, q = 2 * a() - 1
, d = 2 * a() - 1;
t.push({
x: h,
y: g,
xa: q,
ya: d,
max: 6000
})
}
setTimeout(function() {
b()
}, 100)
}();
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Table</title>
<link rel="stylesheet"
href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
crossorigin="anonymous">
<script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script
src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"
integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
crossorigin="anonymous"></script>
<style>
body {
background-image: url("./2.jpg");
}
#timeCanvas {
position: absolute;
top: 3%;
right: 3%;
height: 30px;
width: 210px;
}
.table {
position: absolute;
left: 15%;
top: 7%;
width: 70%;
z-index: 100;
}
.table tr {
background-color: transparent !important;
}
.table tr td {
border-color: #000 !important;
}
h5 {
position: relative;
z-index: 2000;
}
</style>
</head>
<body>
<h5>如需下载,请至<a href="/change4weixin/down" target="_blank">下载页</a></h5>
<canvas id="timeCanvas"></canvas>
<canvas id="c_n149" width="1920" height="1080"
style="position: fixed; top: 0px; right: 0px;z-index: -1;"></canvas>
<script src="./time.js"></script>
<script src="./canvas.js"></script>
<h5>如需插队运行,请联系------陈栋(674945328)/沈金柱(949131080)</h5>
<table class="table table-striped">
<thead>
<tr>
<td>编号</td>
<td>提交者</td>
<td>运行需要时间(分)</td>
<td>开始时间</td>
<td>状态</td>
<td>当前剩余的条数</td>
</tr>
</thead>
<tbody class="data"></tbody>
</table>
<script>
$(function () {
var tbody = $('.data')
var d = []
function getData() {
$(tbody).empty();
d = []
$.ajax({
type: 'get',
datatype: 'json',
url: '/change4weixin/show ',
success: function (data) {
data = JSON.parse(data)
d = data
data.forEach((e, index) => {
tbody.append("<tr class='TR'>"
+"<td class='id'>"+e.site+"</td>"
+"<td>"+e.mail+"</td>"
+"<td>"+e.surplusCount/12+"</td>"
+"<td>"+e.startDate+"</td>"
+"<td>"+e.state+"</td>"
+"<td>"+e.surplusCount+"</td>"
+"</td></tr>")
})
}
})
}
getData()
})
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Table</title>
<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<style>
body {
background-image: url("./2.jpg");
}
#timeCanvas {
position: absolute;
top: 3%;
right: 3%;
height: 30px;
width: 210px;
}
.table {
position: absolute;
left: 15%;
top: 7%;
width: 70%;
z-index: 100;
}
.table tr {
background-color: transparent !important;
}
.table tr td {
border-color: #000 !important;
}
</style>
</head>
<body>
<table class="table table-striped">
<thead>
<tr>
<td>id</td>
<td>编号</td>
<td>提交者</td>
<td>运行需要时间</td>
<td>开始时间</td>
<td>状态</td>
<td>当前剩余的条数</td>
<td>操作</td>
</tr>
</thead>
<tbody class="data"></tbody>
</table>
<canvas id="timeCanvas"></canvas>
<canvas id="c_n149" width="1920" height="1080" style="position: fixed; top: 0px; right: 0px;"></canvas>
<script src="./time.js"></script>
<script src="./canvas.js"></script>
<script>
$(function () {
var tbody = $('.data')
var d = []
function getData() {
$(tbody).empty();
d = []
$.ajax({
type: 'get',
datatype: 'json',
url: '/change4weixin/show ',
success: function (data) {
data = JSON.parse(data)
d = data
data.forEach((e, index) => {
let tr = `<tr class="TR">
<td class="id">${e.id}</td>
<td>${e.site}</td>
<td>${e.mail}</td>
<td>${e.surplusCount/12}</td>
<td>${e.startDate}</td>
<td>${e.state}</td>
<td>${e.surplusCount}</td>
<td>
<button class="btn btn-info del">删除</button>
<button class="btn btn-success insert">插队</button>
</td>
</tr>`
tbody.append(tr)
})
}
})
}
$('.table').delegate(".del","click",function(){
let id = $(this).parents('.TR').children('.id').eq(0).text()
$.ajax({
type: 'get',
datatype: 'json',
data: {
id: id
},
url: '/change4weixin/delete',
success: function (data) {
data = JSON.parse(data)
if (data.result) {
alert('删除成功')
getData()
} else {
alert('删除失败')
}
}
})
})
$('.table').delegate(".insert","click",function(){
let id = $(this).parents('.TR').children('.id').eq(0).text()
if (id === d[0].id) {
alert('第一个不能插队')
return false
}
$.ajax({
type: 'get',
datatype: 'text',
data: {
id: id
},
url: '/change4weixin/cutQ',
success: function (data) {
data = JSON.parse(data)
if (data.result) {
alert('插队成功')
getData()
} else {
alert('插队失败')
}
}
})
})
getData()
})
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Table</title>
<link rel="stylesheet"
href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
crossorigin="anonymous">
<script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script
src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"
integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
crossorigin="anonymous"></script>
<style>
body {
background-image: url("./2.jpg");
}
#timeCanvas {
position: absolute;
top: 3%;
right: 3%;
height: 30px;
width: 210px;
}
.table {
position: absolute;
left: 15%;
top: 7%;
width: 70%;
z-index: 100;
}
.table tr {
background-color: transparent !important;
}
.table tr td {
border-color: #000 !important;
}
</style>
</head>
<body>
<canvas id="timeCanvas"></canvas>
<canvas id="c_n149" width="1920" height="1080"
style="position: fixed; top: 0px; right: 0px;"></canvas>
<script src="./time.js"></script>
<script src="./canvas.js"></script>
<h5>如需插队运行,请联系------陈栋(674945328)/沈金柱(949131080)</h5>
<table class="table table-striped">
<thead>
<tr>
<td>编号</td>
<td>邮箱</td>
<td>日期</td>
<td>状态</td>
</tr>
</thead>
<tbody class="data"></tbody>
</table>
<script>
$(function () {
var tbody = $('.data')
var d = []
function getData() {
$(tbody).empty();
d = []
$.ajax({
type: 'get',
datatype: 'json',
url: '/change4weixin/downLode',
success: function (data) {
data = JSON.parse(data)
d = data
data.forEach((e, index) => {
tbody.append("<tr class='TR'>"
+"<td>"+e.id+"</td>"
+"<td>"+e.mail+"</td>"
+"<td>"+e.date+"</td>"
+"<td>"+e.state+"</td>"
+"<td><a href='/change4weixin/downLodeFile?id="+e.id+"'>下载</a>"
+"</td></tr>")
})
}
})
}
getData()
})
</script>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<body>
<h3>邮箱号输入有误</h3>
<form action="/change4weixin/return" method="post">
<input type="submit" value="返回">
</form>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<body>
<h2>文件格式有问题,请确认有地址一栏</h2>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<body>
<h2>文件类型错误</h2>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<link rel="stylesheet"
href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
crossorigin="anonymous">
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
<script
src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"
integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
crossorigin="anonymous">
</script>
<style type="text/css">
body {
background-image: url("./2.jpg");
display: flex;
flex-flow: column nowrap;
justify-content: center;
align-items: center;
padding-top: 200px; -
-imgwidth: 0px;
}
form {
margin-top: 3%;
width: 20%;
}
.form-group {
margin-top: 20px;
}
#submit:hover {
color: #66afe9;
}
.example {
position: absolute;
}
.example-title {
display: inline-block;
font-size: 16px;
margin: 20px 5px 10px;
font-weight: bold;
cursor: pointer;
}
.example-title:hover {
color: #66afe9;
}
.ck{
color:red;
}
#imgModal, #fileModal ,#showModal,#errorModal{
padding: 10% calc(50% - 480px);
text-align: center;
}
</style>
</head>
<body>
<h4>如需插队,请联系陈栋(674945328)/沈金柱(949131080)</h4>
<div class="example-div">
<span class="example-title ck" id="show" data-toggle="modal"data-target="#showModal">使用说明</span>
<span class="example-title" id="img" data-toggle="modal" data-target="#imgModal">上传文件要求</span>
<span class="example-title" id="file" data-toggle="modal" data-target="#fileModal">文件内容示范</span>
<span class="example-title" id="error" data-toggle="modal" data-target="#errorModal">出现的错误和原因</span>
</div>
<form action="/change4weixin/up" enctype="multipart/form-data"
method="post">
<span>文件</span> <input type="file" name="file" />
<div class="form-group">
<label for="email">邮箱号</label> <input type="text" name="mail"
class="form-control" id="email">
</div>
<div class="form-group">
<label for="emailAgain">重复邮箱号</label> <input type="text" name="mail2"
class="form-control" id="emailAgain">
</div>
<div class="form-group">
<input type="submit" value="提交" class="form-control" id="submit" />
</div>
</form>
<div class="modal fade example" id="imgModal" tabindex="-1"
role="dialog" aria-labelledby="myModalLabel">
<img src="./upload.jpg" alt="事例">
</div>
<div class="modal fade example" id="fileModal" tabindex="-1"
role="dialog" aria-labelledby="myModalLabel">
<img src="./upload_file.png" alt="事例">
</div>
<div class="modal fade example" id="errorModal" tabindex="-1"
role="dialog" aria-labelledby="myModalLabel">
<img src="./error_file.png" alt="事例">
</div>
<div class="modal fade example" id="showModal" tabindex="-1"
role="dialog" aria-labelledby="myModalLabel">
<img src="./show_file.png" alt="事例">
</div>
<script>
(function () {
$('#fileModal').modal('show')
})()
</script>
</body>
</html>
(function(){
var digit=
[
[
[0,0,1,1,1,0,0],
[0,1,1,0,1,1,0],
[1,1,0,0,0,1,1],
[1,1,0,0,0,1,1],
[1,1,0,0,0,1,1],
[1,1,0,0,0,1,1],
[1,1,0,0,0,1,1],
[1,1,0,0,0,1,1],
[0,1,1,0,1,1,0],
[0,0,1,1,1,0,0]
],//0
[
[0,0,0,1,1,0,0],
[0,1,1,1,1,0,0],
[0,0,0,1,1,0,0],
[0,0,0,1,1,0,0],
[0,0,0,1,1,0,0],
[0,0,0,1,1,0,0],
[0,0,0,1,1,0,0],
[0,0,0,1,1,0,0],
[0,0,0,1,1,0,0],
[1,1,1,1,1,1,1]
],//1
[
[0,1,1,1,1,1,0],
[1,1,0,0,0,1,1],
[0,0,0,0,0,1,1],
[0,0,0,0,1,1,0],
[0,0,0,1,1,0,0],
[0,0,1,1,0,0,0],
[0,1,1,0,0,0,0],
[1,1,0,0,0,0,0],
[1,1,0,0,0,1,1],
[1,1,1,1,1,1,1]
],//2
[
[1,1,1,1,1,1,1],
[0,0,0,0,0,1,1],
[0,0,0,0,1,1,0],
[0,0,0,1,1,0,0],
[0,0,1,1,1,0,0],
[0,0,0,0,1,1,0],
[0,0,0,0,0,1,1],
[0,0,0,0,0,1,1],
[1,1,0,0,0,1,1],
[0,1,1,1,1,1,0]
],//3
[
[0,0,0,0,1,1,0],
[0,0,0,1,1,1,0],
[0,0,1,1,1,1,0],
[0,1,1,0,1,1,0],
[1,1,0,0,1,1,0],
[1,1,1,1,1,1,1],
[0,0,0,0,1,1,0],
[0,0,0,0,1,1,0],
[0,0,0,0,1,1,0],
[0,0,0,1,1,1,1]
],//4
[
[1,1,1,1,1,1,1],
[1,1,0,0,0,0,0],
[1,1,0,0,0,0,0],
[1,1,1,1,1,1,0],
[0,0,0,0,0,1,1],
[0,0,0,0,0,1,1],
[0,0,0,0,0,1,1],
[0,0,0,0,0,1,1],
[1,1,0,0,0,1,1],
[0,1,1,1,1,1,0]
],//5
[
[0,0,0,0,1,1,0],
[0,0,1,1,0,0,0],
[0,1,1,0,0,0,0],
[1,1,0,0,0,0,0],
[1,1,0,1,1,1,0],
[1,1,0,0,0,1,1],
[1,1,0,0,0,1,1],
[1,1,0,0,0,1,1],
[1,1,0,0,0,1,1],
[0,1,1,1,1,1,0]
],//6
[
[1,1,1,1,1,1,1],
[1,1,0,0,0,1,1],
[0,0,0,0,1,1,0],
[0,0,0,0,1,1,0],
[0,0,0,1,1,0,0],
[0,0,0,1,1,0,0],
[0,0,1,1,0,0,0],
[0,0,1,1,0,0,0],
[0,0,1,1,0,0,0],
[0,0,1,1,0,0,0]
],//7
[
[0,1,1,1,1,1,0],
[1,1,0,0,0,1,1],
[1,1,0,0,0,1,1],
[1,1,0,0,0,1,1],
[0,1,1,1,1,1,0],
[1,1,0,0,0,1,1],
[1,1,0,0,0,1,1],
[1,1,0,0,0,1,1],
[1,1,0,0,0,1,1],
[0,1,1,1,1,1,0]
],//8
[
[0,1,1,1,1,1,0],
[1,1,0,0,0,1,1],
[1,1,0,0,0,1,1],
[1,1,0,0,0,1,1],
[0,1,1,1,0,1,1],
[0,0,0,0,0,1,1],
[0,0,0,0,0,1,1],
[0,0,0,0,1,1,0],
[0,0,0,1,1,0,0],
[0,1,1,0,0,0,0]
],//9
[
[0,0,0,0,0,0,0],
[0,0,1,1,1,0,0],
[0,0,1,1,1,0,0],
[0,0,1,1,1,0,0],
[0,0,0,0,0,0,0],
[0,0,0,0,0,0,0],
[0,0,1,1,1,0,0],
[0,0,1,1,1,0,0],
[0,0,1,1,1,0,0],
[0,0,0,0,0,0,0]
]//:
];
var canvas = document.getElementById('timeCanvas');
if(canvas.getContext){
var cxt = canvas.getContext('2d');
//声明canvas的宽高
var H = 100,W = 700;
canvas.height = H;
canvas.width = W;
cxt.fillStyle = '#f00';
cxt.fillRect(10,10,50,50);
//存储时间数据
var data = [];
//存储运动的小球
var balls = [];
//设置粒子半径
var R = canvas.height/20-1;
(function(){
var temp = /(\d)(\d):(\d)(\d):(\d)(\d)/.exec(new Date());
//存储时间数字,由十位小时、个位小时、冒号、十位分钟、个位分钟、冒号、十位秒钟、个位秒钟这7个数字组成
data.push(temp[1],temp[2],10,temp[3],temp[4],10,temp[5],temp[6]);
})();
/*生成点阵数字*/
function renderDigit(index,num){
for(var i = 0; i < digit[num].length; i++){
for(var j = 0; j < digit[num][i].length; j++){
if(digit[num][i][j] == 1){
cxt.beginPath();
cxt.arc(14*(R+2)*index + j*2*(R+1)+(R+1),i*2*(R+1)+(R+1),R,0,2*Math.PI);
cxt.closePath();
cxt.fill();
}
}
}
}
/*更新时钟*/
function updateDigitTime(){
var changeNumArray = [];
var temp = /(\d)(\d):(\d)(\d):(\d)(\d)/.exec(new Date());
var NewData = [];
NewData.push(temp[1],temp[2],10,temp[3],temp[4],10,temp[5],temp[6]);
for(var i = data.length-1; i >=0 ; i--){
//时间发生变化
if(NewData[i] !== data[i]){
//将变化的数字值和在data数组中的索引存储在changeNumArray数组中
changeNumArray.push(i+'_'+(Number(data[i])+1)%10);
}
}
//增加小球
for(var i = 0; i< changeNumArray.length; i++){
addBalls.apply(this,changeNumArray[i].split('_'));
}
data = NewData.concat();
}
/*更新小球状态*/
function updateBalls(){
for(var i = 0; i < balls.length; i++){
balls[i].stepY += balls[i].disY;
balls[i].x += balls[i].stepX;
balls[i].y += balls[i].stepY;
if(balls[i].x > W + R || balls[i].y > H + R){
balls.splice(i,1);
i--;
}
}
}
/*增加要运动的小球*/
function addBalls(index,num){
var numArray = [1,2,3];
var colorArray = ["#3BE","#09C","#A6C","#93C","#9C0","#690","#FB3","#F80","#F44","#C00"];
for(var i = 0; i < digit[num].length; i++){
for(var j = 0; j < digit[num][i].length; j++){
if(digit[num][i][j] == 1){
var ball = {
x:14*(R+2)*index + j*2*(R+1)+(R+1),
y:i*2*(R+1)+(R+1),
stepX:0.4*Math.floor(Math.random() * 4 -2),
stepY:-0.5*numArray[Math.floor(Math.random()*numArray.length)],
color:colorArray[Math.floor(Math.random()*colorArray.length)],
disY:0.2
};
balls.push(ball);
}
}
}
}
/*渲染*/
function render(){
//重置画布宽度,达到清空画布的效果
canvas.height = 100;
//渲染时钟
for(var i = 0; i < data.length; i++){
renderDigit(i,data[i]);
}
//渲染小球
for(var i = 0; i < balls.length; i++){
cxt.beginPath();
cxt.arc(balls[i].x,balls[i].y,R,0,2*Math.PI);
cxt.fillStyle = balls[i].color;
cxt.closePath();
cxt.fill();
}
}
function update () {
//更新时钟
updateDigitTime();
//更新小球状态
updateBalls();
//渲染
render();
m(update)
}
var m = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(i) {
window.setTimeout(i, 1000 / 45)
}
setTimeout(function() {
update()
}, 100)
// clearInterval(oTimer);
// var oTimer = setInterval(function(){
// //更新时钟
// updateDigitTime();
// //更新小球状态
// updateBalls();
// //渲染
// render();
// }, 50);
}
})();
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<link rel="stylesheet"
href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
crossorigin="anonymous">
<script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
$(function() {
var tbody = $('.init')
var d = []
function getData() {
$(tbody).empty();
d = []
$.ajax({
type : 'get',
datatype : 'json',
url : '/change4weixin/zhNum ',
success : function(data) {
console.log(data);
var d = JSON.stringify(data);
tbody.append("<tr class='TR'>" + "<td class='id'>" + d
+ "</td>" + "</tr>")
}
})
}
getData()
})
</script>
<style type="text/css">
body {
background-image: url("./2.jpg");
display: flex;
flex-flow: row nowrap;
justify-content: center;
align-items: center;
padding-top: 200px;
}
form {
width: 20%;
margin-right: 15%;
}
.form-group {
margin-top: 20px;
}
#submit:hover {
color: #66afe9;
}
.example-title {
font-size: 16px;
margin: 20px 0 10px;
font-weight: bold;
}
</style>
</head>
<body>
<h6>ks:1.01</h6>
<br/>
<div class="init"></div>
<form action="/change4weixin/zhup" enctype="multipart/form-data"
method="post">
<input type="file" name="file" />
<div class="form-group">
<label for="email">邮箱号</label> <input type="text" name="mail"
class="form-control" id="email">
</div>
<div class="form-group">
<label>起始时间</label> <input type="text" name="start" id="start" />
</div>
<div class="form-group">
<label>截止时间</label> <input type="text" name="end" id="end" />
</div>
<div class="form-group">
<input type="submit" value="提交" class="form-control" id="submit" />
</div>
</form>
<div class="example">
<div class="example-title">图片事例</div>
<img src="./example.jpg" alt="事例">
<div class="example-title">文件实例</div>
<img src="./example2.png" alt="事例">
</div>
</body>
</html>
......@@ -553,6 +553,9 @@ public class ExcelReadAndWrite {
}
}
for (Weixin w : list) {
if (w == null) {
continue;
}
try {
if (null != w.getUrl() && w.getUrl().startsWith("https://mp.weixin.qq.com/s")
|| w.getUrl().startsWith("http://mp.weixin.qq.com/s")) {
......@@ -560,10 +563,13 @@ public class ExcelReadAndWrite {
w.setGetUrl(map.get(w.getUrl()));
}
} else {
if (w.getUrl() == null) {
continue;
} else
w.setGetUrl(w.getUrl() == null ? "" : w.getUrl());
}
} catch (Exception e) {
log.info("错误信息+574{}" + e.getMessage());
System.out.println(e);
}
}
write(list, e.getMail());
......@@ -615,7 +621,8 @@ public class ExcelReadAndWrite {
public static void writeZhihu(List<Zhihu> list, String mail) throws Exception {
Calendar cal = Calendar.getInstance();
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
String inurl = "C:\\Users\\Administrator\\Desktop/" + (int) (Math.random() * 99) + sdf.format(cal.getTime()) + ".xls";
String inurl = "C:\\Users\\Administrator\\Desktop/" + (int) (Math.random() * 99) + sdf.format(cal.getTime())
+ ".xls";
File tempFile = new File(inurl);
// 若是文件不存在就创建新文件
if (!tempFile.exists()) {
......@@ -694,7 +701,6 @@ public class ExcelReadAndWrite {
System.out.println("发送完成");
}
public static List<String> readExcel(String url) {
InputStream stream = null;
String str = null;
......
......@@ -89,10 +89,9 @@ public class MainController {
// String jsonpCallback = request.getParameter("callback");//
// 客户端请求参数
out.println(JSON.toJSONString(ExcelReadAndWrite.findEf()));//
// 返回jsonp格式数据
out.flush();
out.close();
System.out.println(lists.size());
System.out.println("当前队列长度:"+lists.size());
} catch (IOException e) {
e.printStackTrace();
}
......@@ -223,7 +222,7 @@ public class MainController {
}
Excels excel = new Excels();
List<Weixin> list = ReaderExcel.getExcel(path);
if (list.size() == 0) {
if (list.size() == 0||list.size()>35000) {
return "error2";
}
excel.setId((int) (Math.random() * 50000) + "k");
......
......@@ -33,13 +33,13 @@ public class SendMailUtil {
private final static Log log=LogFactory.getLog(SendMailUtil.class);
// 发送邮件的邮箱号(若有授权码则密码输入授权码)
public static String myEmailAccount = "ccxe4zhishu@126.com";
public static String myEmailPassword = "1q2w3e4r5t";
// public static String myEmailAccount = "ccxerisk@sina.com";
// public static String myEmailPassword = "1q2w3e4r";
// public static String myEmailAccount = "ccxe4zhishu@126.com";
// public static String myEmailPassword = "1q2w3e4r5t";
public static String myEmailAccount = "ccxerisk@sina.com";
public static String myEmailPassword = "1q2w3e4r";
// 发件人邮箱的 SMTP 服务器地址, 必须准确, 不同邮件服务器地址不同, 一般(只是一般, 绝非绝对)格式为: smtp.xxx.com
// 网易163邮箱的 SMTP 服务器地址为: smtp.163.com
public static String myEmailSMTPHost = "smtp.126.com";
public static String myEmailSMTPHost = "smtp.sina.com";
/**
*
......
......@@ -5,6 +5,6 @@
<title>Insert title here</title>
</head>
<body>
<h2>文件格式有问题,请确认有地址一栏</h2>
<h2>你的exccel有问题。请尝试新建一个excel,将数据放入,如仍未正常运行转链接,请联系相关负责人</h2>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment