Commit 67c6ccb6 by 郎靓静

移动端的投票

parent f3dab0be
......@@ -69,7 +69,7 @@ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j
<filter-class>org.jasig.cas.client.authentication.AuthenticationFilter</filter-class>
<init-param>
<param-name>casServerLoginUrl</param-name>
<param-value>http://cas.jfbrother.com:9003/cas-jfsso/login</param-value><!-- cas 服务器登录 地址 http://IP:PORT/CasWebProName/login -->
<param-value>http://cas.jfbrother.com/cas-jfsso/login</param-value><!-- cas 服务器登录 地址 http://IP:PORT/CasWebProName/login -->
</init-param>
<init-param>
<!-- 这里的server是服务端的IP -->
......@@ -89,7 +89,7 @@ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j
<filter-class>org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter</filter-class>
<init-param>
<param-name>casServerUrlPrefix</param-name>
<param-value>http://cas.jfbrother.com:9003/cas-jfsso</param-value><!-- cas 服务器地址 http://IP:PORT/CasWebProName -->
<param-value>http://cas.jfbrother.com/cas-jfsso</param-value><!-- cas 服务器地址 http://IP:PORT/CasWebProName -->
</init-param>
<init-param>
<param-name>serverName</param-name>
......
......@@ -83,7 +83,7 @@
}
},10);*/
$input.next('label').click(function(){
$(this).prev("input").focus();
$(this).prev().focus();
});
$input.bind({
focus:function(){
......
@CHARSET "UTF-8";
/* 通用样式 */
@CHARSET "UTF-8";
/* 通用样式 */
body{
font-size:0.6rem;
background-color: #F2F2F2;
font-family:"Microsoft YaHei";
font-size: 0.75rem;
color: #aa7434;
}
*{
box-sizing:border-box;
-moz-box-sizing:border-box; /* Firefox */
-webkit-box-sizing:border-box; /* Safari */
}
/**************相同东西****************/
.header{
height: 2.2rem;
background-color:#fff;
text-align: center;
line-height: 2.2rem;
font-weight: 700;
}
.fl{
float: left;
}
.fr{
float: right;
}
ul li{
margin: 0;
}
.arrow{
display: inline-block;
font-size: 1rem;
}
.arrow1{
display: inline-block;
font-size: 0.9rem;
color: #585858;
}
/**************签到界面****************/
.index_header{
text-align: center;
margin-top:3.8rem;
}
.index_header img{
/* height: 28%;
width: 45%; */
}
.index_header p{
margin-top: 1.75rem;
}
.index_header span{
font-weight: 700;
}
.index{
margin: 2rem 1.3rem;
text-align: center;
}
.index_name{
margin-bottom: 0.1rem;
}
.index_name input[type="text"]{
border:none;
border-radius:0.15rem;
padding-left: 0.4rem;
height: 2.2rem;
width: 13.4rem;
color: #989898
}
.index input[type="submit"]{
height: 2.2rem;
width: 13.4rem;
margin: 2rem 0;
border:none;
border-radius:0.15rem;
text-align: center;
color: #fff;
background-color:#aa7434;
}
.index_name input:focus{
outline: none;
}
.index_cg_photo{
height: 7.2rem;
width: 15.3rem;
margin: 0.75rem auto;
background-color: #fff;
border-radius:0.15rem;
}
.index_cg_photo_l{
width: 7.2rem;
margin:0;
}
.index_cg_photo_l img{
margin: 1.55rem 2rem 2.3rem 1.85rem;
height: 50%;
width: 50%;
}
.index_cg_photo_r{
color: #000;
font-size: 0.5rem;
}
.index_cg_photo_r label{
margin-top: 0.8rem;
margin-bottom: 0.5rem;
font-size: 0.75rem;
}
.index_cg_photo_r p{
margin-bottom: 0.3rem;
font-size: 0.6rem;
}
.index_cg_photo_r span{
font-weight: 700;
padding-right:0.5rem;
}
.index_cg_sj{
height: 2.2rem;
width: 15.3rem;
border-radius:0.15rem;
margin: 0.75rem auto;
margin-bottom: 0;
padding:0 1rem;
line-height: 2.2rem;
background: #fff;
}
.index_picture{
display: inline-block;
}
.index_picture img{
height: 1.1rem;
width: 1.1rem;
line-height: 2.2rem;
vertical-align:text-top;
}
.index_picture span{
vertical-align: middle;
}
.index_cg_sj_l{
display: inline-block;
color: #000;
}
.index_cg_sj_l span{
color: #aa7434;
}
.index_cg_circle{
width: 4.9rem;
height: 4.9rem;
border-radius: 3rem;
background-color: #aa7434;
margin: 2.7rem auto;
font-size: 0.6rem;
text-align: center;
color: #fff;
}
.index_cg_circle img{
height: 2.2rem;
width: 2.2rem;
margin: 0.95rem 1.1rem 0.4rem 1.6rem;
}
.index_cg_circle a{
color:#fff
}
/**************投票主题编辑****************/
.vote{
background-color:#fff;
height: 2.2rem;
padding-left: 6rem;
}
.vote p{
display: inline-block;
line-height: 2.2rem;
font-weight: 700;
font-size: 0.75rem;
margin: 0;
}
.vote_editor_top>label{
line-height:0.7rem !important;
font-size:normal;
}
.vote span{
color: #989898;
font-size: 0.7rem;
padding-left: 3.5rem;
cursor: pointer;
}
.vote_editor{
margin-top:0.75rem;
color: #585858;
}
.vote_editor ul{
list-style: none;
margin: 0;
}
.vote_editor li{
height: 2.2rem;
background-color: #fff;
border-bottom: 0.05rem solid #F2F2F2;
}
.vote_editor li input[type="text"]{
display: inline-block;
height: 2.1rem;
line-height: 2.15rem;
border:none;
width: 80%;
font-size: 0.6rem;
}
.vote_editor img{
display: inline-block;
height: 0.75rem;
width: 0.75rem;
margin-left: 0.35rem;
margin-right: 0.7rem;
vertical-align: middle;
}
.vote_editor_top{
height: 3.2rem;
width: 100%;
background-color: #fff;
margin-bottom: 0.05rem;
}
.vote_editor textarea{
border:none;
margin:0 auto;
height: 100%;
width: 100%;
font-size: 0.7rem;
}
.vote_editor textarea:focus{
outline: none;
}
.vote_editor li input:focus{
outline: none;
}
.vote_little{
font-size: 0.6rem;
color: #989898;
margin: 0.25rem 0.5rem 0.65rem;
}
.vote_editor_bottom li{
padding:0 0.5rem;
background-color: #fff;
border-bottom: 0.05rem solid #F2F2F2;
height: 2.2rem;
line-height: 2.2rem;
display:flex;
justify-content: space-between;
align-items:center;
}
.vote_editor_bottom_select{
height: 2rem;
color: #585858;
width: 6.5rem;
border: 0;
text-align: right;
}
.vote_editor_bottom{
color: #989898;
}
.vote_editor_bottom p{
display: inline-block;
color: #585858;
cursor: pointer;
margin:0;
}
.vote_editor_bottom img{
height: 1.45rem;
padding-left: 9.7rem;
vertical-align:middle;
}
.masking{
width: 100%;
height:100%;
background: #000;
opacity: 0.8;
position: fixed;
top: 0;
left: 0;
display: none;
}
.masking-content{
width: 100%;
margin-top:70%;
position: absolute;
bottom: 0.5rem;
overflow:hidden;
}
.masking-content li{
background-color: #fff;
border-bottom:0.05rem solid #f2f2f2;
color: #000;
height: 2rem;
text-align: center;
font-size: 0.8rem;
line-height: 2rem;
padding-right:0.2rem;
}
.masking1{
width: 100%;
height:100%;
background: #000;
opacity: 0.8;
position: fixed;
top: 0;
left: 0;
display: none;
}
.masking-content1{
width: 100%;
margin-top:70%;
position: absolute;
bottom: 0.5rem;
}
.masking-content1 li{
background-color: #fff;
border-bottom:0.05rem solid #f2f2f2;
color: #000;
height: 2rem;
text-align: center;
font-size: 0.8rem;
line-height: 2rem;
}
.masking2{
width: 100%;
height:100%;
background: #000;
opacity: 0.8;
position: fixed;
top: 0;
left: 0;
display: none;
}
.masking-content2{
width: 100%;
margin-top:70%;
position: absolute;
bottom: 0.5rem;
}
.masking-content2 li{
background-color: #fff;
border-bottom:0.05rem solid #f2f2f2;
color: #000;
height: 2rem;
text-align: center;
font-size: 0.8rem;
line-height: 2rem;
}
#input1{
height: 2rem;
color: #585858;
width: 6.5rem;
border: 0;
}
/**************投票主题****************/
.vote_topic_header{
background-color:#fff;
height: 2.2rem;
}
.vote_topic_header p{
display: inline-block;
padding: 0 4.8rem;
font-weight: 900;
line-height: 2.2rem;
}
.vote_topic_header span{
line-height: 2.2rem;
cursor:pointer;
}
.vote_topic_main{
margin: 0.5rem 0;
}
.vote_topic_main p{
color:#585858;
font-size: 0.8rem;
line-height: 1rem;
padding-left: 0.4rem;
}
.vote_topic_select{
padding-left: 0.4rem;
margin-bottom:0.5rem;
}
.select{
margin-left:0.3rem;
display: inline-block;
width: 90%;
height: 1.45rem;
background-color: #fff;
line-height: 1.45rem;
border-radius: 0.3rem;
padding-left:0.4rem;
}
/**************投票结果****************/
.vote_result_header{
background-color:#fff;
height: 2.2rem;
line-height: 2.2rem;
}
.vote_result_header label{
display: inline-block;
font-weight: normal;
color: #989898;
}
.vote_result_header p{
display: inline-block;
font-weight: 700;
padding-left: 3rem;
line-height: 2.2rem;
}
.vote_result_select{
margin-top:0.8rem;
}
.vote_result_select_tilte{
line-height: 1.2rem;
padding: 0.5rem;
background-color: #fff;
border-bottom: 0.05rem solid #F2F2F2;
color: #585858;
}
.vote_result_select_tilte p{
font-size: 0.6rem;
color: #989898;
}
.vote_result_select ul{
list-style: none;
}
.vote_result_select li{
padding: 0.4rem 0.6rem;
line-height: 1rem;
background-color: #fff;
border-bottom: 0.05rem solid #F2F2F2;
font-size: 0.6rem;
color:#989898;
}
.vote_result_select span{
padding-left:11.6rem;
}
/**************投票结果****************/
.vote_check_header{
background-color:#fff;
height: 2.2rem;
}
.vote_check_header label{
display: inline-block;
line-height: 2.2rem;
color: #989898;
font-weight: normal;
padding-left: 0.4rem;
}
.vote_check_header p{
display: inline-block;
line-height: 2.2rem;
padding-left: 4rem;
font-weight: 700;
}
.vote_check_title{
margin-top: 0.5rem;
background-color: #fff;
line-height: 1.2rem;
padding:0.5rem;
}
.vote_check_middle{
font-size: 0.6rem;
color: #989898;
padding: 0.3rem 0.5rem;
}
.vote_check_result{
margin: 0.5rem 0;
}
.vote_check_result li{
background-color: #fff;
height: 1.45rem;
line-height: 1.45rem;
padding-left: 0.5rem;
border:0.05rem solid #F2F2F2;
font-size: 0.2rem;
color: #585858;
}
.vote_check_content_r{
font-size: 0.6rem;
color: #989898;
padding-left: 10.5rem;
}
.vote_check_content_l{
font-size: 0.6rem;
color: #989898;
}
/**************资料下载****************/
.download_header{
background-color:#fff;
height: 2.2rem;
padding-left: 5rem;
}
.download_header p{
display: inline-block;
line-height: 2.2rem;
font-weight: 700;
font-size: 0.75rem;
margin: 0;
}
.download_header span{
color: #989898;
font-size: 0.7rem;
padding-left: 1.7rem;
cursor: pointer;
}
.download_main{
margin-top: 0.75rem;
}
.download_main a{
color: #000;
}
.download_main a:hover{
text-decoration: none;
}
.download_main a:hover li{
background-color: #c3c3c3;
}
.download_main ul{
list-style: none;
}
.download_main li{
height: 2.2rem;
padding-left: 0.35rem;
background-color: #fff;
border-bottom: 0.05rem solid #f2f2f2;
line-height: 2.2rem;
}
.download_main img{
margin: 0.5rem;
height: 1rem;
width: 1rem;
float: right;
}
.lottery{
color: #484848;
padding: 0.75rem;
font: 1rem bold;
text-align: center;
}
.lottery img{
margin: 0.9rem;
width: 10rem;
height: 10rem;
}
/**************会议纪要****************/
.summary_header{
background-color:#fff;
height: 2.2rem;
padding-left: 6.5rem;
}
.summary_header p{
display: inline-block;
line-height: 2.2rem;
font-weight: 700;
font-size: 0.75rem;
margin: 0;
}
.summary_header span{
color: #989898;
font-size: 0.7rem;
padding-left: 4.5rem;
cursor: pointer;
}
.summary_main_top{
margin-top:0.75rem;
background-color:#fff;
height: 2.2rem;
padding-left: 0.2rem;
color: #585858;
}
.summary_main_top input[type="text"]{
border:none;
height: 2.2rem;
width: 65%;
line-height: 2.2rem;
margin-left:1rem;
}
.summary_main_top span{
color: #989898;
}
.summary_main_bottom{
height: 8.3rem;
background-color:#fff;
color: #282828;
}
.summary_main_bottom>label{
line-height:1rem !important;
font-weight: normal;
}
.summary_main_bottom textarea{
border:none;
height: 100%;
width: 100%;
}
.summary_main_top input:focus{
outline: none;
}
.summary_main_bottom textarea:focus{
outline: none;
}
/**************二维码界面****************/
.two_header{
margin-top:3rem;
margin-bottom: 1.2rem;
text-align: center;
}
.two_header img{
width:12rem;
height:3rem;
}
.two_main{
background-color: #fff;
margin: 1rem 1.8rem;
}
.two_main p{
height: 2.3rem;
border-bottom: 0.05rem solid #f2f2f2;
line-height: 2.3rem;
text-align: center;
font-size:0.8rem;
font-weight: 700;
}
.two_main>p+div{
width: 9rem;
height: 9rem;
display:block;
margin:0.95rem auto;
}
.two_main_wx{
height: 2.3rem;
text-align: center;
}
.two_main_wx label{
line-height: 2.3rem;
font-size: 0.7rem;
}
.two_bottom{
font-size: 0.6rem;
color: #c3c3c3;
text-align: center;
margin-bottom:1rem;
}
/**************投票浏览界面****************/
.vote_browse_main{
background-color:#fff;
margin: 0.5rem 0;
}
.vote_browse_main_top{
padding: 0.4rem 0;
}
.vote_browse_main_top span{
font-size: 0.6rem;
color:#A8A8A8;
}
.vote_browse_main_top span:first-child{
font-size: 0.7rem;
padding:0 0.5rem;
}
.vote_browse_main_middle{
padding: 0.5rem;
color:#000;
}
.vote_browse_main_bottom p{
font-size: 0.6rem;
padding: 0.5rem;
color:#A3A3A3;
margin-bottom:0px;
}
.vote_browse_main_bottom ul{
margin-bottom:0px;
}
.vote_browse_main_bottom li{
width: 100%;
padding: 0.2rem 0;
border-bottom: 0.05rem solid #fff;
background-color:#f7f7f7;
}
.vote_browse_main_bottom span{
color:#8C8C8C;
padding-left: 0.5rem;
}
/* .vote_browse_main_bottom li:first-child{
background-color:#E8F7FE;
} */
.vote_browse_main_bottom_button {
text-align: center;
padding: 0.5rem 0;
}
.vote_browse_main_bottom_button a{
text-decoration: none;
color:#5BADD5;
}
/**************投票详情界面****************/
.vote_details_main{
background-color:#fff;
margin: 0.5rem 0;
}
.vote_details_main_top{
padding: 0.4rem 0;
}
.vote_details_main_top span{
font-size: 0.6rem;
color:#A8A8A8;
}
.vote_details_main_top span:first-child{
font-size: 0.7rem;
padding:0 0.5rem;
}
.vote_details_main_middle{
padding: 0.5rem;
color:#000;
}
.vote_details_main_bottom p{
font-size: 0.6rem;
padding: 0.5rem;
color:#A3A3A3;
margin-bottom:0px;
}
.vote_details_main_bottom ul{
margin-bottom:0px;
}
.vote_details_main_bottom li{
width: 100%;
padding: 0.2rem 0;
border-bottom: 0.05rem solid #fff;
background-color:#f7f7f7;
}
.vote_details_main_bottom span{
color:#8C8C8C;
padding-left: 0.5rem;
}
/* .vote_browse_main_bottom li:first-child{
background-color:#E8F7FE;
} */
.vote_details_main_bottom input{
margin-left: 0.5rem;
}
.vote_details_bottom_button {
background-color: #fff;
width: 100%;
height: 2.5rem;
line-height: 1.5rem;
text-align: center;
padding: 0.5rem 0;
position: relative;
bottom:0;
}
.vote_details_bottom_button a{
display: inline-block;
width: 90%;
height: 1.5rem;
border-radius: 0.1rem;
background-color:#5BADD5;
text-decoration: none;
color:#fff;
}
/**************投票管理界面****************/
.vote_major_title{
height: 2.4rem;
width: 100%;
margin-bottom:0.1rem;
background-color:#fff;
}
.vote_major_title p{
font-size: 1rem;
font-weight: 700;
line-height: 2.4rem;
text-align: center;
color: #484848;
}
.vote_major_content ul li{
height: 4rem;
background-color: #fff;
margin-bottom:0.05rem;
padding-bottom: 0.1rem;
color: #422626fc;
}
.vote_major_selection_top{
line-height: 2rem;
/* padding-right: 1.4rem; */
display: flex;
justify-content: space-between;
position: relative;
}
.vote_major_selection_top a{
line-height: 4rem;
padding:0 1.4rem;
color: #422626fc;
}
/* .vote_major_selection_top:hover a{
background-color:#30a2dca1;
color:#fff;
} */
.vote_major_selection_top span{
font-size: 0.6rem;
line-height: 2rem;
padding-left: 0.2rem;
color:#8c8c8c;
}
input[type=button]:nth-child(1){
outline:none;
border: none;
height: 2.5rem;
width: 100%;
border-radius: 0.5rem;
background-color:#30a2dca1;
margin: 0.5rem 0;
color:#fff;
font-weight: 700;
font-size: 0.9rem;
}
input[type=button]:nth-child(2){
outline:none;
border: none;
height: 2.5rem;
width: 100%;
border-radius: 0.5rem;
background-color:#fb7413d4;
margin-bottom: 0.5rem;
color:#fff;
font-weight: 700;
font-size: 0.9rem;
}
.vote_major_content input[type=checkbox]{
display: block;
float: left;
margin-top:1.75rem;
margin-right:0;
margin-left:0.5rem;
}
.vote_major_selection_top_right{
margin-left:0.5rem;
}
.vote_major_selection_top_right p{
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 10rem;
margin:0;
font-size:16px;
color:#000;
}
.vote_major_selection_top_img{
/* height:0.5rem;
width:0.3rem; */
position: absolute;
right: 1rem;
top: 0;
font-size:0.6rem;
}
.vote_major_selection_top_img span{
color: #fff;
font-weight: 700;
padding: 0.2rem;
margin: 0;
line-height: 0.8rem;
background-color:orange;
}
.vote_editor_judge{
line-height: 5px;
margin: 20px;
display:none;
}
\ No newline at end of file
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<link rel="shortcut icon" type="image/x-icon" href="${ctx}/images/main/logo.ico" />
<link rel="stylesheet" href="${ctx}/lib/css/reset.css" type="text/css" />
<!-- bootstrap的css -->
<link rel="stylesheet" href="${ctx}/lib/plug/bootstrap-3.3.7-dist/css/bootstrap.min.css">
<!-- bootstrap-table的css -->
<link rel="stylesheet" href="${ctx}/lib/plug/bootstrap-table-master/src/bootstrap-table.css">
<!-- 自定义样式 -->
<link rel="stylesheet" href="${ctx}/jfcas04_mobile/css/common.css" type="text/css" />
<!-- fancyBox的css -->
<link rel="stylesheet" type="text/css" href="${ctx}/lib/plug/fancyBox-2.1.5/source/jquery.fancybox.css" media="screen">
<!-- ztree的css -->
<link rel="stylesheet" href="${ctx}/lib/plug/zTree/css/zTreeStyle/zTreeStyle.css" type="text/css">
<link rel="stylesheet" href="${ctx}/lib/plug/jqueryUi/jquery-ui-1.10.4/themes/base/jquery-ui.css">
<!-- xcConfirm的css -->
<link rel="stylesheet" href="${ctx}/lib/plug/xcConfirm/css/xcConfirm.css">
<!-- spectrum(颜色)的css -->
<link rel="stylesheet" type="text/css" href="${ctx}/lib/plug/jqueryColour/spectrum.css">
<!-- fullcalendar(日历)的css -->
<link href='${ctx}/lib/plug/fullcalendar/fullcalendar.min.css' rel='stylesheet' />
<link href='${ctx}/lib/plug/fullcalendar/fullcalendar.print.min.css' rel='stylesheet' media='print' />
<link rel="stylesheet" href="${ctx}/lib/plug/jquery-easyui-1.5.3/themes/icon.css" type="text/css"></link>
<link rel="stylesheet" href="${ctx}/custom/plug/webupload/css/webuploader.css" type="text/css"></link>
<!-- 时间插件的css -->
<link rel="stylesheet" href="${ctx}/lib/plug/mobileTime/css/shijian.css" />
<!-- 弹出框插件的css -->
<link rel="stylesheet" href="${ctx}/lib/plug/sweetalert/css/sweetalert.css" />
<script type="text/javascript" src="${ctx}/lib/js/jquery-1.11.1.min.js"></script>
<!-- fancyBox的js -->
<script type="text/javascript" src="${ctx}/lib/plug/fancyBox-2.1.5/source/jquery.fancybox.js"></script>
<!-- ztree的js -->
<script type="text/javascript" src="${ctx}/lib/plug/zTree/js/jquery.ztree.core.js"></script>
<script type="text/javascript" src="${ctx}/lib/plug/zTree/js/jquery.ztree.exhide.min.js"></script>
<script type="text/javascript" src="${ctx}/lib/plug/zTree/js/jquery.ztree.exedit.min.js"></script>
<script type="text/javascript" src="${ctx}/lib/plug/zTree/js/jquery.ztree.excheck.min.js"></script>
<!-- 文本框的提示效果 -->
<script type="text/javascript" src="${ctx}/custom/plug/inputTips/inputTips.js"></script>
<!-- jquery ui的js -->
<!-- <script src="lib/plug/jqueryUi/jquery-ui-1.12.1.custom/jquery-ui.js"></script> -->
<script src="${ctx}/lib/plug/jqueryUi/jquery-ui-1.10.4/ui/jquery-ui.js"></script>
<!-- cookie的js -->
<script src="${ctx}/lib/js/jquery.cookie.js"></script>
<!-- xcConfirm的js -->
<script src="${ctx}/lib/plug/xcConfirm/js/xcConfirm.js"></script>
<!-- 百度地图 -->
<script src="http://api.map.baidu.com/api?v=2.0&ak=dk1fBEzU3QrGGFqauPP2kmXnA2P6mnOU"></script>
<!-- echarts的js -->
<script src="${ctx}/lib/js/echarts.js"></script>
<!-- 通用的js -->
<script src="${ctx}/custom/js/jquery.extend.js"></script>
<!-- fullcalendar(日历)的js -->
<script src='${ctx}/lib/plug/fullcalendar/lib/moment.min.js'></script>
<script src='${ctx}/lib/plug/fullcalendar/fullcalendar.min.js'></script>
<script src='${ctx}/lib/plug/fullcalendar/locale/zh-cn.js'></script>
<!-- spectrum(颜色)的js -->
<script type="text/javascript" src="${ctx}/lib/plug/jqueryColour/spectrum.js"></script>
<!-- mydate97的js -->
<script src='${ctx}/lib/plug/My97DatePicker/WdatePicker.js'></script>
<!-- 调用api时的js -->
<script type="text/javascript" src="${ctx}/jwapp/common/js/lang_json.js"></script>
<!-- bootstrap的js -->
<script src="${ctx}/lib/plug/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
<!-- bootstrap-table的js -->
<script src="${ctx}/lib/plug/bootstrap-table-master/src/bootstrap-table.js"></script>
<script src="${ctx}/lib/plug/bootstrap-table-master/src/locale/bootstrap-table-zh-CN.js"></script>
<script src="${ctx}/custom/plug/webupload/js/webuploader.js"></script>
<script src="${ctx}/custom/plug/webupload/js/webuploaderExtend.js"></script>
<!-- 时间插件的js -->
<script type="text/javascript" src="${ctx}/lib/plug/mobileTime/js/jquer_shijian.js"></script>
<!-- 弹出框插件的js -->
<script type="text/javascript" src="${ctx}/lib/plug/sweetalert/js/sweetalert.min.js"></script>
<script type="text/javascript">
var ctx='${pageContext.request.contextPath}';
</script>
<script type="text/javascript">
(function() {
//设置页面html的字体大小
var view = screen.width;
var fontSize = view / 16 + "px";
$('html').css("fontSize", fontSize);
})()
var ctx='${pageContext.request.contextPath}';
</script>
\ No newline at end of file
$(function(){
//初始化下来载列表
init_download_content();
})
function init_download_content(){
var download_list =[
{download_name:'会议资料1'},
{download_name:'会议资料2'},
{download_name:'会议资料3'},
{download_name:'会议资料4'},
{download_name:'会议资料5'},
];
//创建列表内的文字和图片
var $download_content = $('#download_content');
for(var i = 0 ;i<download_list.length;i++){
var $li_1 = $('<li></li>');
var $a_1 =$('<a></a>');
var $span_1 = $('<span></span>');
$span_1.text(download_list[i].download_name);
var $img_1=$('<img src="'+ctx+'/jfcas04_mobile/images/10@3x.png" onclick="alert('+i+')">');
$li_1.append($img_1);
$li_1.append($span_1);
$a_1.append($li_1);
$download_content.append($a_1);
}
}
\ No newline at end of file
$(function(){
$('#index_userName').inputTips('请输入用户名')
/*$('#index_userName').inputTips({
tip:{
}
})*/
/*$.fancybox('错误')*/
$('#index_phone').inputTips('请输入电话号码')
})
\ No newline at end of file
$(function(){
init_index_cg_photo_r();
})
function init_index_cg_photo_r(){
var index_cg_photo_list = [
{index_cg_photo_name: '欢迎您,',index_cg_photo_content:'黄草地'},
{index_cg_photo_name: '手机 :',index_cg_photo_content:'18736273627'},
{index_cg_photo_name: '状态 :',index_cg_photo_content:'已签到'},
{index_cg_photo_name: '位置 :',index_cg_photo_content:'三排四座'},
{index_cg_photo_name: '分组 :',index_cg_photo_content:'后勤部门'},
];
var $index_cg_photo_r = $('#index_cg_photo_r');
for(var i=0; i<index_cg_photo_list.length;i++){
//var $label_1 = $('<label></label>');
//$label_1.text('欢迎您,黄草地');
var $p_1 = $('<p></p>');
var $span_1 = $('<span></span>');
var $span_2 = $('<span style="font-weight: normal;"></span>');
$span_1.text(index_cg_photo_list[i].index_cg_photo_name);
$span_2.text(index_cg_photo_list[i].index_cg_photo_content);
$p_1.append($span_1);
$p_1.append($span_2);
//$index_cg_photo_r.append($label_1);
if(i==0){
$p_1.css({fontSize: '0.75rem',paddingTop: '0.8rem'});
$span_2.css({fontWeight: '700'});
}
$index_cg_photo_r.append($p_1);
}
}
\ No newline at end of file
$(function(){
//console.log(ctx)
init_two_content();
})
function init_two_content(){
var two_content_list=[
{two_content_name:'2018-08-14会议签到',two_content_wx:'微信扫码签到'},
{two_content_name:'2018-08-14资料下载',two_content_wx:'微信扫码下载'},
{two_content_name:'2018-08-14投票界面',two_content_wx:'微信扫码投票'},
{two_content_name:'2018-08-14抽奖界面',two_content_wx:'微信扫码抽奖'},
]
var $two_content = $('#two_content');
for(var i=0;i<two_content_list.length;i++){
var $div = $('<div class="two_main"></div>');
var $p_1 = $('<p></p>');
var $div_1 = $('<div></div>');
$div_1.attr('id','qrcodeCanvas'+i);
var $div_2 = $('<div class="two_main_wx"></div>');
var $label = $('<label></label');
$p_1.text(two_content_list[i].two_content_name);
$label.text(two_content_list[i].two_content_wx);
$div.append($p_1);
$div.append($div_1);
$div.append($div_2);
$div_2.append($label);
$two_content.append($div);
var id = $div_1.attr('id');
var link_text;
switch(two_content_list[i].two_content_wx){
case '微信扫码签到':
link_text = 'index.jsp';
break;
case '微信扫码下载':
link_text = 'download.jsp';
break;
case '微信扫码投票':
link_text = 'vote_topic.jsp';
break;
case '微信扫码抽奖':
link_text = 'lottery_draw.jsp';
break;
}
//二维码
jQuery('#'+id).qrcode({
render : "canvas", <!--二维码生成方式 -->
text : "http://192.168.1.171:8080/register/"+link_text, <!-- 二维码内容 -->
//text : 'http://192.168.1.160:8080/register/index.jsp',
width : "144", //二维码的宽度
height : "144",
//src:'down/'+id
});
//把画布转为图片
var canvas = $('#'+id).find('canvas');
var img = convertCanvasToImage(canvas[0]);
canvas.hide();
canvas.after(img);
}
}
// Converts canvas to an image
function convertCanvasToImage(canvas) {
var image = new Image();
image.src = canvas.toDataURL("image/png");
return image;
}
\ No newline at end of file
$(function(){
//初始化下来载列表
init_vote_editor_content();
fn();
$('#vote_editor_text').inputTips('输入投票主题,2-80字');
})
function init_vote_editor_content(){
if($.getUrlParam('voteId')==null){
var vote_editor_list=[
{vote_editor_name:'选项1'},
{vote_editor_name:'选项2'},
{vote_editor_name:'选项3'},
];
var $vote_editor_content = $('#vote_editor_content');
for( var i=0 ;i<vote_editor_list.length;i++){
var $li_2 = $('<li></li>');
var $img_2 = $('<img src="'+ctx+'/jfcas04_mobile/images/3@3x.png" >');
var $input_1 = $('<input type="text">');
$li_2.append($img_2);
$img_2.on('click',function(){
dele($(this));
})
if(i==0||i==1){ //隐藏第一,二行的图片
$img_2[0].style.visibility="hidden";
}
$li_2.append($input_1);
$input_1.val(vote_editor_list[i].vote_editor_name); //每个选项的名字
$input_1.focus(function(){
$(this).val('');
});
$vote_editor_content.append($li_2);
}
}
var results = voteModule.voteDataAction.listAll({
FIELD_UUID : $.getUrlParam('voteId')
}).rowSet;
console.log(results);
var v_jquery = {};
v_jquery.FIELD_MANAGE_ID = $.getUrlParam('voteId');
var infos = voteModule.voteDataAction.listItem(v_jquery).listItems;
console.log(infos);
//查看每个选项的被选情况
var $vote_editor_content = $('#vote_editor_content');
for( var i=0 ;i<infos.length;i++){
$('#vote_editor_text').val(results[0].CONTENT);
var $li_2 = $('<li></li>');
var $img_2 = $('<img src="'+ctx+'/jfcas04_mobile/images/3@3x.png" >');
var $input_1 = $('<input type="text">');
$li_2.append($img_2);
$img_2.on('click',function(){
dele($(this));
})
if(i==0||i==1){ //隐藏第一,二行的图片
$img_2[0].style.visibility="hidden";
}
$li_2.append($input_1);
$input_1.val(infos[i].CONTENT); //每个选项的名字
$vote_editor_content.append($li_2);
$('#vote_select').val(results[0].SUB_TITLE);
$('#vote_select1').val(results[0].MAX_COUNT);
$('#vote_select2').val(results[0].MIN_COUNT);
var ii = results[0].END_TIME;
ii = ii.substring(0, ii.length-3);
$('#input1').val(ii);
}
//最后一行的图片更换
var $img_3 = $('<img src="'+ctx+'/jfcas04_mobile/images/4@3x.png" style="margin:0.7rem 0.35rem;">');
var $span_2 = $('<span style="font-size:0.6rem;"></span>');
var $li_3 = $('<li></li>').appendTo($vote_editor_content);
$span_2.text('新增选项');
$li_3.append($img_3);
$li_3.append($span_2);
$img_3.on('click',function(){
addd($(this));
})
}
//新增选项
function addd(get){
var $add_li = $('<li></li>');
var $add_img = $('<img onClick="dele(this)" src="'+ctx+'/jfcas04_mobile/images/3@3x.png">');
var $add_input = $('<input type="text">');
var index = $('#vote_editor_content>li').length;
$add_input.val('新选项');
$add_input.focus(function(){
$(this).val('');
});
$add_li.append($add_img);
$add_li.append($add_input);
if(index<=15){
$(get).parent().before($add_li);
}
else{
$.fancybox('最多不得超出15个选项,每个选项不得超过40个字');
}
//numCheck();
}
//删除选项
function dele(handler){
$(handler).parent().remove();
//numCheck();
}
//新增或删除选项时,对选项文字的数字排序
function numCheck(){
        var num = $('#vote_editor_content>li').length;    
        for (var i = 0; i <= num; i++){        
        $('#vote_editor_content>li>input').eq(i).val('选项'+(i+1));
}
}
//匿名投票按钮
function fn(){
$("#anonymous").click(
function(){
if($(this).attr('src')==''+ctx+'/jfcas04_mobile/images/5@3x.png'){
$(this).attr('src',''+ctx+'/jfcas04_mobile/images/6@3x.png');
}
else{
$(this).attr('src',''+ctx+'/jfcas04_mobile/images/5@3x.png');
}
}
);
}
//发布投票
function savesend() {
var results = voteModule.voteDataAction.listAll({
FIELD_UUID : $.getUrlParam('voteId')
}).rowSet;
//判断投票是否结束
/*if(results[0].STATUS_FLAG==2){
$.fancybox.open('投票已结束!');
return;
}*/
var v_jquery = {};
v_jquery.FIELD_CONTENT = $('#vote_editor_text').val();
var index_letter =['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q'];
var contents = '';
var letter_array = [];
$('#vote_editor_content').find('li:not(:last)').each(function(index, element) {
var letter_obj = {};
var content = $(element).find('input').val();
letter_obj.INDEX_NAME=index_letter[index];
letter_obj.CONTENT = content;
letter_array.push(letter_obj);
})
v_jquery.FIELD_ITEMS = JSON.stringify(letter_array);
v_jquery.FIELD_SUB_TITLE = $('#vote_select').val();
v_jquery.FIELD_MIN_COUNT = $('#vote_select2').val();
v_jquery.FIELD_MAX_COUNT = $('#vote_select1').val();
v_jquery.FIELD_END_TIME = $('#input1').val();
console.log(v_jquery);
//判断发布的投票信息是否完整
if(v_jquery.FIELD_CONTENT=='' || v_jquery.FIELD_SUB_TITLE=='' || v_jquery.FIELD_MIN_COUNT=='' || v_jquery.FIELD_MAX_COUNT=='' || v_jquery.FIELD_END_TIME==''){
$('.vote_editor_judge').css('display','block');
$('.vote_editor_judge').text('请完整输入以下信息。');
return;
}
//判断最大投票数是否大于最小投票数
if(eval(v_jquery.FIELD_MIN_COUNT) > eval(v_jquery.FIELD_MAX_COUNT) ){
$('.vote_editor_judge').css('display','block');
$('.vote_editor_judge').text('最大投票数必须大于等于最小投票数');
return;
}else{
$('.vote_editor_judge').css('display','none');
}
//判断时间是否是之后的时间
var mydate = new Date();
//var time = mydate.toLocaleString('chinese', { hour12: false });
var year=mydate.getFullYear();
var month=mydate.getMonth()+1;
var day=mydate.getDate();
var hour=mydate.getHours();
var mins=mydate.getMinutes();
if(month<=9){
month="0"+month;
}
if(day<=9){
day="0"+day;
}
mydate=year+"-"+month+"-"+day+" "+hour+":"+mins;
var nowtime = $('#input1').val();
//对比日期大小
if(mydate>nowtime) {
$('.vote_editor_judge') .css('display', 'block');
$('.vote_editor_judge').text('结束时间必须大于实际时间');
return;
}
//判断发布的投票是新增的还是编辑
if($.getUrlParam('voteId')==null){
v_jquery.FIELD_OPETYPE = 'insert';
var result = voteModule.voteActAction.insertVote(v_jquery);
$.fancybox.open('新增成功!',{
//关闭之后触发
afterClose : function( instance, current ){
window.location.href='mobileVotemajor';
}
});
swal("Good!", "新增成功!", "success",function(){
alert()
});
console.log(result)
if(result.VALUE=='保存成功'){
swal({
title: "",
text: "新增成功!",
type: "success",
showCancelButton: false,
allowOutsideClick:true,
closeOnConfirm: false,
}, function() {
//点击确定后跳转页面
window.location.href='mobileVotemajor';
});
}else{
swal("", "新增失败!", "error");
}
}else{
v_jquery.FIELD_UUID = results[0].UUID;
v_jquery.FIELD_OPETYPE = 'updata';
var result = voteModule.voteActAction.updateVote(v_jquery);
console.log(result)
//$.fancybox.open('编辑成功!');
if(result.VALUE=='修改成功'){
swal({
title: "",
text: "编辑成功!",
type: "success",
showCancelButton: false,
allowOutsideClick:true,
closeOnConfirm: false,
}, function() {
//点击确定后跳转页面
window.location.href='mobileVotemajor';
});
}else{
swal("", "编辑失败!", "error");
}
}
}
$(function(){
init_vote_browse_content();
})
function init_vote_browse_content(){
$.ajax({
url:ctx+'/voteData_list_ongoing',
type:'post',
success:function(result){
//主容器
var $vote_browse_content = $('#vote_browse_content');
var infos = result.rowSet;
console.log(infos);
for(var j=0;j < infos.length;j++){
var options = [];
//已投票的主题
if(infos[j].VOTE_COUNT>0){
options = voteModule.voteDataAction.listUserChecked({
FIELD_MANAGE_ID : infos[j].UUID
}).listusercheckeds;
console.log(options);
}
//子容器
var $vote_browse_main = $('<div></div>').addClass('vote_browse_main').appendTo($vote_browse_content);
var $vote_browse_main_top = $('<div></div>').addClass('vote_browse_main_top').appendTo($vote_browse_main);
var $span_1 = $('<span></span>').text(infos[j].CREATE_ID).appendTo($vote_browse_main_top);
var $span_2 = $('<span></span>').text(infos[j].CREATE_TIME).appendTo($vote_browse_main_top);
//子容器中
var $vote_browse_main_middle = $('<div></div>').addClass('vote_browse_main_middle').appendTo($vote_browse_main);
var $p_1 = $('<p></p>').text(j+1+'.'+infos[j].CONTENT).appendTo($vote_browse_main_middle);
//选项内容
var infos_content ={};
infos_content.FIELD_MANAGE_ID = infos[j].UUID;
var vote_topic_content_list = voteModule.voteDataAction.listItem(infos_content).listItems;
//子容器尾
var $vote_browse_main_bottom = $('<div></div>').addClass('vote_browse_main_bottom').appendTo($vote_browse_main);
var $p_2 = $('<p></p>').text('选项预览').appendTo($vote_browse_main_bottom);
//选项的内容样式
var $ul_1 = $('<ul></ul>').appendTo($vote_browse_main_bottom);
//创建一个新的数组
var newArray = [];
for(var i=0; i < vote_topic_content_list.length;i++){
var flag = true;
/*var $li_1 = $('<li></li>').appendTo($ul_1);*/
for(var x =0;x <options.length;x++){
//判断选项是否被选
if(vote_topic_content_list[i].UUID==options[x].ITEM_ID){
var $li_1 = $('<li></li>').appendTo($ul_1);
$li_1.css('background-color','#E8F7FE');
var $span_3 = $('<span></span>').text(vote_topic_content_list[i].CONTENT).appendTo($li_1);
flag = false;
}
}
//将未选的选项放入新数组
if(flag==true){
newArray.push(vote_topic_content_list[i]);
}
}
//显示三条选项
for(var y=0; y < newArray.length;y++){
if($ul_1.find('li').length<3){
var $li_1 = $('<li></li>').appendTo($ul_1);
var $span_3 = $('<span></span>').text(newArray[y].CONTENT).appendTo($li_1);
}
}
//投票按钮
var $vote_browse_main_bottom_button = $('<div></div>').addClass('vote_browse_main_bottom_button').appendTo($vote_browse_main);
//判断主题是否已投
if(infos[j].VOTE_COUNT!=0){
var $a_1 = $('<a></a>').text('已投票,查看结果');
}else{
var $a_1 = $('<a></a>').text('立即投票');
}
$a_1.attr('onclick','window.location.href=\'mobileVotedetails?voteId='+ infos[j].UUID +'\'').appendTo($vote_browse_main_bottom_button);
}
}
})
}
$(function(){
//初始化下来载列表
init_vote_check_content();
})
function init_vote_check_content(){
var vote_content_list=[
{vote_content_name:'王大头',vote_content_time:'12分钟前'},
{vote_content_name:'王二头',vote_content_time:'12分钟前'},
{vote_content_name:'王三头',vote_content_time:'12分钟前'},
];
var $vote_check_content = $('#vote_check_content');
for(var i=0; i< vote_content_list.length;i++){
var $li_4 = $('<li></li>');
var $span_4 = $('<span class="vote_check_content_l"></span>');
var $span_5 = $('<span class="vote_check_content_r"></span>');
$span_4.text(vote_content_list[i].vote_content_name);
$span_5.text(vote_content_list[i].vote_content_time);
$li_4.append($span_4);
$li_4.append($span_5);
$vote_check_content.append($li_4);
}
}
\ No newline at end of file
$(function(){
init_vote_details_content();
})
function init_vote_details_content(){
if($.getUrlParam('voteId')==null){
return;
}
//主题
var results = voteModule.voteDataAction.listAll({
FIELD_UUID : $.getUrlParam('voteId')
}).rowSet;
console.log(results);
//主题选项
var v_jquery = {};
v_jquery.FIELD_MANAGE_ID = $.getUrlParam('voteId');
var infos = voteModule.voteDataAction.listItem(v_jquery).listItems;
console.log(infos);
//获取已投票选项
var options = voteModule.voteDataAction.listUserChecked({
FIELD_MANAGE_ID : $.getUrlParam('voteId')
}).listusercheckeds;
console.log(options);
//主容器
var $vote_details_content = $('#vote_details_content');
for(var j=0;j < results.length;j++){
//子容器
var $vote_details_main = $('<div></div>').addClass('vote_details_main').appendTo($vote_details_content);
//子容器头
var $vote_details_main_top = $('<div></div>').addClass('vote_details_main_top').appendTo($vote_details_main);
var $span_1 = $('<span></span>').text(results[j].CREATE_ID).appendTo($vote_details_main_top);
var $span_2 = $('<span></span>').text(results[j].CREATE_TIME).appendTo($vote_details_main_top);
//子容器中
var $vote_details_main_middle = $('<div></div>').addClass('vote_details_main_middle').appendTo($vote_details_main);
var $p_1 = $('<p></p>').text(j+1+'.'+results[j].CONTENT).appendTo($vote_details_main_middle);
//子容器尾
var $vote_details_main_bottom = $('<div></div>').addClass('vote_details_main_bottom').appendTo($vote_details_main);
var $p_2 = $('<p></p>').text(results[j].SUB_TITLE).appendTo($vote_details_main_bottom);
var $ul_1 = $('<ul></ul>').appendTo($vote_details_main_bottom);
for(var i=0; i < infos.length;i++){
//判断多选还是单选
if(results[0].MAX_COUNT=='1'){
var $input_1 = $('<input type="radio" name="vote_details_main_bottom_radio">');
$input_1.click(function(){
var voteChecked = $(this).prop("checked");
if(voteChecked==true){
$(this).parent().css('background-color','#E8F7FE');
$(this).parent().siblings().css('background-color','#f7f7f7');
}
});
}
else{
var $input_1 = $('<input type="checkbox" >');
//判断哪个选项被选中
var x=0;
$input_1.click(function(){
var voteChecked = $(this).prop("checked");
if(voteChecked==true){
$(this).parent().css('background-color','#E8F7FE');
x++;
}else{
$(this).parent().css('background-color','#f7f7f7');
x--;
}
//限制选中的选项个数
if(x>results[0].MAX_COUNT){
$(this).click();
swal("", '请选择'+results[0].MIN_COUNT+'到'+results[0].MAX_COUNT+'个选项', "error");
//$.fancybox.open('请选择'+results[0].MIN_COUNT+'到'+results[0].MAX_COUNT+'个选项');
}
});
}
var $li_1 = $('<li ></li>').appendTo($ul_1);
$li_1.data('info',infos[i]);
$li_1.append($input_1);
var $span_3 = $('<span></span>').text(infos[i].CONTENT).appendTo($li_1);
//判断主题是否已投票,已投票的选项不可再选
if(options.length!=0){
console.log(options.length)
for(var y=0;y<options.length;y++){
if(infos[i].UUID==options[y].ITEM_ID){
$input_1.prop("checked","checked");
$input_1.parent().css('background-color','#E8F7FE');
$input_1.prop("disabled","true");
}else{
$input_1.prop("disabled","true");
}
}
}
}
var $p_3 = $('<p></p>').appendTo($vote_details_main_bottom);
var $span_4 = $('<span style="padding:0;"></span>').text('截止时间').appendTo($p_3);
var $span_5 = $('<span></span>').text(results[j].UPDATE_TIME).appendTo($p_3);
}
var $vote_details_bottom_button = $('<div></div>').addClass('vote_details_bottom_button').appendTo($vote_details_content);
//判断主题是否已投
if(options.length!=0){
var $p_4 = $('<a href="mobileVotebrowse"></a>').text('返回');
}else{
var $p_4 = $('<a onclick="save(this)"></a>').text('投票');
$p_4.data('results',results[0]);
}
$p_4.appendTo($vote_details_bottom_button);
}
//发布按钮
function save(handler){
var uuids = '';
$('.vote_details_main_bottom').find('li').each(function(index,element){
var voteChecked = $(element).find('input').prop("checked");
if(voteChecked==true){
var uuid = $(element).data('info').UUID;
uuids = uuids + uuid + ',';
}
})
uuids = uuids.substring(0, uuids.length-1);
var results = $(handler).data('results');
var v_jquery = {};
v_jquery.FIELD_FLAG = '1';
v_jquery.FIELD_OPETYPE = 'update';
v_jquery.FIELD_UUID = results.UUID;
v_jquery.FIELD_STATUS_FLAG = results.STATUS_FLAG;
v_jquery.FIELD_MIN_COUNT = results.MIN_COUNT;
v_jquery.FIELD_MAX_COUNT = results.MAX_COUNT;
v_jquery.FIELD_UUIDS=uuids;
//选项数是否达到最少选项的要求
var x = 0;
$('.vote_details_main_bottom>ul').find('li').each(function(index,element){
var voteChecked = $(element).find('input').prop("checked");
if(voteChecked==true){
x++;
}
})
if(x<results.MIN_COUNT){
swal("", "请按要求选择", "error");
return;
}
var result = voteModule.voteActAction.insertUserVote(v_jquery);
console.log(v_jquery);
if(result.VALUE == '保存成功'){
//弹出框
swal({
title: "",
text: "投票成功!",
type: "success",
showCancelButton: false,
allowOutsideClick:true,
closeOnConfirm: true,
}, function() {
//点击确定后跳转页面
window.location.href='mobileVotebrowse';
$('.vote_details_bottom_button').find('a').text('返回').removeAttr('onclick').attr('href','mobileVotebrowse');
});
}
else{
swal("", "投票失败!请再次投票", "error");
}
}
$(function(){
init_vote_major_content();
})
function init_vote_major_content(){
var result = voteModule.voteDataAction.list({
FIELD_UUID : $.getUrlParam('voteId')
}).rowSet;
console.log(result);
var $vote_major_content = $('#vote_major_content');
var $ul_1 = $('<ul></ul>').appendTo($vote_major_content);
for(var i=0; i<result.length;i++){
var $li_1 = $('<li></li>').appendTo($ul_1);
$li_1.data('data_json',result[i]);
var $input_1 = $('<input type="checkbox">').appendTo($li_1);
var $vote_major_selection_top = $('<div></div>').addClass('vote_major_selection_top').appendTo($li_1);
var $div_1 = $('<div></div>').addClass('vote_major_selection_top_right').appendTo($vote_major_selection_top);
var $a_1 = $('<a></a>').text('编辑');
$a_1.attr('onclick','window.location.href=\'mobileVote?voteId='+ result[i].UUID +'\'').appendTo($vote_major_selection_top);
var $div_2 = $('<div></div>').addClass('vote_major_selection_top_img').appendTo($vote_major_selection_top);
//var $span_1 = $('<span></span>').text('进行中').appendTo($div_2);
if(result[i].STATUS_FLAG=='1'){
var $span_1 = $('<span></span>').text('进行中').appendTo($div_2);
}else{
var $span_1 = $('<span></span>').text('已结束').css('background-color','#ff0000db').appendTo($div_2);
}
var $p_1 = $('<p></p>').text(i+1+'.'+result[i].CONTENT).appendTo($div_1);
$p_1.data('data_json',result);
var $span_2 = $('<span></span>').text('发布于').appendTo($div_1);
var $span_3 = $('<span></span>').text(result[i].CREATE_TIME).appendTo($div_1);
}
var kk = $vote_major_content.next().children().val();
if(kk=='新增主题'){
$('.vote_major_content>ul>li').find('input').css('visibility','hidden');
}
}
//删除时,序号排序
function vote_major_sort(){
$('.vote_major_selection_top_right>p').each(function(index,element){
var kk = $(element).text().substring($(element).text().indexOf('.')+1)
$(element).text(index+1+'.'+kk);
})
}
//管理按钮的切换
function vote_major_manage(handler){
var $input_2 = $('.vote_major_footer>input').eq(0);
if($input_2.val()=='新增主题'){
$input_2.val('删除主题');
$('.vote_major_footer>input').eq(0).css('background-color','#ff0000db');
$(handler).val('取消');
$('.vote_major_content>ul>li').find('input').css('visibility','visible');
}else{
$input_2.val('新增主题');
$('.vote_major_footer>input').eq(0).css('background-color','#30a2dca1');
$(handler).val('管理主题');
$('.vote_major_content>ul>li').find('input').css('visibility','hidden');
}
}
//新增和删除按钮
function vote_major_dele_add(get){
var get = $(get).val();
var uuids = '';
var v_jquery = {};
if(get=='新增主题'){
window.location.href= 'mobileVote';
}else{
$('#vote_major_content>ul>li').each(function(index,element){
var data_json = $(element).data('data_json');
var gg = $(element).find('input').prop('checked');
if(gg==true){
var uuid = data_json.UUID;
uuids = uuids + uuid + ',';
}
})
uuids = uuids.substring(0, uuids.length-1);
v_jquery.FIELD_CODE=uuids;
swal({
title : "",
text : "您确定要删除吗?",
type : "warning",
confirmButtonText : "确定",
confirmButtonColor : "#ec6c62",
showCancelButton : true,
closeOnConfirm : false,
allowOutsideClick : true
}, function(isConfirm) {
if (isConfirm) {
var result = voteModule.voteActAction.deleteVote(v_jquery);
if (result.VALUE = '删除成功') {
$('#vote_major_content>ul>li').each(function(index, element) {
var gg = $(element).find('input').prop('checked');
if (gg == true) {
$(element).remove();
vote_major_sort();
}
})
swal("", "删除成功!", "success");
} else {
swal("", "删除失败!", "error");
}
}
});
}
}
\ No newline at end of file
$(function(){
init_vote_result_content();
})
function init_vote_result_content(){
var infos = voteModule.voteDataAction.listUserChecked();
console.log(infos);
}
/*var vote_result_content_list=[
{vote_result_content_name:'大兔子',vote_result_content_amount:'17人'},
{vote_result_content_name:'二兔子',vote_result_content_amount:'17人'},
{vote_result_content_name:'三兔子',vote_result_content_amount:'17人'},
{vote_result_content_name:'四兔子',vote_result_content_amount:'17人'},
{vote_result_content_name:'五兔子',vote_result_content_amount:'17人'},
]*/
//查看投票结果
/*var $vote_result_content = $('.vote_result_content');
for(var i=0; i< vote_result_content_list.length;i++){
var $span_4 = $('<span></span>');
var $li_3 = $('<li></li>');
$li_3.attr('onclick',"window.location.href='mobileVotecheck'");
$li_3.text(vote_result_content_list[i].vote_result_content_name); //每个主题的各个选项
$span_4.text(vote_result_content_list[i].vote_result_content_amount); //每个选项的选投人数
$li_3.append($span_4);
$vote_result_content.append($li_3);
}*/
\ No newline at end of file
$(function(){
init_vote_topic_content();
})
function init_vote_topic_content(){
$.ajax({
url:ctx+'/voteData_list_ongoing',
type:'post',
success:function(result){
//主容器
var $vote_topic_substance = $('.vote_topic_substance');
/*var infos = voteModule.voteDataAction.list().rowSet;*/
var infos = result.rowSet;
//页数
var $vote_topic_header_count = $('#vote_topic_header_count');
$vote_topic_header_count.text(1+'/'+infos.length);
//console.log();
for(var j=0;j < infos.length;j++){
//各页面容器
var $vote_topic_substance_chunk = $('<div></div>').addClass('vote_topic_substance_chunk');
//显示第一页,隐藏其他页
if(j!=0){
$vote_topic_substance_chunk.css('display','none');
}
$vote_topic_substance.append($vote_topic_substance_chunk);
//投票标题容器
var $vote_topic_main = $('<div></div>').addClass('vote_topic_main');
$vote_topic_substance_chunk.append($vote_topic_main);
//投票标题
var $title_p = $('<p></p>').text(j+1+'.'+infos[j].CONTENT).appendTo($vote_topic_main);
//选项内容
var infos_content ={};
infos_content.FIELD_MANAGE_ID = infos[j].UUID;
var vote_topic_content_list = voteModule.voteDataAction.listItem(infos_content).listItems;
//投票下部的容器
var $vote_topic_bottom = $('<div></div>').addClass('.vote_topic_bottom').appendTo($vote_topic_substance_chunk);
//选项内容的容器
var $vote_topic_content = $('<form></form>').attr('id','vote_topic_content').appendTo($vote_topic_bottom);
//选项的内容样式
for(var i=0; i < vote_topic_content_list.length;i++){
//判断多选还是单选
if(infos[j].MAX_COUNT=='1'){
var $input_2 = $('<input type="radio" name="single">');
}
else{
var $input_2 = $('<input type="checkbox" name="single">');
}
var $span_3 = $('<span></span>');
var $div_1 = $('<div class="select"></div>');
var $div = $('<div class="vote_topic_select"></div>');
//每个选项名
$span_3.text(vote_topic_content_list[i].CONTENT);
$div_1.append($span_3);
$div.append($input_2);
$div.append($div_1);
$vote_topic_content.append($div);
}
}
}
})
}
//下一条
function vote_topic_next(handler){
$('.vote_topic_substance_chunk').each(function(index,element){
if($(element).css('display')!='none'&&index<$('.vote_topic_substance_chunk').length-1){
$(element).hide();
$(element).next().show();
return false;
}
})
}
function vote_topic_prev(handler){
$('.vote_topic_substance_chunk').each(function(index,element){
if($(element).css('display')!='none'&&index >= 0){
$(element).hide();
$(element).prev().show();
return false;
}
})
}
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<title>会议相关资料下载</title>
<jsp:include page="/jfcas04_mobile/header.jsp"></jsp:include>
<script type="text/javascript" src="${ctx}/jfcas04_mobile/js/download.js"></script>
</head>
<body>
<div class="download_header">
<p>会议相关资料下载</p>
<span style="display:none;">全部下载</span>
</div>
<div class="download_main">
<ul id="download_content">
<!-- <a href="#"><li><span>会议资料1</span><img src="custom/images/10@3x.png"></li></a>
<a href="#"><li><span>会议资料1</span><img src="custom/images/10@3x.png"></li></a>
<a href="#"><li><span>会议资料1</span><img src="custom/images/10@3x.png"></li></a>
<a href="#"><li><span>会议资料1</span><img src="custom/images/10@3x.png"></li></a>
<a href="#"><li><span>会议资料1</span><img src="custom/images/10@3x.png"></li></a>
<a href="#"><li><span>会议资料1</span><img src="custom/images/10@3x.png"></li></a>
<a href="#"><li><span>会议资料1</span><img src="custom/images/10@3x.png"></li></a>
<a href="#"><li><span>会议资料1</span><img src="custom/images/10@3x.png"></li></a>
<a href="#"><li><span>会议资料1</span><img src="custom/images/10@3x.png"></li></a>
<a href="#"><li><span>会议资料1</span><img src="custom/images/10@3x.png"></li></a>
<a href="#"><li><span>会议资料1</span><img src="custom/images/10@3x.png"></li></a>
<a href="#"><li><span>会议资料1</span><img src="custom/images/10@3x.png"></li></a>
<a href="#"><li><span>会议资料1</span><img src="custom/images/10@3x.png"></li></a>
<a href="#"><li><span>会议资料1</span><img src="custom/images/10@3x.png"></li></a>
<a href="#"><li><span>会议资料1</span><img src="custom/images/10@3x.png"></li></a> -->
</ul>
</div>
</body>
</html>
\ No newline at end of file
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no" />
<title>会议签到</title>
<jsp:include page="/jfcas04_mobile/header.jsp"></jsp:include>
<%-- <link rel="stylesheet" href="${ctx}/jfcas04_mobile/css/common.css" type="text/css" /> --%>
<script type="text/javascript" src="${ctx}/jfcas04_mobile/js/index.js"></script>
</head>
<body>
<div class="index_header">
<img src="${ctx}/jfcas04_mobile/images/logo@2x.png">
<p><span>2018-8-14</span> 会议签到</p>
</div>
<div class="index">
<div class="index_name">
<input type="text" id="index_userName">
</div>
<div class="index_name">
<input type="text" id="index_phone">
</div>
<input type="submit" value="签到" onclick="window.location.href='mobileIndexcg'">
</div>
</body>
</html>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<title>与会人员</title>
<!-- bootstrapºÍbootstrap-table µÄcss-->
<jsp:include page="/jfcas04_mobile/header.jsp"></jsp:include>
<script type="text/javascript" src="${ctx}/jfcas04_mobile/js/index_cg.js"></script>
<script>
(function() {
//设置页面html的字体大小
var view = screen.width;
var fontSize = view / 16 + "px";
$('html').css("fontSize", fontSize);
})()
var ctx = '${pageContext.request.contextPath}';
</script>
</head>
<body>
<div class="header">
<p>已签到</p>
</div>
<div class="index_cg_photo">
<div class="index_cg_photo_l fl">
<img src="${ctx}/jfcas04_mobile/images/toux@3x.png">
</div>
<div class="index_cg_photo_r ">
<div id="index_cg_photo_r">
<!-- <label>欢迎您,黄草地</label>
<p><span>手机:</span>18736273627</p>
<p><span>状态:</span>已签到</p>
<p><span>座位:</span>三排四座</p>
<p><span>分组:</span>后勤部门</p> -->
</div>
</div>
</div>
<div class="index_cg_sj">
<div class="index_picture">
<img src="${ctx}/jfcas04_mobile/images/11@3x.png">
</div>
<span>与会总人员</span>
<div class="index_cg_sj_l fr">16<span></span></div>
</div>
<div class="index_cg_sj">
<div class="index_picture">
<img src="${ctx}/jfcas04_mobile/images/12@3x.png">
</div>
<span>已签到人员</span>
<div class="index_cg_sj_l fr">100<span></span></div>
</div>
<div class="index_cg_bottom">
<div class="index_cg_circle">
<a href="mobileDownload">
<img src="${ctx}/jfcas04_mobile/images/13@3x.png">
<p style="">会议纪要</p>
</a>
</div>
</div>
</body>
</html>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<title>抽奖页面</title>
<jsp:include page="/jfcas04_mobile/header.jsp"></jsp:include>
<style type="text/css">
*{
padding: 0;margin:0;
}
html,body{
width: 100%;
height: 100%;
background: -webkit-radial-gradient(#f50607,#800807);
background: -moz-radial-gradient(#f50607,#800807);
background: -o-radial-gradient(#f50607,#800807);
background: radial-gradient(#f50607,#800807);
}
.container{
padding: 1.2rem 1.7rem;
margin:0 auto;
overflow: hidden;
}
.left{
width: 12.5rem;}
.left h2{
line-height: 2.5rem;
text-align: center;
color: #fff;}
.level,.result-box,button{
width: 12.5rem;
height: 2rem;}
.level{
border-radius: 0.2rem;
font-size:0.9rem;
}
.result-box{
margin:0.75rem 0;
border-radius: 0.2rem;
background-color:#fff;
text-align:center;
line-height:1.8rem;
font-size:0.9rem;
}
button{
border:none;
color:#fff;
font-size:0.9rem;
border-radius: 0.2rem;
cursor: pointer;
margin: 0.5rem 0;
}
button:focus{
outline:none;}
.start{
background-color:#428bca;}
.end{
background-color:#d9534f;}
.list{
width: 12.5rem;
min-height: 12.5rem;
background: #fff;
border-radius: 0.2rem;
padding: 0.5rem;
margin: 0.5rem 0;
}
.level option{
height: 0.75rem;
width: 80%;
}
</style>
<script>
(function() {
//设置页面html的字体大小
var view = screen.width;
var fontSize = view / 16 + "px";
$('html').css("fontSize", fontSize);
})()
var ctx = '${pageContext.request.contextPath}';
</script>
</head>
<body>
<div class="container">
<div class="left">
<h2>抽奖活动</h2>
<select class="level">
<option value="3">三等奖</option>
<option value="2">二等奖</option>
<option value="1">一等奖</option>
</select>
<div class="result-box">150****0000</div>
<button class="start" onClick="start()">开始抽奖</button>
</div>
<div class="list"></div>
</div>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript">
var data = [02161606967, 13020266595, 13062886092, 13120856800, 13166203899, 13222286768, 13260155466, 13311859605, 13321953155, 13386035991, 13386279355, 13391041349, 13402005209, 13501955354, 13524377621, 13566884393, 13585583394, 13601652353, 13601750621, 13601957822, 13611717363, 13611808088, 13621842513, 13636608228, 13651744987, 13671548893, 13671715448, 13671743121, 13671938567, 13701612351, 13770050005, 13774415457, 13774468122, 13795220723, 13816648396, 13817074750, 13817603172, 13817864803, 13818156777, 13818478999, 13818608945, 13818676915, 13818708665, 13870620815, 13901647848, 13901757122, 13901765884, 13916054638, 13916130704, 13916230340, 13916320794, 13917046040, 13917082161, 13917376187, 13917519790, 13917822024, 13918015694, 15000239160, 15000858139, 15000863267, 15001966112, 15021654427, 15026688058, 15162775605, 15201931885, 15262790618, 15366970333, 15692116261, 15800762285, 15801777839, 15836932000, 15900711818, 15901868745, 15921081152, 15921913369, 17721460897, 18017628227, 18202119713, 18502746988, 18516214869, 18521502523, 18521531099, 18606387979, 18616988816, 18621373309, 18621607551, 18621768758, 18621831973, 18621939488, 18817373997, 18817619376, 18818010115, 18857881532, 18901731168, 18910877917, 18916172890, 18918588802, 18930362020, 18939786089, 15001963100, 15001963101, 15001963102, 15001963103, 15001963104, 15001963105, 15001963106, 15001963107, 15001963108, 15001963109, 15001963110, 15001963111, 15001963112, 15001963113, 15001963114, 15001963115, 15001963116, 15001963117, 15001963118, 15001963119, 15001963120, 15001963121, 15001963122, 15001963123, 15001963124, 15001963125, 15001963126, 15001963127, 15001963128, 15001963129, 15001963130, 15001963131, 15001963132, 15001963133, 15001963134, 15001963135, 15001963136, 15001963137, 15001963138, 15001963139, 15001963140, 15001963141, 15001963142, 15001963143, 15001963144, 15001963145, 15001963146, 15001963147, 15001963148, 15001963149, 15001963150, 15001963151, 15001963152, 15001963153, 15001963154, 15001963155, 15001963156, 15001963157, 15001963158, 15001963159, 15001963160, 15001963161, 15001963162, 15001963163, 15001963164, 15001963165, 15001963166, 15001963167, 15001963168, 15001963169, 15001963170, 15001963171, 15001963172, 15001963173, 15001963174, 15001963175, 15001963176, 15001963177, 15001963178, 15001963179, 15001963180, 15001963181, 15001963182, 15001963183, 15001963184, 15001963185, 15001963186, 15001963187, 15001963188, 15001963189, 15001963190, 15001963191, 15001963192, 15001963193, 15001963194, 15001963195, 15001963196, 15001963197, 15001963198, 15001963199, 15001963200, 15001963201, 15001963202, 15001963203, 15001963204, 15001963205, 15001963206, 15001963207, 15001963208, 15001963209, 15001963210, 15001963211, 15001963212, 15001963213, 15001963214, 15001963215, 15001963216, 15001963217, 15001963218, 15001963219, 15001963220, 15001963221, 15001963222, 15001963223, 15001963224, 15001963225, 15001963226, 15001963227, 15001963228, 15001963229, 15001963230, 15001963231, 15001963232, 15001963233, 15001963234, 15001963235, 15001963236, 15001963237, 15001963238, 15001963239, 15001963240, 15001963241, 15001963242, 15001963243, 15001963244, 15001963245, 15001963246, 15001963247, 15001963248, 15001963249, 15001963250, 15001963251, 15001963252, 15001963253, 15001963254, 15001963255, 15001963256, 15001963257, 15001963258, 15001963259, 15001963260, 15001963261, 15001963262, 15001963263, 15001963264, 15001963265, 15001963266, 15001963267, 15001963268, 15001963269, 15001963270, 15001963271, 15001963272, 15001963273, 15001963274, 15001963275, 15001963276, 15001963277, 15001963278, 15001963279, 15001963280, 15001963281, 15001963282, 15001963283, 15001963284, 15001963285, 15001963286, 15001963287, 15001963288, 15001963289, 15001963290, 15001963291, 15001963292, 15001963293];//参与人员
//内定中奖人员
var initP = [13870620815, 13901647848, 13901757122];
var p1Num = 3;//一等奖数量
var p2Num = 5;//二等奖数量
var p3Num = 10;//三等奖数量
var p1Winner = new Array();//一等奖中奖者
var p2Winner = new Array();//二等奖中奖者
var p3Winner = new Array();//三等奖中奖者
var btn =true;//按钮状态未开始还是结束
var key =0;//中奖下标
var time=0;//定时器
//点击按钮
function start(){
if(btn){
if((p1Num<=0) && (p2Num<=0) && (p3Num<=0)){
$("button").hide();
alert("所有抽奖已结束");
}else if($('select').val() == 3 && (p3Num<=0)){
alert('三等奖已抽取完毕,请选择其他奖项...');
}else if($('select').val() == 2 && (p2Num<=0)){
alert('二等奖已抽取完毕,请选择其他奖项...');
}else if($('select').val() == 1 && (p1Num<=0)){
alert("一等奖已抽取完毕,请选择其他奖项...");
}else{
btn = false;
$('button').removeClass('start').addClass('end').text("结束抽奖");
startTrun();
}
}else{
btn = true;
$('button').removeClass("end").addClass("start").text("开始抽奖");
endTrun();
console.log(p3Num,p2Num,p1Num);
}
}
function runTime(){
//$("button").show();
clearInterval(time);
time=setInterval('trunNum()',10);
}
function trunNum(){
key=Math.floor(Math.random()*(data.length));
if(data.length!=0){
var tel=data[key].toString().substr(0, 3)+'****'+data[key].toString().substr(7);
$(".result-box").text(tel);
}
}
function startTrun(){
runTime();
}
//停止转动数字
function endTrun(){
clearInterval(time);
if($("select").val() == 3){
$(".list").prepend("<p>第"+p3Num+"名:"+data[key]+"</p>");
data.splice(key,1);
p3Winner.push(data[key]);
p3Num--;
if(p3Num == 0){
$(".list").prepend("<p>三等奖获得者</p>");
}
}else if($('select').val() == 2){
$(".list").prepend("<p>第"+p2Num+"名:"+data[key]+"</p>");
data.splice(key,1);
p2Winner.push(data[key]);
p2Num--;
if(p2Num == 0){
$(".list").prepend("<p>二等奖获得者</p>");
}
}else{
$(".list").prepend("<p>第"+p1Num+"名:"+data[key]+"</p>");
data.splice(key,1);
p1Winner.push(data[key]);
p1Num--;
if(p1Num == 0){
$(".list").prepend("<p>一等奖获得者</p>");
}
}
}
</script>
</body>
</html>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no" />
<title>会议纪要</title>
<jsp:include page="/jfcas04_mobile/header.jsp"></jsp:include>
<script>
(function() {
//设置页面html的字体大小
var view = screen.width;
var fontSize = view / 16 + "px";
$('html').css("fontSize", fontSize);
})()
var ctx = '${pageContext.request.contextPath}';
</script>
</head>
<body>
<div class="summary_header">
<p>会议纪要</p>
<span>保存</span>
</div>
<div class="summary_main">
<div class="summary_main_top">
会议名称<input type="text" value="">
</div>
<div class="summary_main_top" style="margin:0.5rem 0;">
<span>会议主题</span><input type="text" value="">
</div>
<div class="summary_main_bottom">
<textarea id="summary_text"></textarea>
</div>
</body>
<script type="text/javascript">
$(function(){
$('#summary_text').inputTips({
tip:{
fontSize:'0.75rem',
text:'会议纪要',
}
})
})
</script>
</html>
\ No newline at end of file
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no" />
<title>二维码界面</title>
<jsp:include page="/jfcas04_mobile/header.jsp"></jsp:include>
<script type="text/javascript" src="${ctx}/lib/plug/qrcode/js/jquery.qrcode.js" ></script>
<script type="text/javascript" src="${ctx}/lib/plug/qrcode/js/qrcode.js" ></script>
<script type="text/javascript" src="${ctx}/lib/plug/qrcode/js/utf.js" ></script>
<!-- <script type="text/javascript" src="custom/js/two.js"></script> -->
</head>
<body>
<div class="two_header">
<img src="${ctx}/jfcas04_mobile/images/logo1@2x.png" >
</div>
<div id="two_content">
<!--
<div class="two_main">
<p>2018-08-14会议签到</p>
<div id="qrcodeCanvas1"></div>
<div class="two_main_wx">
<label>微信扫码签到</label>
</div>
</div>
<div class="two_main">
<p>2018-08-14会议签到</p>
<div id="qrcodeCanvas2"></div>
<div class="two_main_wx">
<label>微信扫码签到</label>
</div>
</div>
-->
</div>
<div class="two_bottom">
<p>技术支持:浙江杰夫兄弟智慧科技有限公司</p>
</div>
<script>
$(function(){
init_two_content();
})
function init_two_content(){
var two_content_list=[
{two_content_name:'2018-08-14会议签到',two_content_wx:'微信扫码签到'},
{two_content_name:'2018-08-14资料下载',two_content_wx:'微信扫码下载'},
{two_content_name:'2018-08-14投票界面',two_content_wx:'微信扫码投票'},
{two_content_name:'2018-08-14抽奖界面',two_content_wx:'微信扫码抽奖'},
]
var $two_content = $('#two_content');
for(var i=0;i<two_content_list.length;i++){
var $div = $('<div class="two_main"></div>');
var $p_1 = $('<p></p>');
var $div_1 = $('<div></div>');
$div_1.attr('id','qrcodeCanvas'+i);
var $div_2 = $('<div class="two_main_wx"></div>');
var $label = $('<label></label');
$p_1.text(two_content_list[i].two_content_name);
$label.text(two_content_list[i].two_content_wx);
$div.append($p_1);
$div.append($div_1);
$div.append($div_2);
$div_2.append($label);
$two_content.append($div);
var id = $div_1.attr('id');
var link_text;
switch(two_content_list[i].two_content_wx){
case '微信扫码签到':
link_text = 'mobileIndex';
break;
case '微信扫码下载':
link_text = 'mobileDownload';
break;
case '微信扫码投票':
link_text = 'mobileVotebrowse';
break;
case '微信扫码抽奖':
link_text = 'mobileLotterydraw';
break;
}
(function(link_text){
$div.bind('click',function(){
location.href="<%=basePath%>"+link_text;
})
})(link_text)
//二维码
jQuery('#'+id).qrcode({
render : "canvas", <!--二维码生成方式 -->
text : "<%=basePath%>"+link_text, <!-- 二维码内容 -->
//text : 'http://192.168.1.160:8080/register/index.jsp',
width : "180", //二维码的宽度
height : "180",
//src:'down/'+id
});
//把画布转为图片
var canvas = $('#'+id).find('canvas');
var img = convertCanvasToImage(canvas[0]);
canvas.hide();
canvas.after(img);
}
}
// Converts canvas to an image
function convertCanvasToImage(canvas) {
var image = new Image();
image.src = canvas.toDataURL("image/png");
return image;
}
</script>
</body>
</html>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no" />
<title>投票主题编辑</title>
<jsp:include page="/jfcas04_mobile/header.jsp"></jsp:include>
<script type="text/javascript" src="${ctx}/jfcas04_mobile/js/vote.js"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/vote/js/voteModule.js"></script>
<script>
(function() {
//设置页面html的字体大小
var view = screen.width;
var fontSize = view / 16 + "px";
$('html').css("fontSize", fontSize);
})()
var ctx = '${pageContext.request.contextPath}';
</script>
</head>
<body>
<div class="vote">
<p>投票主题编辑</p>
<span onclick="savesend()">发布</span>
<!-- <a onclick="savesend()">按钮</a> -->
</div>
<div class="alert alert-danger vote_editor_judge" role="alert">错误</div>
<div class="vote_editor">
<div class="vote_editor_top">
<textarea id="vote_editor_text"></textarea>
</div>
<ul id="vote_editor_content">
<!--
<li><img src="custom/images/3@3x.png" style="visibility: hidden;"><input type="text" value="选项1"></li>
<li><img src="custom/images/3@3x.png" style="visibility: hidden;"><input type="text" value="选项2"></li>
<li><img src="custom/images/3@3x.png"><input type="text" value="选项3"></li>
<li><img src="custom/images/4@3x.png"><input type="text" value=""></li>
-->
</ul>
</div>
<div class="vote_little">最多不得超出15个选项,每个选项不得超过40个字</div>
<div class="vote_editor_bottom">
<ul>
<li>
<span>副标题</span>
<div>
<input type="text" class="vote_editor_bottom_select" id="vote_select" value="" />
<!-- <span class="arrow1">></span> -->
</div>
</li>
<li>
<span>最大投票数</span>
<div>
<input type="number" class="vote_editor_bottom_select" id="vote_select1" value="" />
<!-- <span class="arrow1">></span> -->
</div>
</li>
<li>
<span>最小投票数</span>
<div>
<input type="number" class="vote_editor_bottom_select" id="vote_select2" value="" />
<!-- <span class="arrow1">></span>-->
</div>
</li>
<li>
<span>结束时间</span>
<div>
<div>
<input type="text" id="input1" />
<span class="arrow1">></span>
</div>
</div>
</li>
<%-- <li>
<span>结束提醒</span>
<p class="btn-on2"><span id="selection2">十分钟</span><span class="arrow1">></span></p>
</li>
<li>
<span>匿名投票</span>
<img src="${ctx}/jfcas04_mobile/images/6@3x.png" id="anonymous" >
</li> --%>
</ul>
</div>
<div class="vote_major_footer">
<input type="button" value="返回" onclick="window.location.href='mobileVotemajor'">
</div>
<div class="masking">
<div class="masking-content">
<ul>
<li class="btn-off"><p>单选</p></li>
<li class="btn-off"><p>多选</p></li>
</ul>
</div>
</div>
<div class="masking1">
<div class="masking-content">
<ul>
<li class="btn-off1"><p>1</p></li>
<li class="btn-off1"><p>2</p></li>
<li class="btn-off1"><p>3</p></li>
</ul>
</div>
</div>
<!-- <div class="masking2">
<div class="masking-content">
<ul>
<li class="btn-off"><p>十分钟</p></li>
<li class="btn-off"><p>五分钟</p></li>
</ul>
</div>
</div> -->
<script type="text/javascript">
//默认点击显示
$("#input1").shijian()
</script>
</body>
<script>
/*点击按钮弹出蒙版框事件*/
$('.btn-on').click(function(event) {
$('.masking').css({display: 'block'});
$('.masking').find('ul').animate({'height':'80px'},'fast');
});
$('.masking li').bind('click',function(){
$('.masking').find('ul').animate({'height':'0px'},'fast',function(){
$('.masking').css({display: 'none'});
});
var check_text = $(this).find('p').text();
$('#selection').text(check_text);
})
$('.btn-on1').click(function(event){
$('.masking1').css({display: 'block'});
$('.masking1').find('ul').animate({'height':'120px'},'fast');
});
$('.masking1 li').bind('click',function(){
$('.masking1').find('ul').animate({'height':'0px'},'fast',function(){
$('.masking1').css({display: 'none'});
});
var check_text = $(this).find('p').text();
$('#selection1').text(check_text);
})
$('.btn-on2').click(function(event) {
$('.masking2').css({display: 'block'});
$('.masking2').find('ul').animate({'height':'80px'},'fast');
});
$('.masking2 li').bind('click',function(){
$('.masking2').find('ul').animate({'height':'0px'},'fast',function(){
$('.masking2').css({display: 'none'});
});
var check_text = $(this).find('p').text();
$('#selection2').text(check_text);
})
/*点击关闭按钮蒙版消失事件*/
/*$('.btn-off').click(function(event) {
$('.masking').css({
display: 'none'
});
$('.masking1').css({
display: 'none'
});
$('.masking2').css({
display: 'none'
});
});*/
</script>
</html>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no" />
<title>投票浏览界面</title>
<jsp:include page="/jfcas04_mobile/header.jsp"></jsp:include>
<script type="text/javascript" src="${ctx}/jwapp/pages/vote/js/voteModule.js"></script>
<script type="text/javascript" src="${ctx}/jfcas04_mobile/js/vote_browse.js"></script>
</head>
<body>
<div id="vote_browse_content">
<!-- <div class="vote_browse_main">
<div class="vote_browse_main_top">
<span>李大嘴</span>
<span>08-29 10:00</span>
</div>
<div class="vote_browse_main_middle">
<p>大兔子病了,二兔子瞧,三兔子买药,四兔子熬,五兔子死了,
六兔子抬,七兔子挖坑,八兔子埋,九兔子坐在地上哭泣来,十
兔子问他为什么哭?九兔子说,五兔子一去不回来!</p>
</div>
<div class="vote_browse_main_bottom">
<p>选项预览ˆ</p>
<ul>
<li><span>大兔子</span></li>
<li><span>二兔子</span></li>
<li><span>三兔子</span></li>
</ul>
<div class="vote_browse_main_bottom_button">
<a href="#">立即投票</a>
</div>
</div>
</div> -->
</div>
</body>
</html>
\ No newline at end of file
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no" />
<title>投票详情</title>
<jsp:include page="/jfcas04_mobile/header.jsp"></jsp:include>
<script type="text/javascript" src="${ctx}/jfcas04_mobile/js/vote_check.js"></script>
</head>
<body>
<div class="vote_check_header">
<label><span><</span>返回</label>
<p>投票详情</p>
</div>
<div class="vote_check_title">
大兔子
</div>
<div class="vote_check_middle">
共有3人选择此项
</div>
<div class="vote_check_result">
<ul id="vote_check_content">
<!--
<li>王大头<span>23分钟前</span></li>
<li>王二头<span>23分钟前</span></li>
<li>王三头<span>23分钟前</span></li>
-->
</ul>
</div>
</body>
</html>
\ No newline at end of file
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no" />
<title>投票详情ƒ…</title>
<jsp:include page="/jfcas04_mobile/header.jsp"></jsp:include>
<script type="text/javascript" src="${ctx}/jfcas04_mobile/js/vote_details.js"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/vote/js/voteModule.js"></script>
</head>
<body>
<div id="vote_details_content">
<!-- <div class="vote_details_main">
<div class="vote_details_main_top">
<span>李大嘴</span>
<span>08-29 10:00</span>
</div>
<div class="vote_details_main_middle">
<p>大兔子病了,二兔子瞧,三兔子买药,四兔子熬,五兔子死了,六兔子抬,七兔子挖坑,八兔子埋,九兔子坐在地上哭泣来,十 兔子问他为什么哭?九兔子说,五兔子一去不回来!</p>
</div>
<div class="vote_details_main_bottom">
<p>单选€‰</p>
<ul>
<li><input type="radio" checked="checked" name="single"><span>大兔子</span></li>
<li><input type="radio" name="single"><span>大兔子</span></li>
<li><input type="radio" name="single"><span>大兔子</span></li>
</ul>
<p>截止时间<span>08-30 9:31</span></p>
</div>
</div>
<div class="vote_details_bottom_button">
<a href="#">投票</a>
</div>-->
</div>
<!-- <div class="vote_details_bottom_button">
<a href="#">投票</a>
</div> -->
</body>
</html>
\ No newline at end of file
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no" />
<title>投票主题浏览界面</title>
<jsp:include page="/jfcas04_mobile/header.jsp"></jsp:include>
<script type="text/javascript" src="${ctx}/jwapp/pages/vote/js/voteModule.js"></script>
<script type="text/javascript" src="${ctx}/jfcas04_mobile/js/vote_major.js"></script>
</head>
<body>
<div class="vote_major_title">
<p>投票主题管理</p>
</div>
<div class="vote_major_main">
<div class="vote_major_content" id="vote_major_content">
<!-- <ul>
<li>
<input type="radio" >
<div class="vote_major_selection_top">
<div class="vote_major_selection_top_right">
<p>1.王大头的头到底大不大呢?</p>
<span>发布于</span><span>2018-9-7 14:23</span>
</div>
<a>编辑</a>
</div>
</li>
<li>
<input type="radio">
<div class="vote_major_selection_top">
<div>
<p>1.王大头的头到底大不大呢?</p>
<span>发布于</span><span>2018-9-7 14:23</span>
</div>
<a>编辑</a>
</div>
</li>
<li>
<input type="radio">
<div class="vote_major_selection_top">
<div>
<p>1.王大头的头到底大不大呢?</p>
<span>发布于</span><span>2018-9-7 14:23</span>
</div>
<a>编辑</a>
</div>
</li>
</ul> -->
</div>
<div class="vote_major_footer">
<input type="button" value="新增主题" onclick="vote_major_dele_add(this)">
<input type="button" value="管理主题" onclick="vote_major_manage(this)">
</div>
</div>
</body>
</html>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no" />
<title>投票结果</title>
<jsp:include page="/jfcas04_mobile/header.jsp"></jsp:include>
<script type="text/javascript" src="${ctx}/jfcas04_mobile/js/vote_result.js"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/vote/js/voteModule.js"></script>
</head>
<body>
<div class="vote_result_header">
<label><span><</span>返回投票</label>
<p>完成投票</p>
</div>
<div class="vote_result_select">
<div class="vote_result_select_tilte">
1.十只兔子你要做哪一只?
<p>(单选) 剩余时长:54分钟</p>
</div>
<ul class="vote_result_content">
<!--
<li>选项1<span>6人</span></li>
<li>选项2<span>6人</span></li>
<li>选项3<span>6人</span></li>
-->
</ul>
</div>
<div class="vote_result_select">
<div class="vote_result_select_tilte">
1.十只兔子你要做哪一只?
<p>(单选) 剩余时长:54分钟</p>
</div>
<ul class="vote_result_content">
<!--
<li>选项1<span>6人</span></li>
<li>选项2<span>6人</span></li>
<li>选项3<span>6人</span></li>
-->
</ul>
</div>
</body>
</html>
\ No newline at end of file
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no" />
<title>投票主题</title>
<jsp:include page="/jfcas04_mobile/header.jsp"></jsp:include>
<script type="text/javascript" src="${ctx}/jwapp/pages/vote/js/voteModule.js"></script>
<script type="text/javascript" src="${ctx}/jfcas04_mobile/js/vote_topic.js"></script>
</head>
<body>
<div class="vote_topic_header">
<span onclick="vote_topic_prev(this)">上一条</span>
<p id="vote_topic_header_count"></p>
<span onclick="vote_topic_next(this)">下一条</span>
</div>
<div class="vote_topic_substance">
<!-- <div class="vote_topic_substance_chunk">
<div class="vote_topic_main">
<p>
2.大兔子病了,二兔子瞧,三兔子买药,四兔子熬,五兔子死了,
六兔子抬,七兔子挖坑,八兔子埋,九兔子坐在地上哭泣来,十
兔子问他为什么哭?九兔子说,五兔子一去不回来!
</p>
</div>
<div class="vote_topic_bottom">
<form id="vote_topic_content">
</form>
</div>
</div> -->
</div>
</body>
</html>
\ No newline at end of file
......@@ -46,7 +46,6 @@ var is_column = [ [
{field : 'CONTENT',title : '主题内容',width : 150,align : 'center'},
{field : 'VOTE_COUNT',title : '状态',width : 150,align : 'center',
formatter:function(value,row,index){
return value>0?"已投":"未投";
}
},
......
.ov_hi{overflow:hidden}.alwaysShow td{position:relative}.alwaysShow td .df-class{position:absolute;z-index:1;top:50%;left:100%;transform:translate(-50%,-50%);}.df-persp,.persp-bg{position:fixed;width:100%;height:100%;top:0;left:0;z-index:6000;pointer-events:auto}.persp-bg{-webkit-opacity:.5;-moz-opacity:.5;-khtml-opacity:.5;opacity:.5;filter:alpha(opacity=50);-ms-filter:"alpha(opacity=50)";filter:alpha(opacity=50);width:100%;height:100%;background:#000;z-index:1}.df-box{font-weight: 700;min-width:170px;background:#fff;border-radius:10px;font-size:12px;text-shadow:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;z-index:2;position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-ms-touch-action:none;overflow:hidden;text-align:center;-webkit-tap-highlight-color:transparent;top:50%;left:50%;transform:translate(-50%,-50%)}.df-main{}.df-item{position:relative;overflow:hidden}.df-item .G-bg{position:absolute;width:100%;height:100%;top:0;left:0}.G-top{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background:linear-gradient(#fff 0%,rgba(255,255,255,.85)45%,rgba(255,255,255,.6) 75%,rgba(255,255,255,.4) 100%);background:-webkit-gradient(linear,left top,left bottom,from(#fff),color-stop(0.45,rgba(255,255,255,.85)),color-stop(0.75,rgba(255,255,255,.6)),to(rgba(255,255,255,.4)));background:-moz-linear-gradient(#fff 0%,rgba(255,255,255,.85) 45%,rgba(255,255,255,.6) 75%,rgba(255,255,255,.4) 100%);background:-o-linear-gradient(#fff 0%,rgba(255,255,255,.85) 45%,rgba(255,255,255,.6) 75%,rgba(255,255,255,.4) 100%)}.G-mid{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.G-btm{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background:linear-gradient(rgba(255,255,255,.4) 0%,rgba(255,255,255,.6)25%,rgba(255,255,255,.85) 65%,#fff 100%);background:-webkit-gradient(linear,left top,left bottom,from(rgba(255,255,255,.4)),color-stop(0.25,rgba(255,255,255,.6)),color-stop(0.65,rgba(255,255,255,.85)),to(#fff));background:-moz-linear-gradient(rgba(255,255,255,.4) 0%,rgba(255,255,255,.6) 25%,rgba(255,255,255,.85) 48%,#fff 100%);background:-o-linear-gradient(rgba(255,255,255,.4) 0%,rgba(255,255,255,.6) 25%,rgba(255,255,255,.85) 48%,#fff 100%)}.df-ctn{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0 2px;position:relative;background:#000;zoom:1}.df-wrap{display:inline-block}.df-strip{position:relative;z-index:2}.df-ul{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-perspective:1e3;-webkit-backface-visibility:hidden;text-decoration:none;list-style:none;padding:0;margin:0}.df-li{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0 5px;display:block;text-align:center;vertical-align:bottom;filter:Alpha(Opacity=90);font-size:18px;white-space:nowrap}.df-class{font-size:18px;text-align: center;}.df-btn{display:block}.df-btn div{display:inline-block;width:50%;cursor:pointer;border:1px solid #ddd;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.df-btn div:active{background:#f60;color:#fff;border:1px solid #f60}.df-hide{visibility:hidden}
\ No newline at end of file
(function(){function fillZero(x){if(x<10){return x="0"+x;}else{return ""+x;}};$.fn.shijian=function(opt){function cPlugin(o,emlnum){var sjObj=o;sjObj.defaults={type:"time",Format:"yyyy-mm-dd",timeFormat:"h:m:s",width:60,height:32,Year:true,Month:true,Day:true,Hour:true,Minute:true,Seconds:false,yyArr:[],mmArr:[],ddArr:[],hArr:[],mArr:[],sArr:[],yyyy:"2000",mm:"01",dd:"01",h:"01",m:"01",s:"01",val:null,yearText:"年",monthText:"月",dayText:'日',hourText:'时',minuteText:'分',secondsText:'秒',okText:"确认",cancelText:"取消",thisElm:null,showNowTime:true,alwaysShow:false,timeElm:null,isparseInt:false,finalshow:true,boxClassName:"",onfun:function(sjObj){},okfun:function(sjObj){},t_box:null,df_persp:function(){return $("<div class='df-persp'><div class='persp-bg'></div>")},df_box:function(){return $("</div><div class='df-box "+(sjObj.opt.alwaysShow?"alwaysShow":"")+" "+sjObj.opt.boxClassName+"' style='line-height:"+sjObj.opt.height+"px;'></div>")},df_main:function(){return $("<div class='df-main'>")},df_btn:function(){if(sjObj.opt.alwaysShow){return}
return $("<div class='df-btn' style='height:"+sjObj.opt.height+"px'><div class='df-ok'>"+sjObj.opt.okText+"</div><div class='df-no'>"+sjObj.opt.cancelText+"</div></div>")},df_wrap:function(){return $("<div class='df-wrap'><table><tbody><tr></tr></tbody></table></div>")},df_final:function(){return $("<div class='df-final'></div>")},getArr:function(){for(var i=0;i<61;i++){if(i<12){this.mmArr[i]=(i+1);}
if(i<31){this.ddArr[i]=(i+1);}
if(i<24){this.hArr[i]=i;};if(i<60){this.mArr[i]=i;this.sArr[i]=i;}
if(i<61&&!sjObj.opt.Year&&!sjObj.opt.Month&&!sjObj.opt.Day&&!sjObj.opt.Hour){this.mArr[i]=i;}}},y:10,nowTime:new Date(),startYear:null,endYear:null,ampmText:null,dataNum:0,strStart:function(text,c){var df=this;var str;var text=text||"";/*console.log(this);*/if(df.width){str='<div class="df-class">'+text+'</div><div class="df-item " style="height:'+(df.height*5-1)+'px;min-width:'+df.width+'px"><ul class="df-ul" data-class='+c+'>';}else{str='<div class="df-class">'+text+'</div><div class="df-item " style="height:'+(df.height*5-1)+'px"><ul class="df-ul" data-class='+c+'>';}
sjObj.opt.dataNum++;return str;},strEnd:function(){var df=this;return "</ul><div class='G-bg'><div class='G-top' style='height:"+(df.height*2)+"px'></div><div class='G-mid' style='height:"+df.height+"px'></div><div class='G-btm' style='height:"+(df.height*2)+"px'></div></div></div>"},fillZero:function(x){if(x<10){return x="0"+x;}else{return ""+x;}},getYear:function(){if(!this.startYear){var y=sjObj.opt.y||10;nowTime=new Date();for(var x=this.y,i=0;x!=0;y>0?x--:x++,i++){if(y<0){sjObj.opt.yyArr[i]=nowTime.getFullYear()+x+1;}else{sjObj.opt.yyArr[i]=nowTime.getFullYear()+i;}}
sjObj.opt.getArr()}else{if(sjObj.opt.yyArr.length>1){/*console.log("年份",sjObj.opt.yyArr);*/return;}
var endYear=this.endYear||parseInt(sjObj.opt.y)+parseInt(this.startYear);var y=-(endYear-parseInt(this.startYear));nowTime=new Date(endYear+"/01/01");/*console.log("自定义起始年份",endYear,y,nowTime);*/for(var x=y,i=0;y>0?x!=0:x<1;y>0?x--:x++,i++){if(y<0){sjObj.opt.yyArr[i]=nowTime.getFullYear()+x;/*console.log(x,sjObj.opt.yyArr[i]);*/}else{sjObj.opt.yyArr[i]=nowTime.getFullYear()+i;}}
sjObj.opt.getArr()}},setCenter:function(){var wid=$(window).width();var tabWid=null;var mWid=0;$(".df-wrap table").each(function(){tabWid+=parseFloat($(this).width());})
if(tabWid>wid){$(".df-wrap table").each(function(){mWid=parseFloat($(this).width())>mWid?parseFloat($(this).width()):mWid;})
$('.df-box').width(mWid);}else{$('.df-box').width(tabWid+10)}},buildArrStr:function(Arr,txt,c){var str=this.strStart(txt,c);$.each(Arr,function(){str+='<li class="df-li df-show" data-val='+sjObj.opt.fillZero(this)+' style="line-height:'+sjObj.opt.height+'px;height:'+sjObj.opt.height+'px">'+sjObj.opt.fillZero(this)+'</li>'})
/*console.log(Arr)*/
str+=sjObj.opt.strEnd();return str;},buildHTml:function(){var wrap=sjObj.opt.df_wrap();sjObj.opt.t_box=sjObj.opt.df_box();var main=sjObj.opt.df_main();var persp=sjObj.opt.df_persp();/*console.log(sjObj.opt.t_box);*/if(sjObj.opt.alwaysShow){sjObj.opt.timeElm=eval(sjObj.opt.timeElm);/*console.log(sjObj.opt.timeElm)*/
sjObj.opt.timeElm.append(sjObj.opt.t_box.append(main.append(wrap)));}else{sjObj.opt.timeElm=$("<div class='df-persp'><div class='persp-bg'></div>");sjObj.opt.timeElm.append(sjObj.opt.t_box.append(sjObj.opt.finalshow?sjObj.opt.df_final:"").append(main.append(wrap)).append(sjObj.opt.df_btn));$('body').append(sjObj.opt.timeElm)}
if(sjObj.opt.ampmText){main.append("<div class='df-wrap'><table><tbody><tr><td>"+sjObj.opt.buildAmPmStr()+"</tr></tbody></table></div>")}
if(sjObj.opt.Format=="dd-mm-yyyy"){if(sjObj.opt.Day)$(sjObj.opt.timeElm.find('.df-wrap')[0]).find('tr').append("<td>"+sjObj.opt.buildArrStr(sjObj.opt.ddArr,sjObj.opt.dayText,"dd")+"</td>");if(sjObj.opt.Month)$(sjObj.opt.timeElm.find('.df-wrap')[0]).find('tr').append("<td>"+sjObj.opt.buildArrStr(sjObj.opt.mmArr,sjObj.opt.monthText,"mm")+"</td>");if(sjObj.opt.Year)$(sjObj.opt.timeElm.find('df-wrap')[0]).find('tr').append("<td>"+sjObj.opt.buildArrStr(sjObj.opt.yyArr,sjObj.opt.yearText,"yyyy")+"</td>");}else if(sjObj.opt.Format=="mm-dd-yyyy"){if(sjObj.opt.Month)$(sjObj.opt.timeElm.find('.df-wrap')[0]).find('tr').append("<td>"+sjObj.opt.buildArrStr(sjObj.opt.mmArr,sjObj.opt.monthText,"mm")+"</td>");if(sjObj.opt.Day)$(sjObj.opt.timeElm.find('.df-wrap')[0]).find('tr').append("<td>"+sjObj.opt.buildArrStr(sjObj.opt.ddArr,sjObj.opt.dayText,"dd")+"</td>");if(sjObj.opt.Year)$(sjObj.opt.timeElm.find('.df-wrap')[0]).find('tr').append("<td>"+sjObj.opt.buildArrStr(sjObj.opt.yyArr,sjObj.opt.yearText,"yyyy")+"</td>");}else{if(sjObj.opt.Year)$(sjObj.opt.timeElm.find('.df-wrap')[0]).find('tr').append("<td>"+sjObj.opt.buildArrStr(sjObj.opt.yyArr,sjObj.opt.yearText,"yyyy")+"</td>");if(sjObj.opt.Month)$(sjObj.opt.timeElm.find('.df-wrap')[0]).find('tr').append("<td>"+sjObj.opt.buildArrStr(sjObj.opt.mmArr,sjObj.opt.monthText,"mm")+"</td>");if(sjObj.opt.Day)$(sjObj.opt.timeElm.find('.df-wrap')[0]).find('tr').append("<td>"+sjObj.opt.buildArrStr(sjObj.opt.ddArr,sjObj.opt.dayText,"dd")+"</td>");}
if(sjObj.opt.Hour){var eml=sjObj.opt.df_wrap();$(eml).find('tr').append("<td>"+sjObj.opt.buildArrStr(sjObj.opt.hArr,sjObj.opt.hourText,"h")+"</td>")
main.append(eml);};if(sjObj.opt.Minute){var eml=sjObj.opt.df_wrap();$(eml).find('tr').append("<td>"+sjObj.opt.buildArrStr(sjObj.opt.mArr,sjObj.opt.minuteText,"m")+"</td>");main.append(eml);};if(sjObj.opt.Seconds){var eml=sjObj.opt.df_wrap();$(eml).find('tr').append("<td>"+sjObj.opt.buildArrStr(sjObj.opt.sArr,sjObj.opt.secondsText,"m")+"</td>");main.append(eml);}
if(sjObj.opt.showNowTime){if(emlnum){var val=sjObj.value,sjeml=sjObj;}else{var val=sjObj[0].value,sjeml=sjObj[0];}
if(val){/*console.log("input中有值",val);console.log(val.indexOf(" "));*/if(val.indexOf("/")!=-1){val=val.replace(/\//g,"-")}
if(val.indexOf(" ")!=-1){var valarr=val.split(" ");}else{var valarr=[val];}
/*console.log("拆分后",valarr);*/var nyr,sfm;var str="";if(valarr.length==2){nyr=valarr[0];sfm=valarr[1];str+=getnyrstr(nyr)+" "+getsfmstr(sfm);}else if(valarr.length==1&&(valarr.indexOf("-")!=-1||valarr.indexOf("/")!=-1)){str+=getnyrstr(valarr[0])+" "+getsfmstr("")
/*console.log("组合 2");*/}else{if(sjObj.opt.Year||sjObj.opt.Month||sjObj.opt.Day){str+=getnyrstr(valarr[0])+" "+getsfmstr("")}else{str+=getnyrstr("")+" "+getsfmstr(valarr[0])}
/*console.log("组合 3");*/}
/*console.log("合成字符串",str)*/
data=new Date(str.replace(/-/g,"/"));}else{var data=new Date();}
/*console.log(data);*/var year=data.getFullYear();var month=data.getMonth()+1;var day=data.getDate();var hours=data.getHours();var Minutes=data.getMinutes();var Seconds=data.getSeconds();sjObj.opt.yyyy=fillZero(year);sjObj.opt.mm=fillZero(month);sjObj.opt.dd=fillZero(day);sjObj.opt.h=fillZero(hours);sjObj.opt.m=fillZero(Minutes);sjObj.opt.s=fillZero(Seconds);/*console.log(year,month,day,hours,Minutes);*//*console.log("是否显示年",sjObj.opt.Year)*/
if(sjObj.opt.Year)sjObj.opt.timeElm.find("[data-class='yyyy'] .df-li").each(function(){/*console.log(parseInt($(this).attr("data-val")),parseInt(year))*/
if(parseInt($(this).attr("data-val"))==parseInt(year)){var pY=-($(this).index()-2)*sjObj.opt.height;/*console.log(pY,year)*/
$(this).parent().css({"transform":"translate(0,"+pY+"px)"})}})
if(sjObj.opt.Month)sjObj.opt.timeElm.find("[data-class='mm'] .df-li").each(function(){if(parseInt($(this).attr("data-val"))==parseInt(month)){var pY=-($(this).index()-2)*sjObj.opt.height;/*console.log(pY,month)*/
$(this).parent().css({"transform":"translate(0,"+pY+"px)"})}})
if(sjObj.opt.Day)sjObj.opt.timeElm.find("[data-class='dd'] .df-li").each(function(){if(parseInt($(this).attr("data-val"))==parseInt(day)){var pY=-($(this).index()-2)*sjObj.opt.height;/*console.log(day)*/
$(this).parent().css({"transform":"translate(0,"+pY+"px)"})}})
if(sjObj.opt.Hour)sjObj.opt.timeElm.find("[data-class='h'] .df-li").each(function(){if(parseInt($(this).attr("data-val"))==parseInt(hours)){var pY=-($(this).index()-2)*sjObj.opt.height;$(this).parent().css({"transform":"translate(0,"+pY+"px)"})}})
if(sjObj.opt.Minute)sjObj.opt.timeElm.find("[data-class='m'] .df-li").each(function(){if(parseInt($(this).attr("data-val"))==parseInt(Minutes)){var pY=-($(this).index()-2)*sjObj.opt.height;/*console.log(pY,Minutes,$(this).index(),this)*/
$(this).parent().css({"transform":"translate(0,"+pY+"px)"})}})
if(sjObj.opt.Seconds)sjObj.opt.timeElm.find("[data-class='m'] .df-li").each(function(){if(parseInt($(this).attr("data-val"))==parseInt(Seconds)){var pY=-($(this).index()-2)*sjObj.opt.height;$(this).parent().css({"transform":"translate(0,"+pY+"px)"})}})}else{/*console.log("使用自定义时间")*/
if(sjObj.opt.Year)sjObj.opt.timeElm.find("[data-class='yyyy'] .df-li").each(function(){if(parseInt($(this).attr("data-val"))==parseInt(sjObj.opt.yyyy)){var pY=-($(this).index()-2)*sjObj.opt.height;$(this).parent().css({"transform":"translate(0,"+pY+"px)"})}})
if(sjObj.opt.Month)sjObj.opt.timeElm.find("[data-class='mm'] .df-li").each(function(){if(parseInt($(this).attr("data-val"))==parseInt(sjObj.opt.mm)){var pY=-($(this).index()-2)*sjObj.opt.height;$(this).parent().css({"transform":"translate(0,"+pY+"px)"})}})
if(sjObj.opt.Day)sjObj.opt.timeElm.find("[data-class='dd'] .df-li").each(function(){if(parseInt($(this).attr("data-val"))==parseInt(sjObj.opt.dd)){var pY=-($(this).index()-2)*sjObj.opt.height;$(this).parent().css({"transform":"translate(0,"+pY+"px)"})}})
if(sjObj.opt.Hour)sjObj.opt.timeElm.find("[data-class='h'] .df-li").each(function(){if(parseInt($(this).attr("data-val"))==parseInt(sjObj.opt.h)){var pY=-($(this).index()-2)*sjObj.opt.height;/*console.log(pY,sjObj.opt.h,$(this).index())*/
$(this).parent().css({"transform":"translate(0,"+pY+"px)"})}})
if(sjObj.opt.Minute)sjObj.opt.timeElm.find("[data-class='m'] .df-li").each(function(){if(parseInt($(this).attr("data-val"))==parseInt(sjObj.opt.m)){var pY=-($(this).index()-2)*sjObj.opt.height;/*console.log(pY,sjObj.opt.m,$(this).index())*/
$(this).parent().css({"transform":"translate(0,"+pY+"px)"})}})
if(sjObj.opt.Seconds)sjObj.opt.timeElm.find("[data-class='m'] .df-li").each(function(){if(parseInt($(this).attr("data-val"))==parseInt(sjObj.opt.s)){var pY=-($(this).index()-2)*sjObj.opt.height;$(this).parent().css({"transform":"translate(0,"+pY+"px)"})}})
/*console.log("设置默认时间")*/}
sjObj.opt.fillData();sjObj.opt.setCenter();sjObj.opt.bindFun();},bindFun:function(){sjObj.opt.timeElm.find(".df-no").on("click",function(){$(this).parent().parent().parent().remove();sjObj.opt.onfun(sjObj);$("html").removeClass("ov_hi");})
sjObj.opt.timeElm.find(".df-ok").on("click",function(){var str="";if(sjObj.opt.Year){str=sjObj.opt.Format.replace("yyyy",sjObj.opt.yyyy)}
if(sjObj.opt.Month){str=str.replace("mm",sjObj.opt.mm);}
if(sjObj.opt.Day){str=str.replace("dd",sjObj.opt.dd)}
if(sjObj.opt.Day&&sjObj.opt.Hour){str+=" ";}
if(sjObj.opt.Hour){str+=sjObj.opt.h}
if(sjObj.opt.Minute&&sjObj.opt.Hour){str+=":"}
if(sjObj.opt.Minute){str+=sjObj.opt.m;}
if(sjObj.opt.Minute&&sjObj.opt.Seconds){str+=":"}
if(sjObj.opt.Seconds){str+=sjObj.opt.s;}
sjObj.opt.val=sjObj.opt.isparseInt?parseInt(str):str;/*console.log("我执行了没")*/
$(sjObj.opt.thisElm).val(sjObj.opt.val);$(this).parent().parent().parent().remove();sjObj.opt.okfun(sjObj);$("html").removeClass("ov_hi");})
sjObj.opt.moveElm(sjObj.opt.timeElm.find(".G-bg"))},fillData:function(){var str="";if(sjObj.opt.Year){str+=sjObj.opt.yyyy+'-';}
if(sjObj.opt.Month){str+=sjObj.opt.mm+'-'}
if(sjObj.opt.Day){str+=sjObj.opt.dd+" "}
if(sjObj.opt.Hour){str+=sjObj.opt.h+":";}
if(sjObj.opt.Minute){str+=sjObj.opt.m;}
if(sjObj.opt.Seconds){str+=sjObj.opt.s;}
if(!sjObj.opt.alwaysShow){/*console.log("直接显示?",sjObj.opt.timeElm.find(".df-final"));*/if(sjObj.opt.isparseInt){sjObj.opt.timeElm.find(".df-final").html(parseInt(str));}else{sjObj.opt.timeElm.find(".df-final").html(str);}}else{/*console.log("啊哈哈哈哈啊?",sjObj.opt.timeElm.find(".df-final"))*/
$(sjObj.opt.thisElm).html(str).val(str);}},vardata:function(name,val){if(!val){return;}
if(sjObj.opt[name]!=val){sjObj.opt[name]=val;sjObj.opt.fillData();}},getFinal:function(){var currentY=0;var str="";if(sjObj.opt.showNowTime){sjObj.opt.timeElm.find(".df-ul").each(function(){currentY=getTranslateY(this);var dataClass=$(this).attr("data-class");var val=$($(this).find(".df-li")[Math.round(currentY/sjObj.opt.height)+2]).attr("data-val");sjObj.opt.vardata(dataClass,val);/*console.log(dataClass,val)*/
$(this).unbind("webkitTransitionEnd").on("webkitTransitionEnd",function(){currentY=getTranslateY(this);var val=$($(this).find(".df-li")[Math.round(currentY/sjObj.opt.height)+2]).attr("data-val");dataClass=$(this).attr("data-class");sjObj.opt.vardata(dataClass,val);sjObj.opt.daysJudge(dataClass);})})}else{sjObj.opt.timeElm.find(".df-ul").each(function(){currentY=getTranslateY(this);var dataClass=$(this).attr("data-class");var val=$($(this).find(".df-li")[Math.round(currentY/sjObj.opt.height)+2]).attr("data-val");sjObj.opt.vardata(dataClass,val);/*console.log(dataClass,val)*/
$(this).unbind("webkitTransitionEnd").on("webkitTransitionEnd",function(){currentY=getTranslateY(this);var val=$($(this).find(".df-li")[Math.round(currentY/sjObj.opt.height)+2]).attr("data-val");dataClass=$(this).attr("data-class");sjObj.opt.vardata(dataClass,val);sjObj.opt.daysJudge(dataClass);})})}},daysJudge:function(name){if(name=='mm'||name=="yyyy"){var day=new Date(sjObj.opt.yyyy,sjObj.opt.mm,0).getDate();var l=sjObj.opt.timeElm.find('[data-class="dd"]').find(".df-show").length
var mubiao=day-l;if(mubiao>0){for(var i=0;i<mubiao;i++){$(sjObj.opt.timeElm.find('[data-class="dd"]').find(".df-li")[l+i]).removeClass("df-hide").addClass("df-show")}}else{var naomovey=getTranslateY(sjObj.opt.timeElm.find('[data-class="dd"]'))
for(var i=0;i>mubiao;i--){$(sjObj.opt.timeElm.find('[data-class="dd"]').find(".df-li")[l-1+i]).removeClass("df-show").addClass("df-hide")}
if(naomovey>(day-1-2)*sjObj.opt.height){sjObj.opt.timeElm.find('[data-class="dd"]').css({"transition":"all .5s"})
sjObj.opt.timeElm.find('[data-class="dd"]').css({"transform":"translate(0,"+-(day-1-2)*sjObj.opt.height+"px)"})}}};},moveElm:function(eml){return $(eml).each(function(){var sX=null,sY=null,mX=null,mY=null,eX=null,eY=null,sTime=null,eTime=null,mTime=null,nTime=null,nY=0,drt=null,nowElm=null,canStart=true,canMove=false,canEnd=false,emlLang=null,maxY=null,minY=null,lastY=null,nowY=null,moveY=null,stopInertiaMove=false,SE=null,ME=null,EE=null,moveCy=0;var stop=function(e){if(e.preventDefault)
e.preventDefault();e.returnValue=false;}
var moveStart=function(e){/*console.log(e);*/stop(e);if(!canStart){return}
if(e.originalEvent.touches){SE=e.originalEvent.targetTouches[0]}else{SE=e;}
sX=SE.pageX;sY=SE.pageY;nowElm=$(this).prev(".df-ul");emlLang=nowElm.find(".df-show").length;lastY=sY;nY=getTranslateY(nowElm);/*console.log("移动开始时",e);*/sTime=new Date().getTime();if(!canMove&&canEnd){return false}
canStart=false
canMove=false;stopInertiaMove=true;$(window).on("touchmove",function(e){if(stopInertiaMove){e.preventDefault();}})};var moveing=function(e){stop(e);if(e.originalEvent.touches){ME=e.originalEvent.targetTouches[0]}else{ME=e;}
mTime=new Date().getTime();mX=ME.pageX;mY=ME.pageY;drt=GetSlideDirection(sX,sY,mX,mY);if((drt==1||drt==2)&&!canStart){canMove=true;canEnd=true;stopInertiaMove=true;}
if(canMove){nowElm.css({"transition":"none"})
nowElm.css({"transform":"translate(0,"+-(nY-(mY-sY))+"px)"})
sjObj.opt.getFinal();}
if(mTime-sTime>300){/*console.log("移动后加速")*/
sTime=mTime;lastY=mY;}};var moveEnd=function(e){stop(e);if(e.originalEvent.touches){EE=e.originalEvent.changedTouches[0]}else{EE=e;}
eX=EE.pageX;eY=EE.pageY;maxY=sjObj.opt.height*2;minY=-(emlLang-3)*sjObj.opt.height;if(canEnd){canMove=false;canEnd=false;canStart=true;nY=-(nY-(mY-sY));nowY=eY;if(nY>maxY){nowElm.css({"transition":"all .5s"})
nowElm.css({"transform":"translate(0,"+maxY+"px)"})}else if(nY<minY){nowElm.css({"transition":"all .5s"})
nowElm.css({"transform":"translate(0,"+minY+"px)"})}else{eTime=new Date().getTime();var speed=((nowY-lastY)/(eTime-sTime));stopInertiaMove=false;(function(v,startTime,contentY){var dir=v>0?-1:1;var deceleration=dir*0.001;function inertiaMove(){if(stopInertiaMove)
return;var nowTime=new Date().getTime();var t=nowTime-startTime;var nowV=v+t*deceleration;var moveY=(v+nowV)/2*t;if(dir*nowV>0){if(moveCy>sjObj.opt.maxY){nowElm.css({"transition":"all .5s"})
sjObj.opt.nowElm.css({"transform":"translate(0,"+sjObj.opt.maxY+"px)"})}else if(moveCy<sjObj.opt.minY){nowElm.css({"transition":"all .5s"})
nowElm.css({"transform":"translate(0,"+sjObj.opt.minY+"px)"})}else{var MC=Math.round(moveCy/sjObj.opt.height)
if(MC>2){MC=2}else if(MC<-(emlLang-1)+2){MC=-(emlLang-1)+2}
nowElm.css({"transition":"all .4s"});nowElm.css({"transform":"translate(0,"+sjObj.opt.height*MC+"px)"})}
sjObj.opt.getFinal();return}
moveCy=(contentY+moveY)
if(moveCy>(maxY+(sjObj.opt.height*2))){nowElm.css({"transition":"all .5s"})
nowElm.css({"transform":"translate(0,"+maxY+"px)"})
return}else if(moveCy<(minY-(sjObj.opt.height*2))){nowElm.css({"transition":"all .5s"})
nowElm.css({"transform":"translate(0,"+minY+"px)"})
return}
nowElm.css({"transform":"translate(0,"+moveCy+"px)"})
sjObj.opt.getFinal();var timers=setTimeout(inertiaMove,10);}
inertiaMove();})(speed,eTime,nY);}
/*console.log("移动结束",EE)*/}}
/*console.log("开始绑定事件",$(this))*/
$(this).unbind("touchstart mousedown").on("touchstart mousedown",moveStart)
$(this).unbind("touchmove").on("touchmove",moveing)
$(this).unbind("touchend").on("touchend",moveEnd)
$(document).on("mousemove",moveing)
$(document).on("mouseup",moveEnd)})},};sjObj.opt=$.extend({},sjObj.defaults,opt);var GetSlideAngle=function(dx,dy){return Math.atan2(dy,dx)*180/Math.PI;};function getnyrstr(str){var r=sjObj.opt.Format;var valarr=str.split("-");/*console.log(valarr,str);*/if(valarr.length==3){r=r.replace("yyyy",valarr[0]);r=r.replace("mm",valarr[1]);r=r.replace("dd",valarr[2]);}else if(valarr.length==2){if(sjObj.opt.Year&&!sjObj.opt.Month){r=r.replace("yyyy",valarr[0]);r=r.replace("mm",sjObj.opt.mm);r=r.replace("dd",valarr[1]);}else if(sjObj.opt.Year&&!sjObj.opt.Day){r=r.replace("yyyy",valarr[0]);r=r.replace("mm",valarr[1]);r=r.replace("dd",sjObj.opt.dd);}else if(!sjObj.opt.Year){r=r.replace("yyyy",sjObj.opt.yyyy);r=r.replace("mm",valarr[0]);r=r.replace("dd",valarr[1]);}}else if(valarr.length==1){if(sjObj.opt.Year){r=r.replace("yyyy",valarr[0]);r=r.replace("mm",sjObj.opt.mm);r=r.replace("dd",sjObj.opt.dd);}else if(sjObj.opt.Month){r=r.replace("yyyy",sjObj.opt.yyyy);r=r.replace("mm",valarr[0]);r=r.replace("dd",sjObj.opt.dd);}else if(sjObj.opt.Day){r=r.replace("yyyy",sjObj.opt.yyyy);r=r.replace("mm",sjObj.opt.mm);r=r.replace("dd",valarr[0]);}else{r=r.replace("yyyy",sjObj.opt.yyyy);r=r.replace("mm",sjObj.opt.mm);r=r.replace("dd",sjObj.opt.dd);}};/*console.log("返回年月日",r);*/return r;}
function getsfmstr(str){var r=sjObj.opt.timeFormat;/*console.log(r);*/var valarr=str.split(":");if(valarr.length==3){r=r.replace("h",valarr[0]);r=r.replace("m",valarr[1]);r=r.replace("s",valarr[2]);}else if(valarr.length==2){if(sjObj.opt.Hour&&!sjObj.opt.Minute){r=r.replace("h",valarr[0]);r=r.replace("m",sjObj.opt.m);r=r.replace("s",valarr[1]);}else if(sjObj.opt.Hour&&!sjObj.opt.Seconds){r=r.replace("h",valarr[0]);r=r.replace("m",valarr[1]);r=r.replace("s",sjObj.opt.s);}else if(!sjObj.opt.Hour){r=r.replace("h",sjObj.opt.h);r=r.replace("m",valarr[0]);r=r.replace("s",valarr[1]);}}else if(valarr.length==1){if(sjObj.opt.Hour){r=r.replace("h",valarr[0]);r=r.replace("m",sjObj.opt.m);r=r.replace("s",sjObj.opt.s);}else if(sjObj.opt.Minute){r=r.replace("h",sjObj.opt.h);r=r.replace("m",valarr[0]);r=r.replace("s",sjObj.opt.s);}else if(sjObj.opt.Hour){r=r.replace("h",sjObj.opt.h);r=r.replace("m",sjObj.opt.m);r=r.replace("s",valarr[0]);}else{r=r.replace("h",sjObj.opt.h);r=r.replace("m",sjObj.opt.m);r=r.replace("s",sjObj.opt.s);}};/*console.log("返回时分秒",r);*/return r;}
var GetSlideDirection=function(startX,startY,endX,endY){var dy=startY-endY;var dx=endX-startX;var result=0;if(Math.abs(dx)<2&&Math.abs(dy)<2){return result;}
var angle=GetSlideAngle(dx,dy);if(angle>=-45&&angle<45){result=4;}else if(angle>=45&&angle<135){result=1;}else if(angle>=-135&&angle<-45){result=2;}
else if((angle>=135&&angle<=180)||(angle>=-180&&angle<-135)){result=3;}
return result;};var getTranslateY=function(eml){var matrix=$(eml).css("transform");/*console.log("获取到的transform",matrix)*/
var T;if(matrix=="none"){T=0;}else{var arr=matrix.split(",")
T=-(arr[5].split(")")[0]);}
/*console.log("返回的transform",T)*/
return T}
sjObj.innt=function(){if(!sjObj.opt.alwaysShow){$(this).on("click",function(e){e.stopPropagation();sjObj.opt.thisElm=this;switch(sjObj.opt.type){case "time":$("html").addClass("ov_hi");$(this).blur();sjObj.opt.getYear();sjObj.opt.buildHTml();sjObj.opt.getFinal();break;}})}else{sjObj.opt.thisElm=this;/*console.log("直接显示")*/
sjObj.opt.getYear();sjObj.opt.buildHTml();}
$(window).on("resize",function(){/*console.log("窗口大小改变")*/
sjObj.opt.setCenter()})}
sjObj.innt();return sjObj}
if(this.length>1){/*console.log("多个")*/
var arr=[]
$.each(this,function(){arr.push(cPlugin(this,true))})
return arr}else{/*console.log("一个")*/
obj=cPlugin(this);/*console.log("一个时间对象",obj);*/return obj}}})(jQuery)
\ No newline at end of file
function QR8bitByte(a){
this.mode=QRMode.MODE_8BIT_BYTE,
this.data=a
}
function QRCode(a,b){
this.typeNumber=a,
this.errorCorrectLevel=b,
this.modules=null,
this.moduleCount=0,
this.dataCache=null,
this.dataList=new Array()
}
function QRPolynomial(a,b){
var c,d;
if(void 0==a.length){
throw new Error(a.length+"/"+b)
}
for(c=0;c<a.length&&0==a[c];){
c++
}
for(this.num=new Array(a.length-c+b),d=0;d<a.length-c;d++){
this.num[d]=a[d+c]
}
}
function QRRSBlock(a,b){
this.totalCount=a,
this.dataCount=b
}
function QRBitBuffer(){
this.buffer=new Array(),
this.length=0
}
var QRMode,QRErrorCorrectLevel,QRMaskPattern,QRUtil,QRMath,i;
for(function(a){
a.fn.qrcode=function(b){
var c,d;
return"string"==typeof b&&(b={text:b}),
b=a.extend({},{
render:"canvas",
width:256,
height:256,
//这里是图片的高度和宽度
imgWidth:b.width/3,
imgHeight:b.height/3,
typeNumber:-1,
correctLevel:QRErrorCorrectLevel.H,
background:"#ffffff",
foreground:"#000000"
},b),c=function(){
var c,d,e,f,g,h,i,j,k,a=new QRCode(b.typeNumber,b.correctLevel);
for(a.addData(utf16to8(b.text)),a.make(),
c=document.createElement("canvas"),
c.width=b.width,c.height=b.height,d=c.getContext("2d"),
b.src&&(e=new Image(),e.src=b.src,e.onload=function(){
d.drawImage(e,(b.width-b.imgWidth)/2,(b.height-b.imgHeight)/2,
b.imgWidth,b.imgHeight)}),f=b.width/a.getModuleCount(),
g=b.height/a.getModuleCount(),h=0;h<a.getModuleCount();h++)
{for(i=0;i<a.getModuleCount();i++){
d.fillStyle=a.isDark(h,i)?b.foreground:b.background,
j=Math.ceil((i+1)*f)-Math.floor(i*f),
k=Math.ceil((h+1)*f)-Math.floor(h*f),
d.fillRect(Math.round(i*f),Math.round(h*g),j,k)
}}return c},
d=function(){var d,e,f,g,h,i,
c=new QRCode(b.typeNumber,b.correctLevel);
//这里的utf16to8(b.text)是对Text中的字符串进行转码,让其支持中文
for(c.addData(utf16to8(b.text)),c.make(),d=a("<table></table>").css("width",b.width+"px").css("height",b.height+"px").css("border","0px").css("border-collapse","collapse").css("background-color",b.background),e=b.width/c.getModuleCount(),f=b.height/c.getModuleCount(),g=0;g<c.getModuleCount();g++){for(h=a("<tr></tr>").css("height",f+"px").appendTo(d),i=0;i<c.getModuleCount();i++){a("<td></td>").css("width",e+"px").css("background-color",c.isDark(g,i)?b.foreground:b.background).appendTo(h)}}return d},this.each(function(){var e="canvas"==b.render?c():d();a(e).appendTo(this)})}}(jQuery),QR8bitByte.prototype={getLength:function(){return this.data.length},write:function(a){for(var b=0;b<this.data.length;b++){a.put(this.data.charCodeAt(b),8)}}},QRCode.prototype={addData:function(a){var b=new QR8bitByte(a);this.dataList.push(b),this.dataCache=null},isDark:function(a,b){if(0>a||this.moduleCount<=a||0>b||this.moduleCount<=b){throw new Error(a+","+b)}return this.modules[a][b]},getModuleCount:function(){return this.moduleCount},make:function(){var a,b,c,d,e,f;if(this.typeNumber<1){for(a=1,a=1;40>a;a++){for(b=QRRSBlock.getRSBlocks(a,this.errorCorrectLevel),c=new QRBitBuffer(),d=0,e=0;e<b.length;e++){d+=b[e].dataCount}for(e=0;e<this.dataList.length;e++){f=this.dataList[e],c.put(f.mode,4),c.put(f.getLength(),QRUtil.getLengthInBits(f.mode,a)),f.write(c)}if(c.getLengthInBits()<=8*d){break}}this.typeNumber=a}this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(a,b){var c,d;for(this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount),c=0;c<this.moduleCount;c++){for(this.modules[c]=new Array(this.moduleCount),d=0;d<this.moduleCount;d++){this.modules[c][d]=null}}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(a,b),this.typeNumber>=7&&this.setupTypeNumber(a),null==this.dataCache&&(this.dataCache=QRCode.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,b)},setupPositionProbePattern:function(a,b){var c,d;for(c=-1;7>=c;c++){if(!(-1>=a+c||this.moduleCount<=a+c)){for(d=-1;7>=d;d++){-1>=b+d||this.moduleCount<=b+d||(this.modules[a+c][b+d]=c>=0&&6>=c&&(0==d||6==d)||d>=0&&6>=d&&(0==c||6==c)||c>=2&&4>=c&&d>=2&&4>=d?!0:!1)}}}},getBestMaskPattern:function(){var c,d,a=0,b=0;for(c=0;8>c;c++){this.makeImpl(!0,c),d=QRUtil.getLostPoint(this),(0==c||a>d)&&(a=d,b=c)}return b},createMovieClip:function(a,b,c){var f,g,h,i,j,d=a.createEmptyMovieClip(b,c),e=1;for(this.make(),f=0;f<this.modules.length;f++){for(g=f*e,h=0;h<this.modules[f].length;h++){i=h*e,j=this.modules[f][h],j&&(d.beginFill(0,100),d.moveTo(i,g),d.lineTo(i+e,g),d.lineTo(i+e,g+e),d.lineTo(i,g+e),d.endFill())}}return d},setupTimingPattern:function(){var a,b;for(a=8;a<this.moduleCount-8;a++){null==this.modules[a][6]&&(this.modules[a][6]=0==a%2)}for(b=8;b<this.moduleCount-8;b++){null==this.modules[6][b]&&(this.modules[6][b]=0==b%2)}},setupPositionAdjustPattern:function(){var b,c,d,e,f,g,a=QRUtil.getPatternPosition(this.typeNumber);for(b=0;b<a.length;b++){for(c=0;c<a.length;c++){if(d=a[b],e=a[c],null==this.modules[d][e]){for(f=-2;2>=f;f++){for(g=-2;2>=g;g++){this.modules[d+f][e+g]=-2==f||2==f||-2==g||2==g||0==f&&0==g?!0:!1}}}}}},setupTypeNumber:function(a){var c,d,b=QRUtil.getBCHTypeNumber(this.typeNumber);for(c=0;18>c;c++){d=!a&&1==(1&b>>c),this.modules[Math.floor(c/3)][c%3+this.moduleCount-8-3]=d}for(c=0;18>c;c++){d=!a&&1==(1&b>>c),this.modules[c%3+this.moduleCount-8-3][Math.floor(c/3)]=d}},setupTypeInfo:function(a,b){var e,f,c=this.errorCorrectLevel<<3|b,d=QRUtil.getBCHTypeInfo(c);for(e=0;15>e;e++){f=!a&&1==(1&d>>e),6>e?this.modules[e][8]=f:8>e?this.modules[e+1][8]=f:this.modules[this.moduleCount-15+e][8]=f}for(e=0;15>e;e++){f=!a&&1==(1&d>>e),8>e?this.modules[8][this.moduleCount-e-1]=f:9>e?this.modules[8][15-e-1+1]=f:this.modules[8][15-e-1]=f}this.modules[this.moduleCount-8][8]=!a},mapData:function(a,b){var g,h,i,j,c=-1,d=this.moduleCount-1,e=7,f=0;for(g=this.moduleCount-1;g>0;g-=2){for(6==g&&g--;;){for(h=0;2>h;h++){null==this.modules[d][g-h]&&(i=!1,f<a.length&&(i=1==(1&a[f]>>>e)),j=QRUtil.getMask(b,d,g-h),j&&(i=!i),this.modules[d][g-h]=i,e--,-1==e&&(f++,e=7))}if(d+=c,0>d||this.moduleCount<=d){d-=c,c=-c;break}}}}},QRCode.PAD0=236,QRCode.PAD1=17,QRCode.createData=function(a,b,c){var f,g,h,d=QRRSBlock.getRSBlocks(a,b),e=new QRBitBuffer();for(f=0;f<c.length;f++){g=c[f],e.put(g.mode,4),e.put(g.getLength(),QRUtil.getLengthInBits(g.mode,a)),g.write(e)}for(h=0,f=0;f<d.length;f++){h+=d[f].dataCount}if(e.getLengthInBits()>8*h){throw new Error("code length overflow. ("+e.getLengthInBits()+">"+8*h+")")}for(e.getLengthInBits()+4<=8*h&&e.put(0,4);0!=e.getLengthInBits()%8;){e.putBit(!1)}for(;;){if(e.getLengthInBits()>=8*h){break}if(e.put(QRCode.PAD0,8),e.getLengthInBits()>=8*h){break}e.put(QRCode.PAD1,8)}return QRCode.createBytes(e,d)},QRCode.createBytes=function(a,b){var h,i,j,k,l,m,n,o,p,q,r,c=0,d=0,e=0,f=new Array(b.length),g=new Array(b.length);for(h=0;h<b.length;h++){for(i=b[h].dataCount,j=b[h].totalCount-i,d=Math.max(d,i),e=Math.max(e,j),f[h]=new Array(i),k=0;k<f[h].length;k++){f[h][k]=255&a.buffer[k+c]}for(c+=i,l=QRUtil.getErrorCorrectPolynomial(j),m=new QRPolynomial(f[h],l.getLength()-1),n=m.mod(l),g[h]=new Array(l.getLength()-1),k=0;k<g[h].length;k++){o=k+n.getLength()-g[h].length,g[h][k]=o>=0?n.get(o):0}}for(p=0,k=0;k<b.length;k++){p+=b[k].totalCount}for(q=new Array(p),r=0,k=0;d>k;k++){for(h=0;h<b.length;h++){k<f[h].length&&(q[r++]=f[h][k])}}for(k=0;e>k;k++){for(h=0;h<b.length;h++){k<g[h].length&&(q[r++]=g[h][k])}}return q},QRMode={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},QRErrorCorrectLevel={L:1,M:0,Q:3,H:2},QRMaskPattern={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},QRUtil={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(a){for(var b=a<<10;QRUtil.getBCHDigit(b)-QRUtil.getBCHDigit(QRUtil.G15)>=0;){b^=QRUtil.G15<<QRUtil.getBCHDigit(b)-QRUtil.getBCHDigit(QRUtil.G15)}return(a<<10|b)^QRUtil.G15_MASK},getBCHTypeNumber:function(a){for(var b=a<<12;QRUtil.getBCHDigit(b)-QRUtil.getBCHDigit(QRUtil.G18)>=0;){b^=QRUtil.G18<<QRUtil.getBCHDigit(b)-QRUtil.getBCHDigit(QRUtil.G18)}return a<<12|b},getBCHDigit:function(a){for(var b=0;0!=a;){b++,a>>>=1}return b},getPatternPosition:function(a){return QRUtil.PATTERN_POSITION_TABLE[a-1]},getMask:function(a,b,c){switch(a){case QRMaskPattern.PATTERN000:return 0==(b+c)%2;case QRMaskPattern.PATTERN001:return 0==b%2;case QRMaskPattern.PATTERN010:return 0==c%3;case QRMaskPattern.PATTERN011:return 0==(b+c)%3;case QRMaskPattern.PATTERN100:return 0==(Math.floor(b/2)+Math.floor(c/3))%2;case QRMaskPattern.PATTERN101:return 0==b*c%2+b*c%3;case QRMaskPattern.PATTERN110:return 0==(b*c%2+b*c%3)%2;case QRMaskPattern.PATTERN111:return 0==(b*c%3+(b+c)%2)%2;default:throw new Error("bad maskPattern:"+a)}},getErrorCorrectPolynomial:function(a){var c,b=new QRPolynomial([1],0);for(c=0;a>c;c++){b=b.multiply(new QRPolynomial([1,QRMath.gexp(c)],0))}return b},getLengthInBits:function(a,b){if(b>=1&&10>b){switch(a){case QRMode.MODE_NUMBER:return 10;case QRMode.MODE_ALPHA_NUM:return 9;case QRMode.MODE_8BIT_BYTE:return 8;case QRMode.MODE_KANJI:return 8;default:throw new Error("mode:"+a)}}else{if(27>b){switch(a){case QRMode.MODE_NUMBER:return 12;case QRMode.MODE_ALPHA_NUM:return 11;case QRMode.MODE_8BIT_BYTE:return 16;case QRMode.MODE_KANJI:return 10;default:throw new Error("mode:"+a)}}else{if(!(41>b)){throw new Error("type:"+b)}switch(a){case QRMode.MODE_NUMBER:return 14;case QRMode.MODE_ALPHA_NUM:return 13;case QRMode.MODE_8BIT_BYTE:return 16;case QRMode.MODE_KANJI:return 12;default:throw new Error("mode:"+a)}}}},getLostPoint:function(a){var d,e,f,g,h,i,j,k,l,b=a.getModuleCount(),c=0;for(d=0;b>d;d++){for(e=0;b>e;e++){for(f=0,g=a.isDark(d,e),h=-1;1>=h;h++){if(!(0>d+h||d+h>=b)){for(i=-1;1>=i;i++){0>e+i||e+i>=b||(0!=h||0!=i)&&g==a.isDark(d+h,e+i)&&f++}}}f>5&&(c+=3+f-5)}}for(d=0;b-1>d;d++){for(e=0;b-1>e;e++){j=0,a.isDark(d,e)&&j++,a.isDark(d+1,e)&&j++,a.isDark(d,e+1)&&j++,a.isDark(d+1,e+1)&&j++,(0==j||4==j)&&(c+=3)}}for(d=0;b>d;d++){for(e=0;b-6>e;e++){a.isDark(d,e)&&!a.isDark(d,e+1)&&a.isDark(d,e+2)&&a.isDark(d,e+3)&&a.isDark(d,e+4)&&!a.isDark(d,e+5)&&a.isDark(d,e+6)&&(c+=40)}}for(e=0;b>e;e++){for(d=0;b-6>d;d++){a.isDark(d,e)&&!a.isDark(d+1,e)&&a.isDark(d+2,e)&&a.isDark(d+3,e)&&a.isDark(d+4,e)&&!a.isDark(d+5,e)&&a.isDark(d+6,e)&&(c+=40)}}for(k=0,e=0;b>e;e++){for(d=0;b>d;d++){a.isDark(d,e)&&k++}}return l=Math.abs(100*k/b/b-50)/5,c+=10*l}},QRMath={glog:function(a){if(1>a){throw new Error("glog("+a+")")}return QRMath.LOG_TABLE[a]},gexp:function(a){for(;0>a;){a+=255}for(;a>=256;){a-=255}return QRMath.EXP_TABLE[a]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},i=0;8>i;i++){QRMath.EXP_TABLE[i]=1<<i}for(i=8;256>i;i++){QRMath.EXP_TABLE[i]=QRMath.EXP_TABLE[i-4]^QRMath.EXP_TABLE[i-5]^QRMath.EXP_TABLE[i-6]^QRMath.EXP_TABLE[i-8]}for(i=0;255>i;i++){QRMath.LOG_TABLE[QRMath.EXP_TABLE[i]]=i}QRPolynomial.prototype={get:function(a){return this.num[a]},getLength:function(){return this.num.length},multiply:function(a){var c,d,b=new Array(this.getLength()+a.getLength()-1);for(c=0;c<this.getLength();c++){for(d=0;d<a.getLength();d++){b[c+d]^=QRMath.gexp(QRMath.glog(this.get(c))+QRMath.glog(a.get(d)))}}return new QRPolynomial(b,0)},mod:function(a){var b,c,d;if(this.getLength()-a.getLength()<0){return this}for(b=QRMath.glog(this.get(0))-QRMath.glog(a.get(0)),c=new Array(this.getLength()),d=0;d<this.getLength();d++){c[d]=this.get(d)}for(d=0;d<a.getLength();d++){c[d]^=QRMath.gexp(QRMath.glog(a.get(d))+b)}return new QRPolynomial(c,0).mod(a)}},QRRSBlock.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],QRRSBlock.getRSBlocks=function(a,b){var d,e,f,g,h,i,j,c=QRRSBlock.getRsBlockTable(a,b);if(void 0==c){throw new Error("bad rs block @ typeNumber:"+a+"/errorCorrectLevel:"+b)}for(d=c.length/3,e=new Array(),f=0;d>f;f++){for(g=c[3*f+0],h=c[3*f+1],i=c[3*f+2],j=0;g>j;j++){e.push(new QRRSBlock(h,i))}}return e},QRRSBlock.getRsBlockTable=function(a,b){switch(b){case QRErrorCorrectLevel.L:return QRRSBlock.RS_BLOCK_TABLE[4*(a-1)+0];case QRErrorCorrectLevel.M:return QRRSBlock.RS_BLOCK_TABLE[4*(a-1)+1];case QRErrorCorrectLevel.Q:return QRRSBlock.RS_BLOCK_TABLE[4*(a-1)+2];case QRErrorCorrectLevel.H:return QRRSBlock.RS_BLOCK_TABLE[4*(a-1)+3];default:return void 0}},QRBitBuffer.prototype={get:function(a){var b=Math.floor(a/8);return 1==(1&this.buffer[b]>>>7-a%8)},put:function(a,b){for(var c=0;b>c;c++){this.putBit(1==(1&a>>>b-c-1))}},getLengthInBits:function(){return this.length},putBit:function(a){var b=Math.floor(this.length/8);this.buffer.length<=b&&this.buffer.push(0),a&&(this.buffer[b]|=128>>>this.length%8),this.length++}};
\ No newline at end of file
//---------------------------------------------------------------------
// QRCode for JavaScript
//
// Copyright (c) 2009 Kazuhiko Arase
//
// URL: http://www.d-project.com/
//
// Licensed under the MIT license:
// http://www.opensource.org/licenses/mit-license.php
//
// The word "QR Code" is registered trademark of
// DENSO WAVE INCORPORATED
// http://www.denso-wave.com/qrcode/faqpatent-e.html
//
//---------------------------------------------------------------------
//---------------------------------------------------------------------
// QR8bitByte
//---------------------------------------------------------------------
function QR8bitByte(data) {
this.mode = QRMode.MODE_8BIT_BYTE;
this.data = data;
}
QR8bitByte.prototype = {
getLength : function(buffer) {
return this.data.length;
},
write : function(buffer) {
for (var i = 0; i < this.data.length; i++) {
// not JIS ...
buffer.put(this.data.charCodeAt(i), 8);
}
}
};
//---------------------------------------------------------------------
// QRCode
//---------------------------------------------------------------------
function QRCode(typeNumber, errorCorrectLevel) {
this.typeNumber = typeNumber;
this.errorCorrectLevel = errorCorrectLevel;
this.modules = null;
this.moduleCount = 0;
this.dataCache = null;
this.dataList = new Array();
}
QRCode.prototype = {
addData : function(data) {
var newData = new QR8bitByte(data);
this.dataList.push(newData);
this.dataCache = null;
},
isDark : function(row, col) {
if (row < 0 || this.moduleCount <= row || col < 0 || this.moduleCount <= col) {
throw new Error(row + "," + col);
}
return this.modules[row][col];
},
getModuleCount : function() {
return this.moduleCount;
},
make : function() {
// Calculate automatically typeNumber if provided is < 1
if (this.typeNumber < 1 ){
var typeNumber = 1;
for (typeNumber = 1; typeNumber < 40; typeNumber++) {
var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, this.errorCorrectLevel);
var buffer = new QRBitBuffer();
var totalDataCount = 0;
for (var i = 0; i < rsBlocks.length; i++) {
totalDataCount += rsBlocks[i].dataCount;
}
for (var i = 0; i < this.dataList.length; i++) {
var data = this.dataList[i];
buffer.put(data.mode, 4);
buffer.put(data.getLength(), QRUtil.getLengthInBits(data.mode, typeNumber) );
data.write(buffer);
}
if (buffer.getLengthInBits() <= totalDataCount * 8)
break;
}
this.typeNumber = typeNumber;
}
this.makeImpl(false, this.getBestMaskPattern() );
},
makeImpl : function(test, maskPattern) {
this.moduleCount = this.typeNumber * 4 + 17;
this.modules = new Array(this.moduleCount);
for (var row = 0; row < this.moduleCount; row++) {
this.modules[row] = new Array(this.moduleCount);
for (var col = 0; col < this.moduleCount; col++) {
this.modules[row][col] = null;//(col + row) % 3;
}
}
this.setupPositionProbePattern(0, 0);
this.setupPositionProbePattern(this.moduleCount - 7, 0);
this.setupPositionProbePattern(0, this.moduleCount - 7);
this.setupPositionAdjustPattern();
this.setupTimingPattern();
this.setupTypeInfo(test, maskPattern);
if (this.typeNumber >= 7) {
this.setupTypeNumber(test);
}
if (this.dataCache == null) {
this.dataCache = QRCode.createData(this.typeNumber, this.errorCorrectLevel, this.dataList);
}
this.mapData(this.dataCache, maskPattern);
},
setupPositionProbePattern : function(row, col) {
for (var r = -1; r <= 7; r++) {
if (row + r <= -1 || this.moduleCount <= row + r) continue;
for (var c = -1; c <= 7; c++) {
if (col + c <= -1 || this.moduleCount <= col + c) continue;
if ( (0 <= r && r <= 6 && (c == 0 || c == 6) )
|| (0 <= c && c <= 6 && (r == 0 || r == 6) )
|| (2 <= r && r <= 4 && 2 <= c && c <= 4) ) {
this.modules[row + r][col + c] = true;
} else {
this.modules[row + r][col + c] = false;
}
}
}
},
getBestMaskPattern : function() {
var minLostPoint = 0;
var pattern = 0;
for (var i = 0; i < 8; i++) {
this.makeImpl(true, i);
var lostPoint = QRUtil.getLostPoint(this);
if (i == 0 || minLostPoint > lostPoint) {
minLostPoint = lostPoint;
pattern = i;
}
}
return pattern;
},
createMovieClip : function(target_mc, instance_name, depth) {
var qr_mc = target_mc.createEmptyMovieClip(instance_name, depth);
var cs = 1;
this.make();
for (var row = 0; row < this.modules.length; row++) {
var y = row * cs;
for (var col = 0; col < this.modules[row].length; col++) {
var x = col * cs;
var dark = this.modules[row][col];
if (dark) {
qr_mc.beginFill(0, 100);
qr_mc.moveTo(x, y);
qr_mc.lineTo(x + cs, y);
qr_mc.lineTo(x + cs, y + cs);
qr_mc.lineTo(x, y + cs);
qr_mc.endFill();
}
}
}
return qr_mc;
},
setupTimingPattern : function() {
for (var r = 8; r < this.moduleCount - 8; r++) {
if (this.modules[r][6] != null) {
continue;
}
this.modules[r][6] = (r % 2 == 0);
}
for (var c = 8; c < this.moduleCount - 8; c++) {
if (this.modules[6][c] != null) {
continue;
}
this.modules[6][c] = (c % 2 == 0);
}
},
setupPositionAdjustPattern : function() {
var pos = QRUtil.getPatternPosition(this.typeNumber);
for (var i = 0; i < pos.length; i++) {
for (var j = 0; j < pos.length; j++) {
var row = pos[i];
var col = pos[j];
if (this.modules[row][col] != null) {
continue;
}
for (var r = -2; r <= 2; r++) {
for (var c = -2; c <= 2; c++) {
if (r == -2 || r == 2 || c == -2 || c == 2
|| (r == 0 && c == 0) ) {
this.modules[row + r][col + c] = true;
} else {
this.modules[row + r][col + c] = false;
}
}
}
}
}
},
setupTypeNumber : function(test) {
var bits = QRUtil.getBCHTypeNumber(this.typeNumber);
for (var i = 0; i < 18; i++) {
var mod = (!test && ( (bits >> i) & 1) == 1);
this.modules[Math.floor(i / 3)][i % 3 + this.moduleCount - 8 - 3] = mod;
}
for (var i = 0; i < 18; i++) {
var mod = (!test && ( (bits >> i) & 1) == 1);
this.modules[i % 3 + this.moduleCount - 8 - 3][Math.floor(i / 3)] = mod;
}
},
setupTypeInfo : function(test, maskPattern) {
var data = (this.errorCorrectLevel << 3) | maskPattern;
var bits = QRUtil.getBCHTypeInfo(data);
// vertical
for (var i = 0; i < 15; i++) {
var mod = (!test && ( (bits >> i) & 1) == 1);
if (i < 6) {
this.modules[i][8] = mod;
} else if (i < 8) {
this.modules[i + 1][8] = mod;
} else {
this.modules[this.moduleCount - 15 + i][8] = mod;
}
}
// horizontal
for (var i = 0; i < 15; i++) {
var mod = (!test && ( (bits >> i) & 1) == 1);
if (i < 8) {
this.modules[8][this.moduleCount - i - 1] = mod;
} else if (i < 9) {
this.modules[8][15 - i - 1 + 1] = mod;
} else {
this.modules[8][15 - i - 1] = mod;
}
}
// fixed module
this.modules[this.moduleCount - 8][8] = (!test);
},
mapData : function(data, maskPattern) {
var inc = -1;
var row = this.moduleCount - 1;
var bitIndex = 7;
var byteIndex = 0;
for (var col = this.moduleCount - 1; col > 0; col -= 2) {
if (col == 6) col--;
while (true) {
for (var c = 0; c < 2; c++) {
if (this.modules[row][col - c] == null) {
var dark = false;
if (byteIndex < data.length) {
dark = ( ( (data[byteIndex] >>> bitIndex) & 1) == 1);
}
var mask = QRUtil.getMask(maskPattern, row, col - c);
if (mask) {
dark = !dark;
}
this.modules[row][col - c] = dark;
bitIndex--;
if (bitIndex == -1) {
byteIndex++;
bitIndex = 7;
}
}
}
row += inc;
if (row < 0 || this.moduleCount <= row) {
row -= inc;
inc = -inc;
break;
}
}
}
}
};
QRCode.PAD0 = 0xEC;
QRCode.PAD1 = 0x11;
QRCode.createData = function(typeNumber, errorCorrectLevel, dataList) {
var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, errorCorrectLevel);
var buffer = new QRBitBuffer();
for (var i = 0; i < dataList.length; i++) {
var data = dataList[i];
buffer.put(data.mode, 4);
buffer.put(data.getLength(), QRUtil.getLengthInBits(data.mode, typeNumber) );
data.write(buffer);
}
// calc num max data.
var totalDataCount = 0;
for (var i = 0; i < rsBlocks.length; i++) {
totalDataCount += rsBlocks[i].dataCount;
}
if (buffer.getLengthInBits() > totalDataCount * 8) {
throw new Error("code length overflow. ("
+ buffer.getLengthInBits()
+ ">"
+ totalDataCount * 8
+ ")");
}
// end code
if (buffer.getLengthInBits() + 4 <= totalDataCount * 8) {
buffer.put(0, 4);
}
// padding
while (buffer.getLengthInBits() % 8 != 0) {
buffer.putBit(false);
}
// padding
while (true) {
if (buffer.getLengthInBits() >= totalDataCount * 8) {
break;
}
buffer.put(QRCode.PAD0, 8);
if (buffer.getLengthInBits() >= totalDataCount * 8) {
break;
}
buffer.put(QRCode.PAD1, 8);
}
return QRCode.createBytes(buffer, rsBlocks);
}
QRCode.createBytes = function(buffer, rsBlocks) {
var offset = 0;
var maxDcCount = 0;
var maxEcCount = 0;
var dcdata = new Array(rsBlocks.length);
var ecdata = new Array(rsBlocks.length);
for (var r = 0; r < rsBlocks.length; r++) {
var dcCount = rsBlocks[r].dataCount;
var ecCount = rsBlocks[r].totalCount - dcCount;
maxDcCount = Math.max(maxDcCount, dcCount);
maxEcCount = Math.max(maxEcCount, ecCount);
dcdata[r] = new Array(dcCount);
for (var i = 0; i < dcdata[r].length; i++) {
dcdata[r][i] = 0xff & buffer.buffer[i + offset];
}
offset += dcCount;
var rsPoly = QRUtil.getErrorCorrectPolynomial(ecCount);
var rawPoly = new QRPolynomial(dcdata[r], rsPoly.getLength() - 1);
var modPoly = rawPoly.mod(rsPoly);
ecdata[r] = new Array(rsPoly.getLength() - 1);
for (var i = 0; i < ecdata[r].length; i++) {
var modIndex = i + modPoly.getLength() - ecdata[r].length;
ecdata[r][i] = (modIndex >= 0)? modPoly.get(modIndex) : 0;
}
}
var totalCodeCount = 0;
for (var i = 0; i < rsBlocks.length; i++) {
totalCodeCount += rsBlocks[i].totalCount;
}
var data = new Array(totalCodeCount);
var index = 0;
for (var i = 0; i < maxDcCount; i++) {
for (var r = 0; r < rsBlocks.length; r++) {
if (i < dcdata[r].length) {
data[index++] = dcdata[r][i];
}
}
}
for (var i = 0; i < maxEcCount; i++) {
for (var r = 0; r < rsBlocks.length; r++) {
if (i < ecdata[r].length) {
data[index++] = ecdata[r][i];
}
}
}
return data;
}
//---------------------------------------------------------------------
// QRMode
//---------------------------------------------------------------------
var QRMode = {
MODE_NUMBER : 1 << 0,
MODE_ALPHA_NUM : 1 << 1,
MODE_8BIT_BYTE : 1 << 2,
MODE_KANJI : 1 << 3
};
//---------------------------------------------------------------------
// QRErrorCorrectLevel
//---------------------------------------------------------------------
var QRErrorCorrectLevel = {
L : 1,
M : 0,
Q : 3,
H : 2
};
//---------------------------------------------------------------------
// QRMaskPattern
//---------------------------------------------------------------------
var QRMaskPattern = {
PATTERN000 : 0,
PATTERN001 : 1,
PATTERN010 : 2,
PATTERN011 : 3,
PATTERN100 : 4,
PATTERN101 : 5,
PATTERN110 : 6,
PATTERN111 : 7
};
//---------------------------------------------------------------------
// QRUtil
//---------------------------------------------------------------------
var QRUtil = {
PATTERN_POSITION_TABLE : [
[],
[6, 18],
[6, 22],
[6, 26],
[6, 30],
[6, 34],
[6, 22, 38],
[6, 24, 42],
[6, 26, 46],
[6, 28, 50],
[6, 30, 54],
[6, 32, 58],
[6, 34, 62],
[6, 26, 46, 66],
[6, 26, 48, 70],
[6, 26, 50, 74],
[6, 30, 54, 78],
[6, 30, 56, 82],
[6, 30, 58, 86],
[6, 34, 62, 90],
[6, 28, 50, 72, 94],
[6, 26, 50, 74, 98],
[6, 30, 54, 78, 102],
[6, 28, 54, 80, 106],
[6, 32, 58, 84, 110],
[6, 30, 58, 86, 114],
[6, 34, 62, 90, 118],
[6, 26, 50, 74, 98, 122],
[6, 30, 54, 78, 102, 126],
[6, 26, 52, 78, 104, 130],
[6, 30, 56, 82, 108, 134],
[6, 34, 60, 86, 112, 138],
[6, 30, 58, 86, 114, 142],
[6, 34, 62, 90, 118, 146],
[6, 30, 54, 78, 102, 126, 150],
[6, 24, 50, 76, 102, 128, 154],
[6, 28, 54, 80, 106, 132, 158],
[6, 32, 58, 84, 110, 136, 162],
[6, 26, 54, 82, 110, 138, 166],
[6, 30, 58, 86, 114, 142, 170]
],
G15 : (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0),
G18 : (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0),
G15_MASK : (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1),
getBCHTypeInfo : function(data) {
var d = data << 10;
while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15) >= 0) {
d ^= (QRUtil.G15 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15) ) );
}
return ( (data << 10) | d) ^ QRUtil.G15_MASK;
},
getBCHTypeNumber : function(data) {
var d = data << 12;
while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18) >= 0) {
d ^= (QRUtil.G18 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18) ) );
}
return (data << 12) | d;
},
getBCHDigit : function(data) {
var digit = 0;
while (data != 0) {
digit++;
data >>>= 1;
}
return digit;
},
getPatternPosition : function(typeNumber) {
return QRUtil.PATTERN_POSITION_TABLE[typeNumber - 1];
},
getMask : function(maskPattern, i, j) {
switch (maskPattern) {
case QRMaskPattern.PATTERN000 : return (i + j) % 2 == 0;
case QRMaskPattern.PATTERN001 : return i % 2 == 0;
case QRMaskPattern.PATTERN010 : return j % 3 == 0;
case QRMaskPattern.PATTERN011 : return (i + j) % 3 == 0;
case QRMaskPattern.PATTERN100 : return (Math.floor(i / 2) + Math.floor(j / 3) ) % 2 == 0;
case QRMaskPattern.PATTERN101 : return (i * j) % 2 + (i * j) % 3 == 0;
case QRMaskPattern.PATTERN110 : return ( (i * j) % 2 + (i * j) % 3) % 2 == 0;
case QRMaskPattern.PATTERN111 : return ( (i * j) % 3 + (i + j) % 2) % 2 == 0;
default :
throw new Error("bad maskPattern:" + maskPattern);
}
},
getErrorCorrectPolynomial : function(errorCorrectLength) {
var a = new QRPolynomial([1], 0);
for (var i = 0; i < errorCorrectLength; i++) {
a = a.multiply(new QRPolynomial([1, QRMath.gexp(i)], 0) );
}
return a;
},
getLengthInBits : function(mode, type) {
if (1 <= type && type < 10) {
// 1 - 9
switch(mode) {
case QRMode.MODE_NUMBER : return 10;
case QRMode.MODE_ALPHA_NUM : return 9;
case QRMode.MODE_8BIT_BYTE : return 8;
case QRMode.MODE_KANJI : return 8;
default :
throw new Error("mode:" + mode);
}
} else if (type < 27) {
// 10 - 26
switch(mode) {
case QRMode.MODE_NUMBER : return 12;
case QRMode.MODE_ALPHA_NUM : return 11;
case QRMode.MODE_8BIT_BYTE : return 16;
case QRMode.MODE_KANJI : return 10;
default :
throw new Error("mode:" + mode);
}
} else if (type < 41) {
// 27 - 40
switch(mode) {
case QRMode.MODE_NUMBER : return 14;
case QRMode.MODE_ALPHA_NUM : return 13;
case QRMode.MODE_8BIT_BYTE : return 16;
case QRMode.MODE_KANJI : return 12;
default :
throw new Error("mode:" + mode);
}
} else {
throw new Error("type:" + type);
}
},
getLostPoint : function(qrCode) {
var moduleCount = qrCode.getModuleCount();
var lostPoint = 0;
// LEVEL1
for (var row = 0; row < moduleCount; row++) {
for (var col = 0; col < moduleCount; col++) {
var sameCount = 0;
var dark = qrCode.isDark(row, col);
for (var r = -1; r <= 1; r++) {
if (row + r < 0 || moduleCount <= row + r) {
continue;
}
for (var c = -1; c <= 1; c++) {
if (col + c < 0 || moduleCount <= col + c) {
continue;
}
if (r == 0 && c == 0) {
continue;
}
if (dark == qrCode.isDark(row + r, col + c) ) {
sameCount++;
}
}
}
if (sameCount > 5) {
lostPoint += (3 + sameCount - 5);
}
}
}
// LEVEL2
for (var row = 0; row < moduleCount - 1; row++) {
for (var col = 0; col < moduleCount - 1; col++) {
var count = 0;
if (qrCode.isDark(row, col ) ) count++;
if (qrCode.isDark(row + 1, col ) ) count++;
if (qrCode.isDark(row, col + 1) ) count++;
if (qrCode.isDark(row + 1, col + 1) ) count++;
if (count == 0 || count == 4) {
lostPoint += 3;
}
}
}
// LEVEL3
for (var row = 0; row < moduleCount; row++) {
for (var col = 0; col < moduleCount - 6; col++) {
if (qrCode.isDark(row, col)
&& !qrCode.isDark(row, col + 1)
&& qrCode.isDark(row, col + 2)
&& qrCode.isDark(row, col + 3)
&& qrCode.isDark(row, col + 4)
&& !qrCode.isDark(row, col + 5)
&& qrCode.isDark(row, col + 6) ) {
lostPoint += 40;
}
}
}
for (var col = 0; col < moduleCount; col++) {
for (var row = 0; row < moduleCount - 6; row++) {
if (qrCode.isDark(row, col)
&& !qrCode.isDark(row + 1, col)
&& qrCode.isDark(row + 2, col)
&& qrCode.isDark(row + 3, col)
&& qrCode.isDark(row + 4, col)
&& !qrCode.isDark(row + 5, col)
&& qrCode.isDark(row + 6, col) ) {
lostPoint += 40;
}
}
}
// LEVEL4
var darkCount = 0;
for (var col = 0; col < moduleCount; col++) {
for (var row = 0; row < moduleCount; row++) {
if (qrCode.isDark(row, col) ) {
darkCount++;
}
}
}
var ratio = Math.abs(100 * darkCount / moduleCount / moduleCount - 50) / 5;
lostPoint += ratio * 10;
return lostPoint;
}
};
//---------------------------------------------------------------------
// QRMath
//---------------------------------------------------------------------
var QRMath = {
glog : function(n) {
if (n < 1) {
throw new Error("glog(" + n + ")");
}
return QRMath.LOG_TABLE[n];
},
gexp : function(n) {
while (n < 0) {
n += 255;
}
while (n >= 256) {
n -= 255;
}
return QRMath.EXP_TABLE[n];
},
EXP_TABLE : new Array(256),
LOG_TABLE : new Array(256)
};
for (var i = 0; i < 8; i++) {
QRMath.EXP_TABLE[i] = 1 << i;
}
for (var i = 8; i < 256; i++) {
QRMath.EXP_TABLE[i] = QRMath.EXP_TABLE[i - 4]
^ QRMath.EXP_TABLE[i - 5]
^ QRMath.EXP_TABLE[i - 6]
^ QRMath.EXP_TABLE[i - 8];
}
for (var i = 0; i < 255; i++) {
QRMath.LOG_TABLE[QRMath.EXP_TABLE[i] ] = i;
}
//---------------------------------------------------------------------
// QRPolynomial
//---------------------------------------------------------------------
function QRPolynomial(num, shift) {
if (num.length == undefined) {
throw new Error(num.length + "/" + shift);
}
var offset = 0;
while (offset < num.length && num[offset] == 0) {
offset++;
}
this.num = new Array(num.length - offset + shift);
for (var i = 0; i < num.length - offset; i++) {
this.num[i] = num[i + offset];
}
}
QRPolynomial.prototype = {
get : function(index) {
return this.num[index];
},
getLength : function() {
return this.num.length;
},
multiply : function(e) {
var num = new Array(this.getLength() + e.getLength() - 1);
for (var i = 0; i < this.getLength(); i++) {
for (var j = 0; j < e.getLength(); j++) {
num[i + j] ^= QRMath.gexp(QRMath.glog(this.get(i) ) + QRMath.glog(e.get(j) ) );
}
}
return new QRPolynomial(num, 0);
},
mod : function(e) {
if (this.getLength() - e.getLength() < 0) {
return this;
}
var ratio = QRMath.glog(this.get(0) ) - QRMath.glog(e.get(0) );
var num = new Array(this.getLength() );
for (var i = 0; i < this.getLength(); i++) {
num[i] = this.get(i);
}
for (var i = 0; i < e.getLength(); i++) {
num[i] ^= QRMath.gexp(QRMath.glog(e.get(i) ) + ratio);
}
// recursive call
return new QRPolynomial(num, 0).mod(e);
}
};
//---------------------------------------------------------------------
// QRRSBlock
//---------------------------------------------------------------------
function QRRSBlock(totalCount, dataCount) {
this.totalCount = totalCount;
this.dataCount = dataCount;
}
QRRSBlock.RS_BLOCK_TABLE = [
// L
// M
// Q
// H
// 1
[1, 26, 19],
[1, 26, 16],
[1, 26, 13],
[1, 26, 9],
// 2
[1, 44, 34],
[1, 44, 28],
[1, 44, 22],
[1, 44, 16],
// 3
[1, 70, 55],
[1, 70, 44],
[2, 35, 17],
[2, 35, 13],
// 4
[1, 100, 80],
[2, 50, 32],
[2, 50, 24],
[4, 25, 9],
// 5
[1, 134, 108],
[2, 67, 43],
[2, 33, 15, 2, 34, 16],
[2, 33, 11, 2, 34, 12],
// 6
[2, 86, 68],
[4, 43, 27],
[4, 43, 19],
[4, 43, 15],
// 7
[2, 98, 78],
[4, 49, 31],
[2, 32, 14, 4, 33, 15],
[4, 39, 13, 1, 40, 14],
// 8
[2, 121, 97],
[2, 60, 38, 2, 61, 39],
[4, 40, 18, 2, 41, 19],
[4, 40, 14, 2, 41, 15],
// 9
[2, 146, 116],
[3, 58, 36, 2, 59, 37],
[4, 36, 16, 4, 37, 17],
[4, 36, 12, 4, 37, 13],
// 10
[2, 86, 68, 2, 87, 69],
[4, 69, 43, 1, 70, 44],
[6, 43, 19, 2, 44, 20],
[6, 43, 15, 2, 44, 16],
// 11
[4, 101, 81],
[1, 80, 50, 4, 81, 51],
[4, 50, 22, 4, 51, 23],
[3, 36, 12, 8, 37, 13],
// 12
[2, 116, 92, 2, 117, 93],
[6, 58, 36, 2, 59, 37],
[4, 46, 20, 6, 47, 21],
[7, 42, 14, 4, 43, 15],
// 13
[4, 133, 107],
[8, 59, 37, 1, 60, 38],
[8, 44, 20, 4, 45, 21],
[12, 33, 11, 4, 34, 12],
// 14
[3, 145, 115, 1, 146, 116],
[4, 64, 40, 5, 65, 41],
[11, 36, 16, 5, 37, 17],
[11, 36, 12, 5, 37, 13],
// 15
[5, 109, 87, 1, 110, 88],
[5, 65, 41, 5, 66, 42],
[5, 54, 24, 7, 55, 25],
[11, 36, 12],
// 16
[5, 122, 98, 1, 123, 99],
[7, 73, 45, 3, 74, 46],
[15, 43, 19, 2, 44, 20],
[3, 45, 15, 13, 46, 16],
// 17
[1, 135, 107, 5, 136, 108],
[10, 74, 46, 1, 75, 47],
[1, 50, 22, 15, 51, 23],
[2, 42, 14, 17, 43, 15],
// 18
[5, 150, 120, 1, 151, 121],
[9, 69, 43, 4, 70, 44],
[17, 50, 22, 1, 51, 23],
[2, 42, 14, 19, 43, 15],
// 19
[3, 141, 113, 4, 142, 114],
[3, 70, 44, 11, 71, 45],
[17, 47, 21, 4, 48, 22],
[9, 39, 13, 16, 40, 14],
// 20
[3, 135, 107, 5, 136, 108],
[3, 67, 41, 13, 68, 42],
[15, 54, 24, 5, 55, 25],
[15, 43, 15, 10, 44, 16],
// 21
[4, 144, 116, 4, 145, 117],
[17, 68, 42],
[17, 50, 22, 6, 51, 23],
[19, 46, 16, 6, 47, 17],
// 22
[2, 139, 111, 7, 140, 112],
[17, 74, 46],
[7, 54, 24, 16, 55, 25],
[34, 37, 13],
// 23
[4, 151, 121, 5, 152, 122],
[4, 75, 47, 14, 76, 48],
[11, 54, 24, 14, 55, 25],
[16, 45, 15, 14, 46, 16],
// 24
[6, 147, 117, 4, 148, 118],
[6, 73, 45, 14, 74, 46],
[11, 54, 24, 16, 55, 25],
[30, 46, 16, 2, 47, 17],
// 25
[8, 132, 106, 4, 133, 107],
[8, 75, 47, 13, 76, 48],
[7, 54, 24, 22, 55, 25],
[22, 45, 15, 13, 46, 16],
// 26
[10, 142, 114, 2, 143, 115],
[19, 74, 46, 4, 75, 47],
[28, 50, 22, 6, 51, 23],
[33, 46, 16, 4, 47, 17],
// 27
[8, 152, 122, 4, 153, 123],
[22, 73, 45, 3, 74, 46],
[8, 53, 23, 26, 54, 24],
[12, 45, 15, 28, 46, 16],
// 28
[3, 147, 117, 10, 148, 118],
[3, 73, 45, 23, 74, 46],
[4, 54, 24, 31, 55, 25],
[11, 45, 15, 31, 46, 16],
// 29
[7, 146, 116, 7, 147, 117],
[21, 73, 45, 7, 74, 46],
[1, 53, 23, 37, 54, 24],
[19, 45, 15, 26, 46, 16],
// 30
[5, 145, 115, 10, 146, 116],
[19, 75, 47, 10, 76, 48],
[15, 54, 24, 25, 55, 25],
[23, 45, 15, 25, 46, 16],
// 31
[13, 145, 115, 3, 146, 116],
[2, 74, 46, 29, 75, 47],
[42, 54, 24, 1, 55, 25],
[23, 45, 15, 28, 46, 16],
// 32
[17, 145, 115],
[10, 74, 46, 23, 75, 47],
[10, 54, 24, 35, 55, 25],
[19, 45, 15, 35, 46, 16],
// 33
[17, 145, 115, 1, 146, 116],
[14, 74, 46, 21, 75, 47],
[29, 54, 24, 19, 55, 25],
[11, 45, 15, 46, 46, 16],
// 34
[13, 145, 115, 6, 146, 116],
[14, 74, 46, 23, 75, 47],
[44, 54, 24, 7, 55, 25],
[59, 46, 16, 1, 47, 17],
// 35
[12, 151, 121, 7, 152, 122],
[12, 75, 47, 26, 76, 48],
[39, 54, 24, 14, 55, 25],
[22, 45, 15, 41, 46, 16],
// 36
[6, 151, 121, 14, 152, 122],
[6, 75, 47, 34, 76, 48],
[46, 54, 24, 10, 55, 25],
[2, 45, 15, 64, 46, 16],
// 37
[17, 152, 122, 4, 153, 123],
[29, 74, 46, 14, 75, 47],
[49, 54, 24, 10, 55, 25],
[24, 45, 15, 46, 46, 16],
// 38
[4, 152, 122, 18, 153, 123],
[13, 74, 46, 32, 75, 47],
[48, 54, 24, 14, 55, 25],
[42, 45, 15, 32, 46, 16],
// 39
[20, 147, 117, 4, 148, 118],
[40, 75, 47, 7, 76, 48],
[43, 54, 24, 22, 55, 25],
[10, 45, 15, 67, 46, 16],
// 40
[19, 148, 118, 6, 149, 119],
[18, 75, 47, 31, 76, 48],
[34, 54, 24, 34, 55, 25],
[20, 45, 15, 61, 46, 16]
];
QRRSBlock.getRSBlocks = function(typeNumber, errorCorrectLevel) {
var rsBlock = QRRSBlock.getRsBlockTable(typeNumber, errorCorrectLevel);
if (rsBlock == undefined) {
throw new Error("bad rs block @ typeNumber:" + typeNumber + "/errorCorrectLevel:" + errorCorrectLevel);
}
var length = rsBlock.length / 3;
var list = new Array();
for (var i = 0; i < length; i++) {
var count = rsBlock[i * 3 + 0];
var totalCount = rsBlock[i * 3 + 1];
var dataCount = rsBlock[i * 3 + 2];
for (var j = 0; j < count; j++) {
list.push(new QRRSBlock(totalCount, dataCount) );
}
}
return list;
}
QRRSBlock.getRsBlockTable = function(typeNumber, errorCorrectLevel) {
switch(errorCorrectLevel) {
case QRErrorCorrectLevel.L :
return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 0];
case QRErrorCorrectLevel.M :
return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 1];
case QRErrorCorrectLevel.Q :
return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 2];
case QRErrorCorrectLevel.H :
return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 3];
default :
return undefined;
}
}
//---------------------------------------------------------------------
// QRBitBuffer
//---------------------------------------------------------------------
function QRBitBuffer() {
this.buffer = new Array();
this.length = 0;
}
QRBitBuffer.prototype = {
get : function(index) {
var bufIndex = Math.floor(index / 8);
return ( (this.buffer[bufIndex] >>> (7 - index % 8) ) & 1) == 1;
},
put : function(num, length) {
for (var i = 0; i < length; i++) {
this.putBit( ( (num >>> (length - i - 1) ) & 1) == 1);
}
},
getLengthInBits : function() {
return this.length;
},
putBit : function(bit) {
var bufIndex = Math.floor(this.length / 8);
if (this.buffer.length <= bufIndex) {
this.buffer.push(0);
}
if (bit) {
this.buffer[bufIndex] |= (0x80 >>> (this.length % 8) );
}
this.length++;
}
};
/* utf.js - UTF-8 <=> UTF-16 convertion
*
* Copyright (C) 1999 Masanao Izumo <iz@onicos.co.jp>
* Version: 1.0
* LastModified: Dec 25 1999
* This library is free. You can redistribute it and/or modify it.
*/
/*
* Interfaces:
* utf8 = utf16to8(utf16);
* utf16 = utf16to8(utf8);
*/
function utf16to8(str) {
var out, i, len, c;
out = "";
len = str.length;
for(i = 0; i < len; i++) {
c = str.charCodeAt(i);
if ((c >= 0x0001) && (c <= 0x007F)) {
out += str.charAt(i);
} else if (c > 0x07FF) {
out += String.fromCharCode(0xE0 | ((c >> 12) & 0x0F));
out += String.fromCharCode(0x80 | ((c >> 6) & 0x3F));
out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
} else {
out += String.fromCharCode(0xC0 | ((c >> 6) & 0x1F));
out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
}
}
return out;
}
function utf8to16(str) {
var out, i, len, c;
var char2, char3;
out = "";
len = str.length;
i = 0;
while(i < len) {
c = str.charCodeAt(i++);
switch(c >> 4)
{
case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7:
// 0xxxxxxx
out += str.charAt(i-1);
break;
case 12: case 13:
// 110x xxxx 10xx xxxx
char2 = str.charCodeAt(i++);
out += String.fromCharCode(((c & 0x1F) << 6) | (char2 & 0x3F));
break;
case 14:
// 1110 xxxx 10xx xxxx 10xx xxxx
char2 = str.charCodeAt(i++);
char3 = str.charCodeAt(i++);
out += String.fromCharCode(((c & 0x0F) << 12) |
((char2 & 0x3F) << 6) |
((char3 & 0x3F) << 0));
break;
}
}
return out;
}
\ No newline at end of file
body.stop-scrolling { height: 100%; overflow: hidden; }
.sweet-overlay { background-color: black; /* IE8 */
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)"; /* IE8 */
background-color: rgba(0, 0, 0, 0.4); position: fixed; left: 0; right: 0; top: 0; bottom: 0; display: none; z-index: 10000; }
.sweet-alert { background-color: white; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; width: 478px; padding: 17px; border-radius: 5px; text-align: center; position: fixed; left: 50%; top: 50%; margin-left: -256px; margin-top: -200px; overflow: hidden; display: none; z-index: 99999; }
@media all and (max-width: 540px) {
.sweet-alert { width: auto; margin-left: 0; margin-right: 0; left: 15px; right: 15px; }
}
.sweet-alert h2 { color: #575757; font-size: 30px; text-align: center; font-weight: 600; text-transform: none; position: relative; margin: 25px 0; padding: 0; line-height: 40px; display: block; }
.sweet-alert p { color: #797979; font-size: 16px; text-align: center; font-weight: 300; position: relative; text-align: inherit; float: none; margin: 0; padding: 0; line-height: normal; }
.sweet-alert fieldset { border: none; position: relative; }
.sweet-alert .sa-error-container { background-color: #f1f1f1; margin-left: -17px; margin-right: -17px; overflow: hidden; padding: 0 10px; max-height: 0; webkit-transition: padding 0.15s, max-height 0.15s; transition: padding 0.15s, max-height 0.15s; }
.sweet-alert .sa-error-container.show { padding: 10px 0; max-height: 100px; webkit-transition: padding 0.2s, max-height 0.2s; transition: padding 0.25s, max-height 0.25s; }
.sweet-alert .sa-error-container .icon { display: inline-block; width: 24px; height: 24px; border-radius: 50%; background-color: #ea7d7d; color: white; line-height: 24px; text-align: center; margin-right: 3px; }
.sweet-alert .sa-error-container p { display: inline-block; }
.sweet-alert .sa-input-error { position: absolute; top: 29px; right: 26px; width: 20px; height: 20px; opacity: 0; -webkit-transform: scale(0.5); transform: scale(0.5); -webkit-transform-origin: 50% 50%; transform-origin: 50% 50%; -webkit-transition: all 0.1s; transition: all 0.1s; }
.sweet-alert .sa-input-error::before, .sweet-alert .sa-input-error::after { content: ""; width: 20px; height: 6px; background-color: #f06e57; border-radius: 3px; position: absolute; top: 50%; margin-top: -4px; left: 50%; margin-left: -9px; }
.sweet-alert .sa-input-error::before { -webkit-transform: rotate(-45deg); transform: rotate(-45deg); }
.sweet-alert .sa-input-error::after { -webkit-transform: rotate(45deg); transform: rotate(45deg); }
.sweet-alert .sa-input-error.show { opacity: 1; -webkit-transform: scale(1); transform: scale(1); }
.sweet-alert input { width: 100%; box-sizing: border-box; border-radius: 3px; border: 1px solid #d7d7d7; height: 43px; margin-top: 10px; margin-bottom: 17px; font-size: 18px; box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.06); padding: 0 12px; display: none; -webkit-transition: all 0.3s; transition: all 0.3s; }
.sweet-alert input:focus { outline: none; box-shadow: 0px 0px 3px #c4e6f5; border: 1px solid #b4dbed; }
.sweet-alert input:focus::-moz-placeholder {
transition: opacity 0.3s 0.03s ease;
opacity: 0.5;
}
.sweet-alert input:focus:-ms-input-placeholder {
transition: opacity 0.3s 0.03s ease;
opacity: 0.5;
}
.sweet-alert input:focus::-webkit-input-placeholder {
transition: opacity 0.3s 0.03s ease;
opacity: 0.5;
}
.sweet-alert input::-moz-placeholder {
color: #bdbdbd;
}
.sweet-alert input:-ms-input-placeholder {
color: #bdbdbd;
}
.sweet-alert input::-webkit-input-placeholder {
color: #bdbdbd;
}
.sweet-alert.show-input input { display: block; }
.sweet-alert button { background-color: #AEDEF4; color: white; border: none; box-shadow: none; font-size: 17px; font-weight: 500; -webkit-border-radius: 4px; border-radius: 5px; padding: 10px 32px; margin: 26px 5px 0 5px; cursor: pointer; }
.sweet-alert button:focus { outline: none; box-shadow: 0 0 2px rgba(128, 179, 235, 0.5), inset 0 0 0 1px rgba(0, 0, 0, 0.05); }
.sweet-alert button:hover { background-color: #a1d9f2; }
.sweet-alert button:active { background-color: #81ccee; }
.sweet-alert button.cancel { background-color: #D0D0D0; }
.sweet-alert button.cancel:hover { background-color: #c8c8c8; }
.sweet-alert button.cancel:active { background-color: #b6b6b6; }
.sweet-alert button.cancel:focus { box-shadow: rgba(197, 205, 211, 0.8) 0px 0px 2px, rgba(0, 0, 0, 0.0470588) 0px 0px 0px 1px inset !important; }
.sweet-alert button::-moz-focus-inner {
border: 0;
}
.sweet-alert[data-has-cancel-button=false] button { box-shadow: none !important; }
.sweet-alert[data-has-confirm-button=false][data-has-cancel-button=false] { padding-bottom: 40px; }
.sweet-alert .sa-icon { width: 80px; height: 80px; border: 4px solid gray; -webkit-border-radius: 40px; border-radius: 40px; border-radius: 50%; margin: 20px auto; padding: 0; position: relative; box-sizing: content-box; }
.sweet-alert .sa-icon.sa-error { border-color: #F27474; }
.sweet-alert .sa-icon.sa-error .sa-x-mark { position: relative; display: block; }
.sweet-alert .sa-icon.sa-error .sa-line { position: absolute; height: 5px; width: 47px; background-color: #F27474; display: block; top: 37px; border-radius: 2px; }
.sweet-alert .sa-icon.sa-error .sa-line.sa-left { -webkit-transform: rotate(45deg); transform: rotate(45deg); left: 17px; }
.sweet-alert .sa-icon.sa-error .sa-line.sa-right { -webkit-transform: rotate(-45deg); transform: rotate(-45deg); right: 16px; }
.sweet-alert .sa-icon.sa-warning { border-color: #F8BB86; }
.sweet-alert .sa-icon.sa-warning .sa-body { position: absolute; width: 5px; height: 47px; left: 50%; top: 10px; -webkit-border-radius: 2px; border-radius: 2px; margin-left: -2px; background-color: #F8BB86; }
.sweet-alert .sa-icon.sa-warning .sa-dot { position: absolute; width: 7px; height: 7px; -webkit-border-radius: 50%; border-radius: 50%; margin-left: -3px; left: 50%; bottom: 10px; background-color: #F8BB86; }
.sweet-alert .sa-icon.sa-info { border-color: #C9DAE1; }
.sweet-alert .sa-icon.sa-info::before { content: ""; position: absolute; width: 5px; height: 29px; left: 50%; bottom: 17px; border-radius: 2px; margin-left: -2px; background-color: #C9DAE1; }
.sweet-alert .sa-icon.sa-info::after { content: ""; position: absolute; width: 7px; height: 7px; border-radius: 50%; margin-left: -3px; top: 19px; background-color: #C9DAE1; }
.sweet-alert .sa-icon.sa-success { border-color: #A5DC86; }
.sweet-alert .sa-icon.sa-success::before, .sweet-alert .sa-icon.sa-success::after { content: ''; -webkit-border-radius: 40px; border-radius: 40px; border-radius: 50%; position: absolute; width: 60px; height: 120px; background: white; -webkit-transform: rotate(45deg); transform: rotate(45deg); }
.sweet-alert .sa-icon.sa-success::before { -webkit-border-radius: 120px 0 0 120px; border-radius: 120px 0 0 120px; top: -7px; left: -33px; -webkit-transform: rotate(-45deg); transform: rotate(-45deg); -webkit-transform-origin: 60px 60px; transform-origin: 60px 60px; }
.sweet-alert .sa-icon.sa-success::after { -webkit-border-radius: 0 120px 120px 0; border-radius: 0 120px 120px 0; top: -11px; left: 30px; -webkit-transform: rotate(-45deg); transform: rotate(-45deg); -webkit-transform-origin: 0px 60px; transform-origin: 0px 60px; }
.sweet-alert .sa-icon.sa-success .sa-placeholder { width: 80px; height: 80px; border: 4px solid rgba(165, 220, 134, 0.2); -webkit-border-radius: 40px; border-radius: 40px; border-radius: 50%; box-sizing: content-box; position: absolute; left: -4px; top: -4px; z-index: 2; }
.sweet-alert .sa-icon.sa-success .sa-fix { width: 5px; height: 90px; background-color: white; position: absolute; left: 28px; top: 8px; z-index: 1; -webkit-transform: rotate(-45deg); transform: rotate(-45deg); }
.sweet-alert .sa-icon.sa-success .sa-line { height: 5px; background-color: #A5DC86; display: block; border-radius: 2px; position: absolute; z-index: 2; }
.sweet-alert .sa-icon.sa-success .sa-line.sa-tip { width: 25px; left: 14px; top: 46px; -webkit-transform: rotate(45deg); transform: rotate(45deg); }
.sweet-alert .sa-icon.sa-success .sa-line.sa-long { width: 47px; right: 8px; top: 38px; -webkit-transform: rotate(-45deg); transform: rotate(-45deg); }
.sweet-alert .sa-icon.sa-custom { background-size: contain; border-radius: 0; border: none; background-position: center center; background-repeat: no-repeat; }
/*
* Animations
*/
@-webkit-keyframes showSweetAlert {
0% {
transform: scale(0.7);
-webkit-transform: scale(0.7);
}
45% {
transform: scale(1.05);
-webkit-transform: scale(1.05);
}
80% {
transform: scale(0.95);
-webkit-transform: scale(0.95);
}
100% {
transform: scale(1);
-webkit-transform: scale(1);
}
}
@keyframes showSweetAlert {
0% {
transform: scale(0.7);
-webkit-transform: scale(0.7);
}
45% {
transform: scale(1.05);
-webkit-transform: scale(1.05);
}
80% {
transform: scale(0.95);
-webkit-transform: scale(0.95);
}
100% {
transform: scale(1);
-webkit-transform: scale(1);
}
}
@-webkit-keyframes hideSweetAlert {
0% {
transform: scale(1);
-webkit-transform: scale(1);
}
100% {
transform: scale(0.5);
-webkit-transform: scale(0.5);
}
}
@keyframes hideSweetAlert {
0% {
transform: scale(1);
-webkit-transform: scale(1);
}
100% {
transform: scale(0.5);
-webkit-transform: scale(0.5);
}
}
@-webkit-keyframes slideFromTop {
0% {
top: 0%;
}
100% {
top: 50%;
}
}
@keyframes slideFromTop {
0% {
top: 0%;
}
100% {
top: 50%;
}
}
@-webkit-keyframes slideToTop {
0% {
top: 50%;
}
100% {
top: 0%;
}
}
@keyframes slideToTop {
0% {
top: 50%;
}
100% {
top: 0%;
}
}
@-webkit-keyframes slideFromBottom {
0% {
top: 70%;
}
100% {
top: 50%;
}
}
@keyframes slideFromBottom {
0% {
top: 70%;
}
100% {
top: 50%;
}
}
@-webkit-keyframes slideToBottom {
0% {
top: 50%;
}
100% {
top: 70%;
}
}
@keyframes slideToBottom {
0% {
top: 50%;
}
100% {
top: 70%;
}
}
.showSweetAlert[data-animation=pop] { -webkit-animation: showSweetAlert 0.3s; animation: showSweetAlert 0.3s; }
.showSweetAlert[data-animation=none] { -webkit-animation: none; animation: none; }
.showSweetAlert[data-animation=slide-from-top] { -webkit-animation: slideFromTop 0.3s; animation: slideFromTop 0.3s; }
.showSweetAlert[data-animation=slide-from-bottom] { -webkit-animation: slideFromBottom 0.3s; animation: slideFromBottom 0.3s; }
.hideSweetAlert[data-animation=pop] { -webkit-animation: hideSweetAlert 0.2s; animation: hideSweetAlert 0.2s; }
.hideSweetAlert[data-animation=none] { -webkit-animation: none; animation: none; }
.hideSweetAlert[data-animation=slide-from-top] { -webkit-animation: slideToTop 0.4s; animation: slideToTop 0.4s; }
.hideSweetAlert[data-animation=slide-from-bottom] { -webkit-animation: slideToBottom 0.3s; animation: slideToBottom 0.3s; }
@-webkit-keyframes animateSuccessTip {
0% {
width: 0;
left: 1px;
top: 19px;
}
54% {
width: 0;
left: 1px;
top: 19px;
}
70% {
width: 50px;
left: -8px;
top: 37px;
}
84% {
width: 17px;
left: 21px;
top: 48px;
}
100% {
width: 25px;
left: 14px;
top: 45px;
}
}
@keyframes animateSuccessTip {
0% {
width: 0;
left: 1px;
top: 19px;
}
54% {
width: 0;
left: 1px;
top: 19px;
}
70% {
width: 50px;
left: -8px;
top: 37px;
}
84% {
width: 17px;
left: 21px;
top: 48px;
}
100% {
width: 25px;
left: 14px;
top: 45px;
}
}
@-webkit-keyframes animateSuccessLong {
0% {
width: 0;
right: 46px;
top: 54px;
}
65% {
width: 0;
right: 46px;
top: 54px;
}
84% {
width: 55px;
right: 0px;
top: 35px;
}
100% {
width: 47px;
right: 8px;
top: 38px;
}
}
@keyframes animateSuccessLong {
0% {
width: 0;
right: 46px;
top: 54px;
}
65% {
width: 0;
right: 46px;
top: 54px;
}
84% {
width: 55px;
right: 0px;
top: 35px;
}
100% {
width: 47px;
right: 8px;
top: 38px;
}
}
@-webkit-keyframes rotatePlaceholder {
0% {
transform: rotate(-45deg);
-webkit-transform: rotate(-45deg);
}
5% {
transform: rotate(-45deg);
-webkit-transform: rotate(-45deg);
}
12% {
transform: rotate(-405deg);
-webkit-transform: rotate(-405deg);
}
100% {
transform: rotate(-405deg);
-webkit-transform: rotate(-405deg);
}
}
@keyframes rotatePlaceholder {
0% {
transform: rotate(-45deg);
-webkit-transform: rotate(-45deg);
}
5% {
transform: rotate(-45deg);
-webkit-transform: rotate(-45deg);
}
12% {
transform: rotate(-405deg);
-webkit-transform: rotate(-405deg);
}
100% {
transform: rotate(-405deg);
-webkit-transform: rotate(-405deg);
}
}
.animateSuccessTip { -webkit-animation: animateSuccessTip 0.75s; animation: animateSuccessTip 0.75s; }
.animateSuccessLong { -webkit-animation: animateSuccessLong 0.75s; animation: animateSuccessLong 0.75s; }
.sa-icon.sa-success.animate::after { -webkit-animation: rotatePlaceholder 4.25s ease-in; animation: rotatePlaceholder 4.25s ease-in; }
@-webkit-keyframes animateErrorIcon {
0% {
transform: rotateX(100deg);
-webkit-transform: rotateX(100deg);
opacity: 0;
}
100% {
transform: rotateX(0deg);
-webkit-transform: rotateX(0deg);
opacity: 1;
}
}
@keyframes animateErrorIcon {
0% {
transform: rotateX(100deg);
-webkit-transform: rotateX(100deg);
opacity: 0;
}
100% {
transform: rotateX(0deg);
-webkit-transform: rotateX(0deg);
opacity: 1;
}
}
.animateErrorIcon { -webkit-animation: animateErrorIcon 0.5s; animation: animateErrorIcon 0.5s; }
@-webkit-keyframes animateXMark {
0% {
transform: scale(0.4);
-webkit-transform: scale(0.4);
margin-top: 26px;
opacity: 0;
}
50% {
transform: scale(0.4);
-webkit-transform: scale(0.4);
margin-top: 26px;
opacity: 0;
}
80% {
transform: scale(1.15);
-webkit-transform: scale(1.15);
margin-top: -6px;
}
100% {
transform: scale(1);
-webkit-transform: scale(1);
margin-top: 0;
opacity: 1;
}
}
@keyframes animateXMark {
0% {
transform: scale(0.4);
-webkit-transform: scale(0.4);
margin-top: 26px;
opacity: 0;
}
50% {
transform: scale(0.4);
-webkit-transform: scale(0.4);
margin-top: 26px;
opacity: 0;
}
80% {
transform: scale(1.15);
-webkit-transform: scale(1.15);
margin-top: -6px;
}
100% {
transform: scale(1);
-webkit-transform: scale(1);
margin-top: 0;
opacity: 1;
}
}
.animateXMark { -webkit-animation: animateXMark 0.5s; animation: animateXMark 0.5s; }
@-webkit-keyframes pulseWarning {
0% {
border-color: #F8D486;
}
100% {
border-color: #F8BB86;
}
}
@keyframes pulseWarning {
0% {
border-color: #F8D486;
}
100% {
border-color: #F8BB86;
}
}
.pulseWarning { -webkit-animation: pulseWarning 0.75s infinite alternate; animation: pulseWarning 0.75s infinite alternate; }
@-webkit-keyframes pulseWarningIns {
0% {
background-color: #F8D486;
}
100% {
background-color: #F8BB86;
}
}
@keyframes pulseWarningIns {
0% {
background-color: #F8D486;
}
100% {
background-color: #F8BB86;
}
}
.pulseWarningIns { -webkit-animation: pulseWarningIns 0.75s infinite alternate; animation: pulseWarningIns 0.75s infinite alternate; }
/* Internet Explorer 9 has some special quirks that are fixed here */
/* The icons are not animated. */
/* This file is automatically merged into sweet-alert.min.js through Gulp */
/* Error icon */
.sweet-alert .sa-icon.sa-error .sa-line.sa-left { -ms-transform: rotate(45deg) \9; }
.sweet-alert .sa-icon.sa-error .sa-line.sa-right { -ms-transform: rotate(-45deg) \9; }
/* Success icon */
.sweet-alert .sa-icon.sa-success { border-color: transparent\9; }
.sweet-alert .sa-icon.sa-success .sa-line.sa-tip { -ms-transform: rotate(45deg) \9; }
.sweet-alert .sa-icon.sa-success .sa-line.sa-long { -ms-transform: rotate(-45deg) \9; }
!function(e,t,n){"use strict";!function o(e,t,n){function a(s,l){if(!t[s]){if(!e[s]){var i="function"==typeof require&&require;if(!l&&i)return i(s,!0);if(r)return r(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var c=t[s]={exports:{}};e[s][0].call(c.exports,function(t){var n=e[s][1][t];return a(n?n:t)},c,c.exports,o,e,t,n)}return t[s].exports}for(var r="function"==typeof require&&require,s=0;s<n.length;s++)a(n[s]);return a}({1:[function(o){var a,r,s,l,i=function(e){return e&&e.__esModule?e:{"default":e}},u=o("./modules/handle-dom"),c=o("./modules/utils"),d=o("./modules/handle-swal-dom"),f=o("./modules/handle-click"),p=o("./modules/handle-key"),m=i(p),v=o("./modules/default-params"),y=i(v),h=o("./modules/set-params"),g=i(h);s=l=function(){function o(e){var t=s;return t[e]===n?y["default"][e]:t[e]}var s=arguments[0];if(u.addClass(t.body,"stop-scrolling"),d.resetInput(),s===n)return c.logStr("SweetAlert expects at least 1 attribute!"),!1;var l=c.extend({},y["default"]);switch(typeof s){case"string":l.title=s,l.text=arguments[1]||"",l.type=arguments[2]||"";break;case"object":if(s.title===n)return c.logStr('Missing "title" argument!'),!1;l.title=s.title;for(var i in y["default"])l[i]=o(i);l.confirmButtonText=l.showCancelButton?"Confirm":y["default"].confirmButtonText,l.confirmButtonText=o("confirmButtonText"),l.doneFunction=arguments[1]||null;break;default:return c.logStr('Unexpected type of argument! Expected "string" or "object", got '+typeof s),!1}g["default"](l),d.fixVerticalPosition(),d.openModal(arguments[1]);for(var p=d.getModal(),v=p.querySelectorAll("button"),h=["onclick","onmouseover","onmouseout","onmousedown","onmouseup","onfocus"],b=function(e){return f.handleButton(e,l,p)},w=0;w<v.length;w++)for(var C=0;C<h.length;C++){var S=h[C];v[w][S]=b}d.getOverlay().onclick=b,a=e.onkeydown;var x=function(e){return m["default"](e,l,p)};e.onkeydown=x,e.onfocus=function(){setTimeout(function(){r!==n&&(r.focus(),r=n)},0)}},s.setDefaults=l.setDefaults=function(e){if(!e)throw new Error("userParams is required");if("object"!=typeof e)throw new Error("userParams has to be a object");c.extend(y["default"],e)},s.close=l.close=function(){var o=d.getModal();u.fadeOut(d.getOverlay(),5),u.fadeOut(o,5),u.removeClass(o,"showSweetAlert"),u.addClass(o,"hideSweetAlert"),u.removeClass(o,"visible");var s=o.querySelector(".sa-icon.sa-success");u.removeClass(s,"animate"),u.removeClass(s.querySelector(".sa-tip"),"animateSuccessTip"),u.removeClass(s.querySelector(".sa-long"),"animateSuccessLong");var l=o.querySelector(".sa-icon.sa-error");u.removeClass(l,"animateErrorIcon"),u.removeClass(l.querySelector(".sa-x-mark"),"animateXMark");var i=o.querySelector(".sa-icon.sa-warning");return u.removeClass(i,"pulseWarning"),u.removeClass(i.querySelector(".sa-body"),"pulseWarningIns"),u.removeClass(i.querySelector(".sa-dot"),"pulseWarningIns"),setTimeout(function(){var e=o.getAttribute("data-custom-class");u.removeClass(o,e)},300),u.removeClass(t.body,"stop-scrolling"),e.onkeydown=a,e.previousActiveElement&&e.previousActiveElement.focus(),r=n,clearTimeout(o.timeout),!0},s.showInputError=l.showInputError=function(e){var t=d.getModal(),n=t.querySelector(".sa-input-error");u.addClass(n,"show");var o=t.querySelector(".sa-error-container");u.addClass(o,"show"),o.querySelector("p").innerHTML=e,t.querySelector("input").focus()},s.resetInputError=l.resetInputError=function(e){if(e&&13===e.keyCode)return!1;var t=d.getModal(),n=t.querySelector(".sa-input-error");u.removeClass(n,"show");var o=t.querySelector(".sa-error-container");u.removeClass(o,"show")},"undefined"!=typeof e?e.sweetAlert=e.swal=s:c.logStr("SweetAlert is a frontend module!")},{"./modules/default-params":2,"./modules/handle-click":3,"./modules/handle-dom":4,"./modules/handle-key":5,"./modules/handle-swal-dom":6,"./modules/set-params":8,"./modules/utils":9}],2:[function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var o={title:"",text:"",type:null,allowOutsideClick:!1,showConfirmButton:!0,showCancelButton:!1,closeOnConfirm:!0,closeOnCancel:!0,confirmButtonText:"确定",confirmButtonColor:"#AEDEF4",cancelButtonText:"取消",imageUrl:null,imageSize:null,timer:null,customClass:"",html:!1,animation:!0,allowEscapeKey:!0,inputType:"text",inputPlaceholder:"",inputValue:""};n["default"]=o,t.exports=n["default"]},{}],3:[function(t,n,o){Object.defineProperty(o,"__esModule",{value:!0});var a=t("./utils"),r=(t("./handle-swal-dom"),t("./handle-dom")),s=function(t,n,o){function s(e){m&&n.confirmButtonColor&&(p.style.backgroundColor=e)}var u,c,d,f=t||e.event,p=f.target||f.srcElement,m=-1!==p.className.indexOf("confirm"),v=-1!==p.className.indexOf("sweet-overlay"),y=r.hasClass(o,"visible"),h=n.doneFunction&&"true"===o.getAttribute("data-has-done-function");switch(m&&n.confirmButtonColor&&(u=n.confirmButtonColor,c=a.colorLuminance(u,-.04),d=a.colorLuminance(u,-.14)),f.type){case"mouseover":s(c);break;case"mouseout":s(u);break;case"mousedown":s(d);break;case"mouseup":s(c);break;case"focus":var g=o.querySelector("button.confirm"),b=o.querySelector("button.cancel");m?b.style.boxShadow="none":g.style.boxShadow="none";break;case"click":var w=o===p,C=r.isDescendant(o,p);if(!w&&!C&&y&&!n.allowOutsideClick)break;m&&h&&y?l(o,n):h&&y||v?i(o,n):r.isDescendant(o,p)&&"BUTTON"===p.tagName&&sweetAlert.close()}},l=function(e,t){var n=!0;r.hasClass(e,"show-input")&&(n=e.querySelector("input").value,n||(n="")),t.doneFunction(n),t.closeOnConfirm&&sweetAlert.close()},i=function(e,t){var n=String(t.doneFunction).replace(/\s/g,""),o="function("===n.substring(0,9)&&")"!==n.substring(9,10);o&&t.doneFunction(!1),t.closeOnCancel&&sweetAlert.close()};o["default"]={handleButton:s,handleConfirm:l,handleCancel:i},n.exports=o["default"]},{"./handle-dom":4,"./handle-swal-dom":6,"./utils":9}],4:[function(n,o,a){Object.defineProperty(a,"__esModule",{value:!0});var r=function(e,t){return new RegExp(" "+t+" ").test(" "+e.className+" ")},s=function(e,t){r(e,t)||(e.className+=" "+t)},l=function(e,t){var n=" "+e.className.replace(/[\t\r\n]/g," ")+" ";if(r(e,t)){for(;n.indexOf(" "+t+" ")>=0;)n=n.replace(" "+t+" "," ");e.className=n.replace(/^\s+|\s+$/g,"")}},i=function(e){var n=t.createElement("div");return n.appendChild(t.createTextNode(e)),n.innerHTML},u=function(e){e.style.opacity="",e.style.display="block"},c=function(e){if(e&&!e.length)return u(e);for(var t=0;t<e.length;++t)u(e[t])},d=function(e){e.style.opacity="",e.style.display="none"},f=function(e){if(e&&!e.length)return d(e);for(var t=0;t<e.length;++t)d(e[t])},p=function(e,t){for(var n=t.parentNode;null!==n;){if(n===e)return!0;n=n.parentNode}return!1},m=function(e){e.style.left="-9999px",e.style.display="block";var t,n=e.clientHeight;return t="undefined"!=typeof getComputedStyle?parseInt(getComputedStyle(e).getPropertyValue("padding-top"),10):parseInt(e.currentStyle.padding),e.style.left="",e.style.display="none","-"+parseInt((n+t)/2)+"px"},v=function(e,t){if(+e.style.opacity<1){t=t||16,e.style.opacity=0,e.style.display="block";var n=+new Date,o=function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){e.style.opacity=+e.style.opacity+(new Date-n)/100,n=+new Date,+e.style.opacity<1&&setTimeout(o,t)});o()}e.style.display="block"},y=function(e,t){t=t||16,e.style.opacity=1;var n=+new Date,o=function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){e.style.opacity=+e.style.opacity-(new Date-n)/100,n=+new Date,+e.style.opacity>0?setTimeout(o,t):e.style.display="none"});o()},h=function(n){if("function"==typeof MouseEvent){var o=new MouseEvent("click",{view:e,bubbles:!1,cancelable:!0});n.dispatchEvent(o)}else if(t.createEvent){var a=t.createEvent("MouseEvents");a.initEvent("click",!1,!1),n.dispatchEvent(a)}else t.createEventObject?n.fireEvent("onclick"):"function"==typeof n.onclick&&n.onclick()},g=function(t){"function"==typeof t.stopPropagation?(t.stopPropagation(),t.preventDefault()):e.event&&e.event.hasOwnProperty("cancelBubble")&&(e.event.cancelBubble=!0)};a.hasClass=r,a.addClass=s,a.removeClass=l,a.escapeHtml=i,a._show=u,a.show=c,a._hide=d,a.hide=f,a.isDescendant=p,a.getTopMargin=m,a.fadeIn=v,a.fadeOut=y,a.fireClick=h,a.stopEventPropagation=g},{}],5:[function(t,o,a){Object.defineProperty(a,"__esModule",{value:!0});var r=t("./handle-dom"),s=t("./handle-swal-dom"),l=function(t,o,a){var l=t||e.event,i=l.keyCode||l.which,u=a.querySelector("button.confirm"),c=a.querySelector("button.cancel"),d=a.querySelectorAll("button[tabindex]");if(-1!==[9,13,32,27].indexOf(i)){for(var f=l.target||l.srcElement,p=-1,m=0;m<d.length;m++)if(f===d[m]){p=m;break}9===i?(f=-1===p?u:p===d.length-1?d[0]:d[p+1],r.stopEventPropagation(l),f.focus(),o.confirmButtonColor&&s.setFocusStyle(f,o.confirmButtonColor)):13===i?("INPUT"===f.tagName&&(f=u,u.focus()),f=-1===p?u:n):27===i&&o.allowEscapeKey===!0?(f=c,r.fireClick(f,l)):f=n}};a["default"]=l,o.exports=a["default"]},{"./handle-dom":4,"./handle-swal-dom":6}],6:[function(n,o,a){var r=function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(a,"__esModule",{value:!0});var s=n("./utils"),l=n("./handle-dom"),i=n("./default-params"),u=r(i),c=n("./injected-html"),d=r(c),f=".sweet-alert",p=".sweet-overlay",m=function(){var e=t.createElement("div");for(e.innerHTML=d["default"];e.firstChild;)t.body.appendChild(e.firstChild)},v=function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){var e=t.querySelector(f);return e||(m(),e=v()),e}),y=function(){var e=v();return e?e.querySelector("input"):void 0},h=function(){return t.querySelector(p)},g=function(e,t){var n=s.hexToRgb(t);e.style.boxShadow="0 0 2px rgba("+n+", 0.8), inset 0 0 0 1px rgba(0, 0, 0, 0.05)"},b=function(n){var o=v();l.fadeIn(h(),10),l.show(o),l.addClass(o,"showSweetAlert"),l.removeClass(o,"hideSweetAlert"),e.previousActiveElement=t.activeElement;var a=o.querySelector("button.confirm");a.focus(),setTimeout(function(){l.addClass(o,"visible")},500);var r=o.getAttribute("data-timer");if("null"!==r&&""!==r){var s=n;o.timeout=setTimeout(function(){var e=(s||null)&&"true"===o.getAttribute("data-has-done-function");e?s(null):sweetAlert.close()},r)}},w=function(){var e=v(),t=y();l.removeClass(e,"show-input"),t.value=u["default"].inputValue,t.setAttribute("type",u["default"].inputType),t.setAttribute("placeholder",u["default"].inputPlaceholder),C()},C=function(e){if(e&&13===e.keyCode)return!1;var t=v(),n=t.querySelector(".sa-input-error");l.removeClass(n,"show");var o=t.querySelector(".sa-error-container");l.removeClass(o,"show")},S=function(){var e=v();e.style.marginTop=l.getTopMargin(v())};a.sweetAlertInitialize=m,a.getModal=v,a.getOverlay=h,a.getInput=y,a.setFocusStyle=g,a.openModal=b,a.resetInput=w,a.resetInputError=C,a.fixVerticalPosition=S},{"./default-params":2,"./handle-dom":4,"./injected-html":7,"./utils":9}],7:[function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var o='<div class="sweet-overlay" tabIndex="-1"></div><div class="sweet-alert"><div class="sa-icon sa-error">\n <span class="sa-x-mark">\n <span class="sa-line sa-left"></span>\n <span class="sa-line sa-right"></span>\n </span>\n </div><div class="sa-icon sa-warning">\n <span class="sa-body"></span>\n <span class="sa-dot"></span>\n </div><div class="sa-icon sa-info"></div><div class="sa-icon sa-success">\n <span class="sa-line sa-tip"></span>\n <span class="sa-line sa-long"></span>\n\n <div class="sa-placeholder"></div>\n <div class="sa-fix"></div>\n </div><div class="sa-icon sa-custom"></div><h2>Title</h2>\n <p>Text</p>\n <fieldset>\n <input type="text" tabIndex="3" />\n <div class="sa-input-error"></div>\n </fieldset><div class="sa-error-container">\n <div class="icon">!</div>\n <p>Not valid!</p>\n </div><div class="sa-button-container">\n <button class="cancel" tabIndex="2">Cancel</button>\n <button class="confirm" tabIndex="1">OK</button>\n </div></div>';n["default"]=o,t.exports=n["default"]},{}],8:[function(e,t,o){Object.defineProperty(o,"__esModule",{value:!0});var a=e("./utils"),r=e("./handle-swal-dom"),s=e("./handle-dom"),l=["error","warning","info","success","input","prompt"],i=function(e){var t=r.getModal(),o=t.querySelector("h2"),i=t.querySelector("p"),u=t.querySelector("button.cancel"),c=t.querySelector("button.confirm");if(o.innerHTML=e.html?e.title:s.escapeHtml(e.title).split("\n").join("<br>"),i.innerHTML=e.html?e.text:s.escapeHtml(e.text||"").split("\n").join("<br>"),e.text&&s.show(i),e.customClass)s.addClass(t,e.customClass),t.setAttribute("data-custom-class",e.customClass);else{var d=t.getAttribute("data-custom-class");s.removeClass(t,d),t.setAttribute("data-custom-class","")}if(s.hide(t.querySelectorAll(".sa-icon")),e.type&&!a.isIE8()){var f=function(){for(var o=!1,a=0;a<l.length;a++)if(e.type===l[a]){o=!0;break}if(!o)return logStr("Unknown alert type: "+e.type),{v:!1};var i=["success","error","warning","info"],u=n;-1!==i.indexOf(e.type)&&(u=t.querySelector(".sa-icon.sa-"+e.type),s.show(u));var c=r.getInput();switch(e.type){case"success":s.addClass(u,"animate"),s.addClass(u.querySelector(".sa-tip"),"animateSuccessTip"),s.addClass(u.querySelector(".sa-long"),"animateSuccessLong");break;case"error":s.addClass(u,"animateErrorIcon"),s.addClass(u.querySelector(".sa-x-mark"),"animateXMark");break;case"warning":s.addClass(u,"pulseWarning"),s.addClass(u.querySelector(".sa-body"),"pulseWarningIns"),s.addClass(u.querySelector(".sa-dot"),"pulseWarningIns");break;case"input":case"prompt":c.setAttribute("type",e.inputType),c.value=e.inputValue,c.setAttribute("placeholder",e.inputPlaceholder),s.addClass(t,"show-input"),setTimeout(function(){c.focus(),c.addEventListener("keyup",swal.resetInputError)},400)}}();if("object"==typeof f)return f.v}if(e.imageUrl){var p=t.querySelector(".sa-icon.sa-custom");p.style.backgroundImage="url("+e.imageUrl+")",s.show(p);var m=80,v=80;if(e.imageSize){var y=e.imageSize.toString().split("x"),h=y[0],g=y[1];h&&g?(m=h,v=g):logStr("Parameter imageSize expects value with format WIDTHxHEIGHT, got "+e.imageSize)}p.setAttribute("style",p.getAttribute("style")+"width:"+m+"px; height:"+v+"px")}t.setAttribute("data-has-cancel-button",e.showCancelButton),e.showCancelButton?u.style.display="inline-block":s.hide(u),t.setAttribute("data-has-confirm-button",e.showConfirmButton),e.showConfirmButton?c.style.display="inline-block":s.hide(c),e.cancelButtonText&&(u.innerHTML=s.escapeHtml(e.cancelButtonText)),e.confirmButtonText&&(c.innerHTML=s.escapeHtml(e.confirmButtonText)),e.confirmButtonColor&&(c.style.backgroundColor=e.confirmButtonColor,r.setFocusStyle(c,e.confirmButtonColor)),t.setAttribute("data-allow-outside-click",e.allowOutsideClick);var b=e.doneFunction?!0:!1;t.setAttribute("data-has-done-function",b),e.animation?"string"==typeof e.animation?t.setAttribute("data-animation",e.animation):t.setAttribute("data-animation","pop"):t.setAttribute("data-animation","none"),t.setAttribute("data-timer",e.timer)};o["default"]=i,t.exports=o["default"]},{"./handle-dom":4,"./handle-swal-dom":6,"./utils":9}],9:[function(t,n,o){Object.defineProperty(o,"__esModule",{value:!0});var a=function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},r=function(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?parseInt(t[1],16)+", "+parseInt(t[2],16)+", "+parseInt(t[3],16):null},s=function(){return e.attachEvent&&!e.addEventListener},l=function(t){e.console&&e.console.log("SweetAlert: "+t)},i=function(e,t){e=String(e).replace(/[^0-9a-f]/gi,""),e.length<6&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),t=t||0;var n,o,a="#";for(o=0;3>o;o++)n=parseInt(e.substr(2*o,2),16),n=Math.round(Math.min(Math.max(0,n+n*t),255)).toString(16),a+=("00"+n).substr(n.length);return a};o.extend=a,o.hexToRgb=r,o.isIE8=s,o.logStr=l,o.colorLuminance=i},{}]},{},[1]),"function"==typeof define&&define.amd?define(function(){return sweetAlert}):"undefined"!=typeof module&&module.exports&&(module.exports=sweetAlert)}(window,document);
\ No newline at end of file
......@@ -90,7 +90,6 @@
method="officeDetail">
<result name="officeDetail">/jfcas04/officeDetail.jsp</result>
</action>
<action name="userchoiceData_*" class="com.jw.app.userchoice.action.dataAction" method="{1}">
<result name="json" type="json">
<param name="root">jsonObject</param>
......@@ -330,5 +329,70 @@
<action name="jfcas" class="com.gaowj.system.login.CasAction">
</action>
<!-- 移动端登录页 -->
<action name="mobileIndex" class="com.jw.app.portlet.action.viewAction"
method="mobileIndex">
<result name="mobileIndex">/jfcas04_mobile/mobileIndex.jsp</result>
</action>
<!-- 移动端登录成功页-->
<action name="mobileIndexcg" class="com.jw.app.portlet.action.viewAction"
method="mobileIndexcg">
<result name="mobileIndexcg">/jfcas04_mobile/mobileIndexcg.jsp</result>
</action>
<!-- 移动端下载页-->
<action name="mobileDownload" class="com.jw.app.portlet.action.viewAction"
method="mobileDownload">
<result name="mobileDownload">/jfcas04_mobile/mobileDownload.jsp</result>
</action>
<!-- 移动端抽奖页-->
<action name="mobileLotterydraw" class="com.jw.app.portlet.action.viewAction"
method="mobileLotterydraw">
<result name="mobileLotterydraw">/jfcas04_mobile/mobileLotterydraw.jsp</result>
</action>
<!-- 移动端会议纪要页-->
<action name="mobileSummary" class="com.jw.app.portlet.action.viewAction"
method="mobileSummary">
<result name="mobileSummary">/jfcas04_mobile/mobileSummary.jsp</result>
</action>
<!-- 移动端投票编辑页-->
<action name="mobileVote" class="com.jw.app.portlet.action.viewAction"
method="mobileVote">
<result name="mobileVote">/jfcas04_mobile/mobileVote.jsp</result>
</action>
<!-- 移动端投票详情页-->
<action name="mobileVotecheck" class="com.jw.app.portlet.action.viewAction"
method="mobileVotecheck">
<result name="mobileVotecheck">/jfcas04_mobile/mobileVotecheck.jsp</result>
</action>
<!-- 移动端投票结果页-->
<action name="mobileVoteresult" class="com.jw.app.portlet.action.viewAction"
method="mobileVoteresult">
<result name="mobileVoteresult">/jfcas04_mobile/mobileVoteresult.jsp</result>
</action>
<!-- 移动端投票主题页-->
<action name="mobileVotetopic" class="com.jw.app.portlet.action.viewAction"
method="mobileVotetopic">
<result name="mobileVotetopic">/jfcas04_mobile/mobileVotetopic.jsp</result>
</action>
<!-- 移动端二维码页-->
<action name="mobileTwo" class="com.jw.app.portlet.action.viewAction"
method="mobileTwo">
<result name="mobileTwo">/jfcas04_mobile/mobileTwo.jsp</result>
</action>
<!-- 移动端投票主题浏览页(用户)-->
<action name="mobileVotebrowse" class="com.jw.app.portlet.action.viewAction"
method="mobileVotebrowse">
<result name="mobileVotebrowse">/jfcas04_mobile/mobileVotebrowse.jsp</result>
</action>
<!-- 移动端投票页-->
<action name="mobileVotedetails" class="com.jw.app.portlet.action.viewAction"
method="mobileVotedetails">
<result name="mobileVotedetails">/jfcas04_mobile/mobileVotedetails.jsp</result>
</action>
<!-- 移动端投票主题浏览页(管理员)-->
<action name="mobileVotemajor" class="com.jw.app.portlet.action.viewAction"
method="mobileVotemajor">
<result name="mobileVotemajor">/jfcas04_mobile/mobileVotemajor.jsp</result>
</action>
</package>
</struts>
......@@ -262,7 +262,6 @@ public class VoteBusinessImpl implements VoteBusiness {
throws BusinessException {
// 计算起始记录
query.put("STATUS_FLAG", 1);
query.put("USER_ID", SessionUtil.getEmname());
int pageStart = (pageNo - 1) * pageSize;
// 获取列表
......
......@@ -63,4 +63,55 @@ public class viewAction extends BasicAction {
return "officeDetail";
}
public String mobileIndex() throws BusinessException {
return "mobileIndex";
}
public String mobileIndexcg() throws BusinessException {
return "mobileIndexcg";
}
public String mobileDownload() throws BusinessException {
return "mobileDownload";
}
public String mobileLotterydraw() throws BusinessException {
return "mobileLotterydraw";
}
public String mobileSummary() throws BusinessException {
return "mobileSummary";
}
public String mobileVote() throws BusinessException {
return "mobileVote";
}
public String mobileVotecheck() throws BusinessException {
return "mobileVotecheck";
}
public String mobileVoteresult() throws BusinessException {
return "mobileVoteresult";
}
public String mobileVotetopic() throws BusinessException {
return "mobileVotetopic";
}
public String mobileTwo() throws BusinessException {
return "mobileTwo";
}
public String mobileVotebrowse() throws BusinessException {
return "mobileVotebrowse";
}
public String mobileVotedetails() throws BusinessException {
return "mobileVotedetails";
}
public String mobileVotemajor() throws BusinessException {
return "mobileVotemajor";
}
}
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