初次上传
286
assets/css/common.css
Normal file
@ -0,0 +1,286 @@
|
||||
.center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.ml-0 {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.ml-10 {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.ml-20 {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.ml-30 {
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
.mr-0 {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.mr-10 {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.mr-20 {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.mr-30 {
|
||||
margin-right: 30px;
|
||||
}
|
||||
|
||||
.mt-10 {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.mt-20 {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.mt-30 {
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.mt-50 {
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
.mb-0 {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.mb-10 {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.mb-20 {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
|
||||
.pd-5 {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.pd-10 {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.pd-20 {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.pl-20 {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.left {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.right {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.clear {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.must {
|
||||
color: #FF5722;
|
||||
}
|
||||
|
||||
.fs-16 {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.fs-20 {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.w-100 {
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.color-green {
|
||||
color: #009688;
|
||||
}
|
||||
|
||||
.color-red {
|
||||
color: #ff0000;
|
||||
}
|
||||
|
||||
.color-my {
|
||||
color: #aacf53;
|
||||
}
|
||||
|
||||
.window {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.layui-layout-admin .layui-body {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.layui-btn-normal {
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
/*.layui-elem-quote {
|
||||
border-left: 5px solid #1E9FFF;
|
||||
}*/
|
||||
|
||||
.layui-nav-item .layui-nav-child a {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.layui-tab-title li {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.layui-col-xs12 {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.layui-tab-brief > .layui-tab-more li.layui-this:after, .layui-tab-brief > .layui-tab-title .layui-this:after {
|
||||
border-bottom: 4px solid #5FB878;
|
||||
}
|
||||
|
||||
.tip {
|
||||
text-align: center;
|
||||
color: #999;
|
||||
font-size: 16px;
|
||||
padding: 20px;
|
||||
}
|
||||
.tips {
|
||||
color: #F00;
|
||||
padding: 10px;
|
||||
border-width: 0 0 0 5px;
|
||||
border-style: solid;
|
||||
border-color: #FF5722;
|
||||
}
|
||||
|
||||
.none-tips {
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
color: #CCC;
|
||||
}
|
||||
|
||||
.layui-tab[overflow] > .layui-tab-title, .layui-tab > .layui-tab-title {
|
||||
overflow-x: scroll;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
.layui-tab[overflow] > .layui-tab-title::-webkit-scrollbar, .layui-tab > .layui-tab-title::-webkit-scrollbar {
|
||||
display: none
|
||||
}
|
||||
|
||||
.layui-form-mid {
|
||||
margin: 0 5px 0 5px;
|
||||
}
|
||||
|
||||
.long-item .layui-input {
|
||||
display: inline-block;
|
||||
width: 90%;
|
||||
|
||||
}
|
||||
|
||||
.del-btn {
|
||||
position: relative;
|
||||
top: -30px;
|
||||
right: -60px;
|
||||
}
|
||||
|
||||
.layui-tab-bar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.layui-badge {
|
||||
padding: 3px 6px;
|
||||
}
|
||||
|
||||
.add-popup, .edit-popup {
|
||||
padding: 30px;
|
||||
}
|
||||
|
||||
|
||||
/*自定义弹出框*/
|
||||
.cardWrapper.active {
|
||||
pointer-events: all;
|
||||
z-index: 1;
|
||||
animation: fadeIn 0.5s ease-in-out both 0.5s;
|
||||
}
|
||||
.cardWrapper {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
border-radius: 3px;
|
||||
background-color: white;
|
||||
width: 250px;
|
||||
overflow: hidden;
|
||||
z-index: 0;
|
||||
box-shadow: 5px 10px 10px 0px rgba(0, 0, 0, 0.1);
|
||||
pointer-events: none;
|
||||
opacity: 0;
|
||||
transform: scale(0.5);
|
||||
}
|
||||
.cardWrapper .textWrapper {
|
||||
padding: 30px 20px;
|
||||
text-align: center;
|
||||
}
|
||||
.textWrapper .title {
|
||||
font-weight: bold;
|
||||
color: #616e7d;
|
||||
font-size: 14px;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
.cardWrapper .button {
|
||||
text-align: center;
|
||||
padding: 10px 0;
|
||||
color: white;
|
||||
background-color: #3ca7fb;
|
||||
width: 100%;
|
||||
border-radius: 0 0 3px 3px;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
/*number类型输入框去除上下箭头*/
|
||||
input::-webkit-outer-spin-button,
|
||||
input::-webkit-inner-spin-button {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
input[type="number"]{
|
||||
-moz-appearance: textfield;
|
||||
}
|
||||
|
||||
|
||||
.footer {
|
||||
margin-top: 20px;
|
||||
width: 100%;
|
||||
background: #141a25;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.footer .tip {
|
||||
opacity: 0.4;
|
||||
width: 1200px;
|
||||
margin: 0 auto;
|
||||
border-top: 1px solid hsla(0,0%,100%,.4);
|
||||
padding: 15px 0;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.footer .tip a {
|
||||
color: #fff;
|
||||
}
|
||||
314
assets/css/info.css
Normal file
@ -0,0 +1,314 @@
|
||||
.bg {
|
||||
background: #FFF;
|
||||
}
|
||||
|
||||
.layui-header {
|
||||
margin-bottom: 10px;
|
||||
min-width: 1000px;
|
||||
background: #fff;
|
||||
border-bottom: 1px solid #1E9FFF;
|
||||
}
|
||||
|
||||
.layui-layout-admin .layui-main {
|
||||
width: 1000px;
|
||||
}
|
||||
|
||||
.layui-header .logo {
|
||||
line-height: 60px;
|
||||
text-align: center;
|
||||
font-size: 28px;
|
||||
font-weight: bold;
|
||||
color: #1E9FFF;
|
||||
}
|
||||
|
||||
.layui-header .layui-nav-bar {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.layui-header .layui-layout-right {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
|
||||
.title2 {
|
||||
padding: 10px 40px;
|
||||
font-size: 16px;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.demo-img {
|
||||
border: 2px solid #CCCCCC;
|
||||
}
|
||||
|
||||
.border-blue {
|
||||
border-color: #1E9FFF;
|
||||
}
|
||||
|
||||
.layui-badge {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
padding: 2px 10px;
|
||||
}
|
||||
|
||||
.layui-upload-drag .layui-icon {
|
||||
color: #1E9FFF;
|
||||
}
|
||||
|
||||
.layui-form .layui-form-item .layui-upload-drag img {
|
||||
margin-bottom: 10px;
|
||||
max-width: 100px;
|
||||
}
|
||||
|
||||
.layui-show-drag {
|
||||
position: relative;
|
||||
padding: 15px;
|
||||
border: 1px dashed #e2e2e2;
|
||||
background-color: #fff;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
color: #999;
|
||||
height: 162px;
|
||||
width: 265px;
|
||||
}
|
||||
|
||||
.layui-upload-drag {
|
||||
padding: 30px 50px;
|
||||
}
|
||||
|
||||
.layui-form-radio>i:hover,
|
||||
.layui-form-radioed>i {
|
||||
color: #1E9FFF;
|
||||
}
|
||||
|
||||
.layui-form-select dl dd.layui-this {
|
||||
background-color: #1E9FFF;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.layui-disabled {
|
||||
color: #cccccc !important;
|
||||
}
|
||||
|
||||
.link {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #1E9FFF;
|
||||
}
|
||||
|
||||
.examInfo_h .exam-title {
|
||||
width: 152px;
|
||||
}
|
||||
|
||||
.recommend-box .layui-form-item {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/*
|
||||
.photo-div img {
|
||||
max-height: 100%;
|
||||
max-width: 100%;
|
||||
}*/
|
||||
.swiper-container {
|
||||
width: 800px;
|
||||
height: 500px;
|
||||
}
|
||||
|
||||
.swiper-slide {
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
background: #fff;
|
||||
|
||||
/* Center slide text vertically */
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
-webkit-justify-content: center;
|
||||
justify-content: center;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
-webkit-align-items: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.score-item .layui-inline {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.score-content .layui-input {
|
||||
border-width: 0 0 1px 0;
|
||||
}
|
||||
|
||||
.end-tip-div {
|
||||
width: 800px;
|
||||
text-align: center;
|
||||
padding: 10px;
|
||||
margin: 30px auto 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: 2px dashed #CCC;
|
||||
background-color: #fbfbfb;
|
||||
|
||||
}
|
||||
|
||||
.end-tip-div .end-img-div,
|
||||
.end-tip-div .end-text-div {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.end-tip-div .end-text-div {
|
||||
font-size: 18px;
|
||||
text-align: left;
|
||||
line-height: 34px;
|
||||
padding: 50px;
|
||||
}
|
||||
|
||||
.icon-div {
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.layui-form-radio {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.layui-form input[type=checkbox],
|
||||
.layui-form input[type=radio],
|
||||
.layui-form select {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.radioBox {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.radioBox label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.radioBox label input {
|
||||
margin-right: 5px !important;
|
||||
}
|
||||
|
||||
.sexBox {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.sexRows {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.nationBox .layui-form input[type=checkbox],
|
||||
.nationBox .layui-form input[type=radio],
|
||||
.layui-form select {
|
||||
/* display: none !important; */
|
||||
}
|
||||
|
||||
.sexBox .nationBox .layui-form input[type=checkbox],
|
||||
.sexBox .layui-form input[type=radio],
|
||||
.sexBox .layui-form select {
|
||||
display: block !important;
|
||||
}
|
||||
/* .layui-form select {
|
||||
display: none !important;
|
||||
} */
|
||||
|
||||
.layui-form-select .layui-input,.layui-form-select .layui-edge{
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
#hukouProvince{
|
||||
display: block;
|
||||
height: 38px;
|
||||
width: 100%;
|
||||
box-shadow: none;
|
||||
border: 1px solid #e6e6e6;
|
||||
}
|
||||
|
||||
#hukouCity{
|
||||
display: block;
|
||||
height: 38px;
|
||||
width: 100%;
|
||||
box-shadow: none;
|
||||
border: 1px solid #e6e6e6;
|
||||
}
|
||||
|
||||
#hukouCounty,#nation,#graduateProvince,#graduateCity,#graduateCounty
|
||||
,#special_i,#special_ii,#special_iii,#gaokaoEnrollProvince,
|
||||
#gaokaoEnrollCity,#gaokaoEnrollCounty,#preGroupId{
|
||||
display: block;
|
||||
height: 38px;
|
||||
width: 100%;
|
||||
box-shadow: none;
|
||||
border: 1px solid #e6e6e6;
|
||||
}
|
||||
|
||||
.layui-form-item .layui-input-inline{
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.df{
|
||||
display: flex !important;
|
||||
}
|
||||
|
||||
.df .layui-input-inline{
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
@media (max-width:1000px) {
|
||||
.layui-header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.layui-side {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.layui-body {
|
||||
position: relative !important;
|
||||
top: 0 !important;
|
||||
left: 0 !important;
|
||||
}
|
||||
|
||||
.layui-layout-body {
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.pic .layui-field-box{
|
||||
padding: 0 !important;
|
||||
display: flex !important;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.sexBox{
|
||||
padding-top: 10px;
|
||||
}
|
||||
.layui-form-item .layui-form-label{
|
||||
width: auto ;
|
||||
}
|
||||
|
||||
.flyBox{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.flyBox .layui-form-label{
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#upload{
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
}
|
||||
58
assets/css/nav.css
Normal file
@ -0,0 +1,58 @@
|
||||
.remind {
|
||||
color: #FF5722;
|
||||
}
|
||||
|
||||
.layui-timeline .layui-icon {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.unSuc {
|
||||
text-align: center;
|
||||
width: 300px;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.layui-timeline {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.link {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.layui-icon {
|
||||
color: #1E9FFF;
|
||||
}
|
||||
|
||||
.tips {
|
||||
color: #F00;
|
||||
padding: 5px;
|
||||
border-width: 0 0 0 5px;
|
||||
border-style: solid;
|
||||
border-color: #FF5722;
|
||||
}
|
||||
|
||||
.pay-item {
|
||||
width: 500px;
|
||||
padding: 20px;
|
||||
border-radius: 20px 0;
|
||||
border: 1px solid #CCC;
|
||||
box-shadow: 5px 5px 10px #CCC;
|
||||
}
|
||||
|
||||
.pay-detail p {
|
||||
line-height: 30px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.pay-detail .payQrCode {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
/*width: 120px;*/
|
||||
/*height: 120px;*/
|
||||
}
|
||||
|
||||
.pay-detail .validTime {
|
||||
color: #F00;
|
||||
}
|
||||
153
assets/js/common.js
Normal file
@ -0,0 +1,153 @@
|
||||
layui.use(['jquery', 'form', 'layer', 'element'], function () {
|
||||
var $ = layui.$;
|
||||
var form = layui.form;
|
||||
var layer = layui.layer;
|
||||
var element = layui.element;
|
||||
|
||||
/** 下拉框 必填验证 */
|
||||
form.verify({
|
||||
otherReq: function (value, item) {
|
||||
var verifyName = $(item).attr('name')
|
||||
, verifyType = $(item).attr('type')
|
||||
, formElem = $(item).parents('.layui-form')//获取当前所在的form元素,如果存在的话
|
||||
, verifyElem = formElem.find('input[name=' + verifyName + ']')//获取需要校验的元素
|
||||
, isTrue = verifyElem.is(':checked')//是否命中校验
|
||||
, focusElem = verifyElem.next().find('i.layui-icon');//焦点元素
|
||||
if (!isTrue || !value) {
|
||||
console.log(verifyName);
|
||||
//定位焦点
|
||||
focusElem.css(verifyType == 'radio' ? {"color": "#FF5722"} : {"border-color": "#FF5722"});
|
||||
//对非输入框设置焦点
|
||||
focusElem.first().attr("tabIndex", "1").css("outline", "0").blur(function () {
|
||||
focusElem.css(verifyType == 'radio' ? {"color": ""} : {"border-color": ""});
|
||||
}).focus();
|
||||
return '必选项不能为空';
|
||||
}
|
||||
},
|
||||
required: function (value, item) {
|
||||
var verifyName = $(item).attr('name')
|
||||
, formElem = $(item).parents('.layui-form')//获取当前所在的form元素,如果存在的话
|
||||
, verifyElem = formElem.find('input[name=' + verifyName + ']');//获取需要校验的元素
|
||||
if (!value) {
|
||||
console.log(verifyName);
|
||||
//定位焦点
|
||||
verifyElem.css({"border-color": "#FF5722"});
|
||||
//对输入框设置焦点
|
||||
verifyElem.first().attr("tabIndex", "1").css("outline", "0").blur(function () {
|
||||
verifyElem.css({"border-color": ""});
|
||||
}).focus();
|
||||
return '必填项不能为空';
|
||||
}
|
||||
},
|
||||
requiredSelect: function (value, item) {
|
||||
var $ = layui.$;
|
||||
var verifyName = $(item).attr('name')
|
||||
, formElem = $(item).parents('.layui-form')//获取当前所在的form元素,如果存在的话
|
||||
, verifyElem = formElem.find('select[name=' + verifyName + ']');//获取需要校验的元素
|
||||
if (!value) {
|
||||
console.log(verifyName);
|
||||
//定位焦点
|
||||
verifyElem.css({"border-color": "#FF5722"});
|
||||
//对下拉框设置焦点
|
||||
formElem.find('select[name=' + verifyName + ']').first().next().find(".layui-input").attr("tabIndex", "1").css("outline", "0").blur(function () {
|
||||
verifyElem.css({"border-color": ""});
|
||||
}).focus();
|
||||
return '必选项不能为空';
|
||||
}
|
||||
},
|
||||
requiredTa: function (value, item) {
|
||||
var verifyName = $(item).attr('name')
|
||||
, formElem = $(item).parents('.layui-form')//获取当前所在的form元素,如果存在的话
|
||||
, verifyElem = formElem.find('textarea[name=' + verifyName + ']');//获取需要校验的元素
|
||||
if (!value) {
|
||||
console.log(verifyName);
|
||||
//定位焦点
|
||||
verifyElem.css({"border-color": "#FF5722"});
|
||||
//对输入框设置焦点
|
||||
verifyElem.first().attr("tabIndex", "1").css("outline", "0").blur(function () {
|
||||
verifyElem.css({"border-color": ""});
|
||||
}).focus();
|
||||
return '必填项不能为空';
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
layer.photos({
|
||||
photos: '.photo'
|
||||
, anim: 5
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
/** 成功提示 */
|
||||
function showOkMsg(msg) {
|
||||
layer.msg(msg, {
|
||||
icon: 1
|
||||
});
|
||||
}
|
||||
|
||||
/** 父页面成功提示 */
|
||||
function parentShowOkMsg(msg) {
|
||||
parent.layer.msg(msg, {
|
||||
icon: 1
|
||||
});
|
||||
parent.layer.closeAll('iframe');
|
||||
}
|
||||
|
||||
/** 失败提示 */
|
||||
function showFailMsg(msg) {
|
||||
layer.msg(msg, {
|
||||
icon: 7,
|
||||
anim: 6
|
||||
});
|
||||
}
|
||||
|
||||
/** 弹框提示 */
|
||||
function showAlert(msg) {
|
||||
layer.alert(msg, {title: '提示', icon: 7});
|
||||
}
|
||||
|
||||
/** 弹框提示并跳转页面 */
|
||||
function showAlertAndJump(msg, url) {
|
||||
layer.alert(msg, {
|
||||
closeBtn: 0,
|
||||
icon: 1,
|
||||
title: '提示'
|
||||
}, function (index) {
|
||||
jumpToUrl(url);
|
||||
layer.close(index);
|
||||
});
|
||||
}
|
||||
|
||||
/** 网页跳转 */
|
||||
function jumpToUrl(url) {
|
||||
top.location = url;
|
||||
}
|
||||
|
||||
/** 根据身份证号计算年龄 */
|
||||
function getAgeByIdentity(identity) {
|
||||
var len = (identity + "").length;
|
||||
if (len == 0) {
|
||||
return 0;
|
||||
} else {
|
||||
if ((len != 15) && (len != 18)){//身份证号码只能为15位或18位其它不合法
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
var strBirthday = "";
|
||||
if (len == 18){//处理18位的身份证号码从号码中得到生日和性别代码
|
||||
strBirthday = identity.substr(6, 4) + "/" + identity.substr(10, 2) + "/" + identity.substr(12, 2);
|
||||
}
|
||||
if (len == 15) {
|
||||
strBirthday = "19" + identity.substr(6, 2) + "/" + identity.substr(8, 2) + "/" + identity.substr(10, 2);
|
||||
}
|
||||
//时间字符串里,必须是“/”
|
||||
var birthDate = new Date(strBirthday);
|
||||
var nowDateTime = new Date();
|
||||
var age = nowDateTime.getFullYear() - birthDate.getFullYear();
|
||||
//再考虑月、天的因素;.getMonth()获取的是从0开始的,这里进行比较,不需要加1
|
||||
if (nowDateTime.getMonth() < birthDate.getMonth() || (nowDateTime.getMonth() == birthDate.getMonth() && nowDateTime.getDate() < birthDate.getDate())) {
|
||||
age--;
|
||||
}
|
||||
return age;
|
||||
}
|
||||
41
assets/js/follow.js
Normal file
@ -0,0 +1,41 @@
|
||||
layui.use(['element', 'layer', 'jquery'], function () {
|
||||
var element = layui.element,
|
||||
layer = layui.layer,
|
||||
$ = layui.jquery;
|
||||
|
||||
$.ajax({
|
||||
url : '/info/checkOpenId',
|
||||
type : 'get',
|
||||
success : function(data) {
|
||||
if (data.state == 'ok') {
|
||||
parent.layer.closeAll('iframe');
|
||||
} else {
|
||||
if ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))) {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
area: ['80%', '500px'],
|
||||
maxmin: false,
|
||||
resize: false,
|
||||
closeBtn: false,
|
||||
skin:'anno-content',
|
||||
content: '/info/follow'
|
||||
});
|
||||
} else {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
area: ['500px', '500px'],
|
||||
maxmin: false,
|
||||
resize: false,
|
||||
closeBtn: false,
|
||||
skin:'anno-content',
|
||||
content: '/info/follow'
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
1413
assets/js/info.js
Normal file
386
assets/js/nav.js
Normal file
@ -0,0 +1,386 @@
|
||||
layui.use(['element', 'upload', 'jquery', 'form', 'util'], function () {
|
||||
|
||||
var element = layui.element;
|
||||
var upload = layui.upload;
|
||||
var $ = layui.jquery;
|
||||
var form = layui.form;
|
||||
var util = layui.util;
|
||||
|
||||
var demoListView = $('#demoList')
|
||||
, uploadListIns = upload.render({
|
||||
elem: '#selectPhoto'
|
||||
, url: '/nav/uploadHonor' //改成您自己的上传接口
|
||||
, accept: 'image'
|
||||
, acceptMime: 'image/*'
|
||||
, multiple: true
|
||||
, auto: false
|
||||
, bindAction: '#startUpload'
|
||||
, before: function (obj) {
|
||||
layer.msg('正在上传,请稍候...', {time: 0});
|
||||
}
|
||||
, choose: function (obj) {
|
||||
var files = this.files = obj.pushFile(); //将每次选择的文件追加到文件队列
|
||||
//读取本地文件
|
||||
obj.preview(function (index, file, result) {
|
||||
var tr = $(['<tr id="upload-' + index + '">'
|
||||
, '<td>' + file.name + '</td>'
|
||||
, '<td>' + (file.size / 1024).toFixed(1) + 'kb</td>'
|
||||
, '<td>等待上传</td>'
|
||||
, '<td>'
|
||||
, '<button class="layui-btn layui-btn-xs reload layui-hide">重传</button>'
|
||||
, '<button class="layui-btn layui-btn-xs layui-btn-danger delete">删除</button>'
|
||||
, '</td>'
|
||||
, '</tr>'].join(''));
|
||||
|
||||
//删除
|
||||
tr.find('.delete').on('click', function () {
|
||||
delete files[index]; //删除对应的文件
|
||||
tr.remove();
|
||||
uploadListIns.config.elem.next()[0].value = ''; //清空 input file 值,以免删除后出现同名文件不可选
|
||||
});
|
||||
|
||||
demoListView.append(tr);
|
||||
});
|
||||
}
|
||||
, done: function (res, index, upload) {
|
||||
layer.closeAll();
|
||||
if (res.state == 'ok') { //上传成功
|
||||
var tr = demoListView.find('tr#upload-' + index)
|
||||
, tds = tr.children();
|
||||
tds.eq(2).html('<span style="color: #5FB878;">上传成功</span>');
|
||||
tds.eq(3).html(''); //清空操作
|
||||
$(".honor-div").append('<div class="layui-col-md4">' +
|
||||
' <div class="center pd-5 photo" >' +
|
||||
' <img src="' + res.honorUrl + '" alt="' + res.honorName + '" style="max-width: 100%; max-height: 200px;">' +
|
||||
' </div>' +
|
||||
' <p class="center">' + res.honorName + '</p>' +
|
||||
' </div>');
|
||||
return delete this.files[index]; //删除文件队列已经上传成功的文件
|
||||
} else {
|
||||
var tr = demoListView.find('tr#upload-' + index),
|
||||
tds = tr.children();
|
||||
tds.eq(2).html('<span style="color: #FF5722;">' + res.msg + '</span>');
|
||||
}
|
||||
}
|
||||
, error: function (index, msg) {
|
||||
var tr = demoListView.find('tr#upload-' + index),
|
||||
tds = tr.children();
|
||||
tds.eq(2).html('<span style="color: #FF5722;">上传失败</span>');
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.deleteHonor', function () {
|
||||
var $this = $(this);
|
||||
var photoid = $(this).data("photoid");
|
||||
var honorname = $(this).data("honorname");
|
||||
$.ajax({
|
||||
url: '/nav/deleteHonor',
|
||||
type: 'post',
|
||||
data: {
|
||||
photoId: photoid,
|
||||
honorName: honorname
|
||||
},
|
||||
dataType: 'json',
|
||||
beforeSend: function () {
|
||||
layer.load(2);
|
||||
},
|
||||
success: function (res) {
|
||||
layer.closeAll('loading');
|
||||
if (res.state == 'ok') {
|
||||
showOkMsg(res.msg);
|
||||
$this.parents(".layui-col-md4:first").remove();
|
||||
} else if (res.state == 'fail') {
|
||||
showFailMsg(res.msg);
|
||||
} else if (res.state == 'over') {
|
||||
jumpToUrl(res.url);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '#reapply', function () {
|
||||
$(this).attr("disabled", "disabled").css("background-color", "#CCC").text("刷新后再试");
|
||||
layer.confirm("请确定再次申请到我校复读吗?", {icon: 3, title: '提示'}, function (index) {
|
||||
$.ajax({
|
||||
url: '/info/reapply',
|
||||
type: 'post',
|
||||
data: {},
|
||||
dataType: 'json',
|
||||
beforeSend: function () {
|
||||
layer.load(2);
|
||||
},
|
||||
success: function (res) {
|
||||
layer.closeAll('loading');
|
||||
if (res.state == 'ok') {
|
||||
showAlertAndJump(res.msg, res.url);
|
||||
} else if (res.state == 'fail') {
|
||||
showFailMsg(res.msg);
|
||||
} else if (res.state == 'over') {
|
||||
jumpToUrl(res.url);
|
||||
}
|
||||
}
|
||||
});
|
||||
layer.close(index);
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '#returnFee', function () {
|
||||
$(this).attr("disabled", "disabled").css("background-color", "#CCC").text("刷新后再试");
|
||||
|
||||
if((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))) {
|
||||
layer.open({
|
||||
type: 2,
|
||||
area: ['90%', '80%'],
|
||||
title: '<i class="layui-icon layui-icon-rmb"></i> 申请退费',
|
||||
content: '/info/applyReturnFee'
|
||||
});
|
||||
}else {
|
||||
layer.open({
|
||||
type: 2,
|
||||
area: ['500px', '700px'],
|
||||
title: '<i class="layui-icon layui-icon-rmb"></i> 申请退费',
|
||||
content: '/info/applyReturnFee'
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
$(document).on('click', '#returnFee_m', function () {
|
||||
$(this).attr("disabled", "disabled").css("background-color", "#CCC").text("刷新后再试");
|
||||
layer.open({
|
||||
type: 2,
|
||||
area: ['95%', '80%'],
|
||||
title: '<i class="layui-icon layui-icon-rmb"></i> 申请退费',
|
||||
content: '/info/applyReturnFee'
|
||||
});
|
||||
});
|
||||
|
||||
// 监听获取账单
|
||||
form.on('submit(applyQrCode)', function (data) {
|
||||
let payType = data.field.payType;
|
||||
if (!payType) {
|
||||
showAlert("请选择支付方式");
|
||||
return false;
|
||||
}
|
||||
$('#applyQrCode').addClass("layui-hide");
|
||||
$("#payQrCode").html("");
|
||||
$(".pay-item input").attr('disabled', true);
|
||||
|
||||
$.ajax({
|
||||
url: '/nav/applyQrCode',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
payType: payType
|
||||
},
|
||||
beforeSend: function () {
|
||||
layer.msg('正在生成账单...', {
|
||||
icon: 16,
|
||||
shade: 0.2,
|
||||
time: 0
|
||||
});
|
||||
},
|
||||
success: function (res) {
|
||||
console.log(res.data);
|
||||
layer.closeAll("dialog");
|
||||
if (res.state == 'OK') {
|
||||
var d = res.data;
|
||||
// 设置缴费方式
|
||||
if (d.payType == 'W01') {
|
||||
$('.pay-detail .payType').removeClass("layui-hide");
|
||||
$('.pay-detail .payType b').text("微信");
|
||||
} else if (d.payType == 'A01') {
|
||||
$('.pay-detail .payType').removeClass("layui-hide");
|
||||
$('.pay-detail .payType b').text("支付宝");
|
||||
} else if (d.payType == 'U01') {
|
||||
$('.pay-detail .payType').removeClass("layui-hide");
|
||||
$('.pay-detail .payType b').text("银联");
|
||||
}
|
||||
$('.pay-detail .items').text(d.items); // 设置缴费详情
|
||||
$('.pay-detail .amount').text(d.amount); // 设置缴费金额
|
||||
// 生成二维码
|
||||
new QRCode("payQrCode", {
|
||||
text: d.qrCode,
|
||||
width: d.qrCode.length > 100 ? 200 : 120,
|
||||
height: d.qrCode.length > 100 ? 200 : 120,
|
||||
colorDark: "#000000",
|
||||
colorLight: "#ffffff",
|
||||
correctLevel: QRCode.CorrectLevel.H
|
||||
});
|
||||
// 设置剩余时间
|
||||
$('.validTime').html("");
|
||||
TimeDown($('.validTime'), d.validTime);
|
||||
// 显示区域
|
||||
$(".pay-detail").slideDown(500);
|
||||
} else if (res.state == 'FAIL') {
|
||||
$(".pay-detail").addClass("layui-hide");
|
||||
$('#applyQrCode').removeClass("layui-hide");
|
||||
$(".pay-item input").attr('disabled', false);
|
||||
showAlert(res.msg);
|
||||
} else if (res.state == 'over') {
|
||||
jumpToUrl(res.url);
|
||||
}
|
||||
}, error: function () {
|
||||
layer.closeAll("dialog");
|
||||
$(".pay-detail").addClass("layui-hide");
|
||||
$('#applyQrCode').removeClass("layui-hide");
|
||||
$(".pay-item input").attr('disabled', false);
|
||||
showAlert("服务器开小差了,生成账单失败。")
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
// 倒计时
|
||||
function TimeDown(dom, validTime) {
|
||||
//倒计时的总秒数
|
||||
var totalSeconds = parseInt(validTime / 1000);
|
||||
|
||||
//小时数
|
||||
var hours = Math.floor(totalSeconds / (60 * 60));
|
||||
totalSeconds = totalSeconds % (60 * 60);
|
||||
//分钟
|
||||
var minutes = Math.floor(totalSeconds / 60);
|
||||
//秒
|
||||
var seconds = totalSeconds % 60;
|
||||
|
||||
hours = hours.toString().length === 1 ? '0' + hours : hours;
|
||||
minutes = minutes.toString().length === 1 ? '0' + minutes : minutes;
|
||||
seconds = seconds.toString().length === 1 ? '0' + seconds : seconds;
|
||||
|
||||
//输出到页面
|
||||
dom.html(hours + ":" + minutes + ":" + seconds);
|
||||
|
||||
// 每5秒查询一次缴费状态
|
||||
if (parseInt(seconds) % 5 == 0) {
|
||||
$.ajax({
|
||||
url: '/nav/hasPaid',
|
||||
type: 'post',
|
||||
data: {},
|
||||
dataType: 'json',
|
||||
success: function (res) {
|
||||
if (res.state == 'ok') {
|
||||
layer.alert('恭喜您,支付成功!', {
|
||||
icon: 1, title: '提示', time: 0, end: function () {
|
||||
location.href = res.url;
|
||||
}
|
||||
});
|
||||
} else if (res.state == 'fail') {
|
||||
//延迟一秒执行自己
|
||||
if (hours == "00" && minutes == "00" && parseInt(seconds) - 1 < 0) {
|
||||
$('#applyQrCode').removeClass("layui-hide");
|
||||
$(".pay-item input").attr('disabled', false);
|
||||
$("#payQrCode").html("");
|
||||
dom.html('账单已过期,请重新获取');
|
||||
} else {
|
||||
setTimeout(function () {
|
||||
TimeDown(dom, validTime - 1000);
|
||||
}, 1000);
|
||||
}
|
||||
} else if (res.state == 'over') {
|
||||
jumpToUrl(res.url);
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
//延迟一秒执行自己
|
||||
if (hours == "00" && minutes == "00" && parseInt(seconds) - 1 < 0) {
|
||||
$('#applyQrCode').removeClass("layui-hide");
|
||||
$(".pay-item input").attr('disabled', false);
|
||||
$("#payQrCode").html("");
|
||||
dom.html('账单已过期,请重新获取');
|
||||
} else {
|
||||
setTimeout(function () {
|
||||
TimeDown(dom, validTime - 1000);
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
util.event('lay-active', {
|
||||
/*revocationReturnFee: function () {
|
||||
$(this).attr("disabled", "disabled").css("background-color", "#CCC").text("刷新后再试");
|
||||
layer.confirm('确定要取消退费申请吗?', {icon: 3, title: '提示'}, function (index) {
|
||||
$.ajax({
|
||||
url: '/info/revocationReturnFee',
|
||||
type: 'post',
|
||||
data: {},
|
||||
dataType: 'json',
|
||||
beforeSend: function () {
|
||||
layer.msg("正在处理,请稍后……", {time: 0});
|
||||
},
|
||||
success: function (res) {
|
||||
layer.closeAll();
|
||||
if (res.state == 'ok') {
|
||||
showAlertAndJump(res.msg, res.url);
|
||||
} else if (res.state == 'fail') {
|
||||
showFailMsg(res.msg);
|
||||
} else if (res.state == 'over') {
|
||||
jumpToUrl(res.url);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
layer.closeAll();
|
||||
showFailMsg('网络异常,请稍后重试');
|
||||
}
|
||||
});
|
||||
layer.close(index);
|
||||
});
|
||||
}*/
|
||||
})
|
||||
|
||||
/** 查看收据 */
|
||||
$(document).on('click', '#viewBillNo', function() {
|
||||
$.ajax({
|
||||
url: '/pay/getBillNo',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
if (data.state == 'ok' || data.state == 'OK') {
|
||||
layer.open({
|
||||
title: '',
|
||||
content: '<img style="height:500px;" src="' + data.data +'">',
|
||||
cancel: function(){
|
||||
//右上角关闭回调
|
||||
console.log("您取消了该操作");
|
||||
//return false 开启该代码可禁止点击该按钮关闭
|
||||
}
|
||||
});
|
||||
} else if (data.state == 'over') {
|
||||
showFailMsg(data.msg);
|
||||
} else {
|
||||
showFailMsg(data.msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
/** 查看收据 */
|
||||
$(document).on('click', '#viewBillNo_m', function() {
|
||||
$.ajax({
|
||||
url: '/pay/getBillNo',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
if (data.state == 'ok' || data.state == 'OK') {
|
||||
layer.open({
|
||||
title: '',
|
||||
content: '<img style="width:300px;" src="' + data.data +'">',
|
||||
cancel: function(){
|
||||
//右上角关闭回调
|
||||
console.log("您取消了该操作");
|
||||
//return false 开启该代码可禁止点击该按钮关闭
|
||||
}
|
||||
});
|
||||
} else if (data.state == 'over') {
|
||||
showFailMsg(data.msg);
|
||||
} else {
|
||||
showFailMsg(data.msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
5404
assets/layui/css/layui.css
Normal file
936
assets/layui/css/modules/layer.css
Normal file
@ -0,0 +1,936 @@
|
||||
/** layui-v2.5.6 MIT License By https://www.layui.com */
|
||||
.layui-layer-imgbar,.layui-layer-imgtit a,.layui-layer-tab .layui-layer-title span,.layui-layer-title {
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap
|
||||
}
|
||||
|
||||
html #layuicss-layer {
|
||||
display: none;
|
||||
position: absolute;
|
||||
width: 1989px
|
||||
}
|
||||
|
||||
.layui-layer,.layui-layer-shade {
|
||||
position: fixed;
|
||||
_position: absolute;
|
||||
pointer-events: auto
|
||||
}
|
||||
|
||||
.layui-layer-shade {
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
_height: expression(document.body.offsetHeight+"px")
|
||||
}
|
||||
|
||||
.layui-layer {
|
||||
-webkit-overflow-scrolling: touch;
|
||||
top: 150px;
|
||||
left: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #fff;
|
||||
-webkit-background-clip: content;
|
||||
border-radius: 2px;
|
||||
box-shadow: 1px 1px 50px rgba(0,0,0,.3)
|
||||
}
|
||||
|
||||
.layui-layer-close {
|
||||
position: absolute
|
||||
}
|
||||
|
||||
.layui-layer-content {
|
||||
position: relative
|
||||
}
|
||||
|
||||
.layui-layer-border {
|
||||
border: 1px solid #B2B2B2;
|
||||
border: 1px solid rgba(0,0,0,.1);
|
||||
box-shadow: 1px 1px 5px rgba(0,0,0,.2)
|
||||
}
|
||||
|
||||
.layui-layer-load {
|
||||
background: url(loading-1.gif) center center no-repeat #eee
|
||||
}
|
||||
|
||||
.layui-layer-ico {
|
||||
background: url(icon.png) no-repeat
|
||||
}
|
||||
|
||||
.layui-layer-btn a,.layui-layer-dialog .layui-layer-ico,.layui-layer-setwin a {
|
||||
display: inline-block;
|
||||
*display: inline;
|
||||
*zoom:1;vertical-align: top
|
||||
}
|
||||
|
||||
.layui-layer-move {
|
||||
display: none;
|
||||
position: fixed;
|
||||
*position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
cursor: move;
|
||||
opacity: 0;
|
||||
filter: alpha(opacity=0);
|
||||
background-color: #fff;
|
||||
z-index: 2147483647
|
||||
}
|
||||
|
||||
.layui-layer-resize {
|
||||
position: absolute;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
cursor: se-resize
|
||||
}
|
||||
|
||||
.layer-anim {
|
||||
-webkit-animation-fill-mode: both;
|
||||
animation-fill-mode: both;
|
||||
-webkit-animation-duration: .3s;
|
||||
animation-duration: .3s
|
||||
}
|
||||
|
||||
@-webkit-keyframes layer-bounceIn {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: scale(.5);
|
||||
transform: scale(.5)
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 1;
|
||||
-webkit-transform: scale(1);
|
||||
transform: scale(1)
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes layer-bounceIn {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: scale(.5);
|
||||
-ms-transform: scale(.5);
|
||||
transform: scale(.5)
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 1;
|
||||
-webkit-transform: scale(1);
|
||||
-ms-transform: scale(1);
|
||||
transform: scale(1)
|
||||
}
|
||||
}
|
||||
|
||||
.layer-anim-00 {
|
||||
-webkit-animation-name: layer-bounceIn;
|
||||
animation-name: layer-bounceIn
|
||||
}
|
||||
|
||||
@-webkit-keyframes layer-zoomInDown {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: scale(.1) translateY(-2000px);
|
||||
transform: scale(.1) translateY(-2000px);
|
||||
-webkit-animation-timing-function: ease-in-out;
|
||||
animation-timing-function: ease-in-out
|
||||
}
|
||||
|
||||
60% {
|
||||
opacity: 1;
|
||||
-webkit-transform: scale(.475) translateY(60px);
|
||||
transform: scale(.475) translateY(60px);
|
||||
-webkit-animation-timing-function: ease-out;
|
||||
animation-timing-function: ease-out
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes layer-zoomInDown {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: scale(.1) translateY(-2000px);
|
||||
-ms-transform: scale(.1) translateY(-2000px);
|
||||
transform: scale(.1) translateY(-2000px);
|
||||
-webkit-animation-timing-function: ease-in-out;
|
||||
animation-timing-function: ease-in-out
|
||||
}
|
||||
|
||||
60% {
|
||||
opacity: 1;
|
||||
-webkit-transform: scale(.475) translateY(60px);
|
||||
-ms-transform: scale(.475) translateY(60px);
|
||||
transform: scale(.475) translateY(60px);
|
||||
-webkit-animation-timing-function: ease-out;
|
||||
animation-timing-function: ease-out
|
||||
}
|
||||
}
|
||||
|
||||
.layer-anim-01 {
|
||||
-webkit-animation-name: layer-zoomInDown;
|
||||
animation-name: layer-zoomInDown
|
||||
}
|
||||
|
||||
@-webkit-keyframes layer-fadeInUpBig {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translateY(2000px);
|
||||
transform: translateY(2000px)
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 1;
|
||||
-webkit-transform: translateY(0);
|
||||
transform: translateY(0)
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes layer-fadeInUpBig {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translateY(2000px);
|
||||
-ms-transform: translateY(2000px);
|
||||
transform: translateY(2000px)
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 1;
|
||||
-webkit-transform: translateY(0);
|
||||
-ms-transform: translateY(0);
|
||||
transform: translateY(0)
|
||||
}
|
||||
}
|
||||
|
||||
.layer-anim-02 {
|
||||
-webkit-animation-name: layer-fadeInUpBig;
|
||||
animation-name: layer-fadeInUpBig
|
||||
}
|
||||
|
||||
@-webkit-keyframes layer-zoomInLeft {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: scale(.1) translateX(-2000px);
|
||||
transform: scale(.1) translateX(-2000px);
|
||||
-webkit-animation-timing-function: ease-in-out;
|
||||
animation-timing-function: ease-in-out
|
||||
}
|
||||
|
||||
60% {
|
||||
opacity: 1;
|
||||
-webkit-transform: scale(.475) translateX(48px);
|
||||
transform: scale(.475) translateX(48px);
|
||||
-webkit-animation-timing-function: ease-out;
|
||||
animation-timing-function: ease-out
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes layer-zoomInLeft {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: scale(.1) translateX(-2000px);
|
||||
-ms-transform: scale(.1) translateX(-2000px);
|
||||
transform: scale(.1) translateX(-2000px);
|
||||
-webkit-animation-timing-function: ease-in-out;
|
||||
animation-timing-function: ease-in-out
|
||||
}
|
||||
|
||||
60% {
|
||||
opacity: 1;
|
||||
-webkit-transform: scale(.475) translateX(48px);
|
||||
-ms-transform: scale(.475) translateX(48px);
|
||||
transform: scale(.475) translateX(48px);
|
||||
-webkit-animation-timing-function: ease-out;
|
||||
animation-timing-function: ease-out
|
||||
}
|
||||
}
|
||||
|
||||
.layer-anim-03 {
|
||||
-webkit-animation-name: layer-zoomInLeft;
|
||||
animation-name: layer-zoomInLeft
|
||||
}
|
||||
|
||||
@-webkit-keyframes layer-rollIn {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translateX(-100%) rotate(-120deg);
|
||||
transform: translateX(-100%) rotate(-120deg)
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 1;
|
||||
-webkit-transform: translateX(0) rotate(0);
|
||||
transform: translateX(0) rotate(0)
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes layer-rollIn {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translateX(-100%) rotate(-120deg);
|
||||
-ms-transform: translateX(-100%) rotate(-120deg);
|
||||
transform: translateX(-100%) rotate(-120deg)
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 1;
|
||||
-webkit-transform: translateX(0) rotate(0);
|
||||
-ms-transform: translateX(0) rotate(0);
|
||||
transform: translateX(0) rotate(0)
|
||||
}
|
||||
}
|
||||
|
||||
.layer-anim-04 {
|
||||
-webkit-animation-name: layer-rollIn;
|
||||
animation-name: layer-rollIn
|
||||
}
|
||||
|
||||
@keyframes layer-fadeIn {
|
||||
0% {
|
||||
opacity: 0
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 1
|
||||
}
|
||||
}
|
||||
|
||||
.layer-anim-05 {
|
||||
-webkit-animation-name: layer-fadeIn;
|
||||
animation-name: layer-fadeIn
|
||||
}
|
||||
|
||||
@-webkit-keyframes layer-shake {
|
||||
0%,100% {
|
||||
-webkit-transform: translateX(0);
|
||||
transform: translateX(0)
|
||||
}
|
||||
|
||||
10%,30%,50%,70%,90% {
|
||||
-webkit-transform: translateX(-10px);
|
||||
transform: translateX(-10px)
|
||||
}
|
||||
|
||||
20%,40%,60%,80% {
|
||||
-webkit-transform: translateX(10px);
|
||||
transform: translateX(10px)
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes layer-shake {
|
||||
0%,100% {
|
||||
-webkit-transform: translateX(0);
|
||||
-ms-transform: translateX(0);
|
||||
transform: translateX(0)
|
||||
}
|
||||
|
||||
10%,30%,50%,70%,90% {
|
||||
-webkit-transform: translateX(-10px);
|
||||
-ms-transform: translateX(-10px);
|
||||
transform: translateX(-10px)
|
||||
}
|
||||
|
||||
20%,40%,60%,80% {
|
||||
-webkit-transform: translateX(10px);
|
||||
-ms-transform: translateX(10px);
|
||||
transform: translateX(10px)
|
||||
}
|
||||
}
|
||||
|
||||
.layer-anim-06 {
|
||||
-webkit-animation-name: layer-shake;
|
||||
animation-name: layer-shake
|
||||
}
|
||||
|
||||
@-webkit-keyframes fadeIn {
|
||||
0% {
|
||||
opacity: 0
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 1
|
||||
}
|
||||
}
|
||||
|
||||
.layui-layer-title {
|
||||
padding: 0 80px 0 20px;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
border-bottom: 1px solid #eee;
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
overflow: hidden;
|
||||
background-color: #F8F8F8;
|
||||
border-radius: 2px 2px 0 0
|
||||
}
|
||||
|
||||
.layui-layer-setwin {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
*right: 0;
|
||||
top: 15px;
|
||||
font-size: 0;
|
||||
line-height: initial
|
||||
}
|
||||
|
||||
.layui-layer-setwin a {
|
||||
position: relative;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-left: 10px;
|
||||
font-size: 12px;
|
||||
_overflow: hidden
|
||||
}
|
||||
|
||||
.layui-layer-setwin .layui-layer-min cite {
|
||||
position: absolute;
|
||||
width: 14px;
|
||||
height: 2px;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
margin-top: -1px;
|
||||
background-color: #2E2D3C;
|
||||
cursor: pointer;
|
||||
_overflow: hidden
|
||||
}
|
||||
|
||||
.layui-layer-setwin .layui-layer-min:hover cite {
|
||||
background-color: #2D93CA
|
||||
}
|
||||
|
||||
.layui-layer-setwin .layui-layer-max {
|
||||
background-position: -32px -40px
|
||||
}
|
||||
|
||||
.layui-layer-setwin .layui-layer-max:hover {
|
||||
background-position: -16px -40px
|
||||
}
|
||||
|
||||
.layui-layer-setwin .layui-layer-maxmin {
|
||||
background-position: -65px -40px
|
||||
}
|
||||
|
||||
.layui-layer-setwin .layui-layer-maxmin:hover {
|
||||
background-position: -49px -40px
|
||||
}
|
||||
|
||||
.layui-layer-setwin .layui-layer-close1 {
|
||||
background-position: 1px -40px;
|
||||
cursor: pointer
|
||||
}
|
||||
|
||||
.layui-layer-setwin .layui-layer-close1:hover {
|
||||
opacity: .7
|
||||
}
|
||||
|
||||
.layui-layer-setwin .layui-layer-close2 {
|
||||
position: absolute;
|
||||
right: -28px;
|
||||
top: -28px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
margin-left: 0;
|
||||
background-position: -149px -31px;
|
||||
*right: -18px;
|
||||
_display: none
|
||||
}
|
||||
|
||||
.layui-layer-setwin .layui-layer-close2:hover {
|
||||
background-position: -180px -31px
|
||||
}
|
||||
|
||||
.layui-layer-btn {
|
||||
text-align: right;
|
||||
padding: 0 15px 12px;
|
||||
pointer-events: auto;
|
||||
user-select: none;
|
||||
-webkit-user-select: none
|
||||
}
|
||||
|
||||
.layui-layer-btn a {
|
||||
height: 28px;
|
||||
line-height: 28px;
|
||||
margin: 5px 5px 0;
|
||||
padding: 0 15px;
|
||||
border: 1px solid #dedede;
|
||||
background-color: #fff;
|
||||
color: #333;
|
||||
border-radius: 2px;
|
||||
font-weight: 400;
|
||||
cursor: pointer;
|
||||
text-decoration: none
|
||||
}
|
||||
|
||||
.layui-layer-btn a:hover {
|
||||
opacity: .9;
|
||||
text-decoration: none
|
||||
}
|
||||
|
||||
.layui-layer-btn a:active {
|
||||
opacity: .8
|
||||
}
|
||||
|
||||
.layui-layer-btn .layui-layer-btn0 {
|
||||
border-color: #1E9FFF;
|
||||
background-color: #1E9FFF;
|
||||
color: #fff
|
||||
}
|
||||
|
||||
.layui-layer-btn-l {
|
||||
text-align: left
|
||||
}
|
||||
|
||||
.layui-layer-btn-c {
|
||||
text-align: center
|
||||
}
|
||||
|
||||
.layui-layer-dialog {
|
||||
min-width: 260px
|
||||
}
|
||||
|
||||
.layui-layer-dialog .layui-layer-content {
|
||||
position: relative;
|
||||
padding: 20px;
|
||||
line-height: 24px;
|
||||
word-break: break-all;
|
||||
overflow: hidden;
|
||||
font-size: 14px;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto
|
||||
}
|
||||
|
||||
.layui-layer-dialog .layui-layer-content .layui-layer-ico {
|
||||
position: absolute;
|
||||
top: 16px;
|
||||
left: 15px;
|
||||
_left: -40px;
|
||||
width: 30px;
|
||||
height: 30px
|
||||
}
|
||||
|
||||
.layui-layer-ico1 {
|
||||
background-position: -30px 0
|
||||
}
|
||||
|
||||
.layui-layer-ico2 {
|
||||
background-position: -60px 0
|
||||
}
|
||||
|
||||
.layui-layer-ico3 {
|
||||
background-position: -90px 0
|
||||
}
|
||||
|
||||
.layui-layer-ico4 {
|
||||
background-position: -120px 0
|
||||
}
|
||||
|
||||
.layui-layer-ico5 {
|
||||
background-position: -150px 0
|
||||
}
|
||||
|
||||
.layui-layer-ico6 {
|
||||
background-position: -180px 0
|
||||
}
|
||||
|
||||
.layui-layer-rim {
|
||||
border: 6px solid #8D8D8D;
|
||||
border: 6px solid rgba(0,0,0,.3);
|
||||
border-radius: 5px;
|
||||
box-shadow: none
|
||||
}
|
||||
|
||||
.layui-layer-msg {
|
||||
min-width: 180px;
|
||||
border: 1px solid #D3D4D3;
|
||||
box-shadow: none
|
||||
}
|
||||
|
||||
.layui-layer-hui {
|
||||
min-width: 100px;
|
||||
background-color: #000;
|
||||
filter: alpha(opacity=60);
|
||||
background-color: rgba(0,0,0,.6);
|
||||
color: #fff;
|
||||
border: none
|
||||
}
|
||||
|
||||
.layui-layer-hui .layui-layer-content {
|
||||
padding: 12px 25px;
|
||||
text-align: center
|
||||
}
|
||||
|
||||
.layui-layer-dialog .layui-layer-padding {
|
||||
padding: 20px 20px 20px 55px;
|
||||
text-align: left
|
||||
}
|
||||
|
||||
.layui-layer-page .layui-layer-content {
|
||||
position: relative;
|
||||
overflow: auto
|
||||
}
|
||||
|
||||
.layui-layer-iframe .layui-layer-btn,.layui-layer-page .layui-layer-btn {
|
||||
padding-top: 10px
|
||||
}
|
||||
|
||||
.layui-layer-nobg {
|
||||
background: 0 0
|
||||
}
|
||||
|
||||
.layui-layer-iframe iframe {
|
||||
display: block;
|
||||
width: 100%
|
||||
}
|
||||
|
||||
.layui-layer-loading {
|
||||
border-radius: 100%;
|
||||
background: 0 0;
|
||||
box-shadow: none;
|
||||
border: none
|
||||
}
|
||||
|
||||
.layui-layer-loading .layui-layer-content {
|
||||
width: 60px;
|
||||
height: 24px;
|
||||
background: url(loading-0.gif) no-repeat
|
||||
}
|
||||
|
||||
.layui-layer-loading .layui-layer-loading1 {
|
||||
width: 37px;
|
||||
height: 37px;
|
||||
background: url(loading-1.gif) no-repeat
|
||||
}
|
||||
|
||||
.layui-layer-ico16,.layui-layer-loading .layui-layer-loading2 {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
background: url(loading-2.gif) no-repeat
|
||||
}
|
||||
|
||||
.layui-layer-tips {
|
||||
background: 0 0;
|
||||
box-shadow: none;
|
||||
border: none
|
||||
}
|
||||
|
||||
.layui-layer-tips .layui-layer-content {
|
||||
position: relative;
|
||||
line-height: 22px;
|
||||
min-width: 12px;
|
||||
padding: 8px 15px;
|
||||
font-size: 12px;
|
||||
_float: left;
|
||||
border-radius: 2px;
|
||||
box-shadow: 1px 1px 3px rgba(0,0,0,.2);
|
||||
background-color: #000;
|
||||
color: #fff
|
||||
}
|
||||
|
||||
.layui-layer-tips .layui-layer-close {
|
||||
right: -2px;
|
||||
top: -1px
|
||||
}
|
||||
|
||||
.layui-layer-tips i.layui-layer-TipsG {
|
||||
position: absolute;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-width: 8px;
|
||||
border-color: transparent;
|
||||
border-style: dashed;
|
||||
*overflow: hidden
|
||||
}
|
||||
|
||||
.layui-layer-tips i.layui-layer-TipsB,.layui-layer-tips i.layui-layer-TipsT {
|
||||
left: 5px;
|
||||
border-right-style: solid;
|
||||
border-right-color: #000
|
||||
}
|
||||
|
||||
.layui-layer-tips i.layui-layer-TipsT {
|
||||
bottom: -8px
|
||||
}
|
||||
|
||||
.layui-layer-tips i.layui-layer-TipsB {
|
||||
top: -8px
|
||||
}
|
||||
|
||||
.layui-layer-tips i.layui-layer-TipsL,.layui-layer-tips i.layui-layer-TipsR {
|
||||
top: 5px;
|
||||
border-bottom-style: solid;
|
||||
border-bottom-color: #000
|
||||
}
|
||||
|
||||
.layui-layer-tips i.layui-layer-TipsR {
|
||||
left: -8px
|
||||
}
|
||||
|
||||
.layui-layer-tips i.layui-layer-TipsL {
|
||||
right: -8px
|
||||
}
|
||||
|
||||
.layui-layer-lan[type=dialog] {
|
||||
min-width: 280px
|
||||
}
|
||||
|
||||
.layui-layer-lan .layui-layer-title {
|
||||
background: #4476A7;
|
||||
color: #fff;
|
||||
border: none
|
||||
}
|
||||
|
||||
.layui-layer-lan .layui-layer-btn {
|
||||
padding: 5px 10px 10px;
|
||||
text-align: right;
|
||||
border-top: 1px solid #E9E7E7
|
||||
}
|
||||
|
||||
.layui-layer-lan .layui-layer-btn a {
|
||||
background: #fff;
|
||||
border-color: #E9E7E7;
|
||||
color: #333
|
||||
}
|
||||
|
||||
.layui-layer-lan .layui-layer-btn .layui-layer-btn1 {
|
||||
background: #C9C5C5
|
||||
}
|
||||
|
||||
.layui-layer-molv .layui-layer-title {
|
||||
background: #009f95;
|
||||
color: #fff;
|
||||
border: none
|
||||
}
|
||||
|
||||
.layui-layer-molv .layui-layer-btn a {
|
||||
background: #009f95;
|
||||
border-color: #009f95
|
||||
}
|
||||
|
||||
.layui-layer-molv .layui-layer-btn .layui-layer-btn1 {
|
||||
background: #92B8B1
|
||||
}
|
||||
|
||||
.layui-layer-iconext {
|
||||
background: url(icon-ext.png) no-repeat
|
||||
}
|
||||
|
||||
.layui-layer-prompt .layui-layer-input {
|
||||
display: block;
|
||||
width: 230px;
|
||||
height: 36px;
|
||||
margin: 0 auto;
|
||||
line-height: 30px;
|
||||
padding-left: 10px;
|
||||
border: 1px solid #e6e6e6;
|
||||
color: #333
|
||||
}
|
||||
|
||||
.layui-layer-prompt textarea.layui-layer-input {
|
||||
width: 300px;
|
||||
height: 100px;
|
||||
line-height: 20px;
|
||||
padding: 6px 10px
|
||||
}
|
||||
|
||||
.layui-layer-prompt .layui-layer-content {
|
||||
padding: 20px
|
||||
}
|
||||
|
||||
.layui-layer-prompt .layui-layer-btn {
|
||||
padding-top: 0
|
||||
}
|
||||
|
||||
.layui-layer-tab {
|
||||
box-shadow: 1px 1px 50px rgba(0,0,0,.4)
|
||||
}
|
||||
|
||||
.layui-layer-tab .layui-layer-title {
|
||||
padding-left: 0;
|
||||
overflow: visible
|
||||
}
|
||||
|
||||
.layui-layer-tab .layui-layer-title span {
|
||||
position: relative;
|
||||
float: left;
|
||||
min-width: 80px;
|
||||
max-width: 260px;
|
||||
padding: 0 20px;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
cursor: pointer
|
||||
}
|
||||
|
||||
.layui-layer-tab .layui-layer-title span.layui-this {
|
||||
height: 43px;
|
||||
border-left: 1px solid #eee;
|
||||
border-right: 1px solid #eee;
|
||||
background-color: #fff;
|
||||
z-index: 10
|
||||
}
|
||||
|
||||
.layui-layer-tab .layui-layer-title span:first-child {
|
||||
border-left: none
|
||||
}
|
||||
|
||||
.layui-layer-tabmain {
|
||||
line-height: 24px;
|
||||
clear: both
|
||||
}
|
||||
|
||||
.layui-layer-tabmain .layui-layer-tabli {
|
||||
display: none
|
||||
}
|
||||
|
||||
.layui-layer-tabmain .layui-layer-tabli.layui-this {
|
||||
display: block
|
||||
}
|
||||
|
||||
.layui-layer-photos {
|
||||
-webkit-animation-duration: .8s;
|
||||
animation-duration: .8s
|
||||
}
|
||||
|
||||
.layui-layer-photos .layui-layer-content {
|
||||
overflow: hidden;
|
||||
text-align: center
|
||||
}
|
||||
|
||||
.layui-layer-photos .layui-layer-phimg img {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
*display: inline;
|
||||
*zoom:1;vertical-align: top
|
||||
}
|
||||
|
||||
.layui-layer-imgbar,.layui-layer-imguide {
|
||||
display: none
|
||||
}
|
||||
|
||||
.layui-layer-imgnext,.layui-layer-imgprev {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 27px;
|
||||
_width: 44px;
|
||||
height: 44px;
|
||||
margin-top: -22px;
|
||||
outline: 0;
|
||||
blr: expression(this.onFocus=this.blur())
|
||||
}
|
||||
|
||||
.layui-layer-imgprev {
|
||||
left: 10px;
|
||||
background-position: -5px -5px;
|
||||
_background-position: -70px -5px
|
||||
}
|
||||
|
||||
.layui-layer-imgprev:hover {
|
||||
background-position: -33px -5px;
|
||||
_background-position: -120px -5px
|
||||
}
|
||||
|
||||
.layui-layer-imgnext {
|
||||
right: 10px;
|
||||
_right: 8px;
|
||||
background-position: -5px -50px;
|
||||
_background-position: -70px -50px
|
||||
}
|
||||
|
||||
.layui-layer-imgnext:hover {
|
||||
background-position: -33px -50px;
|
||||
_background-position: -120px -50px
|
||||
}
|
||||
|
||||
.layui-layer-imgbar {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
background-color: rgba(0,0,0,.8);
|
||||
background-color: #000\9;
|
||||
filter: Alpha(opacity=80);
|
||||
color: #fff;
|
||||
overflow: hidden;
|
||||
font-size: 0
|
||||
}
|
||||
|
||||
.layui-layer-imgtit * {
|
||||
display: inline-block;
|
||||
*display: inline;
|
||||
*zoom:1;vertical-align: top;
|
||||
font-size: 12px
|
||||
}
|
||||
|
||||
.layui-layer-imgtit a {
|
||||
max-width: 65%;
|
||||
overflow: hidden;
|
||||
color: #fff
|
||||
}
|
||||
|
||||
.layui-layer-imgtit a:hover {
|
||||
color: #fff;
|
||||
text-decoration: underline
|
||||
}
|
||||
|
||||
.layui-layer-imgtit em {
|
||||
padding-left: 10px;
|
||||
font-style: normal
|
||||
}
|
||||
|
||||
@-webkit-keyframes layer-bounceOut {
|
||||
100% {
|
||||
opacity: 0;
|
||||
-webkit-transform: scale(.7);
|
||||
transform: scale(.7)
|
||||
}
|
||||
|
||||
30% {
|
||||
-webkit-transform: scale(1.05);
|
||||
transform: scale(1.05)
|
||||
}
|
||||
|
||||
0% {
|
||||
-webkit-transform: scale(1);
|
||||
transform: scale(1)
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes layer-bounceOut {
|
||||
100% {
|
||||
opacity: 0;
|
||||
-webkit-transform: scale(.7);
|
||||
-ms-transform: scale(.7);
|
||||
transform: scale(.7)
|
||||
}
|
||||
|
||||
30% {
|
||||
-webkit-transform: scale(1.05);
|
||||
-ms-transform: scale(1.05);
|
||||
transform: scale(1.05)
|
||||
}
|
||||
|
||||
0% {
|
||||
-webkit-transform: scale(1);
|
||||
-ms-transform: scale(1);
|
||||
transform: scale(1)
|
||||
}
|
||||
}
|
||||
|
||||
.layer-anim-close {
|
||||
-webkit-animation-name: layer-bounceOut;
|
||||
animation-name: layer-bounceOut;
|
||||
-webkit-animation-fill-mode: both;
|
||||
animation-fill-mode: both;
|
||||
-webkit-animation-duration: .2s;
|
||||
animation-duration: .2s
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1100px) {
|
||||
.layui-layer-iframe {
|
||||
overflow-y:auto;
|
||||
-webkit-overflow-scrolling: touch
|
||||
}
|
||||
}
|
||||
2
assets/layui/css/modules/layer/default/layer.css
Normal file
4449
assets/layui/lay/modules/element.js
Normal file
403
assets/layui/lay/modules/form.js
Normal file
@ -0,0 +1,403 @@
|
||||
/** layui-v2.5.6 MIT License By https://www.layui.com */
|
||||
;layui.define("layer", function(e) {
|
||||
"use strict";
|
||||
var t = layui.$
|
||||
, i = layui.layer
|
||||
, a = layui.hint()
|
||||
, n = layui.device()
|
||||
, l = "form"
|
||||
, r = ".layui-form"
|
||||
, s = "layui-this"
|
||||
, o = "layui-hide"
|
||||
, c = "layui-disabled"
|
||||
, u = function() {
|
||||
this.config = {
|
||||
verify: {
|
||||
required: [/[\S]+/, "必填项不能为空"],
|
||||
phone: [/^1\d{10}$/, "请输入正确的手机号"],
|
||||
email: [/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/, "邮箱格式不正确"],
|
||||
url: [/(^#)|(^http(s*):\/\/[^\s]+\.[^\s]+)/, "链接格式不正确"],
|
||||
number: function(e) {
|
||||
if (!e || isNaN(e))
|
||||
return "只能填写数字"
|
||||
},
|
||||
date: [/^(\d{4})[-\/](\d{1}|0\d{1}|1[0-2])([-\/](\d{1}|0\d{1}|[1-2][0-9]|3[0-1]))*$/, "日期格式不正确"],
|
||||
identity: [/(^\d{15}$)|(^\d{17}(x|X|\d)$)/, "请输入正确的身份证号"]
|
||||
}
|
||||
}
|
||||
};
|
||||
u.prototype.set = function(e) {
|
||||
var i = this;
|
||||
return t.extend(!0, i.config, e),
|
||||
i
|
||||
}
|
||||
,
|
||||
u.prototype.verify = function(e) {
|
||||
var i = this;
|
||||
return t.extend(!0, i.config.verify, e),
|
||||
i
|
||||
}
|
||||
,
|
||||
u.prototype.on = function(e, t) {
|
||||
return layui.onevent.call(this, l, e, t)
|
||||
}
|
||||
,
|
||||
u.prototype.val = function(e, i) {
|
||||
var a = this
|
||||
, n = t(r + '[lay-filter="' + e + '"]');
|
||||
return n.each(function(e, a) {
|
||||
var n = t(this);
|
||||
layui.each(i, function(e, t) {
|
||||
var i, a = n.find('[name="' + e + '"]');
|
||||
a[0] && (i = a[0].type,
|
||||
"checkbox" === i ? a[0].checked = t : "radio" === i ? a.each(function() {
|
||||
this.value == t && (this.checked = !0)
|
||||
}) : a.val(t))
|
||||
})
|
||||
}),
|
||||
f.render(null, e),
|
||||
a.getValue(e)
|
||||
}
|
||||
,
|
||||
u.prototype.getValue = function(e, i) {
|
||||
i = i || t(r + '[lay-filter="' + e + '"]').eq(0);
|
||||
var a = {}
|
||||
, n = {}
|
||||
, l = i.find("input,select,textarea");
|
||||
return layui.each(l, function(e, t) {
|
||||
if (t.name = (t.name || "").replace(/^\s*|\s*&/, ""),
|
||||
t.name) {
|
||||
if (/^.*\[\]$/.test(t.name)) {
|
||||
var i = t.name.match(/^(.*)\[\]$/g)[0];
|
||||
a[i] = 0 | a[i],
|
||||
t.name = t.name.replace(/^(.*)\[\]$/, "$1[" + a[i]++ + "]")
|
||||
}
|
||||
/^checkbox|radio$/.test(t.type) && !t.checked || (n[t.name] = t.value)
|
||||
}
|
||||
}),
|
||||
n
|
||||
}
|
||||
,
|
||||
u.prototype.render = function(e, i) {
|
||||
var n = this
|
||||
, u = t(r + function() {
|
||||
return i ? '[lay-filter="' + i + '"]' : ""
|
||||
}())
|
||||
, d = {
|
||||
select: function() {
|
||||
var e, i = "请选择", a = "layui-form-select", n = "layui-select-title", r = "layui-select-none", d = "", f = u.find("select"), v = function(i, l) {
|
||||
t(i.target).parent().hasClass(n) && !l || (t("." + a).removeClass(a + "ed " + a + "up"),
|
||||
e && d && e.val(d)),
|
||||
e = null
|
||||
}, y = function(i, u, f) {
|
||||
var y, p = t(this), m = i.find("." + n), k = m.find("input"), g = i.find("dl"), x = g.children("dd"), b = this.selectedIndex;
|
||||
if (!u) {
|
||||
var C = function() {
|
||||
var e = i.offset().top + i.outerHeight() + 5 - h.scrollTop()
|
||||
, t = g.outerHeight();
|
||||
b = p[0].selectedIndex,
|
||||
i.addClass(a + "ed"),
|
||||
x.removeClass(o),
|
||||
y = null,
|
||||
x.eq(b).addClass(s).siblings().removeClass(s),
|
||||
e + t > h.height() && e >= t && i.addClass(a + "up"),
|
||||
T()
|
||||
}
|
||||
, w = function(e) {
|
||||
i.removeClass(a + "ed " + a + "up"),
|
||||
k.blur(),
|
||||
y = null,
|
||||
e || $(k.val(), function(e) {
|
||||
var i = p[0].selectedIndex;
|
||||
e && (d = t(p[0].options[i]).html(),
|
||||
0 === i && d === k.attr("placeholder") && (d = ""),
|
||||
k.val(d || ""))
|
||||
})
|
||||
}
|
||||
, T = function() {
|
||||
var e = g.children("dd." + s);
|
||||
if (e[0]) {
|
||||
var t = e.position().top
|
||||
, i = g.height()
|
||||
, a = e.height();
|
||||
t > i && g.scrollTop(t + g.scrollTop() - i + a - 5),
|
||||
t < 0 && g.scrollTop(t + g.scrollTop() - 5)
|
||||
}
|
||||
};
|
||||
m.on("click", function(e) {
|
||||
i.hasClass(a + "ed") ? w() : (v(e, !0),
|
||||
C()),
|
||||
g.find("." + r).remove()
|
||||
}),
|
||||
m.find(".layui-edge").on("click", function() {
|
||||
k.focus()
|
||||
}),
|
||||
k.on("keyup", function(e) {
|
||||
var t = e.keyCode;
|
||||
9 === t && C()
|
||||
}).on("keydown", function(e) {
|
||||
var t = e.keyCode;
|
||||
9 === t && w();
|
||||
var i = function(t, a) {
|
||||
var n, l;
|
||||
e.preventDefault();
|
||||
var r = function() {
|
||||
var e = g.children("dd." + s);
|
||||
if (g.children("dd." + o)[0] && "next" === t) {
|
||||
var i = g.children("dd:not(." + o + ",." + c + ")")
|
||||
, n = i.eq(0).index();
|
||||
if (n >= 0 && n < e.index() && !i.hasClass(s))
|
||||
return i.eq(0).prev()[0] ? i.eq(0).prev() : g.children(":last")
|
||||
}
|
||||
return a && a[0] ? a : y && y[0] ? y : e
|
||||
}();
|
||||
return l = r[t](),
|
||||
n = r[t]("dd:not(." + o + ")"),
|
||||
l[0] ? (y = r[t](),
|
||||
n[0] && !n.hasClass(c) || !y[0] ? (n.addClass(s).siblings().removeClass(s),
|
||||
void T()) : i(t, y)) : y = null
|
||||
};
|
||||
38 === t && i("prev"),
|
||||
40 === t && i("next"),
|
||||
13 === t && (e.preventDefault(),
|
||||
g.children("dd." + s).trigger("click"))
|
||||
});
|
||||
var $ = function(e, i, a) {
|
||||
var n = 0;
|
||||
layui.each(x, function() {
|
||||
var i = t(this)
|
||||
, l = i.text()
|
||||
, r = l.indexOf(e) === -1;
|
||||
("" === e || "blur" === a ? e !== l : r) && n++,
|
||||
"keyup" === a && i[r ? "addClass" : "removeClass"](o)
|
||||
});
|
||||
var l = n === x.length;
|
||||
return i(l),
|
||||
l
|
||||
}
|
||||
, q = function(e) {
|
||||
var t = this.value
|
||||
, i = e.keyCode;
|
||||
return 9 !== i && 13 !== i && 37 !== i && 38 !== i && 39 !== i && 40 !== i && ($(t, function(e) {
|
||||
e ? g.find("." + r)[0] || g.append('<p class="' + r + '">无匹配项</p>') : g.find("." + r).remove()
|
||||
}, "keyup"),
|
||||
"" === t && g.find("." + r).remove(),
|
||||
void T())
|
||||
};
|
||||
f && k.on("keyup", q).on("blur", function(i) {
|
||||
var a = p[0].selectedIndex;
|
||||
e = k,
|
||||
d = t(p[0].options[a]).html(),
|
||||
0 === a && d === k.attr("placeholder") && (d = ""),
|
||||
setTimeout(function() {
|
||||
$(k.val(), function(e) {
|
||||
d || k.val("")
|
||||
}, "blur")
|
||||
}, 200)
|
||||
}),
|
||||
x.on("click", function() {
|
||||
var e = t(this)
|
||||
, a = e.attr("lay-value")
|
||||
, n = p.attr("lay-filter");
|
||||
return !e.hasClass(c) && (e.hasClass("layui-select-tips") ? k.val("") : (k.val(e.text()),
|
||||
e.addClass(s)),
|
||||
e.siblings().removeClass(s),
|
||||
p.val(a).removeClass("layui-form-danger"),
|
||||
layui.event.call(this, l, "select(" + n + ")", {
|
||||
elem: p[0],
|
||||
value: a,
|
||||
othis: i
|
||||
}),
|
||||
w(!0),
|
||||
!1)
|
||||
}),
|
||||
i.find("dl>dt").on("click", function(e) {
|
||||
return !1
|
||||
}),
|
||||
t(document).off("click", v).on("click", v)
|
||||
}
|
||||
};
|
||||
f.each(function(e, l) {
|
||||
var r = t(this)
|
||||
, o = r.next("." + a)
|
||||
, u = this.disabled
|
||||
, d = l.value
|
||||
, f = t(l.options[l.selectedIndex])
|
||||
, v = l.options[0];
|
||||
if ("string" == typeof r.attr("lay-ignore"))
|
||||
return r.show();
|
||||
var h = "string" == typeof r.attr("lay-search")
|
||||
, p = v ? v.value ? i : v.innerHTML || i : i
|
||||
, m = t(['<div class="' + (h ? "" : "layui-unselect ") + a, (u ? " layui-select-disabled" : "") + '">', '<div class="' + n + '">', '<input type="text" placeholder="' + p + '" ' + ('value="' + (d ? f.html() : "") + '"') + (!u && h ? "" : " readonly") + ' class="layui-input' + (h ? "" : " layui-unselect") + (u ? " " + c : "") + '">', '<i class="layui-edge"></i></div>', '<dl class="layui-anim layui-anim-upbit' + (r.find("optgroup")[0] ? " layui-select-group" : "") + '">', function(e) {
|
||||
var t = [];
|
||||
return layui.each(e, function(e, a) {
|
||||
0 !== e || a.value ? "optgroup" === a.tagName.toLowerCase() ? t.push("<dt>" + a.label + "</dt>") : t.push('<dd lay-value="' + a.value + '" class="' + (d === a.value ? s : "") + (a.disabled ? " " + c : "") + '">' + a.innerHTML + "</dd>") : t.push('<dd lay-value="" class="layui-select-tips">' + (a.innerHTML || i) + "</dd>")
|
||||
}),
|
||||
0 === t.length && t.push('<dd lay-value="" class="' + c + '">没有选项</dd>'),
|
||||
t.join("")
|
||||
}(r.find("*")) + "</dl>", "</div>"].join(""));
|
||||
o[0] && o.remove(),
|
||||
r.after(m),
|
||||
y.call(this, m, u, h)
|
||||
})
|
||||
},
|
||||
checkbox: function() {
|
||||
var e = {
|
||||
checkbox: ["layui-form-checkbox", "layui-form-checked", "checkbox"],
|
||||
_switch: ["layui-form-switch", "layui-form-onswitch", "switch"]
|
||||
}
|
||||
, i = u.find("input[type=checkbox]")
|
||||
, a = function(e, i) {
|
||||
var a = t(this);
|
||||
e.on("click", function() {
|
||||
var t = a.attr("lay-filter")
|
||||
, n = (a.attr("lay-text") || "").split("|");
|
||||
a[0].disabled || (a[0].checked ? (a[0].checked = !1,
|
||||
e.removeClass(i[1]).find("em").text(n[1])) : (a[0].checked = !0,
|
||||
e.addClass(i[1]).find("em").text(n[0])),
|
||||
layui.event.call(a[0], l, i[2] + "(" + t + ")", {
|
||||
elem: a[0],
|
||||
value: a[0].value,
|
||||
othis: e
|
||||
}))
|
||||
})
|
||||
};
|
||||
i.each(function(i, n) {
|
||||
var l = t(this)
|
||||
, r = l.attr("lay-skin")
|
||||
, s = (l.attr("lay-text") || "").split("|")
|
||||
, o = this.disabled;
|
||||
"switch" === r && (r = "_" + r);
|
||||
var u = e[r] || e.checkbox;
|
||||
if ("string" == typeof l.attr("lay-ignore"))
|
||||
return l.show();
|
||||
var d = l.next("." + u[0])
|
||||
, f = t(['<div class="layui-unselect ' + u[0], n.checked ? " " + u[1] : "", o ? " layui-checkbox-disbaled " + c : "", '"', r ? ' lay-skin="' + r + '"' : "", ">", function() {
|
||||
var e = n.title.replace(/\s/g, "")
|
||||
, t = {
|
||||
checkbox: [e ? "<span>" + n.title + "</span>" : "", '<i class="layui-icon layui-icon-ok"></i>'].join(""),
|
||||
_switch: "<em>" + ((n.checked ? s[0] : s[1]) || "") + "</em><i></i>"
|
||||
};
|
||||
return t[r] || t.checkbox
|
||||
}(), "</div>"].join(""));
|
||||
d[0] && d.remove(),
|
||||
l.after(f),
|
||||
a.call(this, f, u)
|
||||
})
|
||||
},
|
||||
radio: function() {
|
||||
var e = "layui-form-radio"
|
||||
, i = ["", ""]
|
||||
, a = u.find("input[type=radio]")
|
||||
, n = function(a) {
|
||||
var n = t(this)
|
||||
, s = "layui-anim-scaleSpring";
|
||||
a.on("click", function() {
|
||||
var o = n[0].name
|
||||
, c = n.parents(r)
|
||||
, u = n.attr("lay-filter")
|
||||
, d = c.find("input[name=" + o.replace(/(\.|#|\[|\])/g, "\\$1") + "]");
|
||||
n[0].disabled || (layui.each(d, function() {
|
||||
var a = t(this).next("." + e);
|
||||
this.checked = !1,
|
||||
a.removeClass(e + "ed"),
|
||||
a.find(".layui-icon").removeClass(s).html(i[1])
|
||||
}),
|
||||
n[0].checked = !0,
|
||||
a.addClass(e + "ed"),
|
||||
a.find(".layui-icon").addClass(s).html(i[0]),
|
||||
layui.event.call(n[0], l, "radio(" + u + ")", {
|
||||
elem: n[0],
|
||||
value: n[0].value,
|
||||
othis: a
|
||||
}))
|
||||
})
|
||||
};
|
||||
a.each(function(a, l) {
|
||||
var r = t(this)
|
||||
, s = r.next("." + e)
|
||||
, o = this.disabled;
|
||||
if ("string" == typeof r.attr("lay-ignore"))
|
||||
return r.show();
|
||||
s[0] && s.remove();
|
||||
var u = t(['<div class="layui-unselect ' + e, l.checked ? " " + e + "ed" : "", (o ? " layui-radio-disbaled " + c : "") + '">', '<i class="layui-anim layui-icon">' + i[l.checked ? 0 : 1] + "</i>", "<div>" + function() {
|
||||
var e = l.title || "";
|
||||
return "string" == typeof r.next().attr("lay-radio") && (e = r.next().html(),
|
||||
r.next().remove()),
|
||||
e
|
||||
}() + "</div>", "</div>"].join(""));
|
||||
r.after(u),
|
||||
n.call(this, u)
|
||||
})
|
||||
}
|
||||
};
|
||||
return e ? d[e] ? d[e]() : a.error("不支持的" + e + "表单渲染") : layui.each(d, function(e, t) {
|
||||
t()
|
||||
}),
|
||||
n
|
||||
}
|
||||
;
|
||||
var d = function() {
|
||||
var e = null
|
||||
, a = f.config.verify
|
||||
, s = "layui-form-danger"
|
||||
, o = {}
|
||||
, c = t(this)
|
||||
, u = c.parents(r)
|
||||
, d = u.find("*[lay-verify]")
|
||||
, v = c.parents("form")[0]
|
||||
, h = c.attr("lay-filter");
|
||||
return layui.each(d, function(l, r) {
|
||||
var o = t(this)
|
||||
, c = o.attr("lay-verify").split("|")
|
||||
, u = o.attr("lay-verType")
|
||||
, d = o.val();
|
||||
if (o.removeClass(s),
|
||||
layui.each(c, function(t, l) {
|
||||
var c, f = "", v = "function" == typeof a[l];
|
||||
if (a[l]) {
|
||||
var c = v ? f = a[l](d, r) : !a[l][0].test(d);
|
||||
if (f = f || a[l][1],
|
||||
"required" === l && (f = o.attr("lay-reqText") || f),
|
||||
c)
|
||||
return "tips" === u ? i.tips(f, function() {
|
||||
return "string" == typeof o.attr("lay-ignore") || "select" !== r.tagName.toLowerCase() && !/^checkbox|radio$/.test(r.type) ? o : o.next()
|
||||
}(), {
|
||||
tips: 1
|
||||
}) : "alert" === u ? i.alert(f, {
|
||||
title: "提示",
|
||||
shadeClose: !0
|
||||
}) : i.msg(f, {
|
||||
icon: 5,
|
||||
shift: 6
|
||||
}),
|
||||
n.android || n.ios || setTimeout(function() {
|
||||
r.focus()
|
||||
}, 7),
|
||||
o.addClass(s),
|
||||
e = !0
|
||||
}
|
||||
}),
|
||||
e)
|
||||
return e
|
||||
}),
|
||||
!e && (o = f.getValue(null, u),
|
||||
layui.event.call(this, l, "submit(" + h + ")", {
|
||||
elem: this,
|
||||
form: v,
|
||||
field: o
|
||||
}))
|
||||
}
|
||||
, f = new u
|
||||
, v = t(document)
|
||||
, h = t(window);
|
||||
f.render(),
|
||||
v.on("reset", r, function() {
|
||||
var e = t(this).attr("lay-filter");
|
||||
setTimeout(function() {
|
||||
f.render(null, e)
|
||||
}, 50)
|
||||
}),
|
||||
v.on("submit", r, d).on("click", "*[lay-submit]", d),
|
||||
e(l, f)
|
||||
});
|
||||
4449
assets/layui/lay/modules/jquery.js
vendored
Normal file
941
assets/layui/lay/modules/layer.js
Normal file
@ -0,0 +1,941 @@
|
||||
/** layui-v2.5.6 MIT License By https://www.layui.com */
|
||||
;!function(e, t) {
|
||||
"use strict";
|
||||
var i, n, a = e.layui && layui.define, o = {
|
||||
getPath: function() {
|
||||
var e = document.currentScript ? document.currentScript.src : function() {
|
||||
for (var e, t = document.scripts, i = t.length - 1, n = i; n > 0; n--)
|
||||
if ("interactive" === t[n].readyState) {
|
||||
e = t[n].src;
|
||||
break
|
||||
}
|
||||
return e || t[i].src
|
||||
}();
|
||||
return e.substring(0, e.lastIndexOf("/") + 1)
|
||||
}(),
|
||||
config: {},
|
||||
end: {},
|
||||
minIndex: 0,
|
||||
minLeft: [],
|
||||
btn: ["确定", "取消"],
|
||||
type: ["dialog", "page", "iframe", "loading", "tips"],
|
||||
getStyle: function(t, i) {
|
||||
var n = t.currentStyle ? t.currentStyle : e.getComputedStyle(t, null);
|
||||
return n[n.getPropertyValue ? "getPropertyValue" : "getAttribute"](i)
|
||||
},
|
||||
link: function(t, i, n) {
|
||||
if (r.path) {
|
||||
var a = document.getElementsByTagName("head")[0]
|
||||
, s = document.createElement("link");
|
||||
"string" == typeof i && (n = i);
|
||||
var l = (n || t).replace(/\.|\//g, "")
|
||||
, f = "layuicss-" + l
|
||||
, c = 0;
|
||||
s.rel = "stylesheet",
|
||||
s.href = r.path + t,
|
||||
s.id = f,
|
||||
document.getElementById(f) || a.appendChild(s),
|
||||
"function" == typeof i && !function u() {
|
||||
return ++c > 80 ? e.console && console.error("layer.css: Invalid") : void (1989 === parseInt(o.getStyle(document.getElementById(f), "width")) ? i() : setTimeout(u, 100))
|
||||
}()
|
||||
}
|
||||
}
|
||||
}, r = {
|
||||
v: "3.1.1",
|
||||
ie: function() {
|
||||
var t = navigator.userAgent.toLowerCase();
|
||||
return !!(e.ActiveXObject || "ActiveXObject"in e) && ((t.match(/msie\s(\d+)/) || [])[1] || "11")
|
||||
}(),
|
||||
index: e.layer && e.layer.v ? 1e5 : 0,
|
||||
path: o.getPath,
|
||||
config: function(e, t) {
|
||||
return e = e || {},
|
||||
r.cache = o.config = i.extend({}, o.config, e),
|
||||
r.path = o.config.path || r.path,
|
||||
"string" == typeof e.extend && (e.extend = [e.extend]),
|
||||
o.config.path && r.ready(),
|
||||
e.extend ? (a ? layui.addcss("modules/layer/" + e.extend) : o.link("theme/" + e.extend),
|
||||
this) : this
|
||||
},
|
||||
ready: function(e) {
|
||||
var t = "layer"
|
||||
, i = ""
|
||||
, n = (a ? "modules/layer/" : "theme/") + "default/layer.css?v=" + r.v + i;
|
||||
return a ? layui.addcss(n, e, t) : o.link(n, e, t),
|
||||
this
|
||||
},
|
||||
alert: function(e, t, n) {
|
||||
var a = "function" == typeof t;
|
||||
return a && (n = t),
|
||||
r.open(i.extend({
|
||||
content: e,
|
||||
yes: n
|
||||
}, a ? {} : t))
|
||||
},
|
||||
confirm: function(e, t, n, a) {
|
||||
var s = "function" == typeof t;
|
||||
return s && (a = n,
|
||||
n = t),
|
||||
r.open(i.extend({
|
||||
content: e,
|
||||
btn: o.btn,
|
||||
yes: n,
|
||||
btn2: a
|
||||
}, s ? {} : t))
|
||||
},
|
||||
msg: function(e, n, a) {
|
||||
var s = "function" == typeof n
|
||||
, f = o.config.skin
|
||||
, c = (f ? f + " " + f + "-msg" : "") || "layui-layer-msg"
|
||||
, u = l.anim.length - 1;
|
||||
return s && (a = n),
|
||||
r.open(i.extend({
|
||||
content: e,
|
||||
time: 3e3,
|
||||
shade: !1,
|
||||
skin: c,
|
||||
title: !1,
|
||||
closeBtn: !1,
|
||||
btn: !1,
|
||||
resize: !1,
|
||||
end: a
|
||||
}, s && !o.config.skin ? {
|
||||
skin: c + " layui-layer-hui",
|
||||
anim: u
|
||||
} : function() {
|
||||
return n = n || {},
|
||||
(n.icon === -1 || n.icon === t && !o.config.skin) && (n.skin = c + " " + (n.skin || "layui-layer-hui")),
|
||||
n
|
||||
}()))
|
||||
},
|
||||
load: function(e, t) {
|
||||
return r.open(i.extend({
|
||||
type: 3,
|
||||
icon: e || 0,
|
||||
resize: !1,
|
||||
shade: .01
|
||||
}, t))
|
||||
},
|
||||
tips: function(e, t, n) {
|
||||
return r.open(i.extend({
|
||||
type: 4,
|
||||
content: [e, t],
|
||||
closeBtn: !1,
|
||||
time: 3e3,
|
||||
shade: !1,
|
||||
resize: !1,
|
||||
fixed: !1,
|
||||
maxWidth: 210
|
||||
}, n))
|
||||
}
|
||||
}, s = function(e) {
|
||||
var t = this;
|
||||
t.index = ++r.index,
|
||||
t.config = i.extend({}, t.config, o.config, e),
|
||||
document.body ? t.creat() : setTimeout(function() {
|
||||
t.creat()
|
||||
}, 30)
|
||||
};
|
||||
s.pt = s.prototype;
|
||||
var l = ["layui-layer", ".layui-layer-title", ".layui-layer-main", ".layui-layer-dialog", "layui-layer-iframe", "layui-layer-content", "layui-layer-btn", "layui-layer-close"];
|
||||
l.anim = ["layer-anim-00", "layer-anim-01", "layer-anim-02", "layer-anim-03", "layer-anim-04", "layer-anim-05", "layer-anim-06"],
|
||||
s.pt.config = {
|
||||
type: 0,
|
||||
shade: .3,
|
||||
fixed: !0,
|
||||
move: l[1],
|
||||
title: "信息",
|
||||
offset: "auto",
|
||||
area: "auto",
|
||||
closeBtn: 1,
|
||||
time: 0,
|
||||
zIndex: 19891014,
|
||||
maxWidth: 360,
|
||||
anim: 0,
|
||||
isOutAnim: !0,
|
||||
icon: -1,
|
||||
moveType: 1,
|
||||
resize: !0,
|
||||
scrollbar: !0,
|
||||
tips: 2
|
||||
},
|
||||
s.pt.vessel = function(e, t) {
|
||||
var n = this
|
||||
, a = n.index
|
||||
, r = n.config
|
||||
, s = r.zIndex + a
|
||||
, f = "object" == typeof r.title
|
||||
, c = r.maxmin && (1 === r.type || 2 === r.type)
|
||||
, u = r.title ? '<div class="layui-layer-title" style="' + (f ? r.title[1] : "") + '">' + (f ? r.title[0] : r.title) + "</div>" : "";
|
||||
return r.zIndex = s,
|
||||
t([r.shade ? '<div class="layui-layer-shade" id="layui-layer-shade' + a + '" times="' + a + '" style="' + ("z-index:" + (s - 1) + "; ") + '"></div>' : "", '<div class="' + l[0] + (" layui-layer-" + o.type[r.type]) + (0 != r.type && 2 != r.type || r.shade ? "" : " layui-layer-border") + " " + (r.skin || "") + '" id="' + l[0] + a + '" type="' + o.type[r.type] + '" times="' + a + '" showtime="' + r.time + '" conType="' + (e ? "object" : "string") + '" style="z-index: ' + s + "; width:" + r.area[0] + ";height:" + r.area[1] + (r.fixed ? "" : ";position:absolute;") + '">' + (e && 2 != r.type ? "" : u) + '<div id="' + (r.id || "") + '" class="layui-layer-content' + (0 == r.type && r.icon !== -1 ? " layui-layer-padding" : "") + (3 == r.type ? " layui-layer-loading" + r.icon : "") + '">' + (0 == r.type && r.icon !== -1 ? '<i class="layui-layer-ico layui-layer-ico' + r.icon + '"></i>' : "") + (1 == r.type && e ? "" : r.content || "") + '</div><span class="layui-layer-setwin">' + function() {
|
||||
var e = c ? '<a class="layui-layer-min" href="javascript:;"><cite></cite></a><a class="layui-layer-ico layui-layer-max" href="javascript:;"></a>' : "";
|
||||
return r.closeBtn && (e += '<a class="layui-layer-ico ' + l[7] + " " + l[7] + (r.title ? r.closeBtn : 4 == r.type ? "1" : "2") + '" href="javascript:;"></a>'),
|
||||
e
|
||||
}() + "</span>" + (r.btn ? function() {
|
||||
var e = "";
|
||||
"string" == typeof r.btn && (r.btn = [r.btn]);
|
||||
for (var t = 0, i = r.btn.length; t < i; t++)
|
||||
e += '<a class="' + l[6] + t + '">' + r.btn[t] + "</a>";
|
||||
return '<div class="' + l[6] + " layui-layer-btn-" + (r.btnAlign || "") + '">' + e + "</div>"
|
||||
}() : "") + (r.resize ? '<span class="layui-layer-resize"></span>' : "") + "</div>"], u, i('<div class="layui-layer-move"></div>')),
|
||||
n
|
||||
}
|
||||
,
|
||||
s.pt.creat = function() {
|
||||
var e = this
|
||||
, t = e.config
|
||||
, a = e.index
|
||||
, s = t.content
|
||||
, f = "object" == typeof s
|
||||
, c = i("body");
|
||||
if (!t.id || !i("#" + t.id)[0]) {
|
||||
switch ("string" == typeof t.area && (t.area = "auto" === t.area ? ["", ""] : [t.area, ""]),
|
||||
t.shift && (t.anim = t.shift),
|
||||
6 == r.ie && (t.fixed = !1),
|
||||
t.type) {
|
||||
case 0:
|
||||
t.btn = "btn"in t ? t.btn : o.btn[0],
|
||||
r.closeAll("dialog");
|
||||
break;
|
||||
case 2:
|
||||
var s = t.content = f ? t.content : [t.content || "", "auto"];
|
||||
t.content = '<iframe scrolling="' + (t.content[1] || "auto") + '" allowtransparency="true" id="' + l[4] + a + '" name="' + l[4] + a + '" onload="this.className=\'\';" class="layui-layer-load" frameborder="0" src="' + t.content[0] + '"></iframe>';
|
||||
break;
|
||||
case 3:
|
||||
delete t.title,
|
||||
delete t.closeBtn,
|
||||
t.icon === -1 && 0 === t.icon,
|
||||
r.closeAll("loading");
|
||||
break;
|
||||
case 4:
|
||||
f || (t.content = [t.content, "body"]),
|
||||
t.follow = t.content[1],
|
||||
t.content = t.content[0] + '<i class="layui-layer-TipsG"></i>',
|
||||
delete t.title,
|
||||
t.tips = "object" == typeof t.tips ? t.tips : [t.tips, !0],
|
||||
t.tipsMore || r.closeAll("tips")
|
||||
}
|
||||
if (e.vessel(f, function(n, r, u) {
|
||||
c.append(n[0]),
|
||||
f ? function() {
|
||||
2 == t.type || 4 == t.type ? function() {
|
||||
i("body").append(n[1])
|
||||
}() : function() {
|
||||
s.parents("." + l[0])[0] || (s.data("display", s.css("display")).show().addClass("layui-layer-wrap").wrap(n[1]),
|
||||
i("#" + l[0] + a).find("." + l[5]).before(r))
|
||||
}()
|
||||
}() : c.append(n[1]),
|
||||
i(".layui-layer-move")[0] || c.append(o.moveElem = u),
|
||||
e.layero = i("#" + l[0] + a),
|
||||
t.scrollbar || l.html.css("overflow", "hidden").attr("layer-full", a)
|
||||
}).auto(a),
|
||||
i("#layui-layer-shade" + e.index).css({
|
||||
"background-color": t.shade[1] || "#000",
|
||||
opacity: t.shade[0] || t.shade
|
||||
}),
|
||||
2 == t.type && 6 == r.ie && e.layero.find("iframe").attr("src", s[0]),
|
||||
4 == t.type ? e.tips() : e.offset(),
|
||||
t.fixed && n.on("resize", function() {
|
||||
e.offset(),
|
||||
(/^\d+%$/.test(t.area[0]) || /^\d+%$/.test(t.area[1])) && e.auto(a),
|
||||
4 == t.type && e.tips()
|
||||
}),
|
||||
t.time <= 0 || setTimeout(function() {
|
||||
r.close(e.index)
|
||||
}, t.time),
|
||||
e.move().callback(),
|
||||
l.anim[t.anim]) {
|
||||
var u = "layer-anim " + l.anim[t.anim];
|
||||
e.layero.addClass(u).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend", function() {
|
||||
i(this).removeClass(u)
|
||||
})
|
||||
}
|
||||
t.isOutAnim && e.layero.data("isOutAnim", !0)
|
||||
}
|
||||
}
|
||||
,
|
||||
s.pt.auto = function(e) {
|
||||
var t = this
|
||||
, a = t.config
|
||||
, o = i("#" + l[0] + e);
|
||||
"" === a.area[0] && a.maxWidth > 0 && (r.ie && r.ie < 8 && a.btn && o.width(o.innerWidth()),
|
||||
o.outerWidth() > a.maxWidth && o.width(a.maxWidth));
|
||||
var s = [o.innerWidth(), o.innerHeight()]
|
||||
, f = o.find(l[1]).outerHeight() || 0
|
||||
, c = o.find("." + l[6]).outerHeight() || 0
|
||||
, u = function(e) {
|
||||
e = o.find(e),
|
||||
e.height(s[1] - f - c - 2 * (0 | parseFloat(e.css("padding-top"))))
|
||||
};
|
||||
switch (a.type) {
|
||||
case 2:
|
||||
u("iframe");
|
||||
break;
|
||||
default:
|
||||
"" === a.area[1] ? a.maxHeight > 0 && o.outerHeight() > a.maxHeight ? (s[1] = a.maxHeight,
|
||||
u("." + l[5])) : a.fixed && s[1] >= n.height() && (s[1] = n.height(),
|
||||
u("." + l[5])) : u("." + l[5])
|
||||
}
|
||||
return t
|
||||
}
|
||||
,
|
||||
s.pt.offset = function() {
|
||||
var e = this
|
||||
, t = e.config
|
||||
, i = e.layero
|
||||
, a = [i.outerWidth(), i.outerHeight()]
|
||||
, o = "object" == typeof t.offset;
|
||||
e.offsetTop = (n.height() - a[1]) / 2,
|
||||
e.offsetLeft = (n.width() - a[0]) / 2,
|
||||
o ? (e.offsetTop = t.offset[0],
|
||||
e.offsetLeft = t.offset[1] || e.offsetLeft) : "auto" !== t.offset && ("t" === t.offset ? e.offsetTop = 0 : "r" === t.offset ? e.offsetLeft = n.width() - a[0] : "b" === t.offset ? e.offsetTop = n.height() - a[1] : "l" === t.offset ? e.offsetLeft = 0 : "lt" === t.offset ? (e.offsetTop = 0,
|
||||
e.offsetLeft = 0) : "lb" === t.offset ? (e.offsetTop = n.height() - a[1],
|
||||
e.offsetLeft = 0) : "rt" === t.offset ? (e.offsetTop = 0,
|
||||
e.offsetLeft = n.width() - a[0]) : "rb" === t.offset ? (e.offsetTop = n.height() - a[1],
|
||||
e.offsetLeft = n.width() - a[0]) : e.offsetTop = t.offset),
|
||||
t.fixed || (e.offsetTop = /%$/.test(e.offsetTop) ? n.height() * parseFloat(e.offsetTop) / 100 : parseFloat(e.offsetTop),
|
||||
e.offsetLeft = /%$/.test(e.offsetLeft) ? n.width() * parseFloat(e.offsetLeft) / 100 : parseFloat(e.offsetLeft),
|
||||
e.offsetTop += n.scrollTop(),
|
||||
e.offsetLeft += n.scrollLeft()),
|
||||
i.attr("minLeft") && (e.offsetTop = n.height() - (i.find(l[1]).outerHeight() || 0),
|
||||
e.offsetLeft = i.css("left")),
|
||||
i.css({
|
||||
top: e.offsetTop,
|
||||
left: e.offsetLeft
|
||||
})
|
||||
}
|
||||
,
|
||||
s.pt.tips = function() {
|
||||
var e = this
|
||||
, t = e.config
|
||||
, a = e.layero
|
||||
, o = [a.outerWidth(), a.outerHeight()]
|
||||
, r = i(t.follow);
|
||||
r[0] || (r = i("body"));
|
||||
var s = {
|
||||
width: r.outerWidth(),
|
||||
height: r.outerHeight(),
|
||||
top: r.offset().top,
|
||||
left: r.offset().left
|
||||
}
|
||||
, f = a.find(".layui-layer-TipsG")
|
||||
, c = t.tips[0];
|
||||
t.tips[1] || f.remove(),
|
||||
s.autoLeft = function() {
|
||||
s.left + o[0] - n.width() > 0 ? (s.tipLeft = s.left + s.width - o[0],
|
||||
f.css({
|
||||
right: 12,
|
||||
left: "auto"
|
||||
})) : s.tipLeft = s.left
|
||||
}
|
||||
,
|
||||
s.where = [function() {
|
||||
s.autoLeft(),
|
||||
s.tipTop = s.top - o[1] - 10,
|
||||
f.removeClass("layui-layer-TipsB").addClass("layui-layer-TipsT").css("border-right-color", t.tips[1])
|
||||
}
|
||||
, function() {
|
||||
s.tipLeft = s.left + s.width + 10,
|
||||
s.tipTop = s.top,
|
||||
f.removeClass("layui-layer-TipsL").addClass("layui-layer-TipsR").css("border-bottom-color", t.tips[1])
|
||||
}
|
||||
, function() {
|
||||
s.autoLeft(),
|
||||
s.tipTop = s.top + s.height + 10,
|
||||
f.removeClass("layui-layer-TipsT").addClass("layui-layer-TipsB").css("border-right-color", t.tips[1])
|
||||
}
|
||||
, function() {
|
||||
s.tipLeft = s.left - o[0] - 10,
|
||||
s.tipTop = s.top,
|
||||
f.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color", t.tips[1])
|
||||
}
|
||||
],
|
||||
s.where[c - 1](),
|
||||
1 === c ? s.top - (n.scrollTop() + o[1] + 16) < 0 && s.where[2]() : 2 === c ? n.width() - (s.left + s.width + o[0] + 16) > 0 || s.where[3]() : 3 === c ? s.top - n.scrollTop() + s.height + o[1] + 16 - n.height() > 0 && s.where[0]() : 4 === c && o[0] + 16 - s.left > 0 && s.where[1](),
|
||||
a.find("." + l[5]).css({
|
||||
"background-color": t.tips[1],
|
||||
"padding-right": t.closeBtn ? "30px" : ""
|
||||
}),
|
||||
a.css({
|
||||
left: s.tipLeft - (t.fixed ? n.scrollLeft() : 0),
|
||||
top: s.tipTop - (t.fixed ? n.scrollTop() : 0)
|
||||
})
|
||||
}
|
||||
,
|
||||
s.pt.move = function() {
|
||||
var e = this
|
||||
, t = e.config
|
||||
, a = i(document)
|
||||
, s = e.layero
|
||||
, l = s.find(t.move)
|
||||
, f = s.find(".layui-layer-resize")
|
||||
, c = {};
|
||||
return t.move && l.css("cursor", "move"),
|
||||
l.on("mousedown", function(e) {
|
||||
e.preventDefault(),
|
||||
t.move && (c.moveStart = !0,
|
||||
c.offset = [e.clientX - parseFloat(s.css("left")), e.clientY - parseFloat(s.css("top"))],
|
||||
o.moveElem.css("cursor", "move").show())
|
||||
}),
|
||||
f.on("mousedown", function(e) {
|
||||
e.preventDefault(),
|
||||
c.resizeStart = !0,
|
||||
c.offset = [e.clientX, e.clientY],
|
||||
c.area = [s.outerWidth(), s.outerHeight()],
|
||||
o.moveElem.css("cursor", "se-resize").show()
|
||||
}),
|
||||
a.on("mousemove", function(i) {
|
||||
if (c.moveStart) {
|
||||
var a = i.clientX - c.offset[0]
|
||||
, o = i.clientY - c.offset[1]
|
||||
, l = "fixed" === s.css("position");
|
||||
if (i.preventDefault(),
|
||||
c.stX = l ? 0 : n.scrollLeft(),
|
||||
c.stY = l ? 0 : n.scrollTop(),
|
||||
!t.moveOut) {
|
||||
var f = n.width() - s.outerWidth() + c.stX
|
||||
, u = n.height() - s.outerHeight() + c.stY;
|
||||
a < c.stX && (a = c.stX),
|
||||
a > f && (a = f),
|
||||
o < c.stY && (o = c.stY),
|
||||
o > u && (o = u)
|
||||
}
|
||||
s.css({
|
||||
left: a,
|
||||
top: o
|
||||
})
|
||||
}
|
||||
if (t.resize && c.resizeStart) {
|
||||
var a = i.clientX - c.offset[0]
|
||||
, o = i.clientY - c.offset[1];
|
||||
i.preventDefault(),
|
||||
r.style(e.index, {
|
||||
width: c.area[0] + a,
|
||||
height: c.area[1] + o
|
||||
}),
|
||||
c.isResize = !0,
|
||||
t.resizing && t.resizing(s)
|
||||
}
|
||||
}).on("mouseup", function(e) {
|
||||
c.moveStart && (delete c.moveStart,
|
||||
o.moveElem.hide(),
|
||||
t.moveEnd && t.moveEnd(s)),
|
||||
c.resizeStart && (delete c.resizeStart,
|
||||
o.moveElem.hide())
|
||||
}),
|
||||
e
|
||||
}
|
||||
,
|
||||
s.pt.callback = function() {
|
||||
function e() {
|
||||
var e = a.cancel && a.cancel(t.index, n);
|
||||
e === !1 || r.close(t.index)
|
||||
}
|
||||
var t = this
|
||||
, n = t.layero
|
||||
, a = t.config;
|
||||
t.openLayer(),
|
||||
a.success && (2 == a.type ? n.find("iframe").on("load", function() {
|
||||
a.success(n, t.index)
|
||||
}) : a.success(n, t.index)),
|
||||
6 == r.ie && t.IE6(n),
|
||||
n.find("." + l[6]).children("a").on("click", function() {
|
||||
var e = i(this).index();
|
||||
if (0 === e)
|
||||
a.yes ? a.yes(t.index, n) : a.btn1 ? a.btn1(t.index, n) : r.close(t.index);
|
||||
else {
|
||||
var o = a["btn" + (e + 1)] && a["btn" + (e + 1)](t.index, n);
|
||||
o === !1 || r.close(t.index)
|
||||
}
|
||||
}),
|
||||
n.find("." + l[7]).on("click", e),
|
||||
a.shadeClose && i("#layui-layer-shade" + t.index).on("click", function() {
|
||||
r.close(t.index)
|
||||
}),
|
||||
n.find(".layui-layer-min").on("click", function() {
|
||||
var e = a.min && a.min(n);
|
||||
e === !1 || r.min(t.index, a)
|
||||
}),
|
||||
n.find(".layui-layer-max").on("click", function() {
|
||||
i(this).hasClass("layui-layer-maxmin") ? (r.restore(t.index),
|
||||
a.restore && a.restore(n)) : (r.full(t.index, a),
|
||||
setTimeout(function() {
|
||||
a.full && a.full(n)
|
||||
}, 100))
|
||||
}),
|
||||
a.end && (o.end[t.index] = a.end)
|
||||
}
|
||||
,
|
||||
o.reselect = function() {
|
||||
i.each(i("select"), function(e, t) {
|
||||
var n = i(this);
|
||||
n.parents("." + l[0])[0] || 1 == n.attr("layer") && i("." + l[0]).length < 1 && n.removeAttr("layer").show(),
|
||||
n = null
|
||||
})
|
||||
}
|
||||
,
|
||||
s.pt.IE6 = function(e) {
|
||||
i("select").each(function(e, t) {
|
||||
var n = i(this);
|
||||
n.parents("." + l[0])[0] || "none" === n.css("display") || n.attr({
|
||||
layer: "1"
|
||||
}).hide(),
|
||||
n = null
|
||||
})
|
||||
}
|
||||
,
|
||||
s.pt.openLayer = function() {
|
||||
var e = this;
|
||||
r.zIndex = e.config.zIndex,
|
||||
r.setTop = function(e) {
|
||||
var t = function() {
|
||||
r.zIndex++,
|
||||
e.css("z-index", r.zIndex + 1)
|
||||
};
|
||||
return r.zIndex = parseInt(e[0].style.zIndex),
|
||||
e.on("mousedown", t),
|
||||
r.zIndex
|
||||
}
|
||||
}
|
||||
,
|
||||
o.record = function(e) {
|
||||
var t = [e.width(), e.height(), e.position().top, e.position().left + parseFloat(e.css("margin-left"))];
|
||||
e.find(".layui-layer-max").addClass("layui-layer-maxmin"),
|
||||
e.attr({
|
||||
area: t
|
||||
})
|
||||
}
|
||||
,
|
||||
o.rescollbar = function(e) {
|
||||
l.html.attr("layer-full") == e && (l.html[0].style.removeProperty ? l.html[0].style.removeProperty("overflow") : l.html[0].style.removeAttribute("overflow"),
|
||||
l.html.removeAttr("layer-full"))
|
||||
}
|
||||
,
|
||||
e.layer = r,
|
||||
r.getChildFrame = function(e, t) {
|
||||
return t = t || i("." + l[4]).attr("times"),
|
||||
i("#" + l[0] + t).find("iframe").contents().find(e)
|
||||
}
|
||||
,
|
||||
r.getFrameIndex = function(e) {
|
||||
return i("#" + e).parents("." + l[4]).attr("times")
|
||||
}
|
||||
,
|
||||
r.iframeAuto = function(e) {
|
||||
if (e) {
|
||||
var t = r.getChildFrame("html", e).outerHeight()
|
||||
, n = i("#" + l[0] + e)
|
||||
, a = n.find(l[1]).outerHeight() || 0
|
||||
, o = n.find("." + l[6]).outerHeight() || 0;
|
||||
n.css({
|
||||
height: t + a + o
|
||||
}),
|
||||
n.find("iframe").css({
|
||||
height: t
|
||||
})
|
||||
}
|
||||
}
|
||||
,
|
||||
r.iframeSrc = function(e, t) {
|
||||
i("#" + l[0] + e).find("iframe").attr("src", t)
|
||||
}
|
||||
,
|
||||
r.style = function(e, t, n) {
|
||||
var a = i("#" + l[0] + e)
|
||||
, r = a.find(".layui-layer-content")
|
||||
, s = a.attr("type")
|
||||
, f = a.find(l[1]).outerHeight() || 0
|
||||
, c = a.find("." + l[6]).outerHeight() || 0;
|
||||
a.attr("minLeft");
|
||||
s !== o.type[3] && s !== o.type[4] && (n || (parseFloat(t.width) <= 260 && (t.width = 260),
|
||||
parseFloat(t.height) - f - c <= 64 && (t.height = 64 + f + c)),
|
||||
a.css(t),
|
||||
c = a.find("." + l[6]).outerHeight(),
|
||||
s === o.type[2] ? a.find("iframe").css({
|
||||
height: parseFloat(t.height) - f - c
|
||||
}) : r.css({
|
||||
height: parseFloat(t.height) - f - c - parseFloat(r.css("padding-top")) - parseFloat(r.css("padding-bottom"))
|
||||
}))
|
||||
}
|
||||
,
|
||||
r.min = function(e, t) {
|
||||
var a = i("#" + l[0] + e)
|
||||
, s = a.find(l[1]).outerHeight() || 0
|
||||
, f = a.attr("minLeft") || 181 * o.minIndex + "px"
|
||||
, c = a.css("position");
|
||||
o.record(a),
|
||||
o.minLeft[0] && (f = o.minLeft[0],
|
||||
o.minLeft.shift()),
|
||||
a.attr("position", c),
|
||||
r.style(e, {
|
||||
width: 180,
|
||||
height: s,
|
||||
left: f,
|
||||
top: n.height() - s,
|
||||
position: "fixed",
|
||||
overflow: "hidden"
|
||||
}, !0),
|
||||
a.find(".layui-layer-min").hide(),
|
||||
"page" === a.attr("type") && a.find(l[4]).hide(),
|
||||
o.rescollbar(e),
|
||||
a.attr("minLeft") || o.minIndex++,
|
||||
a.attr("minLeft", f)
|
||||
}
|
||||
,
|
||||
r.restore = function(e) {
|
||||
var t = i("#" + l[0] + e)
|
||||
, n = t.attr("area").split(",");
|
||||
t.attr("type");
|
||||
r.style(e, {
|
||||
width: parseFloat(n[0]),
|
||||
height: parseFloat(n[1]),
|
||||
top: parseFloat(n[2]),
|
||||
left: parseFloat(n[3]),
|
||||
position: t.attr("position"),
|
||||
overflow: "visible"
|
||||
}, !0),
|
||||
t.find(".layui-layer-max").removeClass("layui-layer-maxmin"),
|
||||
t.find(".layui-layer-min").show(),
|
||||
"page" === t.attr("type") && t.find(l[4]).show(),
|
||||
o.rescollbar(e)
|
||||
}
|
||||
,
|
||||
r.full = function(e) {
|
||||
var t, a = i("#" + l[0] + e);
|
||||
o.record(a),
|
||||
l.html.attr("layer-full") || l.html.css("overflow", "hidden").attr("layer-full", e),
|
||||
clearTimeout(t),
|
||||
t = setTimeout(function() {
|
||||
var t = "fixed" === a.css("position");
|
||||
r.style(e, {
|
||||
top: t ? 0 : n.scrollTop(),
|
||||
left: t ? 0 : n.scrollLeft(),
|
||||
width: n.width(),
|
||||
height: n.height()
|
||||
}, !0),
|
||||
a.find(".layui-layer-min").hide()
|
||||
}, 100)
|
||||
}
|
||||
,
|
||||
r.title = function(e, t) {
|
||||
var n = i("#" + l[0] + (t || r.index)).find(l[1]);
|
||||
n.html(e)
|
||||
}
|
||||
,
|
||||
r.close = function(e) {
|
||||
var t = i("#" + l[0] + e)
|
||||
, n = t.attr("type")
|
||||
, a = "layer-anim-close";
|
||||
if (t[0]) {
|
||||
var s = "layui-layer-wrap"
|
||||
, f = function() {
|
||||
if (n === o.type[1] && "object" === t.attr("conType")) {
|
||||
t.children(":not(." + l[5] + ")").remove();
|
||||
for (var a = t.find("." + s), r = 0; r < 2; r++)
|
||||
a.unwrap();
|
||||
a.css("display", a.data("display")).removeClass(s)
|
||||
} else {
|
||||
if (n === o.type[2])
|
||||
try {
|
||||
var f = i("#" + l[4] + e)[0];
|
||||
f.contentWindow.document.write(""),
|
||||
f.contentWindow.close(),
|
||||
t.find("." + l[5])[0].removeChild(f)
|
||||
} catch (c) {}
|
||||
t[0].innerHTML = "",
|
||||
t.remove()
|
||||
}
|
||||
"function" == typeof o.end[e] && o.end[e](),
|
||||
delete o.end[e]
|
||||
};
|
||||
t.data("isOutAnim") && t.addClass("layer-anim " + a),
|
||||
i("#layui-layer-moves, #layui-layer-shade" + e).remove(),
|
||||
6 == r.ie && o.reselect(),
|
||||
o.rescollbar(e),
|
||||
t.attr("minLeft") && (o.minIndex--,
|
||||
o.minLeft.push(t.attr("minLeft"))),
|
||||
r.ie && r.ie < 10 || !t.data("isOutAnim") ? f() : setTimeout(function() {
|
||||
f()
|
||||
}, 200)
|
||||
}
|
||||
}
|
||||
,
|
||||
r.closeAll = function(e) {
|
||||
i.each(i("." + l[0]), function() {
|
||||
var t = i(this)
|
||||
, n = e ? t.attr("type") === e : 1;
|
||||
n && r.close(t.attr("times")),
|
||||
n = null
|
||||
})
|
||||
}
|
||||
;
|
||||
var f = r.cache || {}
|
||||
, c = function(e) {
|
||||
return f.skin ? " " + f.skin + " " + f.skin + "-" + e : ""
|
||||
};
|
||||
r.prompt = function(e, t) {
|
||||
var a = "";
|
||||
if (e = e || {},
|
||||
"function" == typeof e && (t = e),
|
||||
e.area) {
|
||||
var o = e.area;
|
||||
a = 'style="width: ' + o[0] + "; height: " + o[1] + ';"',
|
||||
delete e.area
|
||||
}
|
||||
var s, l = 2 == e.formType ? '<textarea class="layui-layer-input"' + a + "></textarea>" : function() {
|
||||
return '<input type="' + (1 == e.formType ? "password" : "text") + '" class="layui-layer-input">'
|
||||
}(), f = e.success;
|
||||
return delete e.success,
|
||||
r.open(i.extend({
|
||||
type: 1,
|
||||
btn: ["确定", "取消"],
|
||||
content: l,
|
||||
skin: "layui-layer-prompt" + c("prompt"),
|
||||
maxWidth: n.width(),
|
||||
success: function(t) {
|
||||
s = t.find(".layui-layer-input"),
|
||||
s.val(e.value || "").focus(),
|
||||
"function" == typeof f && f(t)
|
||||
},
|
||||
resize: !1,
|
||||
yes: function(i) {
|
||||
var n = s.val();
|
||||
"" === n ? s.focus() : n.length > (e.maxlength || 500) ? r.tips("最多输入" + (e.maxlength || 500) + "个字数", s, {
|
||||
tips: 1
|
||||
}) : t && t(n, i, s)
|
||||
}
|
||||
}, e))
|
||||
}
|
||||
,
|
||||
r.tab = function(e) {
|
||||
e = e || {};
|
||||
var t = e.tab || {}
|
||||
, n = "layui-this"
|
||||
, a = e.success;
|
||||
return delete e.success,
|
||||
r.open(i.extend({
|
||||
type: 1,
|
||||
skin: "layui-layer-tab" + c("tab"),
|
||||
resize: !1,
|
||||
title: function() {
|
||||
var e = t.length
|
||||
, i = 1
|
||||
, a = "";
|
||||
if (e > 0)
|
||||
for (a = '<span class="' + n + '">' + t[0].title + "</span>"; i < e; i++)
|
||||
a += "<span>" + t[i].title + "</span>";
|
||||
return a
|
||||
}(),
|
||||
content: '<ul class="layui-layer-tabmain">' + function() {
|
||||
var e = t.length
|
||||
, i = 1
|
||||
, a = "";
|
||||
if (e > 0)
|
||||
for (a = '<li class="layui-layer-tabli ' + n + '">' + (t[0].content || "no content") + "</li>"; i < e; i++)
|
||||
a += '<li class="layui-layer-tabli">' + (t[i].content || "no content") + "</li>";
|
||||
return a
|
||||
}() + "</ul>",
|
||||
success: function(t) {
|
||||
var o = t.find(".layui-layer-title").children()
|
||||
, r = t.find(".layui-layer-tabmain").children();
|
||||
o.on("mousedown", function(t) {
|
||||
t.stopPropagation ? t.stopPropagation() : t.cancelBubble = !0;
|
||||
var a = i(this)
|
||||
, o = a.index();
|
||||
a.addClass(n).siblings().removeClass(n),
|
||||
r.eq(o).show().siblings().hide(),
|
||||
"function" == typeof e.change && e.change(o)
|
||||
}),
|
||||
"function" == typeof a && a(t)
|
||||
}
|
||||
}, e))
|
||||
}
|
||||
,
|
||||
r.photos = function(t, n, a) {
|
||||
function o(e, t, i) {
|
||||
var n = new Image;
|
||||
return n.src = e,
|
||||
n.complete ? t(n) : (n.onload = function() {
|
||||
n.onload = null,
|
||||
t(n)
|
||||
}
|
||||
,
|
||||
void (n.onerror = function(e) {
|
||||
n.onerror = null,
|
||||
i(e)
|
||||
}
|
||||
))
|
||||
}
|
||||
var s = {};
|
||||
if (t = t || {},
|
||||
t.photos) {
|
||||
var l = t.photos.constructor === Object
|
||||
, f = l ? t.photos : {}
|
||||
, u = f.data || []
|
||||
, d = f.start || 0;
|
||||
s.imgIndex = (0 | d) + 1,
|
||||
t.img = t.img || "img";
|
||||
var y = t.success;
|
||||
if (delete t.success,
|
||||
l) {
|
||||
if (0 === u.length)
|
||||
return r.msg("没有图片")
|
||||
} else {
|
||||
var p = i(t.photos)
|
||||
, h = function() {
|
||||
u = [],
|
||||
p.find(t.img).each(function(e) {
|
||||
var t = i(this);
|
||||
t.attr("layer-index", e),
|
||||
u.push({
|
||||
alt: t.attr("alt"),
|
||||
pid: t.attr("layer-pid"),
|
||||
src: t.attr("layer-src") || t.attr("src"),
|
||||
thumb: t.attr("src")
|
||||
})
|
||||
})
|
||||
};
|
||||
if (h(),
|
||||
0 === u.length)
|
||||
return;
|
||||
if (n || p.on("click", t.img, function() {
|
||||
var e = i(this)
|
||||
, n = e.attr("layer-index");
|
||||
r.photos(i.extend(t, {
|
||||
photos: {
|
||||
start: n,
|
||||
data: u,
|
||||
tab: t.tab
|
||||
},
|
||||
full: t.full
|
||||
}), !0),
|
||||
h()
|
||||
}),
|
||||
!n)
|
||||
return
|
||||
}
|
||||
s.imgprev = function(e) {
|
||||
s.imgIndex--,
|
||||
s.imgIndex < 1 && (s.imgIndex = u.length),
|
||||
s.tabimg(e)
|
||||
}
|
||||
,
|
||||
s.imgnext = function(e, t) {
|
||||
s.imgIndex++,
|
||||
s.imgIndex > u.length && (s.imgIndex = 1,
|
||||
t) || s.tabimg(e)
|
||||
}
|
||||
,
|
||||
s.keyup = function(e) {
|
||||
if (!s.end) {
|
||||
var t = e.keyCode;
|
||||
e.preventDefault(),
|
||||
37 === t ? s.imgprev(!0) : 39 === t ? s.imgnext(!0) : 27 === t && r.close(s.index)
|
||||
}
|
||||
}
|
||||
,
|
||||
s.tabimg = function(e) {
|
||||
if (!(u.length <= 1))
|
||||
return f.start = s.imgIndex - 1,
|
||||
r.close(s.index),
|
||||
r.photos(t, !0, e)
|
||||
}
|
||||
,
|
||||
s.event = function() {
|
||||
s.bigimg.hover(function() {
|
||||
s.imgsee.show()
|
||||
}, function() {
|
||||
s.imgsee.hide()
|
||||
}),
|
||||
s.bigimg.find(".layui-layer-imgprev").on("click", function(e) {
|
||||
e.preventDefault(),
|
||||
s.imgprev()
|
||||
}),
|
||||
s.bigimg.find(".layui-layer-imgnext").on("click", function(e) {
|
||||
e.preventDefault(),
|
||||
s.imgnext()
|
||||
}),
|
||||
i(document).on("keyup", s.keyup)
|
||||
}
|
||||
,
|
||||
s.loadi = r.load(1, {
|
||||
shade: !("shade"in t) && .9,
|
||||
scrollbar: !1
|
||||
}),
|
||||
o(u[d].src, function(n) {
|
||||
r.close(s.loadi),
|
||||
s.index = r.open(i.extend({
|
||||
type: 1,
|
||||
id: "layui-layer-photos",
|
||||
area: function() {
|
||||
var a = [n.width, n.height]
|
||||
, o = [i(e).width() - 100, i(e).height() - 100];
|
||||
if (!t.full && (a[0] > o[0] || a[1] > o[1])) {
|
||||
var r = [a[0] / o[0], a[1] / o[1]];
|
||||
r[0] > r[1] ? (a[0] = a[0] / r[0],
|
||||
a[1] = a[1] / r[0]) : r[0] < r[1] && (a[0] = a[0] / r[1],
|
||||
a[1] = a[1] / r[1])
|
||||
}
|
||||
return [a[0] + "px", a[1] + "px"]
|
||||
}(),
|
||||
title: !1,
|
||||
shade: .9,
|
||||
shadeClose: !0,
|
||||
closeBtn: !1,
|
||||
move: ".layui-layer-phimg img",
|
||||
moveType: 1,
|
||||
scrollbar: !1,
|
||||
moveOut: !0,
|
||||
isOutAnim: !1,
|
||||
skin: "layui-layer-photos" + c("photos"),
|
||||
content: '<div class="layui-layer-phimg"><img src="' + u[d].src + '" alt="' + (u[d].alt || "") + '" layer-pid="' + u[d].pid + '"><div class="layui-layer-imgsee">' + (u.length > 1 ? '<span class="layui-layer-imguide"><a href="javascript:;" class="layui-layer-iconext layui-layer-imgprev"></a><a href="javascript:;" class="layui-layer-iconext layui-layer-imgnext"></a></span>' : "") + '<div class="layui-layer-imgbar" style="display:' + (a ? "block" : "") + '"><span class="layui-layer-imgtit"><a href="javascript:;">' + (u[d].alt || "") + "</a><em>" + s.imgIndex + "/" + u.length + "</em></span></div></div></div>",
|
||||
success: function(e, i) {
|
||||
s.bigimg = e.find(".layui-layer-phimg"),
|
||||
s.imgsee = e.find(".layui-layer-imguide,.layui-layer-imgbar"),
|
||||
s.event(e),
|
||||
t.tab && t.tab(u[d], e),
|
||||
"function" == typeof y && y(e)
|
||||
},
|
||||
end: function() {
|
||||
s.end = !0,
|
||||
i(document).off("keyup", s.keyup)
|
||||
}
|
||||
}, t))
|
||||
}, function() {
|
||||
r.close(s.loadi),
|
||||
r.msg("当前图片地址异常<br>是否继续查看下一张?", {
|
||||
time: 3e4,
|
||||
btn: ["下一张", "不看了"],
|
||||
yes: function() {
|
||||
u.length > 1 && s.imgnext(!0, !0)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
,
|
||||
o.run = function(t) {
|
||||
i = t,
|
||||
n = i(e),
|
||||
l.html = i("html"),
|
||||
r.open = function(e) {
|
||||
var t = new s(e);
|
||||
return t.index
|
||||
}
|
||||
}
|
||||
,
|
||||
e.layui && layui.define ? (r.ready(),
|
||||
layui.define("jquery", function(t) {
|
||||
r.path = layui.cache.dir,
|
||||
o.run(layui.$),
|
||||
e.layer = r,
|
||||
t("layer", r)
|
||||
})) : "function" == typeof define && define.amd ? define(["src/main/webapp/aaa/layui/lay/modules/jquery"], function() {
|
||||
return o.run(e.jQuery),
|
||||
r
|
||||
}) : function() {
|
||||
o.run(e.jQuery),
|
||||
r.ready()
|
||||
}()
|
||||
}(window);
|
||||
383
assets/layui/lay/modules/upload.js
Normal file
@ -0,0 +1,383 @@
|
||||
/** layui-v2.5.6 MIT License By https://www.layui.com */
|
||||
;layui.define("layer", function(e) {
|
||||
"use strict";
|
||||
var t = layui.$
|
||||
, i = layui.layer
|
||||
, n = layui.hint()
|
||||
, o = layui.device()
|
||||
, a = {
|
||||
config: {},
|
||||
set: function(e) {
|
||||
var i = this;
|
||||
return i.config = t.extend({}, i.config, e),
|
||||
i
|
||||
},
|
||||
on: function(e, t) {
|
||||
return layui.onevent.call(this, r, e, t)
|
||||
}
|
||||
}
|
||||
, l = function() {
|
||||
var e = this;
|
||||
return {
|
||||
upload: function(t) {
|
||||
e.upload.call(e, t)
|
||||
},
|
||||
reload: function(t) {
|
||||
e.reload.call(e, t)
|
||||
},
|
||||
config: e.config
|
||||
}
|
||||
}
|
||||
, r = "upload"
|
||||
, u = "layui-upload-file"
|
||||
, c = "layui-upload-form"
|
||||
, f = "layui-upload-iframe"
|
||||
, s = "layui-upload-choose"
|
||||
, p = function(e) {
|
||||
var i = this;
|
||||
i.config = t.extend({}, i.config, a.config, e),
|
||||
i.render()
|
||||
};
|
||||
p.prototype.config = {
|
||||
accept: "images",
|
||||
exts: "",
|
||||
auto: !0,
|
||||
bindAction: "",
|
||||
url: "",
|
||||
field: "file",
|
||||
acceptMime: "",
|
||||
method: "post",
|
||||
data: {},
|
||||
drag: !0,
|
||||
size: 0,
|
||||
number: 0,
|
||||
multiple: !1
|
||||
},
|
||||
p.prototype.render = function(e) {
|
||||
var i = this
|
||||
, e = i.config;
|
||||
e.elem = t(e.elem),
|
||||
e.bindAction = t(e.bindAction),
|
||||
i.file(),
|
||||
i.events()
|
||||
}
|
||||
,
|
||||
p.prototype.file = function() {
|
||||
var e = this
|
||||
, i = e.config
|
||||
, n = e.elemFile = t(['<input class="' + u + '" type="file" accept="' + i.acceptMime + '" name="' + i.field + '"', i.multiple ? " multiple" : "", ">"].join(""))
|
||||
, a = i.elem.next();
|
||||
(a.hasClass(u) || a.hasClass(c)) && a.remove(),
|
||||
o.ie && o.ie < 10 && i.elem.wrap('<div class="layui-upload-wrap"></div>'),
|
||||
e.isFile() ? (e.elemFile = i.elem,
|
||||
i.field = i.elem[0].name) : i.elem.after(n),
|
||||
o.ie && o.ie < 10 && e.initIE()
|
||||
}
|
||||
,
|
||||
p.prototype.initIE = function() {
|
||||
var e = this
|
||||
, i = e.config
|
||||
, n = t('<iframe id="' + f + '" class="' + f + '" name="' + f + '" frameborder="0"></iframe>')
|
||||
, o = t(['<form target="' + f + '" class="' + c + '" method="post" key="set-mine" enctype="multipart/form-data" action="' + i.url + '">', "</form>"].join(""));
|
||||
t("#" + f)[0] || t("body").append(n),
|
||||
i.elem.next().hasClass(c) || (e.elemFile.wrap(o),
|
||||
i.elem.next("." + c).append(function() {
|
||||
var e = [];
|
||||
return layui.each(i.data, function(t, i) {
|
||||
i = "function" == typeof i ? i() : i,
|
||||
e.push('<input type="hidden" name="' + t + '" value="' + i + '">')
|
||||
}),
|
||||
e.join("")
|
||||
}()))
|
||||
}
|
||||
,
|
||||
p.prototype.msg = function(e) {
|
||||
return i.msg(e, {
|
||||
icon: 2,
|
||||
shift: 6
|
||||
})
|
||||
}
|
||||
,
|
||||
p.prototype.isFile = function() {
|
||||
var e = this.config.elem[0];
|
||||
if (e)
|
||||
return "input" === e.tagName.toLocaleLowerCase() && "file" === e.type
|
||||
}
|
||||
,
|
||||
p.prototype.preview = function(e) {
|
||||
var t = this;
|
||||
window.FileReader && layui.each(t.chooseFiles, function(t, i) {
|
||||
var n = new FileReader;
|
||||
n.readAsDataURL(i),
|
||||
n.onload = function() {
|
||||
e && e(t, i, this.result)
|
||||
}
|
||||
})
|
||||
}
|
||||
,
|
||||
p.prototype.upload = function(e, i) {
|
||||
var n, a = this, l = a.config, r = a.elemFile[0], u = function() {
|
||||
var i = 0
|
||||
, n = 0
|
||||
, o = e || a.files || a.chooseFiles || r.files
|
||||
, u = function() {
|
||||
l.multiple && i + n === a.fileLength && "function" == typeof l.allDone && l.allDone({
|
||||
total: a.fileLength,
|
||||
successful: i,
|
||||
aborted: n
|
||||
})
|
||||
};
|
||||
layui.each(o, function(e, o) {
|
||||
var r = new FormData;
|
||||
r.append(l.field, o),
|
||||
layui.each(l.data, function(e, t) {
|
||||
t = "function" == typeof t ? t() : t,
|
||||
r.append(e, t)
|
||||
});
|
||||
var c = {
|
||||
url: l.url,
|
||||
type: "post",
|
||||
data: r,
|
||||
contentType: !1,
|
||||
processData: !1,
|
||||
dataType: "json",
|
||||
headers: l.headers || {},
|
||||
success: function(t) {
|
||||
i++,
|
||||
d(e, t),
|
||||
u()
|
||||
},
|
||||
error: function() {
|
||||
n++,
|
||||
a.msg("请求上传接口出现异常"),
|
||||
m(e),
|
||||
u()
|
||||
}
|
||||
};
|
||||
"function" == typeof l.progress && (c.xhr = function() {
|
||||
var e = t.ajaxSettings.xhr();
|
||||
return e.upload.addEventListener("progress", function(e) {
|
||||
if (e.lengthComputable) {
|
||||
var t = Math.floor(e.loaded / e.total * 100);
|
||||
l.progress(t, l.item[0], e)
|
||||
}
|
||||
}),
|
||||
e
|
||||
}
|
||||
),
|
||||
t.ajax(c)
|
||||
})
|
||||
}, c = function() {
|
||||
var e = t("#" + f);
|
||||
a.elemFile.parent().submit(),
|
||||
clearInterval(p.timer),
|
||||
p.timer = setInterval(function() {
|
||||
var t, i = e.contents().find("body");
|
||||
try {
|
||||
t = i.text()
|
||||
} catch (n) {
|
||||
a.msg("获取上传后的响应信息出现异常"),
|
||||
clearInterval(p.timer),
|
||||
m()
|
||||
}
|
||||
t && (clearInterval(p.timer),
|
||||
i.html(""),
|
||||
d(0, t))
|
||||
}, 30)
|
||||
}, d = function(e, t) {
|
||||
if (a.elemFile.next("." + s).remove(),
|
||||
r.value = "",
|
||||
"object" != typeof t)
|
||||
try {
|
||||
t = JSON.parse(t)
|
||||
} catch (i) {
|
||||
return t = {},
|
||||
a.msg("请对上传接口返回有效JSON")
|
||||
}
|
||||
"function" == typeof l.done && l.done(t, e || 0, function(e) {
|
||||
a.upload(e)
|
||||
})
|
||||
}, m = function(e) {
|
||||
l.auto && (r.value = ""),
|
||||
"function" == typeof l.error && l.error(e || 0, function(e) {
|
||||
a.upload(e)
|
||||
})
|
||||
}, h = l.exts, v = function() {
|
||||
var t = [];
|
||||
return layui.each(e || a.chooseFiles, function(e, i) {
|
||||
t.push(i.name)
|
||||
}),
|
||||
t
|
||||
}(), g = {
|
||||
preview: function(e) {
|
||||
a.preview(e)
|
||||
},
|
||||
upload: function(e, t) {
|
||||
var i = {};
|
||||
i[e] = t,
|
||||
a.upload(i)
|
||||
},
|
||||
pushFile: function() {
|
||||
return a.files = a.files || {},
|
||||
layui.each(a.chooseFiles, function(e, t) {
|
||||
a.files[e] = t
|
||||
}),
|
||||
a.files
|
||||
},
|
||||
resetFile: function(e, t, i) {
|
||||
var n = new File([t],i);
|
||||
a.files = a.files || {},
|
||||
a.files[e] = n
|
||||
}
|
||||
}, y = function() {
|
||||
if ("choose" !== i && !l.auto || (l.choose && l.choose(g),
|
||||
"choose" !== i))
|
||||
return l.before && l.before(g),
|
||||
o.ie ? o.ie > 9 ? u() : c() : void u()
|
||||
};
|
||||
if (v = 0 === v.length ? r.value.match(/[^\/\\]+\..+/g) || [] || "" : v,
|
||||
0 !== v.length) {
|
||||
switch (l.accept) {
|
||||
case "file":
|
||||
if (h && !RegExp("\\w\\.(" + h + ")$", "i").test(escape(v)))
|
||||
return a.msg("选择的文件中包含不支持的格式"),
|
||||
r.value = "";
|
||||
break;
|
||||
case "video":
|
||||
if (!RegExp("\\w\\.(" + (h || "avi|mp4|wma|rmvb|rm|flash|3gp|flv") + ")$", "i").test(escape(v)))
|
||||
return a.msg("选择的视频中包含不支持的格式"),
|
||||
r.value = "";
|
||||
break;
|
||||
case "audio":
|
||||
if (!RegExp("\\w\\.(" + (h || "mp3|wav|mid") + ")$", "i").test(escape(v)))
|
||||
return a.msg("选择的音频中包含不支持的格式"),
|
||||
r.value = "";
|
||||
break;
|
||||
default:
|
||||
if (layui.each(v, function(e, t) {
|
||||
RegExp("\\w\\.(" + (h || "jpg|png|gif|bmp|jpeg$") + ")", "i").test(escape(t)) || (n = !0)
|
||||
}),
|
||||
n)
|
||||
return a.msg("选择的图片中包含不支持的格式"),
|
||||
r.value = ""
|
||||
}
|
||||
if (a.fileLength = function() {
|
||||
var t = 0
|
||||
, i = e || a.files || a.chooseFiles || r.files;
|
||||
return layui.each(i, function() {
|
||||
t++
|
||||
}),
|
||||
t
|
||||
}(),
|
||||
l.number && a.fileLength > l.number)
|
||||
return a.msg("同时最多只能上传的数量为:" + l.number);
|
||||
if (l.size > 0 && !(o.ie && o.ie < 10)) {
|
||||
var F;
|
||||
if (layui.each(a.chooseFiles, function(e, t) {
|
||||
if (t.size > 1024 * l.size) {
|
||||
var i = l.size / 1024;
|
||||
i = i >= 1 ? i.toFixed(2) + "MB" : l.size + "KB",
|
||||
r.value = "",
|
||||
F = i
|
||||
}
|
||||
}),
|
||||
F)
|
||||
return a.msg("文件不能超过" + F)
|
||||
}
|
||||
y()
|
||||
}
|
||||
}
|
||||
,
|
||||
p.prototype.reload = function(e) {
|
||||
e = e || {},
|
||||
delete e.elem,
|
||||
delete e.bindAction;
|
||||
var i = this
|
||||
, e = i.config = t.extend({}, i.config, a.config, e)
|
||||
, n = e.elem.next();
|
||||
n.attr({
|
||||
name: e.name,
|
||||
accept: e.acceptMime,
|
||||
multiple: e.multiple
|
||||
})
|
||||
}
|
||||
,
|
||||
p.prototype.events = function() {
|
||||
var e = this
|
||||
, i = e.config
|
||||
, a = function(t) {
|
||||
e.chooseFiles = {},
|
||||
layui.each(t, function(t, i) {
|
||||
var n = (new Date).getTime();
|
||||
e.chooseFiles[n + "-" + t] = i
|
||||
})
|
||||
}
|
||||
, l = function(t, n) {
|
||||
var o = e.elemFile
|
||||
, a = t.length > 1 ? t.length + "个文件" : (t[0] || {}).name || o[0].value.match(/[^\/\\]+\..+/g) || [] || "";
|
||||
o.next().hasClass(s) && o.next().remove(),
|
||||
e.upload(null, "choose"),
|
||||
e.isFile() || i.choose || o.after('<span class="layui-inline ' + s + '">' + a + "</span>")
|
||||
};
|
||||
i.elem.off("upload.start").on("upload.start", function() {
|
||||
var o = t(this)
|
||||
, a = o.attr("lay-data");
|
||||
if (a)
|
||||
try {
|
||||
a = new Function("return " + a)(),
|
||||
e.config = t.extend({}, i, a)
|
||||
} catch (l) {
|
||||
n.error("Upload element property lay-data configuration item has a syntax error: " + a)
|
||||
}
|
||||
e.config.item = o,
|
||||
e.elemFile[0].click()
|
||||
}),
|
||||
o.ie && o.ie < 10 || i.elem.off("upload.over").on("upload.over", function() {
|
||||
var e = t(this);
|
||||
e.attr("lay-over", "")
|
||||
}).off("upload.leave").on("upload.leave", function() {
|
||||
var e = t(this);
|
||||
e.removeAttr("lay-over")
|
||||
}).off("upload.drop").on("upload.drop", function(n, o) {
|
||||
var r = t(this)
|
||||
, u = o.originalEvent.dataTransfer.files || [];
|
||||
r.removeAttr("lay-over"),
|
||||
a(u),
|
||||
i.auto ? e.upload(u) : l(u)
|
||||
}),
|
||||
e.elemFile.off("upload.change").on("upload.change", function() {
|
||||
var t = this.files || [];
|
||||
a(t),
|
||||
i.auto ? e.upload() : l(t)
|
||||
}),
|
||||
i.bindAction.off("upload.action").on("upload.action", function() {
|
||||
e.upload()
|
||||
}),
|
||||
i.elem.data("haveEvents") || (e.elemFile.on("change", function() {
|
||||
t(this).trigger("upload.change")
|
||||
}),
|
||||
i.elem.on("click", function() {
|
||||
e.isFile() || t(this).trigger("upload.start")
|
||||
}),
|
||||
i.drag && i.elem.on("dragover", function(e) {
|
||||
e.preventDefault(),
|
||||
t(this).trigger("upload.over")
|
||||
}).on("dragleave", function(e) {
|
||||
t(this).trigger("upload.leave")
|
||||
}).on("drop", function(e) {
|
||||
e.preventDefault(),
|
||||
t(this).trigger("upload.drop", e)
|
||||
}),
|
||||
i.bindAction.on("click", function() {
|
||||
t(this).trigger("upload.action")
|
||||
}),
|
||||
i.elem.data("haveEvents", !0))
|
||||
}
|
||||
,
|
||||
a.render = function(e) {
|
||||
var t = new p(e);
|
||||
return l.call(t)
|
||||
}
|
||||
,
|
||||
e(r, a)
|
||||
});
|
||||
159
assets/layui/lay/modules/util.js
Normal file
@ -0,0 +1,159 @@
|
||||
/** layui-v2.5.6 MIT License By https://www.layui.com */
|
||||
;layui.define("jquery", function(e) {
|
||||
"use strict";
|
||||
var t = layui.$
|
||||
, i = {
|
||||
fixbar: function(e) {
|
||||
var i, n, a = "layui-fixbar", o = "layui-fixbar-top", r = t(document), l = t("body");
|
||||
e = t.extend({
|
||||
showHeight: 200
|
||||
}, e),
|
||||
e.bar1 = e.bar1 === !0 ? "" : e.bar1,
|
||||
e.bar2 = e.bar2 === !0 ? "" : e.bar2,
|
||||
e.bgcolor = e.bgcolor ? "background-color:" + e.bgcolor : "";
|
||||
var c = [e.bar1, e.bar2, ""]
|
||||
, u = t(['<ul class="' + a + '">', e.bar1 ? '<li class="layui-icon" lay-type="bar1" style="' + e.bgcolor + '">' + c[0] + "</li>" : "", e.bar2 ? '<li class="layui-icon" lay-type="bar2" style="' + e.bgcolor + '">' + c[1] + "</li>" : "", '<li class="layui-icon ' + o + '" lay-type="top" style="' + e.bgcolor + '">' + c[2] + "</li>", "</ul>"].join(""))
|
||||
, g = u.find("." + o)
|
||||
, s = function() {
|
||||
var t = r.scrollTop();
|
||||
t >= e.showHeight ? i || (g.show(),
|
||||
i = 1) : i && (g.hide(),
|
||||
i = 0)
|
||||
};
|
||||
t("." + a)[0] || ("object" == typeof e.css && u.css(e.css),
|
||||
l.append(u),
|
||||
s(),
|
||||
u.find("li").on("click", function() {
|
||||
var i = t(this)
|
||||
, n = i.attr("lay-type");
|
||||
"top" === n && t("html,body").animate({
|
||||
scrollTop: 0
|
||||
}, 200),
|
||||
e.click && e.click.call(this, n)
|
||||
}),
|
||||
r.on("scroll", function() {
|
||||
clearTimeout(n),
|
||||
n = setTimeout(function() {
|
||||
s()
|
||||
}, 100)
|
||||
}))
|
||||
},
|
||||
countdown: function(e, t, i) {
|
||||
var n = this
|
||||
, a = "function" == typeof t
|
||||
, o = new Date(e).getTime()
|
||||
, r = new Date(!t || a ? (new Date).getTime() : t).getTime()
|
||||
, l = o - r
|
||||
, c = [Math.floor(l / 864e5), Math.floor(l / 36e5) % 24, Math.floor(l / 6e4) % 60, Math.floor(l / 1e3) % 60];
|
||||
a && (i = t);
|
||||
var u = setTimeout(function() {
|
||||
n.countdown(e, r + 1e3, i)
|
||||
}, 1e3);
|
||||
return i && i(l > 0 ? c : [0, 0, 0, 0], t, u),
|
||||
l <= 0 && clearTimeout(u),
|
||||
u
|
||||
},
|
||||
timeAgo: function(e, t) {
|
||||
var i = this
|
||||
, n = [[], []]
|
||||
, a = (new Date).getTime() - new Date(e).getTime();
|
||||
return a > 26784e5 ? (a = new Date(e),
|
||||
n[0][0] = i.digit(a.getFullYear(), 4),
|
||||
n[0][1] = i.digit(a.getMonth() + 1),
|
||||
n[0][2] = i.digit(a.getDate()),
|
||||
t || (n[1][0] = i.digit(a.getHours()),
|
||||
n[1][1] = i.digit(a.getMinutes()),
|
||||
n[1][2] = i.digit(a.getSeconds())),
|
||||
n[0].join("-") + " " + n[1].join(":")) : a >= 864e5 ? (a / 1e3 / 60 / 60 / 24 | 0) + "天前" : a >= 36e5 ? (a / 1e3 / 60 / 60 | 0) + "小时前" : a >= 18e4 ? (a / 1e3 / 60 | 0) + "分钟前" : a < 0 ? "未来" : "刚刚"
|
||||
},
|
||||
digit: function(e, t) {
|
||||
var i = "";
|
||||
e = String(e),
|
||||
t = t || 2;
|
||||
for (var n = e.length; n < t; n++)
|
||||
i += "0";
|
||||
return e < Math.pow(10, t) ? i + (0 | e) : e
|
||||
},
|
||||
toDateString: function(e, t) {
|
||||
var i = this
|
||||
, n = new Date(e || new Date)
|
||||
, a = [i.digit(n.getFullYear(), 4), i.digit(n.getMonth() + 1), i.digit(n.getDate())]
|
||||
, o = [i.digit(n.getHours()), i.digit(n.getMinutes()), i.digit(n.getSeconds())];
|
||||
return t = t || "yyyy-MM-dd HH:mm:ss",
|
||||
t.replace(/yyyy/g, a[0]).replace(/MM/g, a[1]).replace(/dd/g, a[2]).replace(/HH/g, o[0]).replace(/mm/g, o[1]).replace(/ss/g, o[2])
|
||||
},
|
||||
escape: function(e) {
|
||||
return String(e || "").replace(/&(?!#?[a-zA-Z0-9]+;)/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/'/g, "'").replace(/"/g, """)
|
||||
},
|
||||
event: function(e, n, a) {
|
||||
var o = t("body");
|
||||
return a = a || "click",
|
||||
n = i.event[e] = t.extend(!0, i.event[e], n) || {},
|
||||
i.event.UTIL_EVENT_CALLBACK = i.event.UTIL_EVENT_CALLBACK || {},
|
||||
o.off(a, "*[" + e + "]", i.event.UTIL_EVENT_CALLBACK[e]),
|
||||
i.event.UTIL_EVENT_CALLBACK[e] = function() {
|
||||
var i = t(this)
|
||||
, a = i.attr(e);
|
||||
"function" == typeof n[a] && n[a].call(this, i)
|
||||
}
|
||||
,
|
||||
o.on(a, "*[" + e + "]", i.event.UTIL_EVENT_CALLBACK[e]),
|
||||
n
|
||||
}
|
||||
};
|
||||
!function(e, t, i) {
|
||||
"$:nomunge";
|
||||
function n() {
|
||||
a = t[l](function() {
|
||||
o.each(function() {
|
||||
var t = e(this)
|
||||
, i = t.width()
|
||||
, n = t.height()
|
||||
, a = e.data(this, u);
|
||||
(i !== a.w || n !== a.h) && t.trigger(c, [a.w = i, a.h = n])
|
||||
}),
|
||||
n()
|
||||
}, r[g])
|
||||
}
|
||||
var a, o = e([]), r = e.resize = e.extend(e.resize, {}), l = "setTimeout", c = "resize", u = c + "-special-event", g = "delay", s = "throttleWindow";
|
||||
r[g] = 250,
|
||||
r[s] = !0,
|
||||
e.event.special[c] = {
|
||||
setup: function() {
|
||||
if (!r[s] && this[l])
|
||||
return !1;
|
||||
var t = e(this);
|
||||
o = o.add(t),
|
||||
e.data(this, u, {
|
||||
w: t.width(),
|
||||
h: t.height()
|
||||
}),
|
||||
1 === o.length && n()
|
||||
},
|
||||
teardown: function() {
|
||||
if (!r[s] && this[l])
|
||||
return !1;
|
||||
var t = e(this);
|
||||
o = o.not(t),
|
||||
t.removeData(u),
|
||||
o.length || clearTimeout(a)
|
||||
},
|
||||
add: function(t) {
|
||||
function n(t, n, o) {
|
||||
var r = e(this)
|
||||
, l = e.data(this, u) || {};
|
||||
l.w = n !== i ? n : r.width(),
|
||||
l.h = o !== i ? o : r.height(),
|
||||
a.apply(this, arguments)
|
||||
}
|
||||
if (!r[s] && this[l])
|
||||
return !1;
|
||||
var a;
|
||||
return e.isFunction(t) ? (a = t,
|
||||
n) : (a = t.handler,
|
||||
void (t.handler = n))
|
||||
}
|
||||
}
|
||||
}(t, window),
|
||||
e("util", i)
|
||||
});
|
||||
366
assets/layui/layui.js
Normal file
@ -0,0 +1,366 @@
|
||||
/** layui-v2.5.6 MIT License By https://www.layui.com */
|
||||
;!function(e) {
|
||||
"use strict";
|
||||
var t = document
|
||||
, n = {
|
||||
modules: {},
|
||||
status: {},
|
||||
timeout: 10,
|
||||
event: {}
|
||||
}
|
||||
, o = function() {
|
||||
this.v = "2.5.6"
|
||||
}
|
||||
, r = function() {
|
||||
var e = t.currentScript ? t.currentScript.src : function() {
|
||||
for (var e, n = t.scripts, o = n.length - 1, r = o; r > 0; r--)
|
||||
if ("interactive" === n[r].readyState) {
|
||||
e = n[r].src;
|
||||
break
|
||||
}
|
||||
return e || n[o].src
|
||||
}();
|
||||
return e.substring(0, e.lastIndexOf("/") + 1)
|
||||
}()
|
||||
, a = function(t) {
|
||||
e.console && console.error && console.error("Layui hint: " + t)
|
||||
}
|
||||
, i = "undefined" != typeof opera && "[object Opera]" === opera.toString()
|
||||
, u = {
|
||||
layer: "modules/layer",
|
||||
laydate: "modules/laydate",
|
||||
laypage: "modules/laypage",
|
||||
laytpl: "modules/laytpl",
|
||||
layim: "modules/layim",
|
||||
layedit: "modules/layedit",
|
||||
form: "modules/form",
|
||||
upload: "modules/upload",
|
||||
transfer: "modules/transfer",
|
||||
tree: "modules/tree",
|
||||
table: "modules/table",
|
||||
element: "modules/element",
|
||||
rate: "modules/rate",
|
||||
colorpicker: "modules/colorpicker",
|
||||
slider: "modules/slider",
|
||||
carousel: "modules/carousel",
|
||||
flow: "modules/flow",
|
||||
util: "modules/util",
|
||||
code: "modules/code",
|
||||
jquery: "modules/jquery",
|
||||
mobile: "modules/mobile",
|
||||
"layui.all": "../layui.all"
|
||||
};
|
||||
o.prototype.cache = n,
|
||||
o.prototype.define = function(e, t) {
|
||||
var o = this
|
||||
, r = "function" == typeof e
|
||||
, a = function() {
|
||||
var e = function(e, t) {
|
||||
layui[e] = t,
|
||||
n.status[e] = !0
|
||||
};
|
||||
return "function" == typeof t && t(function(o, r) {
|
||||
e(o, r),
|
||||
n.callback[o] = function() {
|
||||
t(e)
|
||||
}
|
||||
}),
|
||||
this
|
||||
};
|
||||
return r && (t = e,
|
||||
e = []),
|
||||
!layui["layui.all"] && layui["layui.mobile"] ? a.call(o) : (o.use(e, a),
|
||||
o)
|
||||
}
|
||||
,
|
||||
o.prototype.use = function(e, o, l) {
|
||||
function s(e, t) {
|
||||
var o = "PLaySTATION 3" === navigator.platform ? /^complete$/ : /^(complete|loaded)$/;
|
||||
("load" === e.type || o.test((e.currentTarget || e.srcElement).readyState)) && (n.modules[d] = t,
|
||||
y.removeChild(v),
|
||||
function r() {
|
||||
return ++m > 1e3 * n.timeout / 4 ? a(d + " is not a valid module") : void (n.status[d] ? c() : setTimeout(r, 4))
|
||||
}())
|
||||
}
|
||||
function c() {
|
||||
l.push(layui[d]),
|
||||
e.length > 1 ? p.use(e.slice(1), o, l) : "function" == typeof o && o.apply(layui, l)
|
||||
}
|
||||
var p = this
|
||||
, f = n.dir = n.dir ? n.dir : r
|
||||
, y = t.getElementsByTagName("head")[0];
|
||||
e = "string" == typeof e ? [e] : e,
|
||||
window.jQuery && jQuery.fn.on && (p.each(e, function(t, n) {
|
||||
"jquery" === n && e.splice(t, 1)
|
||||
}),
|
||||
layui.jquery = layui.$ = jQuery);
|
||||
var d = e[0]
|
||||
, m = 0;
|
||||
if (l = l || [],
|
||||
n.host = n.host || (f.match(/\/\/([\s\S]+?)\//) || ["//" + location.host + "/"])[0],
|
||||
0 === e.length || layui["layui.all"] && u[d] || !layui["layui.all"] && layui["layui.mobile"] && u[d])
|
||||
return c(),
|
||||
p;
|
||||
var h = (u[d] ? f + "lay/" : /^\{\/\}/.test(p.modules[d]) ? "" : n.base || "") + (p.modules[d] || d) + ".js";
|
||||
if (h = h.replace(/^\{\/\}/, ""),
|
||||
!n.modules[d] && layui[d] && (n.modules[d] = h),
|
||||
n.modules[d])
|
||||
!function g() {
|
||||
return ++m > 1e3 * n.timeout / 4 ? a(d + " is not a valid module") : void ("string" == typeof n.modules[d] && n.status[d] ? c() : setTimeout(g, 4))
|
||||
}();
|
||||
else {
|
||||
var v = t.createElement("script");
|
||||
v.async = !0,
|
||||
v.charset = "utf-8",
|
||||
v.src = h + function() {
|
||||
var e = n.version === !0 ? n.v || (new Date).getTime() : n.version || "";
|
||||
return e ? "?v=" + e : ""
|
||||
}(),
|
||||
y.appendChild(v),
|
||||
!v.attachEvent || v.attachEvent.toString && v.attachEvent.toString().indexOf("[native code") < 0 || i ? v.addEventListener("load", function(e) {
|
||||
s(e, h)
|
||||
}, !1) : v.attachEvent("onreadystatechange", function(e) {
|
||||
s(e, h)
|
||||
}),
|
||||
n.modules[d] = h
|
||||
}
|
||||
return p
|
||||
}
|
||||
,
|
||||
o.prototype.getStyle = function(t, n) {
|
||||
var o = t.currentStyle ? t.currentStyle : e.getComputedStyle(t, null);
|
||||
return o[o.getPropertyValue ? "getPropertyValue" : "getAttribute"](n)
|
||||
}
|
||||
,
|
||||
o.prototype.link = function(e, o, r) {
|
||||
var i = this
|
||||
, u = t.createElement("link")
|
||||
, l = t.getElementsByTagName("head")[0];
|
||||
"string" == typeof o && (r = o);
|
||||
var s = (r || e).replace(/\.|\//g, "")
|
||||
, c = u.id = "layuicss-" + s
|
||||
, p = 0;
|
||||
return u.rel = "stylesheet",
|
||||
u.href = e + (n.debug ? "?v=" + (new Date).getTime() : ""),
|
||||
u.media = "all",
|
||||
t.getElementById(c) || l.appendChild(u),
|
||||
"function" != typeof o ? i : (function f() {
|
||||
return ++p > 1e3 * n.timeout / 100 ? a(e + " timeout") : void (1989 === parseInt(i.getStyle(t.getElementById(c), "width")) ? function() {
|
||||
o()
|
||||
}() : setTimeout(f, 100))
|
||||
}(),
|
||||
i)
|
||||
}
|
||||
,
|
||||
n.callback = {},
|
||||
o.prototype.factory = function(e) {
|
||||
if (layui[e])
|
||||
return "function" == typeof n.callback[e] ? n.callback[e] : null
|
||||
}
|
||||
,
|
||||
o.prototype.addcss = function(e, t, o) {
|
||||
return layui.link(n.dir + "css/" + e, t, o)
|
||||
}
|
||||
,
|
||||
o.prototype.img = function(e, t, n) {
|
||||
var o = new Image;
|
||||
return o.src = e,
|
||||
o.complete ? t(o) : (o.onload = function() {
|
||||
o.onload = null,
|
||||
"function" == typeof t && t(o)
|
||||
}
|
||||
,
|
||||
void (o.onerror = function(e) {
|
||||
o.onerror = null,
|
||||
"function" == typeof n && n(e)
|
||||
}
|
||||
))
|
||||
}
|
||||
,
|
||||
o.prototype.config = function(e) {
|
||||
e = e || {};
|
||||
for (var t in e)
|
||||
n[t] = e[t];
|
||||
return this
|
||||
}
|
||||
,
|
||||
o.prototype.modules = function() {
|
||||
var e = {};
|
||||
for (var t in u)
|
||||
e[t] = u[t];
|
||||
return e
|
||||
}(),
|
||||
o.prototype.extend = function(e) {
|
||||
var t = this;
|
||||
e = e || {};
|
||||
for (var n in e)
|
||||
t[n] || t.modules[n] ? a("模块名 " + n + " 已被占用") : t.modules[n] = e[n];
|
||||
return t
|
||||
}
|
||||
,
|
||||
o.prototype.router = function(e) {
|
||||
var t = this
|
||||
, e = e || location.hash
|
||||
, n = {
|
||||
path: [],
|
||||
search: {},
|
||||
hash: (e.match(/[^#](#.*$)/) || [])[1] || ""
|
||||
};
|
||||
return /^#\//.test(e) ? (e = e.replace(/^#\//, ""),
|
||||
n.href = "/" + e,
|
||||
e = e.replace(/([^#])(#.*$)/, "$1").split("/") || [],
|
||||
t.each(e, function(e, t) {
|
||||
/^\w+=/.test(t) ? function() {
|
||||
t = t.split("="),
|
||||
n.search[t[0]] = t[1]
|
||||
}() : n.path.push(t)
|
||||
}),
|
||||
n) : n
|
||||
}
|
||||
,
|
||||
o.prototype.url = function(e) {
|
||||
var t = this
|
||||
, n = {
|
||||
pathname: function() {
|
||||
var t = e ? function() {
|
||||
var t = (e.match(/\.[^.]+?\/.+/) || [])[0] || "";
|
||||
return t.replace(/^[^\/]+/, "").replace(/\?.+/, "")
|
||||
}() : location.pathname;
|
||||
return t.replace(/^\//, "").split("/")
|
||||
}(),
|
||||
search: function() {
|
||||
var n = {}
|
||||
, o = (e ? (e.match(/\?.+/) || [])[0] || "" : location.search).replace(/^\?+/, "").split("&");
|
||||
return t.each(o, function(e, t) {
|
||||
var o = t.indexOf("=")
|
||||
, r = function() {
|
||||
return o < 0 ? t.substr(0, t.length) : 0 !== o && t.substr(0, o)
|
||||
}();
|
||||
r && (n[r] = o > 0 ? t.substr(o + 1) : null)
|
||||
}),
|
||||
n
|
||||
}(),
|
||||
hash: t.router(function() {
|
||||
return e ? (e.match(/#.+/) || [])[0] || "" : location.hash
|
||||
}())
|
||||
};
|
||||
return n
|
||||
}
|
||||
,
|
||||
o.prototype.data = function(t, n, o) {
|
||||
if (t = t || "layui",
|
||||
o = o || localStorage,
|
||||
e.JSON && e.JSON.parse) {
|
||||
if (null === n)
|
||||
return delete o[t];
|
||||
n = "object" == typeof n ? n : {
|
||||
key: n
|
||||
};
|
||||
try {
|
||||
var r = JSON.parse(o[t])
|
||||
} catch (a) {
|
||||
var r = {}
|
||||
}
|
||||
return "value"in n && (r[n.key] = n.value),
|
||||
n.remove && delete r[n.key],
|
||||
o[t] = JSON.stringify(r),
|
||||
n.key ? r[n.key] : r
|
||||
}
|
||||
}
|
||||
,
|
||||
o.prototype.sessionData = function(e, t) {
|
||||
return this.data(e, t, sessionStorage)
|
||||
}
|
||||
,
|
||||
o.prototype.device = function(t) {
|
||||
var n = navigator.userAgent.toLowerCase()
|
||||
, o = function(e) {
|
||||
var t = new RegExp(e + "/([^\\s\\_\\-]+)");
|
||||
return e = (n.match(t) || [])[1],
|
||||
e || !1
|
||||
}
|
||||
, r = {
|
||||
os: function() {
|
||||
return /windows/.test(n) ? "windows" : /linux/.test(n) ? "linux" : /iphone|ipod|ipad|ios/.test(n) ? "ios" : /mac/.test(n) ? "mac" : void 0
|
||||
}(),
|
||||
ie: function() {
|
||||
return !!(e.ActiveXObject || "ActiveXObject"in e) && ((n.match(/msie\s(\d+)/) || [])[1] || "11")
|
||||
}(),
|
||||
weixin: o("micromessenger")
|
||||
};
|
||||
return t && !r[t] && (r[t] = o(t)),
|
||||
r.android = /android/.test(n),
|
||||
r.ios = "ios" === r.os,
|
||||
r.mobile = !(!r.android && !r.ios),
|
||||
r
|
||||
}
|
||||
,
|
||||
o.prototype.hint = function() {
|
||||
return {
|
||||
error: a
|
||||
}
|
||||
}
|
||||
,
|
||||
o.prototype.each = function(e, t) {
|
||||
var n, o = this;
|
||||
if ("function" != typeof t)
|
||||
return o;
|
||||
if (e = e || [],
|
||||
e.constructor === Object) {
|
||||
for (n in e)
|
||||
if (t.call(e[n], n, e[n]))
|
||||
break
|
||||
} else
|
||||
for (n = 0; n < e.length && !t.call(e[n], n, e[n]); n++)
|
||||
;
|
||||
return o
|
||||
}
|
||||
,
|
||||
o.prototype.sort = function(e, t, n) {
|
||||
var o = JSON.parse(JSON.stringify(e || []));
|
||||
return t ? (o.sort(function(e, n) {
|
||||
var o = /^-?\d+$/
|
||||
, r = e[t]
|
||||
, a = n[t];
|
||||
return o.test(r) && (r = parseFloat(r)),
|
||||
o.test(a) && (a = parseFloat(a)),
|
||||
r && !a ? 1 : !r && a ? -1 : r > a ? 1 : r < a ? -1 : 0
|
||||
}),
|
||||
n && o.reverse(),
|
||||
o) : o
|
||||
}
|
||||
,
|
||||
o.prototype.stope = function(t) {
|
||||
t = t || e.event;
|
||||
try {
|
||||
t.stopPropagation()
|
||||
} catch (n) {
|
||||
t.cancelBubble = !0
|
||||
}
|
||||
}
|
||||
,
|
||||
o.prototype.onevent = function(e, t, n) {
|
||||
return "string" != typeof e || "function" != typeof n ? this : o.event(e, t, null, n)
|
||||
}
|
||||
,
|
||||
o.prototype.event = o.event = function(e, t, o, r) {
|
||||
var a = this
|
||||
, i = null
|
||||
, u = t.match(/\((.*)\)$/) || []
|
||||
, l = (e + "." + t).replace(u[0], "")
|
||||
, s = u[1] || ""
|
||||
, c = function(e, t) {
|
||||
var n = t && t.call(a, o);
|
||||
n === !1 && null === i && (i = !1)
|
||||
};
|
||||
return r ? (n.event[l] = n.event[l] || {},
|
||||
n.event[l][s] = [r],
|
||||
this) : (layui.each(n.event[l], function(e, t) {
|
||||
return "{*}" === s ? void layui.each(t, c) : ("" === e && layui.each(t, c),
|
||||
void (s && e === s && layui.each(t, c)))
|
||||
}),
|
||||
i)
|
||||
}
|
||||
,
|
||||
e.layui = new o
|
||||
}(window);
|
||||
966
finalExamScore.html
Normal file
@ -0,0 +1,966 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="renderer" content="webkit" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<title>高考信息</title>
|
||||
<link type="text/css" rel="stylesheet" href="./assets/layui/css/layui.css" />
|
||||
<link type="text/css" rel="stylesheet" href="./assets/css/common.css" />
|
||||
<link type="text/css" rel="stylesheet" href="./assets/css/mobile/info.css" />
|
||||
<link rel="stylesheet" href="./newCSS/finalExamScore.css">
|
||||
<link href="./newCSS/sweetalert2.min.css" rel="stylesheet">
|
||||
<style type="text/css">
|
||||
.layui-input,
|
||||
.layui-textarea {
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.layui-form-label {
|
||||
width: 100px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body class="pd-20">
|
||||
<div class="layui-layout layui-layout-admin">
|
||||
<!-- 头部区域 -->
|
||||
<div class="layui-header">
|
||||
<div class="layui-logo">学生端信息管理</div>
|
||||
<ul class="layui-nav layui-layout-right">
|
||||
<li class="layui-nav-item">
|
||||
<div id="exit">安全退出</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 左侧导航区域 -->
|
||||
<div class="layui-side layui-bg-black">
|
||||
<div class="layui-side-scroll">
|
||||
<ul class="layui-nav layui-nav-tree">
|
||||
<li class="layui-nav-item layui-nav-itemed">
|
||||
<a href="javascript:;">个人中心</a>
|
||||
<dl class="layui-nav-child">
|
||||
<dd class=""><a href="./nav.html">报名进度</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-body">
|
||||
<p class="tips mb-20 fs-16">请填写高考信息</p>
|
||||
<div class="layui-form">
|
||||
<div class="layui-form-item df">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label" style="width: 140px;">是否参加2025年高考<i
|
||||
class="must fs-20">*</i></label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="currentExam" id="currentExam" lay-verify="requiredSelect" lay-verType="tips"
|
||||
lay-filter="currentExam">
|
||||
<option value="">请选择</option>
|
||||
<option value="1">是</option>
|
||||
<option value="0">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="final-exam-content-0 layui-hide disabled ">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline finalExamYear-content ">
|
||||
<label class="layui-form-label">高考年份</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="finalExamYear" placeholder="请输入高考年份" autocomplete="off"
|
||||
class="layui-input finalExamYear-content-item" id="gaokaoYear" lay-verify=""
|
||||
lay-vertype="tips" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline finalExamYear-content">
|
||||
<label class="layui-form-label">大学名称</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="finalExamSchool" placeholder="请输入大学名称" autocomplete="off"
|
||||
class="layui-input finalExamYear-content-item" id="schoolName" lay-verify=""
|
||||
lay-vertype="tips" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label" style="width: 125px">2026年高考省份<i
|
||||
class="must">*</i></label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="nextYearFinalExamProvince1" id="nextYearFinalExamProvince1"
|
||||
lay-verify="" lay-vertype="tips" lay-search lay-filter="nextExamProvice1">
|
||||
<option value=""></option>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label" style="width: 125px">2026年高考组合<i
|
||||
class="must">*</i></label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="nextYearFinalExamGroup1" id="nextYearFinalExamGroup1" lay-verify=""
|
||||
lay-verType="tips">
|
||||
<option value=""></option>
|
||||
<option value="1">1物理化学政治</option>
|
||||
<option value="2">2物理化学生物</option>
|
||||
<option value="3">3物理化学地理</option>
|
||||
<option value="4">4物理生物地理</option>
|
||||
<option value="5">5物理生物政治</option>
|
||||
<option value="6">6物理政治地理</option>
|
||||
<option value="7">7历史化学地理</option>
|
||||
<option value="8">8历史化学政治</option>
|
||||
<option value="9">9历史生物地理</option>
|
||||
<option value="10">10历史化学生物</option>
|
||||
<option value="11">11历史政治生物</option>
|
||||
<option value="12">12历史政治地理</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<fieldset class="layui-elem-field layui-field-title border-blue finalExamYear-content ">
|
||||
<legend>证明材料</legend>
|
||||
<p class="tips mb-20 fs-16">
|
||||
请上传以下四种方式一项截图即可<br>1.大学录取通知书<br>2.大学证明(盖章)<br>3.学信网相关记录<br>4.其他证明材料</p>
|
||||
<div class="layui-field-box personPic" style="padding: 10px 270px;">
|
||||
<label class="layui-upload-drag left" id="uploadPhoto2">
|
||||
<img src="./newImg/upload.png" id="upload" alt="">
|
||||
<p>点击上传</p>
|
||||
<b class="must">*请上传 一寸证件照片</b>
|
||||
<p>照片大小:<span class="must">10M以内</span></p>
|
||||
<p>照片格式:<span class="must">jpg,png,jpeg</span></p>
|
||||
</label>
|
||||
|
||||
<div class="userImg2">
|
||||
<img src="" id="userPic2" alt="">
|
||||
<img src="./static/picture/close.png" id="close2" alt="">
|
||||
</div>
|
||||
|
||||
<input type="file" id="upload2" accept="image/*">
|
||||
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn" id="btn1" lay-submit lay-filter="finalScoreSub">立即提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="final-exam-content-1 ">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label" style="width: 100px;">2025高考省份<i
|
||||
class="must fs-20">*</i></label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="finalExamProvince" id="examProvince" lay-verify="" lay-verType="tips"
|
||||
lay-filter="finalExamProvince" class="currentExam-item-select">
|
||||
<option value=""></option>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label" style="width: 100px">2025高考组合 <i class="must">*</i></label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="thisYearFinalExamGroup" id="thisYearFinalExamGroup" lay-verify=""
|
||||
lay-filter="finalExamGroup" lay-verType="tips" class="currentExam-item-select">
|
||||
<option value=""></option>
|
||||
<option value="1">1物理化学政治</option>
|
||||
<option value="2">2物理化学生物</option>
|
||||
<option value="3">3物理化学地理</option>
|
||||
<option value="4">4物理生物地理</option>
|
||||
<option value="5">5物理生物政治</option>
|
||||
<option value="6">6物理政治地理</option>
|
||||
<option value="7">7历史化学地理</option>
|
||||
<option value="8">8历史化学政治</option>
|
||||
<option value="9">9历史生物地理</option>
|
||||
<option value="10">10历史化学生物</option>
|
||||
<option value="11">11历史政治生物</option>
|
||||
<option value="12">12历史政治地理</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="score-content" style="max-width: 1000px;">
|
||||
<p class="tip left">~ 请先选择高考省份 ~</p>
|
||||
<div class="layui-clear"></div>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
|
||||
<div class="score-content" style="max-width: 1000px;">
|
||||
<p class="tips mb-20 fs-16">如考生号和准考证号只有一项,准考证号与考生号请填写一致,外语科目为非英语科目学生不予录取</p>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline"> <label class="layui-form-label">准考证号 <i class="must">*</i></label>
|
||||
<div class="layui-input-inline"> <input type="text" name="finalExamNo"
|
||||
placeholder="请输入高考准考证号" id="finalExamNo" autocomplete="off" class="layui-input"
|
||||
lay-verify="required" lay-vertype="tips"> </div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline"> <label class="layui-form-label">考生号 <i class="must">*</i></label>
|
||||
<div class="layui-input-inline"> <input type="text" id="kaoshenghao" name="kaoshenghao"
|
||||
placeholder="请输入考生号" autocomplete="off" class="layui-input" lay-verify="required"
|
||||
lay-vertype="tips">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item Allsub">
|
||||
|
||||
|
||||
</div>
|
||||
<div class="m-content">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">高考总成绩 <i class="must">*</i></label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="number" name="finalExamTotalScore1" id="finalExamTotalScore1"
|
||||
placeholder="请输入高考总成绩" autocomplete="off" class="layui-input" lay-verify=""
|
||||
lay-vertype="tips">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">高考省排名 <i class="must">*</i></label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="number" name="finalExamRank1" id="finalExamRank1"
|
||||
placeholder="请输入高考省排名" autocomplete="off" class="layui-input" lay-verify=""
|
||||
lay-vertype="tips">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<p class="tips mb-20 fs-16">请提供高考查分网址 查分用户名 密码 只用于验证成绩真伪</p>
|
||||
</div>
|
||||
<div class="layui-form-item layui-form-text df">
|
||||
<label class="layui-form-label">查分验证<br>方式 <i class="must">*</i></label>
|
||||
<div class="layui-input-block flex1" style="max-width: 510px;">
|
||||
<textarea name="checkScoreType1" id="checkScoreType1"
|
||||
placeholder="请提供高考查分网址 查分用户名 密码 只用于验证成绩真伪" class="layui-textarea" lay-verify=""
|
||||
lay-vertype="tips"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label" style="width: 125px">2026年高考省份<i class="must">*</i></label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="nextYearFinalExamProvince2" id="nextYearFinalExamProvince2" lay-verify=""
|
||||
lay-vertype="tips" lay-search="" lay-filter="nextExamProvice2">
|
||||
<option value=""></option>
|
||||
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label" style="width: 125px">2026年高考组合 <i class="must">*</i></label>
|
||||
|
||||
|
||||
<div class="layui-input-inline">
|
||||
<select name="nextYearFinalExamGroup2" id="nextYearFinalExamGroup2" lay-verify=""
|
||||
lay-vertype="tips" lay-search lay-filter="nextYearFinalExamGroup2">
|
||||
<option value=""></option>
|
||||
<option value="1">1物理化学政治</option>
|
||||
<option value="2">2物理化学生物</option>
|
||||
<option value="3">3物理化学地理</option>
|
||||
<option value="4">4物理生物地理</option>
|
||||
<option value="5">5物理生物政治</option>
|
||||
<option value="6">6物理政治地理</option>
|
||||
<option value="7">7历史化学地理</option>
|
||||
<option value="8">8历史化学政治</option>
|
||||
<option value="9">9历史生物地理</option>
|
||||
<option value="10">10历史化学生物</option>
|
||||
<option value="11">11历史政治生物</option>
|
||||
<option value="12">12历史政治地理</option>
|
||||
</select>
|
||||
<div class="layui-unselect layui-form-select">
|
||||
<div class="layui-select-title"><input type="text" placeholder="请选择" value=""
|
||||
readonly="" class="layui-input layui-unselect"><i class="layui-edge"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="m-content">
|
||||
<fieldset class="layui-elem-field layui-field-title border-blue">
|
||||
<legend>高考成绩截图</legend>
|
||||
|
||||
|
||||
<div class="layui-field-box personPic" style="padding: 10px 270px;">
|
||||
<label class="layui-upload-drag left" id="uploadPhoto">
|
||||
<img src="./newImg/upload.png" id="upload" alt="">
|
||||
<p>点击上传</p>
|
||||
<b class="must">*请上传 一寸证件照片</b>
|
||||
<p>照片大小:<span class="must">10M以内</span></p>
|
||||
<p>照片格式:<span class="must">jpg,png,jpeg</span></p>
|
||||
</label>
|
||||
|
||||
<div class="userImg">
|
||||
<img src="" id="userPic" alt="">
|
||||
<img src="./static/picture/close.png" id="close" alt="">
|
||||
</div>
|
||||
|
||||
<input type="file" id="upload1" accept="image/*">
|
||||
|
||||
<div class="layui-show-drag left layui-hide" id="showPhoto">
|
||||
<div style="margin-bottom: 5px;">
|
||||
<img src="" height="125">
|
||||
</div>
|
||||
<button class="layui-btn layui-btn-danger layui-btn-sm" type="button"
|
||||
id="deletePhoto">删除图片</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="layui-form-item df2">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn" lay-submit="" id="btn2" lay-filter="finalScoreSub">立即提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div>
|
||||
<blockquote class="layui-elem-quote">
|
||||
<h3>如有疑问,可扫码咨询:</h3>
|
||||
<hr>
|
||||
<div class="ml-30">
|
||||
<img src="/newImg/qrcode.png">
|
||||
</div>
|
||||
</blockquote>
|
||||
</div> -->
|
||||
|
||||
<div class="form-content layui-hide">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">高考总成绩 <i class="must">*</i></label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="number" name="finalExamTotalScore1" id="finalExamTotalScore1"
|
||||
placeholder="请输入高考总成绩" autocomplete="off" class="layui-input" lay-verify=""
|
||||
lay-vertype="tips">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">高考省排名 <i class="must">*</i></label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="number" name="finalExamRank1" id="finalExamRank1" placeholder="请输入高考省排名"
|
||||
autocomplete="off" class="layui-input" lay-verify="" lay-vertype="tips">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<p class="tips mb-20 fs-16">请提供高考查分网址 查分用户名 密码 只用于验证成绩真伪</p>
|
||||
</div>
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">查分验证<br>方式 <i class="must">*</i></label>
|
||||
<div class="layui-input-block" style="max-width: 510px;">
|
||||
<textarea name="checkScoreType1" id="checkScoreType1"
|
||||
placeholder="请提供高考查分网址 查分用户名 密码 只用于验证成绩真伪" class="layui-textarea" lay-verify=""
|
||||
lay-vertype="tips"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label" style="width: 125px">2026年高考省份 <i class="must">*</i></label>
|
||||
<div class="layui-input-inline" style="margin-left: 155px;">
|
||||
<select name="nextYearFinalExamProvince3" id="nextYearFinalExamProvince3"
|
||||
lay-verify="requiredSelect" lay-vertype="tips" lay-filter="nextExamProvice2">
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label" style="width: 125px">2026年高考组合4 <i
|
||||
class="must">*</i></label>
|
||||
<div class="layui-input-inline" style="margin-left: 155px;">
|
||||
<select name="nextYearFinalExamGroup4" id="nextYearFinalExamProvince4"
|
||||
lay-verify=lay-verType="tips">
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<fieldset class="layui-elem-field layui-field-title border-blue">
|
||||
<hr class="layui-bg-blue">
|
||||
<legend>高考成绩截图</legend>
|
||||
<div class="layui-field-box center">
|
||||
<div class="layui-upload-drag center" id="uploadScorePhoto">
|
||||
<img src="./newImg/upload.png" id="upload" alt="">
|
||||
|
||||
<p>点击上传,或将文件拖拽到此处</p>
|
||||
<p>照片大小:<span class="must">10M以内</span></p>
|
||||
<p>照片格式:<span class="must">jpg,png,jpeg</span></p>
|
||||
</div>
|
||||
<div class="layui-show-drag center layui-hide" id="showPhoto">
|
||||
<div style="margin-bottom: 5px;">
|
||||
<img src="" height="125">
|
||||
</div>
|
||||
<button class="layui-btn layui-btn-danger layui-btn-sm" type="button"
|
||||
id="deleteScorePhoto_r">删除图片</button>
|
||||
</div>
|
||||
<input type="hidden" name="finalScorePhotoUrl" id="finalScorePhotoUrl">
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block" style="margin-left: 0; text-align: center;">
|
||||
<button class="layui-btn" lay-submit lay-filter="finalScoreSub">立即提交3</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.7.1.js" integrity="sha256-eKhayi8LEQwp4NKxN+CfCh+3qOVUtJn3QNZ0TciWLP4="
|
||||
crossorigin="anonymous"></script>
|
||||
<script src="./static/js/axios.min.js"></script>
|
||||
|
||||
|
||||
<script src="./static/js/sweetalert2.min.js"></script>
|
||||
<script>
|
||||
let token = localStorage.getItem("authToken")
|
||||
if (!token) {
|
||||
Swal.fire({
|
||||
title: '提示',
|
||||
text: '请重新登录',
|
||||
icon: 'error', // 可选:'success', 'error', 'warning', 'info', 'question'
|
||||
confirmButtonText: '确定',
|
||||
}).then(res => {
|
||||
if (res.isConfirmed) {
|
||||
window.location.href = './login.html'
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 高考成绩截图
|
||||
$('#uploadPhoto').click(function () {
|
||||
$("#upload1").click()
|
||||
})
|
||||
let imgUrl
|
||||
let imgUrl2
|
||||
$("#upload1").change(function (e) {
|
||||
let file = e.target.files[0];
|
||||
if (file) {
|
||||
let formData = new FormData();
|
||||
formData.append('file', file);
|
||||
axios.post('http://sms-auth.magicany.cc/student/upload', formData, {
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
"Authorization": token
|
||||
}
|
||||
}).then(res => {
|
||||
console.log(res.data.data.path);
|
||||
imgUrl2 = res.data.data.path
|
||||
imgUrl = 'http://sms-auth.magicany.cc/' + res.data.data.path
|
||||
$("#userPic").attr("src", imgUrl)
|
||||
$('#uploadPhoto').hide()
|
||||
$('.userImg').show()
|
||||
|
||||
// 清除输入框的值
|
||||
$("#upload1").val('');
|
||||
|
||||
}).catch(err => {
|
||||
console.log(err);
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
$("#close").click(function () {
|
||||
$("#userPic").attr("src", '')
|
||||
$('#uploadPhoto').show()
|
||||
$('.userImg').hide()
|
||||
// 清除输入框的值
|
||||
$("#upload1").val('');
|
||||
})
|
||||
|
||||
|
||||
// 证明材料
|
||||
$('#uploadPhoto2').click(function () {
|
||||
$("#upload2").click()
|
||||
})
|
||||
let imgUrl3
|
||||
let imgUrl4
|
||||
$("#upload2").change(function (e) {
|
||||
let file = e.target.files[0];
|
||||
if (file) {
|
||||
let formData = new FormData();
|
||||
formData.append('file', file);
|
||||
axios.post('http://sms-auth.magicany.cc/student/upload', formData, {
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
"Authorization": token
|
||||
}
|
||||
}).then(res => {
|
||||
imgUrl3 = res.data.data.path
|
||||
imgUrl4 = 'http://sms-auth.magicany.cc/' + res.data.data.path
|
||||
$("#userPic2").attr("src", imgUrl4)
|
||||
$('#uploadPhoto2').hide()
|
||||
$('.userImg2').show()
|
||||
|
||||
// 清除输入框的值
|
||||
$("#upload2").val('');
|
||||
|
||||
}).catch(err => {
|
||||
console.log(err);
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
$("#close2").click(function () {
|
||||
$("#userPic2").attr("src", '')
|
||||
$('#uploadPhoto2').show()
|
||||
$('.userImg2').hide()
|
||||
imgUrl3 = ''
|
||||
imgUrl4 = ''
|
||||
|
||||
// 清除输入框的值
|
||||
$("#upload2").val('');
|
||||
})
|
||||
|
||||
|
||||
//获取省份
|
||||
let proviceList
|
||||
function getCityTree() {
|
||||
axios.post('http://sms-auth.magicany.cc/student/cityTree', {
|
||||
}, {
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
"Authorization": token
|
||||
}
|
||||
}).then(res => {
|
||||
proviceList = res.data.data.list
|
||||
$.each(proviceList, function (index, item) {
|
||||
$("#hukouProvince").append(`<option value="${item.id}">${item.name}</option>`);
|
||||
$("#nextYearFinalExamProvince1").append(`<option value="${item.id}">${item.name}</option>`);
|
||||
$("#examProvince").append(`<option value="${item.id}">${item.name}</option>`);
|
||||
$("#nextYearFinalExamProvince2").append(`<option value="${item.id}">${item.name}</option>`);
|
||||
});
|
||||
|
||||
}).catch(err => {
|
||||
console.log(err);
|
||||
})
|
||||
}
|
||||
getCityTree()
|
||||
|
||||
|
||||
|
||||
let currentValue
|
||||
$("#currentExam").change(function () {
|
||||
currentValue = $('#currentExam').val()
|
||||
console.log(currentValue);
|
||||
if (currentValue == 1) {
|
||||
|
||||
$('.final-exam-content-0').addClass('layui-hide')
|
||||
$('.final-exam-content-0').addClass('disabled')
|
||||
// $(".score-content").show()
|
||||
$('.final-exam-content-1 ').show()
|
||||
if ($('#examProvince').val()) {
|
||||
$(".score-content").show()
|
||||
AllSub($('#examProvince').val())
|
||||
|
||||
}
|
||||
|
||||
} else if (currentValue == 0) {
|
||||
$(".score-content").hide()
|
||||
$('.final-exam-content-1 ').hide()
|
||||
$('.final-exam-content-0').removeClass('layui-hide')
|
||||
$('.final-exam-content-0').removeClass('disabled')
|
||||
}
|
||||
})
|
||||
|
||||
$("#examProvince").change(function () {
|
||||
currentValue = $('#examProvince').val()
|
||||
|
||||
if ($('#currentExam').val() == 1) {
|
||||
AllSub($('#examProvince').find('option:selected').text())
|
||||
$(".score-content").show()
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
$("#btn1").click(function () {
|
||||
submit()
|
||||
})
|
||||
|
||||
$("#btn2").click(function () {
|
||||
submit()
|
||||
})
|
||||
|
||||
function submit() {
|
||||
//是否参加25高考
|
||||
let currentExam = $('#currentExam').val()
|
||||
|
||||
//25高考省份
|
||||
let examProvince = $("#examProvince").val()
|
||||
//25高考组合
|
||||
let thisYearFinalExamGroup = $('#thisYearFinalExamGroup').val()
|
||||
//准考证号
|
||||
let finalExamNo = $("#finalExamNo").val()
|
||||
//考生号
|
||||
let kaoshenghao = $('#kaoshenghao').val()
|
||||
|
||||
|
||||
|
||||
//总分
|
||||
let finalExamTotalScore1 = $("#finalExamTotalScore1").val()
|
||||
//排名
|
||||
let finalExamRank1 = $("#finalExamRank1").val()
|
||||
//查分方式
|
||||
let checkScoreType1 = $("#checkScoreType1").val()
|
||||
// //26高考省份
|
||||
let nextYearFinalExamProvince2 = $("#nextYearFinalExamProvince2").val()
|
||||
// //26高考组合
|
||||
let nextYearFinalExamGroup2 = $("#nextYearFinalExamGroup2").val()
|
||||
|
||||
|
||||
//高考年份
|
||||
let gaokaoYear = $("#gaokaoYear").val()
|
||||
//大学名称
|
||||
let schoolName = $("#schoolName").val()
|
||||
//26年省份
|
||||
let nextYearFinalExamProvince1 = $("#nextYearFinalExamProvince1").val()
|
||||
//26年组合
|
||||
let nextYearFinalExamGroup1 = $("#nextYearFinalExamGroup1").val()
|
||||
|
||||
|
||||
let scoreList = []
|
||||
|
||||
if (currentExam == 1) {
|
||||
allSubject.forEach(item => {
|
||||
scoreList.push({
|
||||
subjectId: Number(item.id),
|
||||
score: Number($(`#all${item.id}`).val())
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
let isJoin = currentExam == 0 ? 2 : 1
|
||||
let province
|
||||
if (currentExam == 1) {
|
||||
province = nextYearFinalExamProvince2
|
||||
} else {
|
||||
province = nextYearFinalExamProvince1
|
||||
}
|
||||
|
||||
let preselection
|
||||
if (currentExam == 1) {
|
||||
preselection = nextYearFinalExamGroup2
|
||||
} else {
|
||||
preselection = nextYearFinalExamGroup1
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//证明材料
|
||||
// imgUrl3
|
||||
//成绩截图
|
||||
//imgUrl2
|
||||
|
||||
//不参加25高考
|
||||
if (currentExam == 0) {
|
||||
if (!gaokaoYear) {
|
||||
Swal.fire({
|
||||
title: '提示',
|
||||
text: '请填写高考年份',
|
||||
icon: 'error', // 可选:'success', 'error', 'warning', 'info', 'question'
|
||||
confirmButtonText: '确定'
|
||||
});
|
||||
|
||||
return
|
||||
}
|
||||
if (!schoolName) {
|
||||
|
||||
Swal.fire({
|
||||
title: '提示',
|
||||
text: '请填写大学名称',
|
||||
icon: 'error', // 可选:'success', 'error', 'warning', 'info', 'question'
|
||||
confirmButtonText: '确定'
|
||||
});
|
||||
|
||||
return
|
||||
|
||||
}
|
||||
if (!nextYearFinalExamProvince1) {
|
||||
Swal.fire({
|
||||
title: '提示',
|
||||
text: '请选择26年高考省份',
|
||||
icon: 'error', // 可选:'success', 'error', 'warning', 'info', 'question'
|
||||
confirmButtonText: '确定'
|
||||
});
|
||||
|
||||
return
|
||||
|
||||
}
|
||||
|
||||
if (!nextYearFinalExamGroup1) {
|
||||
|
||||
Swal.fire({
|
||||
title: '提示',
|
||||
text: '请选择26年高考组合',
|
||||
icon: 'error', // 可选:'success', 'error', 'warning', 'info', 'question'
|
||||
confirmButtonText: '确定'
|
||||
});
|
||||
|
||||
return
|
||||
|
||||
}
|
||||
if (!imgUrl3) {
|
||||
|
||||
Swal.fire({
|
||||
title: '提示',
|
||||
text: '请上传证明材料',
|
||||
icon: 'error', // 可选:'success', 'error', 'warning', 'info', 'question'
|
||||
confirmButtonText: '确定'
|
||||
});
|
||||
|
||||
return
|
||||
|
||||
}
|
||||
//参加25高考
|
||||
} else if (currentExam == 1) {
|
||||
if (!examProvince) {
|
||||
|
||||
Swal.fire({
|
||||
title: '提示',
|
||||
text: '请选择25年高考省份',
|
||||
icon: 'error', // 可选:'success', 'error', 'warning', 'info', 'question'
|
||||
confirmButtonText: '确定'
|
||||
});
|
||||
|
||||
return
|
||||
|
||||
}
|
||||
if (!thisYearFinalExamGroup) {
|
||||
|
||||
|
||||
Swal.fire({
|
||||
title: '提示',
|
||||
text: '请选择25年高考组合',
|
||||
icon: 'error', // 可选:'success', 'error', 'warning', 'info', 'question'
|
||||
confirmButtonText: '确定'
|
||||
});
|
||||
|
||||
return
|
||||
|
||||
}
|
||||
|
||||
if (!finalExamNo) {
|
||||
|
||||
Swal.fire({
|
||||
title: '提示',
|
||||
text: '请填写准考证号',
|
||||
icon: 'error', // 可选:'success', 'error', 'warning', 'info', 'question'
|
||||
confirmButtonText: '确定'
|
||||
});
|
||||
|
||||
return
|
||||
|
||||
}
|
||||
if (!kaoshenghao) {
|
||||
|
||||
Swal.fire({
|
||||
title: '提示',
|
||||
text: '请填写考生号',
|
||||
icon: 'error', // 可选:'success', 'error', 'warning', 'info', 'question'
|
||||
confirmButtonText: '确定'
|
||||
});
|
||||
|
||||
return
|
||||
|
||||
}
|
||||
if (!finalExamTotalScore1) {
|
||||
|
||||
Swal.fire({
|
||||
title: '提示',
|
||||
text: '请填写高考总成绩',
|
||||
icon: 'error', // 可选:'success', 'error', 'warning', 'info', 'question'
|
||||
confirmButtonText: '确定'
|
||||
});
|
||||
|
||||
return
|
||||
|
||||
}
|
||||
if (!finalExamRank1) {
|
||||
|
||||
Swal.fire({
|
||||
title: '提示',
|
||||
text: '请填写高考省排名',
|
||||
icon: 'error', // 可选:'success', 'error', 'warning', 'info', 'question'
|
||||
confirmButtonText: '确定'
|
||||
});
|
||||
|
||||
return
|
||||
|
||||
}
|
||||
|
||||
if (!checkScoreType1) {
|
||||
|
||||
Swal.fire({
|
||||
title: '提示',
|
||||
text: '请填写查验方式',
|
||||
icon: 'error', // 可选:'success', 'error', 'warning', 'info', 'question'
|
||||
confirmButtonText: '确定'
|
||||
});
|
||||
|
||||
return
|
||||
|
||||
}
|
||||
|
||||
if (!nextYearFinalExamProvince2) {
|
||||
|
||||
Swal.fire({
|
||||
title: '提示',
|
||||
text: '请选择26年高考省份',
|
||||
icon: 'error', // 可选:'success', 'error', 'warning', 'info', 'question'
|
||||
confirmButtonText: '确定'
|
||||
});
|
||||
|
||||
return
|
||||
|
||||
}
|
||||
if (!nextYearFinalExamGroup2) {
|
||||
Swal.fire({
|
||||
title: '提示',
|
||||
text: '请选择26年高考组合',
|
||||
icon: 'error', // 可选:'success', 'error', 'warning', 'info', 'question'
|
||||
confirmButtonText: '确定'
|
||||
});
|
||||
|
||||
return
|
||||
|
||||
}
|
||||
if (!imgUrl2) {
|
||||
|
||||
Swal.fire({
|
||||
title: '提示',
|
||||
text: '请上传高考成绩截图',
|
||||
icon: 'error', // 可选:'success', 'error', 'warning', 'info', 'question'
|
||||
confirmButtonText: '确定'
|
||||
});
|
||||
|
||||
return
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
axios.post('http://sms-auth.magicany.cc/student/college_score/add', {
|
||||
baseId: Number(localStorage.getItem('baseId')),
|
||||
isJoin: isJoin,
|
||||
collegeYear: gaokaoYear,
|
||||
schoolName: schoolName,
|
||||
province: examProvince,
|
||||
preselection: Number(thisYearFinalExamGroup),
|
||||
admissionTicket: finalExamNo,
|
||||
studentId: kaoshenghao,
|
||||
total: Number(finalExamTotalScore1),
|
||||
ranking: finalExamRank1,
|
||||
authUrl: checkScoreType1,
|
||||
nextProvince: Number(province),
|
||||
nextPreselection: Number(preselection),
|
||||
scoreList: scoreList,
|
||||
pic: imgUrl2,
|
||||
material: imgUrl3
|
||||
|
||||
}, {
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
"Authorization": token
|
||||
}
|
||||
}).then(res => {
|
||||
console.log(res);
|
||||
if (res.status == 500) {
|
||||
|
||||
Swal.fire({
|
||||
title: '提示',
|
||||
text: res.response.data.msg,
|
||||
icon: 'error', // 可选:'success', 'error', 'warning', 'info', 'question'
|
||||
confirmButtonText: '确定'
|
||||
});
|
||||
|
||||
return
|
||||
|
||||
}
|
||||
if (res.status == 200) {
|
||||
Swal.fire({
|
||||
title: '提示',
|
||||
text: '提交成功',
|
||||
icon: 'success', // 可选:'success', 'error', 'warning', 'info', 'question'
|
||||
confirmButtonText: '确定'
|
||||
});
|
||||
|
||||
return
|
||||
|
||||
}
|
||||
|
||||
}).catch(err => {
|
||||
console.log(err);
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
let allSubject
|
||||
//获取学科
|
||||
function AllSub(e) {
|
||||
axios.post('http://sms-auth.magicany.cc/student/allSubject', {
|
||||
name: e,
|
||||
}, {
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
"Authorization": token
|
||||
}
|
||||
}).then(res => {
|
||||
console.log(res.data.data.list);
|
||||
allSubject = res.data.data.list
|
||||
$.each(allSubject, function (index, item) {
|
||||
$(".Allsub").append(
|
||||
`
|
||||
<div class="layui-inline"> <label class="layui-form-label">${item.name}</label>
|
||||
<div class="layui-input-inline"> <input type="hidden" name="subjectId" value="1"> <input
|
||||
type="number" name="score" id="${'all' + item.id}" placeholder="请输入分数" autocomplete="off"
|
||||
class="layui-input"> </div>
|
||||
</div>
|
||||
`
|
||||
)
|
||||
});
|
||||
|
||||
}).catch(err => {
|
||||
console.log(err);
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
$("#exit").click(function () {
|
||||
localStorage.removeItem('baseId')
|
||||
localStorage.removeItem('authToken')
|
||||
localStorage.removeItem('authToken')
|
||||
})
|
||||
</script>
|
||||
|
||||
</html>
|
||||
1316
index.html
Normal file
208
login.html
Normal file
@ -0,0 +1,208 @@
|
||||
<!DOCTYPE html>
|
||||
<!--[if IE]>
|
||||
<script>top.location = "/ver";</script><![endif]-->
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<title>复习生报名</title>
|
||||
<link type="image/x-icon" rel="icon" href="./assets/img/favicon.ico">
|
||||
<link type="text/css" rel="stylesheet" href="./static/css/layui.css">
|
||||
<link type="text/css" rel="stylesheet" href="./static/css/common.css">
|
||||
<link type="text/css" rel="stylesheet" href="./static/css/login.css">
|
||||
<link rel="stylesheet" href="./newCSS/index.css">
|
||||
<link href="./newCSS/sweetalert2.min.css" rel="stylesheet">
|
||||
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.7.1.js"
|
||||
integrity="sha256-eKhayi8LEQwp4NKxN+CfCh+3qOVUtJn3QNZ0TciWLP4=" crossorigin="anonymous"></script>
|
||||
<script src="./static/js/axios.min.js"></script>
|
||||
|
||||
<script src="./static/js/sweetalert2.min.js"></script>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="bg">
|
||||
<div class="box">
|
||||
<div class="logo">
|
||||
<strong>复习生登录</strong>
|
||||
</div>
|
||||
<form class="layui-form layui-form-pane">
|
||||
<div class="layui-form-item">
|
||||
<div class="">
|
||||
<input type="text" name="account" placeholder="请输入帐号(信息注册填写的手机号)" autocomplete="off"
|
||||
class="layui-input pl-20" lay-verify="required" lay-vertype="tips" id="account">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="">
|
||||
<input type="password" name="password" id="password" placeholder="请输入密码(信息注册填写的学生身份证号后6位,最后一位X大写)"
|
||||
autocomplete="off" class="layui-input pl-20" lay-verify="required" lay-vertype="tips">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
|
||||
<div class="captcha-container">
|
||||
<div class="yzmBox">
|
||||
<input type="text" id="yzm" name="captcha" placeholder="请输入验证码" autocomplete="off"
|
||||
class="layui-input pl-20" style="width: 250px" lay-verify="required" lay-vertype="tips">
|
||||
<span class="captcha-box" id="captcha"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-btn layui-btn-fluid" id="login">立即登录</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="dialog">
|
||||
<div class="box2">
|
||||
<h2 class="anno-title">提示内容</h2>
|
||||
<hr class="layui-bg-red">
|
||||
<hr class="layui-bg-red">
|
||||
<ul class="anno">
|
||||
<li class="content">1. 学生必须如实填写高考分数,如审核发现成绩造假,立即取消入学资格;</li>
|
||||
<li class="content">2. 本校只招收英语类考生,暂不招收其它语种;</li>
|
||||
<li class="content">3. 我校不招收物理和历史同时选择或者同时不选择的考生;</li>
|
||||
<li class="content">4. 开学后如果转组合(高考组合与首次开学后所学组合不同),按最高标准收费,开学后补齐学费;</li>
|
||||
<li class="content">5. 艺术生(有长时间不在校,在外培训)按在校生对待;</li>
|
||||
<li class="content">6. 关于注册中“是否在我校报名2025年高考”,省外户籍的学生应当返回户籍所在省份报名,应该选择否;
|
||||
省内户籍的学生,如选择是,则必须在我校进行高考报名,报名核查时如未在我校高考报名,则无条件退学,学费不退。如选择否,则暂缓录取,学校将根据学生实际高考报名考点选择性录取</li>
|
||||
</ul>
|
||||
<div class="center mt-30">
|
||||
<button class="layui-btn" id="down">我已阅读并同意以上用户协议</button>
|
||||
</div>
|
||||
<div class="center mt-10">
|
||||
<button class="layui-btn layui-btn-primary" id="exit">不同意</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
const captchaEl = document.getElementById('captcha');
|
||||
const refreshBtn = document.getElementById('refresh');
|
||||
|
||||
let currentCaptcha = '';
|
||||
|
||||
// 生成随机验证码(4位字母数字组合)
|
||||
function generateCaptcha() {
|
||||
const chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
||||
let captcha = '';
|
||||
for (let i = 0; i < 4; i++) {
|
||||
captcha += chars.charAt(Math.floor(Math.random() * chars.length));
|
||||
}
|
||||
currentCaptcha = captcha;
|
||||
captchaEl.textContent = captcha;
|
||||
}
|
||||
|
||||
// 初始化验证码
|
||||
generateCaptcha();
|
||||
|
||||
// 刷新验证码
|
||||
captchaEl.addEventListener('click', generateCaptcha);
|
||||
|
||||
|
||||
|
||||
$('#login').click(function () {
|
||||
let account = $('#account').val()
|
||||
let password = $('#password').val()
|
||||
|
||||
if (!account) {
|
||||
Swal.fire({
|
||||
title: '提示',
|
||||
text: '请输入账号',
|
||||
icon: 'error', // 可选:'success', 'error', 'warning', 'info', 'question'
|
||||
confirmButtonText: '确定'
|
||||
});
|
||||
return
|
||||
|
||||
}
|
||||
if (!password) {
|
||||
|
||||
Swal.fire({
|
||||
title: '提示',
|
||||
text: '请输入密码',
|
||||
icon: 'error', // 可选:'success', 'error', 'warning', 'info', 'question'
|
||||
confirmButtonText: '确定'
|
||||
});
|
||||
return
|
||||
|
||||
}
|
||||
if (!$('#yzm').val()) {
|
||||
|
||||
Swal.fire({
|
||||
title: '提示',
|
||||
text: '请输入验证码',
|
||||
icon: 'error', // 可选:'success', 'error', 'warning', 'info', 'question'
|
||||
confirmButtonText: '确定'
|
||||
});
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
if ($('#yzm').val().toUpperCase() === currentCaptcha) {
|
||||
axios.post('http://sms-auth.magicany.cc/student/login', {
|
||||
phone: account,
|
||||
password: password
|
||||
}).then(res => {
|
||||
console.log(res.data.data.token);
|
||||
|
||||
if (res.status == 200) {
|
||||
localStorage.setItem('authToken', res.data.data.token);
|
||||
window.location.href = './nav.html'
|
||||
}
|
||||
|
||||
}).catch(err => {
|
||||
console.log(err);
|
||||
})
|
||||
|
||||
// 这里可以添加成功后的操作,如表单提交
|
||||
} else {
|
||||
generateCaptcha(); // 错误后刷新验证码
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
var countdown = 5;
|
||||
|
||||
function setTime(val) {
|
||||
if (countdown == 0) {
|
||||
$('#down').attr("disabled", false);
|
||||
$('#down').text("我已阅读并同意以上用户协议");
|
||||
return;
|
||||
} else {
|
||||
$('#down').attr("disabled", true);
|
||||
$('#down').text("请阅读 " + countdown + "秒");
|
||||
countdown--;
|
||||
}
|
||||
setTimeout(function () {
|
||||
setTime($('#down'))
|
||||
}, 1000)
|
||||
}
|
||||
setTime()
|
||||
|
||||
$('#down').click(function () {
|
||||
$('.dialog').hide()
|
||||
})
|
||||
|
||||
$('#exit').click(function () {
|
||||
$('.layui-btn').hide()
|
||||
})
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
149
nav.html
Normal file
@ -0,0 +1,149 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<title>复习生报名</title>
|
||||
<!--<link type="image/x-icon" rel="icon" href="/assets/img/favicon.ico">-->
|
||||
<link type="text/css" rel="stylesheet" href="./assets/layui/css/layui.css">
|
||||
<link type="text/css" rel="stylesheet" href="./assets/css/common.css">
|
||||
<link type="text/css" rel="stylesheet" href="./assets/css/nav.css" />
|
||||
<link rel="stylesheet" href="./newCSS/nav.css">
|
||||
<link href="./newCSS/sweetalert2.min.css" rel="stylesheet">
|
||||
|
||||
</head>
|
||||
|
||||
<body class="layui-layout-body">
|
||||
<div class="layui-layout layui-layout-admin">
|
||||
<!-- 头部区域 -->
|
||||
<div class="layui-header">
|
||||
<div class="layui-logo">学生端信息管理</div>
|
||||
<ul class="layui-nav layui-layout-right">
|
||||
<li class="layui-nav-item">
|
||||
<div id="exit">安全退出</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 左侧导航区域 -->
|
||||
<div class="layui-side layui-bg-black">
|
||||
<div class="layui-side-scroll">
|
||||
<ul class="layui-nav layui-nav-tree">
|
||||
<li class="layui-nav-item layui-nav-itemed">
|
||||
<a href="javascript:;">个人中心</a>
|
||||
<dl class="layui-nav-child">
|
||||
<dd class="layui-this"><a href="./nav.html">报名进度</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 内容主体区域 -->
|
||||
<div class="layui-body">
|
||||
<blockquote class="layui-elem-quote">
|
||||
学生报名进度
|
||||
</blockquote>
|
||||
<ul class="layui-timeline">
|
||||
<li class="layui-timeline-item">
|
||||
<i class="layui-icon layui-timeline-axis layui-icon-ok-circle"></i>
|
||||
<div class="layui-timeline-content layui-text ">
|
||||
<div class="person">
|
||||
<img src="./newImg/sucess.png" alt="">
|
||||
<h3>个人信息<span style="color: red;">(当前状态:可修改)</span></h3>
|
||||
</div>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="./info.html" class="link">查看 / 修改报名信息</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<li class="layui-timeline-item ">
|
||||
<i class="layui-icon layui-timeline-axis layui-icon-circle"></i>
|
||||
<div class="layui-timeline-content layui-text">
|
||||
<div class="person">
|
||||
<div class="cir"></div>
|
||||
<h3 class="layui-timeline-title">高考成绩<span style="color: red;">(当前状态:待完善) </span></h3>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="tips">
|
||||
<b>请在高考出分后第一时间完善高考成绩,并及时关注学校官网通知,同时注意查看注册用手机号是否有短信通知。</b><br>
|
||||
务必保证成绩的真实有效,如发现成绩作假,立即取消入学资格。
|
||||
</li>
|
||||
<li>
|
||||
<a href="./finalExamScore.html" class="link">填写 / 修改高考成绩</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<li class="layui-timeline-item">
|
||||
<i class="layui-icon layui-timeline-axis layui-icon-component"></i>
|
||||
<div class="layui-timeline-content layui-text">
|
||||
<div class="person">
|
||||
<img src="./newImg/func.png" alt="">
|
||||
<h3 class="layui-timeline-title">
|
||||
其余功能
|
||||
</h3>
|
||||
</div>
|
||||
<ul>
|
||||
<li>
|
||||
其余功能暂未开放
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.7.1.js"
|
||||
integrity="sha256-eKhayi8LEQwp4NKxN+CfCh+3qOVUtJn3QNZ0TciWLP4=" crossorigin="anonymous"></script>
|
||||
<script src="./static/js/axios.min.js"></script>
|
||||
|
||||
<script src="./static/js/sweetalert2.min.js"></script>
|
||||
|
||||
<script>
|
||||
let token = localStorage.getItem("authToken")
|
||||
|
||||
if (!token) {
|
||||
Swal.fire({
|
||||
title: '提示',
|
||||
text: '请重新登录',
|
||||
icon: 'error', // 可选:'success', 'error', 'warning', 'info', 'question'
|
||||
confirmButtonText: '确定',
|
||||
}).then(res => {
|
||||
if (res.isConfirmed) {
|
||||
window.location.href = './login.html'
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function GetInfo() {
|
||||
axios.post('http://sms-auth.magicany.cc/student/loginInfo', {
|
||||
|
||||
}, {
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
"Authorization": token
|
||||
}
|
||||
}).then(res => {
|
||||
console.log(res.data.data.info.id);
|
||||
localStorage.setItem('baseId', res.data.data.info.id);
|
||||
}).catch(err => {
|
||||
console.log(err);
|
||||
})
|
||||
}
|
||||
GetInfo()
|
||||
|
||||
$("#exit").click(function () {
|
||||
localStorage.removeItem('baseId')
|
||||
localStorage.removeItem('authToken')
|
||||
localStorage.removeItem('authToken')
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
136
newCSS/enroll.css
Normal file
@ -0,0 +1,136 @@
|
||||
@media (max-width:1000px) {
|
||||
|
||||
.layui-header {
|
||||
width: 100%;
|
||||
min-width: unset;
|
||||
}
|
||||
|
||||
.layui-main {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.layui-header .logo {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.personPic {
|
||||
padding: 0 !important;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
|
||||
.layui-input,
|
||||
.layui-select,
|
||||
.layui-textarea {
|
||||
border: none;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
.layui-inline {
|
||||
border-bottom: 1px solid #EEE;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.footer .tip {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.layui-badge {
|
||||
font-size: 14px !important;
|
||||
font-weight: bold;
|
||||
padding: 2px 10px;
|
||||
}
|
||||
|
||||
.link {
|
||||
font-size: 16px !important;
|
||||
}
|
||||
|
||||
.layui-input-inline {
|
||||
display: flex !important;
|
||||
}
|
||||
|
||||
.layui-input-inline select {
|
||||
border: none;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
.layui-form-select dl dd,
|
||||
.layui-form-select dl dt {
|
||||
padding: 0 10px;
|
||||
line-height: 36px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.layui-input-inline {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.layui-form-label {
|
||||
padding-left: 0px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
.layui-field-title .layui-field-box {
|
||||
padding: 10px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.layui-form-item {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.dx {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.dx .layui-form-item {
|
||||
display: flex;
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
|
||||
.dx .layui-form-label {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.dx .layui-form-item .layui-input-inline {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.layui-form-item .layui-form-label {
|
||||
width: auto !important;
|
||||
}
|
||||
}
|
||||
|
||||
#upload1 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.userImg {
|
||||
padding: 30px 50px;
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
display: none;
|
||||
position: relative;
|
||||
}
|
||||
.userImg img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#close {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
top: 0px;
|
||||
z-index: 999;
|
||||
}
|
||||
.personPic{
|
||||
display: flex;
|
||||
}
|
||||
229
newCSS/finalExamScore.css
Normal file
@ -0,0 +1,229 @@
|
||||
@media (max-width:1000px) {
|
||||
.layui-header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.layui-side {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.layui-body {
|
||||
position: relative !important;
|
||||
top: 0 !important;
|
||||
left: 0 !important;
|
||||
}
|
||||
|
||||
.layui-form-select .layui-input {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.layui-inline .layui-form-label {
|
||||
width: 112px !important;
|
||||
white-space: pre-line !important;
|
||||
}
|
||||
|
||||
.layui-inline {
|
||||
display: flex !important;
|
||||
}
|
||||
|
||||
.layui-input-inline {
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
|
||||
.ml-30 img {
|
||||
width: 90% !important;
|
||||
height: 90% !important;
|
||||
}
|
||||
|
||||
.layui-field-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.df2 {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.layui-input,
|
||||
.layui-textarea {
|
||||
width: 100% !important;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
.layui-inline {
|
||||
border-bottom: 0;
|
||||
margin: 0 auto !important;
|
||||
}
|
||||
|
||||
.layui-form-item .layui-form-label {
|
||||
text-align-last: left;
|
||||
}
|
||||
|
||||
.layui-form-item .layui-input-inline {
|
||||
margin-bottom: 0;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
#checkScoreType1 {
|
||||
border: 1px solid #ddd !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.df {
|
||||
display: flex !important;
|
||||
margin: 0 auto;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.layui-inline {
|
||||
width: 100% !important;
|
||||
display: flex !important;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.layui-field-title .layui-field-box {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.layui-input-block {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
.pd-20 {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.layui-header {
|
||||
border-bottom: 1px solid #1E9FFF;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.ml-30 img {
|
||||
width: 400px;
|
||||
height: 400px;
|
||||
}
|
||||
|
||||
.layui-form-label {
|
||||
width: 85px !important;
|
||||
}
|
||||
|
||||
.layui-input-block {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.df {
|
||||
display: flex !important;
|
||||
}
|
||||
|
||||
.flex1 {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
#upload {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.layui-input,
|
||||
.layui-textarea {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.personPic {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
#upload1 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.userImg {
|
||||
padding: 30px 50px;
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
display: none;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.userImg img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#close {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
top: 0px;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.layui-form input[type=checkbox],
|
||||
.layui-form input[type=radio],
|
||||
.layui-form select {
|
||||
display: block;
|
||||
display: block;
|
||||
height: 38px;
|
||||
width: 100%;
|
||||
box-shadow: none;
|
||||
border: 1px solid #e6e6e6;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.layui-form-select .layui-input {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.layui-edge {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.score-content {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.layui-input-inline input {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
#upload2 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.userImg2 {
|
||||
padding: 30px 50px;
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
display: none;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.userImg2 img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#close2 {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
top: 0px;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.layui-nav-item {
|
||||
cursor: pointer;
|
||||
}
|
||||
68
newCSS/index.css
Normal file
@ -0,0 +1,68 @@
|
||||
@media (max-width:1000px) {
|
||||
html{
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
}
|
||||
.bg{
|
||||
background-color: #fff;
|
||||
}
|
||||
.box{
|
||||
margin: 0px;
|
||||
position: relative;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
box-shadow:none;
|
||||
}
|
||||
|
||||
.box2{
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
.dialog{
|
||||
background-color: rgba(0,0,0,0.5);
|
||||
padding: 20px;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
display: none;
|
||||
}
|
||||
.box2{
|
||||
background-color: #fff;
|
||||
padding: 20px;
|
||||
/* left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%,-50%); */
|
||||
width: 40vw;
|
||||
}
|
||||
|
||||
.captcha-container {
|
||||
margin: 20px;
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
.captcha-box {
|
||||
display: inline-block;
|
||||
padding: 10px;
|
||||
background: #f0f0f0;
|
||||
letter-spacing: 5px;
|
||||
font-weight: bold;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.yzmBox{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.captcha-box{
|
||||
flex: 1;
|
||||
}
|
||||
64
newCSS/nav.css
Normal file
@ -0,0 +1,64 @@
|
||||
@media (max-width:1000px) {
|
||||
.layui-header{
|
||||
display: none;
|
||||
}
|
||||
.layui-bg-black{
|
||||
display: none;
|
||||
}
|
||||
.layui-body{
|
||||
position: relative !important;
|
||||
top: 0 !important;
|
||||
left: 0 !important;
|
||||
}
|
||||
li{
|
||||
list-style-type: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.person{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.person img{
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
margin-right: 10px;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.layui-icon-ok-circle:before{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.layui-timeline-content{
|
||||
padding-left: 0;
|
||||
}
|
||||
.layui-icon-component:before{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.layui-icon-circle:before{
|
||||
display: none;
|
||||
}
|
||||
.layui-timeline .layui-icon{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.cir{
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
margin-right: 10px;
|
||||
box-sizing: border-box;
|
||||
border-radius: 50%;
|
||||
border: 2px solid #1e9fff;
|
||||
}
|
||||
.layui-text h3{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.layui-timeline-item:before, hr{
|
||||
display: none;
|
||||
}
|
||||
.layui-timeline-item:before, hr{
|
||||
display: none !important;
|
||||
}
|
||||
1
newCSS/sweetalert2.min.css
vendored
Normal file
BIN
newImg/func.png
Normal file
|
After Width: | Height: | Size: 7.2 KiB |
BIN
newImg/qrcode.png
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
newImg/sucess.png
Normal file
|
After Width: | Height: | Size: 8.7 KiB |
BIN
newImg/upload.png
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
286
static/css/common.css
Normal file
@ -0,0 +1,286 @@
|
||||
.center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.ml-0 {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.ml-10 {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.ml-20 {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.ml-30 {
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
.mr-0 {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.mr-10 {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.mr-20 {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.mr-30 {
|
||||
margin-right: 30px;
|
||||
}
|
||||
|
||||
.mt-10 {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.mt-20 {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.mt-30 {
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.mt-50 {
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
.mb-0 {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.mb-10 {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.mb-20 {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
|
||||
.pd-5 {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.pd-10 {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.pd-20 {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.pl-20 {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.left {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.right {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.clear {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.must {
|
||||
color: #FF5722;
|
||||
}
|
||||
|
||||
.fs-16 {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.fs-20 {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.w-100 {
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.color-green {
|
||||
color: #009688;
|
||||
}
|
||||
|
||||
.color-red {
|
||||
color: #ff0000;
|
||||
}
|
||||
|
||||
.color-my {
|
||||
color: #aacf53;
|
||||
}
|
||||
|
||||
.window {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.layui-layout-admin .layui-body {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.layui-btn-normal {
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
/*.layui-elem-quote {
|
||||
border-left: 5px solid #1E9FFF;
|
||||
}*/
|
||||
|
||||
.layui-nav-item .layui-nav-child a {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.layui-tab-title li {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.layui-col-xs12 {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.layui-tab-brief > .layui-tab-more li.layui-this:after, .layui-tab-brief > .layui-tab-title .layui-this:after {
|
||||
border-bottom: 4px solid #5FB878;
|
||||
}
|
||||
|
||||
.tip {
|
||||
text-align: center;
|
||||
color: #999;
|
||||
font-size: 16px;
|
||||
padding: 20px;
|
||||
}
|
||||
.tips {
|
||||
color: #F00;
|
||||
padding: 10px;
|
||||
border-width: 0 0 0 5px;
|
||||
border-style: solid;
|
||||
border-color: #FF5722;
|
||||
}
|
||||
|
||||
.none-tips {
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
color: #CCC;
|
||||
}
|
||||
|
||||
.layui-tab[overflow] > .layui-tab-title, .layui-tab > .layui-tab-title {
|
||||
overflow-x: scroll;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
.layui-tab[overflow] > .layui-tab-title::-webkit-scrollbar, .layui-tab > .layui-tab-title::-webkit-scrollbar {
|
||||
display: none
|
||||
}
|
||||
|
||||
.layui-form-mid {
|
||||
margin: 0 5px 0 5px;
|
||||
}
|
||||
|
||||
.long-item .layui-input {
|
||||
display: inline-block;
|
||||
width: 90%;
|
||||
|
||||
}
|
||||
|
||||
.del-btn {
|
||||
position: relative;
|
||||
top: -30px;
|
||||
right: -60px;
|
||||
}
|
||||
|
||||
.layui-tab-bar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.layui-badge {
|
||||
padding: 3px 6px;
|
||||
}
|
||||
|
||||
.add-popup, .edit-popup {
|
||||
padding: 30px;
|
||||
}
|
||||
|
||||
|
||||
/*自定义弹出框*/
|
||||
.cardWrapper.active {
|
||||
pointer-events: all;
|
||||
z-index: 1;
|
||||
animation: fadeIn 0.5s ease-in-out both 0.5s;
|
||||
}
|
||||
.cardWrapper {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
border-radius: 3px;
|
||||
background-color: white;
|
||||
width: 250px;
|
||||
overflow: hidden;
|
||||
z-index: 0;
|
||||
box-shadow: 5px 10px 10px 0px rgba(0, 0, 0, 0.1);
|
||||
pointer-events: none;
|
||||
opacity: 0;
|
||||
transform: scale(0.5);
|
||||
}
|
||||
.cardWrapper .textWrapper {
|
||||
padding: 30px 20px;
|
||||
text-align: center;
|
||||
}
|
||||
.textWrapper .title {
|
||||
font-weight: bold;
|
||||
color: #616e7d;
|
||||
font-size: 14px;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
.cardWrapper .button {
|
||||
text-align: center;
|
||||
padding: 10px 0;
|
||||
color: white;
|
||||
background-color: #3ca7fb;
|
||||
width: 100%;
|
||||
border-radius: 0 0 3px 3px;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
/*number类型输入框去除上下箭头*/
|
||||
input::-webkit-outer-spin-button,
|
||||
input::-webkit-inner-spin-button {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
input[type="number"]{
|
||||
-moz-appearance: textfield;
|
||||
}
|
||||
|
||||
|
||||
.footer {
|
||||
margin-top: 20px;
|
||||
width: 100%;
|
||||
background: #141a25;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.footer .tip {
|
||||
opacity: 0.4;
|
||||
width: 1200px;
|
||||
margin: 0 auto;
|
||||
border-top: 1px solid hsla(0,0%,100%,.4);
|
||||
padding: 15px 0;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.footer .tip a {
|
||||
color: #fff;
|
||||
}
|
||||
128
static/css/enroll.css
Normal file
@ -0,0 +1,128 @@
|
||||
.bg {
|
||||
background: #FFF;
|
||||
}
|
||||
|
||||
.layui-header {
|
||||
margin-bottom: 10px;
|
||||
min-width: 1000px;
|
||||
background: #fff;
|
||||
border-bottom: 1px solid #aacf53;
|
||||
}
|
||||
|
||||
.layui-main {
|
||||
width: 1000px;
|
||||
}
|
||||
|
||||
.layui-header .logo {
|
||||
line-height: 60px;
|
||||
text-align: center;
|
||||
font-size: 30px;
|
||||
font-weight: bold;
|
||||
color: #aacf53;
|
||||
letter-spacing: 5px;
|
||||
}
|
||||
|
||||
.layui-header .layui-nav-bar {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.layui-header .layui-layout-right {
|
||||
background: #fff;
|
||||
}
|
||||
.title, .title2 {
|
||||
color: #aacf53;
|
||||
text-align: center;
|
||||
}
|
||||
.title {
|
||||
font-size: 2em;
|
||||
font-weight: bold;
|
||||
}
|
||||
.title2 {
|
||||
padding: 10px;
|
||||
font-size: 16px;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.demo-img {
|
||||
border: 2px solid #CCCCCC;
|
||||
}
|
||||
|
||||
.border-blue {
|
||||
border-color: #1E9FFF;
|
||||
}
|
||||
|
||||
.layui-badge {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
padding: 2px 10px;
|
||||
}
|
||||
|
||||
.layui-form .layui-form-item .layui-upload-drag img {
|
||||
margin-bottom: 10px;
|
||||
max-width: 100px;
|
||||
}
|
||||
|
||||
.layui-show-drag {
|
||||
position: relative;
|
||||
padding: 15px;
|
||||
border: 1px dashed #e2e2e2;
|
||||
background-color: #fff;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
color: #999;
|
||||
height: 162px;
|
||||
width: 265px;
|
||||
}
|
||||
|
||||
.layui-upload-drag {
|
||||
padding: 30px 50px;
|
||||
}
|
||||
|
||||
.layui-disabled {
|
||||
color: #cccccc !important;
|
||||
}
|
||||
|
||||
.link {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #1E9FFF;
|
||||
}
|
||||
|
||||
.examInfo_h .exam-title {
|
||||
width: 152px;
|
||||
}
|
||||
|
||||
.recommend-box .layui-form-item {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.score-item .layui-inline {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.end-tip-div {
|
||||
width: 800px;
|
||||
text-align: center;
|
||||
padding: 10px;
|
||||
margin: 30px auto 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: 2px dashed #CCC;
|
||||
background-color: #fbfbfb;
|
||||
|
||||
}
|
||||
.end-tip-div .end-img-div, .end-tip-div .end-text-div {
|
||||
display: inline-block;
|
||||
}
|
||||
.end-tip-div .end-text-div {
|
||||
font-size: 18px;
|
||||
text-align: left;
|
||||
line-height: 34px;
|
||||
padding: 50px;
|
||||
}
|
||||
|
||||
.icon-div {
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
40
static/css/index.css
Normal file
@ -0,0 +1,40 @@
|
||||
.layui-input-inline{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.layui-form input[type=checkbox], .layui-form input[type=radio], .layui-form select{
|
||||
display: block;
|
||||
}
|
||||
.radioBox{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 14px;
|
||||
line-height: 28px;
|
||||
margin: 6px 10px 0 0;
|
||||
padding-right: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.radioBox label{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
.radioBox input{
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.layui-input-inline select{
|
||||
height: 38px;
|
||||
line-height: 1.3;
|
||||
line-height: 38px \9;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
background-color: #fff;
|
||||
border-radius: 2px;
|
||||
border-color: #e6e6e6;
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding-left: 10px;
|
||||
}
|
||||
2
static/css/layui.css
Normal file
64
static/css/login.css
Normal file
@ -0,0 +1,64 @@
|
||||
.bg {
|
||||
background: #EEE;
|
||||
}
|
||||
|
||||
.box {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-top: -250px;
|
||||
margin-left: -215px;
|
||||
padding: 40px;
|
||||
width: 350px;
|
||||
height: 400px;
|
||||
background: #fff;
|
||||
box-shadow: #CCC 0 0 20px;
|
||||
}
|
||||
|
||||
.box .logo {
|
||||
margin-bottom: 50px;
|
||||
text-align: center;
|
||||
color: #aacf53;
|
||||
}
|
||||
|
||||
.box .logo strong {
|
||||
display: block;
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
.box .logo em {
|
||||
display: block;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.box .layui-input {
|
||||
height: 45px;
|
||||
border-width: 0 0 1px 0;
|
||||
}
|
||||
|
||||
.box .layui-form-item .layui-input-inline {
|
||||
width: 130px;
|
||||
}
|
||||
|
||||
.box .captcha {
|
||||
width: 100px;
|
||||
height: 38px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.box .remind {
|
||||
text-align: center;
|
||||
color: #f90051;
|
||||
}
|
||||
|
||||
/**浏览器版本过低,登录超时*/
|
||||
.ver, .over {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-top: -100px;
|
||||
margin-left: -500px;
|
||||
width: 1000px;
|
||||
text-align: center;
|
||||
color: #333;
|
||||
}
|
||||
BIN
static/font/iconfont.eot
Normal file
554
static/font/iconfont.svg
Normal file
|
After Width: | Height: | Size: 299 KiB |
BIN
static/font/iconfont.ttf
Normal file
BIN
static/font/iconfont.woff
Normal file
BIN
static/font/iconfont.woff2
Normal file
31
static/js/anno.js
Normal file
@ -0,0 +1,31 @@
|
||||
layui.use(['element', 'layer', 'jquery'], function () {
|
||||
var element = layui.element,
|
||||
layer = layui.layer,
|
||||
$ = layui.jquery;
|
||||
|
||||
if ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))) {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
area: ['80%', '500px'],
|
||||
maxmin: false,
|
||||
resize: false,
|
||||
closeBtn: false,
|
||||
skin:'anno-content',
|
||||
content: '/anno'
|
||||
});
|
||||
} else {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
area: ['500px', '500px'],
|
||||
maxmin: false,
|
||||
resize: false,
|
||||
closeBtn: false,
|
||||
skin:'anno-content',
|
||||
content: '/anno'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
3
static/js/axios.min.js
vendored
Normal file
153
static/js/common.js
Normal file
@ -0,0 +1,153 @@
|
||||
layui.use(['jquery', 'form', 'layer', 'element'], function () {
|
||||
var $ = layui.$;
|
||||
var form = layui.form;
|
||||
var layer = layui.layer;
|
||||
var element = layui.element;
|
||||
|
||||
/** 下拉框 必填验证 */
|
||||
form.verify({
|
||||
otherReq: function (value, item) {
|
||||
var verifyName = $(item).attr('name')
|
||||
, verifyType = $(item).attr('type')
|
||||
, formElem = $(item).parents('.layui-form')//获取当前所在的form元素,如果存在的话
|
||||
, verifyElem = formElem.find('input[name=' + verifyName + ']')//获取需要校验的元素
|
||||
, isTrue = verifyElem.is(':checked')//是否命中校验
|
||||
, focusElem = verifyElem.next().find('i.layui-icon');//焦点元素
|
||||
if (!isTrue || !value) {
|
||||
console.log(verifyName);
|
||||
//定位焦点
|
||||
focusElem.css(verifyType == 'radio' ? {"color": "#FF5722"} : {"border-color": "#FF5722"});
|
||||
//对非输入框设置焦点
|
||||
focusElem.first().attr("tabIndex", "1").css("outline", "0").blur(function () {
|
||||
focusElem.css(verifyType == 'radio' ? {"color": ""} : {"border-color": ""});
|
||||
}).focus();
|
||||
return '必选项不能为空';
|
||||
}
|
||||
},
|
||||
required: function (value, item) {
|
||||
var verifyName = $(item).attr('name')
|
||||
, formElem = $(item).parents('.layui-form')//获取当前所在的form元素,如果存在的话
|
||||
, verifyElem = formElem.find('input[name=' + verifyName + ']');//获取需要校验的元素
|
||||
if (!value) {
|
||||
console.log(verifyName);
|
||||
//定位焦点
|
||||
verifyElem.css({"border-color": "#FF5722"});
|
||||
//对输入框设置焦点
|
||||
verifyElem.first().attr("tabIndex", "1").css("outline", "0").blur(function () {
|
||||
verifyElem.css({"border-color": ""});
|
||||
}).focus();
|
||||
return '必填项不能为空';
|
||||
}
|
||||
},
|
||||
requiredSelect: function (value, item) {
|
||||
var $ = layui.$;
|
||||
var verifyName = $(item).attr('name')
|
||||
, formElem = $(item).parents('.layui-form')//获取当前所在的form元素,如果存在的话
|
||||
, verifyElem = formElem.find('select[name=' + verifyName + ']');//获取需要校验的元素
|
||||
if (!value) {
|
||||
console.log(verifyName);
|
||||
//定位焦点
|
||||
verifyElem.css({"border-color": "#FF5722"});
|
||||
//对下拉框设置焦点
|
||||
formElem.find('select[name=' + verifyName + ']').first().next().find(".layui-input").attr("tabIndex", "1").css("outline", "0").blur(function () {
|
||||
verifyElem.css({"border-color": ""});
|
||||
}).focus();
|
||||
return '必选项不能为空';
|
||||
}
|
||||
},
|
||||
requiredTa: function (value, item) {
|
||||
var verifyName = $(item).attr('name')
|
||||
, formElem = $(item).parents('.layui-form')//获取当前所在的form元素,如果存在的话
|
||||
, verifyElem = formElem.find('textarea[name=' + verifyName + ']');//获取需要校验的元素
|
||||
if (!value) {
|
||||
console.log(verifyName);
|
||||
//定位焦点
|
||||
verifyElem.css({"border-color": "#FF5722"});
|
||||
//对输入框设置焦点
|
||||
verifyElem.first().attr("tabIndex", "1").css("outline", "0").blur(function () {
|
||||
verifyElem.css({"border-color": ""});
|
||||
}).focus();
|
||||
return '必填项不能为空';
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
layer.photos({
|
||||
photos: '.photo'
|
||||
, anim: 5
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
/** 成功提示 */
|
||||
function showOkMsg(msg) {
|
||||
layer.msg(msg, {
|
||||
icon: 1
|
||||
});
|
||||
}
|
||||
|
||||
/** 父页面成功提示 */
|
||||
function parentShowOkMsg(msg) {
|
||||
parent.layer.msg(msg, {
|
||||
icon: 1
|
||||
});
|
||||
parent.layer.closeAll('iframe');
|
||||
}
|
||||
|
||||
/** 失败提示 */
|
||||
function showFailMsg(msg) {
|
||||
layer.msg(msg, {
|
||||
icon: 7,
|
||||
anim: 6
|
||||
});
|
||||
}
|
||||
|
||||
/** 弹框提示 */
|
||||
function showAlert(msg) {
|
||||
layer.alert(msg, {title: '提示', icon: 7});
|
||||
}
|
||||
|
||||
/** 弹框提示并跳转页面 */
|
||||
function showAlertAndJump(msg, url) {
|
||||
layer.alert(msg, {
|
||||
closeBtn: 0,
|
||||
icon: 1,
|
||||
title: '提示'
|
||||
}, function (index) {
|
||||
jumpToUrl(url);
|
||||
layer.close(index);
|
||||
});
|
||||
}
|
||||
|
||||
/** 网页跳转 */
|
||||
function jumpToUrl(url) {
|
||||
top.location = url;
|
||||
}
|
||||
|
||||
/** 根据身份证号计算年龄 */
|
||||
function getAgeByIdentity(identity) {
|
||||
var len = (identity + "").length;
|
||||
if (len == 0) {
|
||||
return 0;
|
||||
} else {
|
||||
if ((len != 15) && (len != 18)){//身份证号码只能为15位或18位其它不合法
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
var strBirthday = "";
|
||||
if (len == 18){//处理18位的身份证号码从号码中得到生日和性别代码
|
||||
strBirthday = identity.substr(6, 4) + "/" + identity.substr(10, 2) + "/" + identity.substr(12, 2);
|
||||
}
|
||||
if (len == 15) {
|
||||
strBirthday = "19" + identity.substr(6, 2) + "/" + identity.substr(8, 2) + "/" + identity.substr(10, 2);
|
||||
}
|
||||
//时间字符串里,必须是“/”
|
||||
var birthDate = new Date(strBirthday);
|
||||
var nowDateTime = new Date();
|
||||
var age = nowDateTime.getFullYear() - birthDate.getFullYear();
|
||||
//再考虑月、天的因素;.getMonth()获取的是从0开始的,这里进行比较,不需要加1
|
||||
if (nowDateTime.getMonth() < birthDate.getMonth() || (nowDateTime.getMonth() == birthDate.getMonth() && nowDateTime.getDate() < birthDate.getDate())) {
|
||||
age--;
|
||||
}
|
||||
return age;
|
||||
}
|
||||
1179
static/js/enroll.js
Normal file
10716
static/js/jquery.js
vendored
Normal file
320
static/js/lay/modules/element.js
Normal file
@ -0,0 +1,320 @@
|
||||
/** layui-v2.5.6 MIT License By https://www.layui.com */
|
||||
;layui.define("jquery", function(t) {
|
||||
"use strict";
|
||||
var a = layui.$
|
||||
, i = (layui.hint(),
|
||||
layui.device())
|
||||
, e = "element"
|
||||
, l = "layui-this"
|
||||
, n = "layui-show"
|
||||
, s = function() {
|
||||
this.config = {}
|
||||
};
|
||||
s.prototype.set = function(t) {
|
||||
var i = this;
|
||||
return a.extend(!0, i.config, t),
|
||||
i
|
||||
}
|
||||
,
|
||||
s.prototype.on = function(t, a) {
|
||||
return layui.onevent.call(this, e, t, a)
|
||||
}
|
||||
,
|
||||
s.prototype.tabAdd = function(t, i) {
|
||||
var e = ".layui-tab-title"
|
||||
, l = a(".layui-tab[lay-filter=" + t + "]")
|
||||
, n = l.children(e)
|
||||
, s = n.children(".layui-tab-bar")
|
||||
, o = l.children(".layui-tab-content")
|
||||
, r = '<li lay-id="' + (i.id || "") + '"' + (i.attr ? ' lay-attr="' + i.attr + '"' : "") + ">" + (i.title || "unnaming") + "</li>";
|
||||
return s[0] ? s.before(r) : n.append(r),
|
||||
o.append('<div class="layui-tab-item">' + (i.content || "") + "</div>"),
|
||||
f.hideTabMore(!0),
|
||||
f.tabAuto(),
|
||||
this
|
||||
}
|
||||
,
|
||||
s.prototype.tabDelete = function(t, i) {
|
||||
var e = ".layui-tab-title"
|
||||
, l = a(".layui-tab[lay-filter=" + t + "]")
|
||||
, n = l.children(e)
|
||||
, s = n.find('>li[lay-id="' + i + '"]');
|
||||
return f.tabDelete(null, s),
|
||||
this
|
||||
}
|
||||
,
|
||||
s.prototype.tabChange = function(t, i) {
|
||||
var e = ".layui-tab-title"
|
||||
, l = a(".layui-tab[lay-filter=" + t + "]")
|
||||
, n = l.children(e)
|
||||
, s = n.find('>li[lay-id="' + i + '"]');
|
||||
return f.tabClick.call(s[0], null, null, s),
|
||||
this
|
||||
}
|
||||
,
|
||||
s.prototype.tab = function(t) {
|
||||
t = t || {},
|
||||
b.on("click", t.headerElem, function(i) {
|
||||
var e = a(this).index();
|
||||
f.tabClick.call(this, i, e, null, t)
|
||||
})
|
||||
}
|
||||
,
|
||||
s.prototype.progress = function(t, i) {
|
||||
var e = "layui-progress"
|
||||
, l = a("." + e + "[lay-filter=" + t + "]")
|
||||
, n = l.find("." + e + "-bar")
|
||||
, s = n.find("." + e + "-text");
|
||||
return n.css("width", i),
|
||||
s.text(i),
|
||||
this
|
||||
}
|
||||
;
|
||||
var o = ".layui-nav"
|
||||
, r = "layui-nav-item"
|
||||
, c = "layui-nav-bar"
|
||||
, u = "layui-nav-tree"
|
||||
, d = "layui-nav-child"
|
||||
, y = "layui-nav-more"
|
||||
, h = "layui-anim layui-anim-upbit"
|
||||
, f = {
|
||||
tabClick: function(t, i, s, o) {
|
||||
o = o || {};
|
||||
var r = s || a(this)
|
||||
, i = i || r.parent().children("li").index(r)
|
||||
, c = o.headerElem ? r.parent() : r.parents(".layui-tab").eq(0)
|
||||
, u = o.bodyElem ? a(o.bodyElem) : c.children(".layui-tab-content").children(".layui-tab-item")
|
||||
, d = r.find("a")
|
||||
, y = c.attr("lay-filter");
|
||||
"javascript:;" !== d.attr("href") && "_blank" === d.attr("target") || (r.addClass(l).siblings().removeClass(l),
|
||||
u.eq(i).addClass(n).siblings().removeClass(n)),
|
||||
layui.event.call(this, e, "tab(" + y + ")", {
|
||||
elem: c,
|
||||
index: i
|
||||
})
|
||||
},
|
||||
tabDelete: function(t, i) {
|
||||
var n = i || a(this).parent()
|
||||
, s = n.index()
|
||||
, o = n.parents(".layui-tab").eq(0)
|
||||
, r = o.children(".layui-tab-content").children(".layui-tab-item")
|
||||
, c = o.attr("lay-filter");
|
||||
n.hasClass(l) && (n.next()[0] ? f.tabClick.call(n.next()[0], null, s + 1) : n.prev()[0] && f.tabClick.call(n.prev()[0], null, s - 1)),
|
||||
n.remove(),
|
||||
r.eq(s).remove(),
|
||||
setTimeout(function() {
|
||||
f.tabAuto()
|
||||
}, 50),
|
||||
layui.event.call(this, e, "tabDelete(" + c + ")", {
|
||||
elem: o,
|
||||
index: s
|
||||
})
|
||||
},
|
||||
tabAuto: function() {
|
||||
var t = "layui-tab-more"
|
||||
, e = "layui-tab-bar"
|
||||
, l = "layui-tab-close"
|
||||
, n = this;
|
||||
a(".layui-tab").each(function() {
|
||||
var s = a(this)
|
||||
, o = s.children(".layui-tab-title")
|
||||
, r = (s.children(".layui-tab-content").children(".layui-tab-item"),
|
||||
'lay-stope="tabmore"')
|
||||
, c = a('<span class="layui-unselect layui-tab-bar" ' + r + "><i " + r + ' class="layui-icon"></i></span>');
|
||||
if (n === window && 8 != i.ie && f.hideTabMore(!0),
|
||||
s.attr("lay-allowClose") && o.find("li").each(function() {
|
||||
var t = a(this);
|
||||
if (!t.find("." + l)[0]) {
|
||||
var i = a('<i class="layui-icon layui-unselect ' + l + '">ဆ</i>');
|
||||
i.on("click", f.tabDelete),
|
||||
t.append(i)
|
||||
}
|
||||
}),
|
||||
"string" != typeof s.attr("lay-unauto"))
|
||||
if (o.prop("scrollWidth") > o.outerWidth() + 1) {
|
||||
if (o.find("." + e)[0])
|
||||
return;
|
||||
o.append(c),
|
||||
s.attr("overflow", ""),
|
||||
c.on("click", function(a) {
|
||||
o[this.title ? "removeClass" : "addClass"](t),
|
||||
this.title = this.title ? "" : "收缩"
|
||||
})
|
||||
} else
|
||||
o.find("." + e).remove(),
|
||||
s.removeAttr("overflow")
|
||||
})
|
||||
},
|
||||
hideTabMore: function(t) {
|
||||
var i = a(".layui-tab-title");
|
||||
t !== !0 && "tabmore" === a(t.target).attr("lay-stope") || (i.removeClass("layui-tab-more"),
|
||||
i.find(".layui-tab-bar").attr("title", ""))
|
||||
},
|
||||
clickThis: function() {
|
||||
var t = a(this)
|
||||
, i = t.parents(o)
|
||||
, n = i.attr("lay-filter")
|
||||
, s = t.parent()
|
||||
, c = t.siblings("." + d)
|
||||
, y = "string" == typeof s.attr("lay-unselect");
|
||||
"javascript:;" !== t.attr("href") && "_blank" === t.attr("target") || y || c[0] || (i.find("." + l).removeClass(l),
|
||||
s.addClass(l)),
|
||||
i.hasClass(u) && (c.removeClass(h),
|
||||
c[0] && (s["none" === c.css("display") ? "addClass" : "removeClass"](r + "ed"),
|
||||
"all" === i.attr("lay-shrink") && s.siblings().removeClass(r + "ed"))),
|
||||
layui.event.call(this, e, "nav(" + n + ")", t)
|
||||
},
|
||||
collapse: function() {
|
||||
var t = a(this)
|
||||
, i = t.find(".layui-colla-icon")
|
||||
, l = t.siblings(".layui-colla-content")
|
||||
, s = t.parents(".layui-collapse").eq(0)
|
||||
, o = s.attr("lay-filter")
|
||||
, r = "none" === l.css("display");
|
||||
if ("string" == typeof s.attr("lay-accordion")) {
|
||||
var c = s.children(".layui-colla-item").children("." + n);
|
||||
c.siblings(".layui-colla-title").children(".layui-colla-icon").html(""),
|
||||
c.removeClass(n)
|
||||
}
|
||||
l[r ? "addClass" : "removeClass"](n),
|
||||
i.html(r ? "" : ""),
|
||||
layui.event.call(this, e, "collapse(" + o + ")", {
|
||||
title: t,
|
||||
content: l,
|
||||
show: r
|
||||
})
|
||||
}
|
||||
};
|
||||
s.prototype.init = function(t, e) {
|
||||
var l = function() {
|
||||
return e ? '[lay-filter="' + e + '"]' : ""
|
||||
}()
|
||||
, s = {
|
||||
tab: function() {
|
||||
f.tabAuto.call({})
|
||||
},
|
||||
nav: function() {
|
||||
var t = 200
|
||||
, e = {}
|
||||
, s = {}
|
||||
, p = {}
|
||||
, b = function(l, o, r) {
|
||||
var c = a(this)
|
||||
, f = c.find("." + d);
|
||||
o.hasClass(u) ? l.css({
|
||||
top: c.position().top,
|
||||
height: c.children("a").outerHeight(),
|
||||
opacity: 1
|
||||
}) : (f.addClass(h),
|
||||
l.css({
|
||||
left: c.position().left + parseFloat(c.css("marginLeft")),
|
||||
top: c.position().top + c.height() - l.height()
|
||||
}),
|
||||
e[r] = setTimeout(function() {
|
||||
l.css({
|
||||
width: c.width(),
|
||||
opacity: 1
|
||||
})
|
||||
}, i.ie && i.ie < 10 ? 0 : t),
|
||||
clearTimeout(p[r]),
|
||||
"block" === f.css("display") && clearTimeout(s[r]),
|
||||
s[r] = setTimeout(function() {
|
||||
f.addClass(n),
|
||||
c.find("." + y).addClass(y + "d")
|
||||
}, 300))
|
||||
};
|
||||
a(o + l).each(function(i) {
|
||||
var l = a(this)
|
||||
, o = a('<span class="' + c + '"></span>')
|
||||
, h = l.find("." + r);
|
||||
l.find("." + c)[0] || (l.append(o),
|
||||
h.on("mouseenter", function() {
|
||||
b.call(this, o, l, i)
|
||||
}).on("mouseleave", function() {
|
||||
l.hasClass(u) || (clearTimeout(s[i]),
|
||||
s[i] = setTimeout(function() {
|
||||
l.find("." + d).removeClass(n),
|
||||
l.find("." + y).removeClass(y + "d")
|
||||
}, 300))
|
||||
}),
|
||||
l.on("mouseleave", function() {
|
||||
clearTimeout(e[i]),
|
||||
p[i] = setTimeout(function() {
|
||||
l.hasClass(u) ? o.css({
|
||||
height: 0,
|
||||
top: o.position().top + o.height() / 2,
|
||||
opacity: 0
|
||||
}) : o.css({
|
||||
width: 0,
|
||||
left: o.position().left + o.width() / 2,
|
||||
opacity: 0
|
||||
})
|
||||
}, t)
|
||||
})),
|
||||
h.find("a").each(function() {
|
||||
var t = a(this)
|
||||
, i = (t.parent(),
|
||||
t.siblings("." + d));
|
||||
i[0] && !t.children("." + y)[0] && t.append('<span class="' + y + '"></span>'),
|
||||
t.off("click", f.clickThis).on("click", f.clickThis)
|
||||
})
|
||||
})
|
||||
},
|
||||
breadcrumb: function() {
|
||||
var t = ".layui-breadcrumb";
|
||||
a(t + l).each(function() {
|
||||
var t = a(this)
|
||||
, i = "lay-separator"
|
||||
, e = t.attr(i) || "/"
|
||||
, l = t.find("a");
|
||||
l.next("span[" + i + "]")[0] || (l.each(function(t) {
|
||||
t !== l.length - 1 && a(this).after("<span " + i + ">" + e + "</span>")
|
||||
}),
|
||||
t.css("visibility", "visible"))
|
||||
})
|
||||
},
|
||||
progress: function() {
|
||||
var t = "layui-progress";
|
||||
a("." + t + l).each(function() {
|
||||
var i = a(this)
|
||||
, e = i.find(".layui-progress-bar")
|
||||
, l = e.attr("lay-percent");
|
||||
e.css("width", function() {
|
||||
return /^.+\/.+$/.test(l) ? 100 * new Function("return " + l)() + "%" : l
|
||||
}()),
|
||||
i.attr("lay-showPercent") && setTimeout(function() {
|
||||
e.html('<span class="' + t + '-text">' + l + "</span>")
|
||||
}, 350)
|
||||
})
|
||||
},
|
||||
collapse: function() {
|
||||
var t = "layui-collapse";
|
||||
a("." + t + l).each(function() {
|
||||
var t = a(this).find(".layui-colla-item");
|
||||
t.each(function() {
|
||||
var t = a(this)
|
||||
, i = t.find(".layui-colla-title")
|
||||
, e = t.find(".layui-colla-content")
|
||||
, l = "none" === e.css("display");
|
||||
i.find(".layui-colla-icon").remove(),
|
||||
i.append('<i class="layui-icon layui-colla-icon">' + (l ? "" : "") + "</i>"),
|
||||
i.off("click", f.collapse).on("click", f.collapse)
|
||||
})
|
||||
})
|
||||
}
|
||||
};
|
||||
return s[t] ? s[t]() : layui.each(s, function(t, a) {
|
||||
a()
|
||||
})
|
||||
}
|
||||
,
|
||||
s.prototype.render = s.prototype.init;
|
||||
var p = new s
|
||||
, b = a(document);
|
||||
p.render();
|
||||
var v = ".layui-tab-title li";
|
||||
b.on("click", v, f.tabClick),
|
||||
b.on("click", f.hideTabMore),
|
||||
a(window).on("resize", f.tabAuto),
|
||||
t(e, p)
|
||||
});
|
||||
4449
static/js/lay/modules/jquery.js
vendored
Normal file
2
static/js/layui.js
Normal file
37
static/js/login.js
Normal file
@ -0,0 +1,37 @@
|
||||
layui.use([ 'jquery', 'form', 'layer', 'element' ], function() {
|
||||
|
||||
var $ = layui.$;
|
||||
var form = layui.form;
|
||||
var layer = layui.layer;
|
||||
var element = layui.element;
|
||||
|
||||
/** 默认获取焦点 */
|
||||
$('.box input[name = "username"]').focus();
|
||||
|
||||
// layer.tips("最后一位X请大写", ".box input[name = 'password']", {time: 5000, tips: 3});
|
||||
|
||||
/** 登录 */
|
||||
form.on('submit(login)', function(data) {
|
||||
$.ajax({
|
||||
url : '/login',
|
||||
type : 'post',
|
||||
data : data.field,
|
||||
dataType : 'json',
|
||||
beforeSend : function() {
|
||||
layer.load(2);
|
||||
},
|
||||
success : function(data) {
|
||||
layer.closeAll('loading');
|
||||
if (data.state == 'ok') {
|
||||
jumpToUrl(data.url);
|
||||
} else if (data.state == 'fail') {
|
||||
showFailMsg(data.msg);
|
||||
$('.box .captcha').click();
|
||||
$('.box input[name = "captcha"]').val('');
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
1
static/js/sweetalert2.min.js
vendored
Normal file
BIN
static/picture/captcha.jpg
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
static/picture/close.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
static/picture/demo.jpg
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
static/picture/zixun_qr.png
Normal file
|
After Width: | Height: | Size: 4.5 KiB |