Commit 68652392 authored by ganjingcun's avatar ganjingcun

投票系统前台

parent 5336cb16
/**
extensions is an Array and each item has such format:
{firstName: 'xxx', lastName: 'xxx', ext: 'xxx', extType: 'xxx'}
lastName, ext can be empty, extType can only has "DigitalUser", "VitrualUser","FaxUser","Dept","AO".
**/
/**
Question 1: sort extensions by "firstName" + "lastName" + "ext" ASC
**/
function sortExtensionsByName(extensions) {
if (!extensions) {
return [];
}
extensions.sort(function (a, b) {
var str1 = a.firstName + (a.lastName || '') + (a.ext || '')
var str2 = b.firstName + (b.lastName || '') + (b.ext || '')
return str1 > str2;
})
return extensions;
}
//test
console.log('---- test of Question 1 start ----');
var extensions = [
{ firstName: 'a', ext: 'yyy2', extType: 'DigitalUser' },
{ firstName: 'a', ext: 'yyy1', extType: 'DigitalUser' },
{ firstName: 'c', lastName: 'bbb', ext: 'mmm', extType: 'VitrualUser' },
{ firstName: 'z', lastName: 'ccc', extType: 'FaxUser' },
{ firstName: 's', ext: 'xxx', extType: 'Dept' },
{ firstName: 'b', lastName: 'ddd', ext: 'mmm', extType: 'AO' }
];
console.log(sortExtensionsByName(extensions));
/**
Question 2: sort extensions by extType follow these orders ASC
DigitalUser < VitrualUser < FaxUser < AO < Dept.
**/
function sortExtensionsByExtType(extensions) {
if (!extensions) {
return [];
}
var extTypeOrder = ['DigitalUser', 'VitrualUser', 'FaxUser', 'AO', 'Dept']
extensions.sort(function (a, b) {
return extTypeOrder.indexOf(a.extType) - extTypeOrder.indexOf(b.extType);
})
return extensions;
}
//test
console.log('---- test of Question 2 start ----');
var extensions = [
{ firstName: 'a', ext: 'yyy2', extType: 'AO' },
{ firstName: 'x', ext: 'yyy1', extType: 'Dept' },
{ firstName: 'c', ext: 'mmm', extType: 'VitrualUser' },
{ firstName: 'z', extType: 'FaxUser' },
{ firstName: 's', ext: 'xxx', extType: 'DigitalUser' },
{ firstName: 'b', ext: 'mmm', extType: 'AO' }
];
console.log(sortExtensionsByExtType(extensions));
/**
saleItems is an Array has each item has such format:
{
month: n, //[1-12],
date: n, //[1-31],
transationId: "xxx",
salePrice: number
}
**/
/**
Question 3: write a function to calculate and return a list of total sales (sum) for each quarter, expected result like:
[
{quater: 1, totalPrices: xxx, transactionNums: n},
{....}
]
**/
function sumByQuater(saleItems) {
var sumResult = [
{ quater: 1, totalPrices: 0, transactionNums: 0 },
{ quater: 2, totalPrices: 0, transactionNums: 0 },
{ quater: 3, totalPrices: 0, transactionNums: 0 },
{ quater: 4, totalPrices: 0, transactionNums: 0 },
]
saleItems.forEach(function (saleItem) {
var quaterIndex = Math.ceil(saleItem.month / 3) - 1;
sumResult[quaterIndex].totalPrices += saleItem.salePrice;
sumResult[quaterIndex].transactionNums++;
})
return sumResult;
}
//test
console.log('---- test of Question 3 start ----')
var saleItems = [
{ month: 1, date: 1, transationId: "a", salePrice: 11 },
{ month: 2, date: 2, transationId: "b", salePrice: 22 },
{ month: 3, date: 3, transationId: "a", salePrice: 33 },
{ month: 4, date: 4, transationId: "a", salePrice: 44 },
{ month: 5, date: 5, transationId: "a", salePrice: 55 },
{ month: 6, date: 6, transationId: "a", salePrice: 66 },
{ month: 7, date: 7, transationId: "a", salePrice: 11 },
{ month: 11, date: 8, transationId: "a", salePrice: 22 },
{ month: 12, date: 9, transationId: "a", salePrice: 33 },
];
console.log(sumByQuater(saleItems))
/**
Question 4: write a function to calculate and return a list of average sales for each quarter, expected result like:
[
{quater: 1, averagePrices: xxx, transactionNums: n},
{....}
]
**/
function averageByQuater(saleItems) {
var sumByQuaterResult = sumByQuater(saleItems)
sumByQuaterResult.forEach(function (quater) {
quater.averagePrices = quater.totalPrices / quater.transactionNums;
delete quater.totalPrices;
})
return sumByQuaterResult;
}
console.log('---- test of Question 4 start ----');
console.log(averageByQuater(saleItems));
/**
Question 5: please create a tool to generate Sequence
Expected to be used like:
var sequence1 = new Sequence();
sequence1.next() --> return 1;
sequence1.next() --> return 2;
in another module:
var sequence2 = new Sequence();
sequence2.next() --> 3;
sequence2.next() --> 4;
**/
function Sequence() {
if (typeof Sequence.instance === 'object') {
return Sequence.instance;
}
this.count = 1;
this.next = function () {
return this.count++;
}
Sequence.instance = this;
}
// test
console.log('---- test of Question 5 start ----');
var sequence1 = new Sequence();
var sequence2 = new Sequence();
console.log(sequence1 === sequence2); // true
console.log(sequence1.next());
console.log(sequence1.next());
console.log(sequence2.next());
console.log(sequence2.next());
/**
Question 6:
AllKeys: 0-9;
usedKeys: an array to store all used keys like [2,3,4];
We want to get an array which contains all the unused keys,in this example it would be: [0,1,5,6,7,8,9]
**/
function getUnUsedKeys(allKeys, usedKeys) {
var unUsedKey = allKeys.filter(function (a) {
return usedKeys.indexOf(a) === -1;
})
return unUsedKey;
}
//test
console.log('---- test of Question 6 start ----');
var usedKeys = [2, 3, 4];
var allKeys = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
console.log(getUnUsedKeys(allKeys, usedKeys));
......@@ -8,12 +8,14 @@
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/css/styles.css">
<link rel="stylesheet" href="assets/css/font-awesome.min.css">
<link rel="stylesheet" href="assets/layui/css/layui.css">
</head>
<body>
<div id="app"></div>
<!-- built files will be auto injected -->
<script src="assets/js/jquery.min.js"></script>
<script src="assets/layui/layui.all.js"></script>
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
</body>
......
......@@ -16,6 +16,7 @@
"moment": "^2.18.1",
"shelljs": "^0.7.7",
"swiper": "^3.4.2",
"uuid": "^3.1.0",
"vue": "^2.4.2",
"vue-resource": "^1.3.4",
"vue-router": "^2.2.0",
......
......@@ -5,8 +5,8 @@ import config from './config';
Vue.use(VueResource)
// const URL = "http://localhost:3000/api"
const URL = "https://api.mycard.moe/ygopro/arena"
const URL = "http://localhost:3000/api"
// const URL = "https://api.mycard.moe/ygopro/arena"
export default class Api {
......@@ -81,4 +81,13 @@ export default class Api {
return Vue.http.post(url, opt, { 'emulateJSON': true });
}
static getVote(opt) {
return Vue.http.get(`${URL}/vote`, { 'params': opt });
}
static submitVote(opt) {
const url = `${URL}/submitVote`
return Vue.http.post(url, opt, { 'emulateJSON': true });
}
}
......@@ -40,24 +40,141 @@
</nav>
</div>
<!--<other-component></other-component>-->
<!-- Form -->
<el-button type="text" @click="dialogFormVisible = true">打开嵌套表单的 Dialog</el-button>
<el-dialog title="MCPRO服务改进调查" :visible.sync="dialogFormVisible" :size='size'>
<!--<img src="../assets/img/mycardlogo.png" id="logo">-->
<div class="voteTitle">{{ voteObj.title }} </div><br>
<el-form :model="form">
<el-form-item :label-width="formLabelWidth">
<div v-for=" item in voteObj.options">
<el-radio v-model="radio" :label="item.key">
<span class='wrap'>
{{item.name}}
</span>
</el-radio>
</div>
</el-form-item>
<p class="voteFoot">投票可以改善您的游戏体验。还可以获得EXP哦 ^_^</p>
</el-form>
<div slot="footer" class="dialog-footer">
<!--<el-button @click="dialogFormVisible = false">取 消</el-button>-->
<el-button type="primary" @click="submitVote">提 交</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import querystring from 'querystring';
import crypto from 'crypto';
import language from './lang';
import { mapGetters } from 'vuex'
import API from '../api'
import moment from 'moment'
export default {
data() {
return {
voteObj: {},
size: 'small',
dialogFormVisible: false,
form: {
name: '',
region: '',
date1: '',
date2: '',
delivery: false,
type: [],
resource: '',
desc: ''
},
formLabelWidth: '20px',
radio: ""
}
},
created: function () {
this.init()
var regex_match = /(nokia|iphone|android|motorola|^mot-|softbank|foma|docomo|kddi|up.browser|up.link|htc|dopod|blazer|netfront|helio|hosin|huawei|novarra|CoolPad|webos|techfaith|palmsource|blackberry|alcatel|amoi|ktouch|nexian|samsung|^sam-|s[cg]h|^lge|ericsson|philips|sagem|wellcom|bunjalloo|maui|symbian|smartphone|midp|wap|phone|windows ce|iemobile|^spice|^bird|^zte-|longcos|pantech|gionee|^sie-|portalmmm|jigs browser|hiptop|^benq|haier|^lct|operas*mobi|opera*mini|320x320|240x320|176x220)/i;
if (regex_match.exec(navigator.userAgent)) {
this.size = 'large';
}
},
mounted: function () {
var _this = this
if (location.hash === "#/vote") {
return;
}
if (!this.user.isLogin) {
return;
}
var voteTime = localStorage.getItem('voteTime');
if (voteTime) {
var today = moment().format('YYYY-MM-DD')
if (voteTime === today) {
return
}
}
API.getVote({ user: this.user.id, username: this.user.username }).then((res) => {
this.voteObj = res.data.data
if (this.voteObj !== "null") {
this.voteObj.options = JSON.parse(this.voteObj.options)
setTimeout(function () {
layer.open({
type: 1
, title: 'Hi, ' + _this.user.username
, offset: 'rb' //具体配置参考:http://www.layui.com/doc/modules/layer.html#offset
, id: 'layerDemo'
, content: '<div style="padding: 20px 100px;">' + '是否参与问卷调查?' + '</div>'
, btn: '好的'
, btnAlign: 'c' //按钮居中
, shade: 0 //不显示遮罩
, yes: function () {
layer.closeAll();
_this.dialogFormVisible = true;
}
});
}, 1000)
}
}, (res) => {
console.log(res)
});
},
computed: {
...mapGetters({
lang: 'getLang',
......@@ -65,6 +182,41 @@
}),
},
methods: {
submitVote: function () {
var param = {
user: this.user.id,
username: this.user.username,
opid: this.radio,
voteid: this.voteObj.id
}
console.log(param)
if (!this.radio) {
this.$notify({
// title: '操作成功',
message: '请选择后在提交 !',
type: 'warning'
})
return;
}
this.dialogFormVisible = false
API.submitVote(param).then((res) => {
this.$notify({
title: '操作成功',
message: '感谢您的参与, 环境会因为您而变得更好。此问卷为您奖励 EXP + 1 !',
type: 'success'
})
localStorage.setItem('voteTime', moment().format('YYYY-MM-DD'));
}, (res) => {
console.log(res)
});
},
init: function () {
var token = querystring.parse(location.search.slice(1)).sso;
if (token) {
......@@ -86,11 +238,12 @@
},
render: function (token) {
var user = querystring.parse(new Buffer(token, 'base64').toString());
console.log(user)
this.$store.dispatch('login', user);
},
logout: function () {
localStorage.removeItem('token');
this.$store.dispatch('logout',{});
this.$store.dispatch('logout', {});
// var redirectUrl = "http://localhost:8081/index.html";
var redirectUrl = "https://mycard.moe/ygopro/arena/index.html";
......@@ -130,3 +283,21 @@
}
</script>
<style>
.voteTitle {
font-size: 22px;
margin-left: 20px;
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
}
.voteFoot {
margin-left: 20px;
}
.wrap {
white-space: normal;
width: 260px;
/*word-break:break-all; width:100px; overflow:auto;*/
}
</style>
\ No newline at end of file
......@@ -55,7 +55,7 @@
</el-date-picker>
</el-form-item>
<el-form-item label="是否启用" >
<el-form-item label="是否启用">
<!--<el-tooltip :content="xxx " placement="top">-->
<!--<el-switch v-model="dynamicValidateForm.status" on-color="#13ce66" off-color="#ff4949" on-value="true" off-value="false">
</el-switch>-->
......@@ -85,8 +85,8 @@
<template scope="props">
<div v-for=" item in props.row.options">
{{ item.name }}
<el-progress :percentage="50"></el-progress>
{{ item.name }} -- {{ item.count || 0 }}
<el-progress :percentage="item.percentage"></el-progress>
</div>
......@@ -123,7 +123,10 @@
<div class="text-center">
<el-pagination :page-size="pageSize" layout="total, prev, pager, next" :total="history.total" @current-change="clickpage"></el-pagination>
</div>
</div>
</div>
</template>
......@@ -143,7 +146,13 @@
created: function () {
var lang = localStorage.getItem('lang') || 'cn';
this.init(lang)
},
watch: {
date: function (val) {
if (val[0] != null) {
......@@ -153,7 +162,7 @@
this.from_date = '';
this.to_date = '';
}
if(this.needRender){
if (this.needRender) {
this.renderTable()
}
......@@ -161,11 +170,13 @@
},
data: function () {
return {
needRender:true,
radio: "x",
ddd: [1, 2, 31, 231, 23],
needRender: true,
page: 1,
from_date: moment().format('YYYY-MM-DD HH:mm'),
to_date: moment().add(7, 'd').format('YYYY-MM-DD HH:mm'),
date: [moment().format('YYYY-MM-DD HH:mm'), moment().add(7, 'd').format('YYYY-MM-DD HH:mm')],
date: [moment().format('YYYY-MM-DD HH:mm'), moment().add(7, 'd').format('YYYY-MM-DD')],
username: '',
type: '0',
formInline: {
......@@ -223,7 +234,7 @@
},
dynamicValidateForm: {
domains: [{
value: ''
key: Date.now()
}],
id: '',
status: false,
......@@ -249,6 +260,13 @@
newVote() {
this.dialogFormVisible = true
this.dynamicValidateForm.id = ""
title: ''
this.dynamicValidateForm.title = ""
this.dynamicValidateForm.status = false
this.dynamicValidateForm.domains = [{
key: Date.now()
}]
},
handleClick(row) {
......@@ -256,7 +274,7 @@
this.dynamicValidateForm.status = row.status
this.dynamicValidateForm.title = row.title
this.dynamicValidateForm.domains = row.options
// this.date = [row.start_time, row.end_time]
this.date = [row.start_time, row.end_time]
this.dialogFormVisible = true;
},
......@@ -303,10 +321,30 @@
API.getVoteList(params).then((res) => {
var history = {}
history.total = res.data.total
var optionCountMap = res.data.optionCountMap
history.data = res.data.data.map(function (row) {
row.options = JSON.parse(row.options)
var voteVount = 0
row.options.map(function(option){
option.count = parseInt(optionCountMap[option.key])
voteVount += option.count
return option
})
row.options.map(function(option){
var percentage = 100
if(voteVount === 0 || option.count === 0){
percentage = 0
}else{
percentage = option.count / voteVount * 100
}
option.percentage = percentage
return option
})
return row
})
console.log(history.data)
_this.history = history
}, (res) => {
//
......@@ -377,7 +415,6 @@
},
addDomain() {
this.dynamicValidateForm.domains.push({
value: '',
key: Date.now()
});
}
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
/** layui-v2.1.4 MIT License By http://www.layui.com */
blockquote,body,button,dd,div,dl,dt,form,h1,h2,h3,h4,h5,h6,input,legend,li,ol,p,td,textarea,th,ul{margin:0;padding:0;-webkit-tap-highlight-color:rgba(0,0,0,0)}html{font:12px 'Helvetica Neue','PingFang SC',STHeitiSC-Light,Helvetica,Arial,sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}a,button,input{-webkit-tap-highlight-color:rgba(255,0,0,0)}a{text-decoration:none;background:0 0}a:active,a:hover{outline:0}table{border-collapse:collapse;border-spacing:0}li{list-style:none}b,strong{font-weight:700}h1,h2,h3,h4,h5,h6{font-weight:500}address,cite,dfn,em,var{font-style:normal}dfn{font-style:italic}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}img{border:0;vertical-align:bottom}.layui-inline,input,label{vertical-align:middle}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0;outline:0}button,select{text-transform:none}select{-webkit-appearance:none;border:none}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}@font-face{font-family:layui-icon;src:url(../font/iconfont.eot?v=1.0.7);src:url(../font/iconfont.eot?v=1.0.7#iefix) format('embedded-opentype'),url(../font/iconfont.woff?v=1.0.7) format('woff'),url(../font/iconfont.ttf?v=1.0.7) format('truetype'),url(../font/iconfont.svg?v=1.0.7#iconfont) format('svg')}.layui-icon{font-family:layui-icon!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.layui-box,.layui-box *{-webkit-box-sizing:content-box!important;-moz-box-sizing:content-box!important;box-sizing:content-box!important}.layui-border-box,.layui-border-box *{-webkit-box-sizing:border-box!important;-moz-box-sizing:border-box!important;box-sizing:border-box!important}.layui-inline{position:relative;display:inline-block;*display:inline;*zoom:1}.layui-edge,.layui-upload-iframe{position:absolute;width:0;height:0}.layui-edge{border-style:dashed;border-color:transparent;overflow:hidden}.layui-elip{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layui-unselect{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.layui-disabled,.layui-disabled:active{background-color:#d2d2d2!important;color:#fff!important;cursor:not-allowed!important}.layui-circle{border-radius:100%}.layui-show{display:block!important}.layui-hide{display:none!important}.layui-upload-iframe{border:0;visibility:hidden}.layui-upload-enter{border:1px solid #009E94;background-color:#009E94;color:#fff;-webkit-transform:scale(1.1);transform:scale(1.1)}@-webkit-keyframes layui-m-anim-scale{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes layui-m-anim-scale{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}.layui-m-anim-scale{animation-name:layui-m-anim-scale;-webkit-animation-name:layui-m-anim-scale}@-webkit-keyframes layui-m-anim-up{0%{opacity:0;-webkit-transform:translateY(800px);transform:translateY(800px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes layui-m-anim-up{0%{opacity:0;-webkit-transform:translateY(800px);transform:translateY(800px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}.layui-m-anim-up{-webkit-animation-name:layui-m-anim-up;animation-name:layui-m-anim-up}@-webkit-keyframes layui-m-anim-left{0%{-webkit-transform:translateX(100%);transform:translateX(100%)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes layui-m-anim-left{0%{-webkit-transform:translateX(100%);transform:translateX(100%)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}.layui-m-anim-left{-webkit-animation-name:layui-m-anim-left;animation-name:layui-m-anim-left}@-webkit-keyframes layui-m-anim-right{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes layui-m-anim-right{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}.layui-m-anim-right{-webkit-animation-name:layui-m-anim-right;animation-name:layui-m-anim-right}@-webkit-keyframes layui-m-anim-lout{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes layui-m-anim-lout{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}.layui-m-anim-lout{-webkit-animation-name:layui-m-anim-lout;animation-name:layui-m-anim-lout}@-webkit-keyframes layui-m-anim-rout{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes layui-m-anim-rout{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{-webkit-transform:translateX(100%);transform:translateX(100%)}}.layui-m-anim-rout{-webkit-animation-name:layui-m-anim-rout;animation-name:layui-m-anim-rout}.layui-m-layer{position:relative;z-index:19891014}.layui-m-layer *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.layui-m-layermain,.layui-m-layershade{position:fixed;left:0;top:0;width:100%;height:100%}.layui-m-layershade{background-color:rgba(0,0,0,.7);pointer-events:auto}.layui-m-layermain{display:table;font-family:Helvetica,arial,sans-serif;pointer-events:none}.layui-m-layermain .layui-m-layersection{display:table-cell;vertical-align:middle;text-align:center}.layui-m-layerchild{position:relative;display:inline-block;text-align:left;background-color:#fff;font-size:14px;border-radius:5px;box-shadow:0 0 8px rgba(0,0,0,.1);pointer-events:auto;-webkit-overflow-scrolling:touch;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.2s;animation-duration:.2s}.layui-m-layer0 .layui-m-layerchild{width:90%;max-width:640px}.layui-m-layer1 .layui-m-layerchild{border:none;border-radius:0}.layui-m-layer2 .layui-m-layerchild{width:auto;max-width:260px;min-width:40px;border:none;background:0 0;box-shadow:none;color:#fff}.layui-m-layerchild h3{padding:0 10px;height:60px;line-height:60px;font-size:16px;font-weight:400;border-radius:5px 5px 0 0;text-align:center}.layui-m-layerbtn span,.layui-m-layerchild h3{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layui-m-layercont{padding:50px 30px;line-height:22px;text-align:center}.layui-m-layer1 .layui-m-layercont{padding:0;text-align:left}.layui-m-layer2 .layui-m-layercont{text-align:center;padding:0;line-height:0}.layui-m-layer2 .layui-m-layercont i{width:25px;height:25px;margin-left:8px;display:inline-block;background-color:#fff;border-radius:100%;-webkit-animation:layui-m-anim-loading 1.4s infinite ease-in-out;animation:layui-m-anim-loading 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}.layui-m-layerbtn,.layui-m-layerbtn span{position:relative;text-align:center;border-radius:0 0 5px 5px}.layui-m-layer2 .layui-m-layercont p{margin-top:20px}@-webkit-keyframes layui-m-anim-loading{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}@keyframes layui-m-anim-loading{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}.layui-m-layer2 .layui-m-layercont i:first-child{margin-left:0;-webkit-animation-delay:-.32s;animation-delay:-.32s}.layui-m-layer2 .layui-m-layercont i.layui-m-layerload{-webkit-animation-delay:-.16s;animation-delay:-.16s}.layui-m-layer2 .layui-m-layercont>div{line-height:22px;padding-top:7px;margin-bottom:20px;font-size:14px}.layui-m-layerbtn{display:box;display:-moz-box;display:-webkit-box;width:100%;height:50px;line-height:50px;font-size:0;border-top:1px solid #D0D0D0;background-color:#F2F2F2}.layui-m-layerbtn span{display:block;-moz-box-flex:1;box-flex:1;-webkit-box-flex:1;font-size:14px;cursor:pointer}.layui-m-layerbtn span[yes]{color:#40AFFE}.layui-m-layerbtn span[no]{border-right:1px solid #D0D0D0;border-radius:0 0 0 5px}.layui-m-layerbtn span:active{background-color:#F6F6F6}.layui-m-layerend{position:absolute;right:7px;top:10px;width:30px;height:30px;border:0;font-weight:400;background:0 0;cursor:pointer;-webkit-appearance:none;font-size:30px}.layui-m-layerend::after,.layui-m-layerend::before{position:absolute;left:5px;top:15px;content:'';width:18px;height:1px;background-color:#999;transform:rotate(45deg);-webkit-transform:rotate(45deg);border-radius:3px}.layui-m-layerend::after{transform:rotate(-45deg);-webkit-transform:rotate(-45deg)}body .layui-m-layer .layui-m-layer-footer{position:fixed;width:95%;max-width:100%;margin:0 auto;left:0;right:0;bottom:10px;background:0 0}.layui-m-layer-footer .layui-m-layercont{padding:20px;border-radius:5px 5px 0 0;background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn{display:block;height:auto;background:0 0;border-top:none}.layui-m-layer-footer .layui-m-layerbtn span{background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn span[no]{color:#FD482C;border-top:1px solid #c2c2c2;border-radius:0 0 5px 5px}.layui-m-layer-footer .layui-m-layerbtn span[yes]{margin-top:10px;border-radius:5px}body .layui-m-layer .layui-m-layer-msg{width:auto;max-width:90%;margin:0 auto;bottom:-150px;background-color:rgba(0,0,0,.7);color:#fff}.layui-m-layer-msg .layui-m-layercont{padding:10px 20px}
\ No newline at end of file
/** layui-v2.1.4 MIT License By http://www.layui.com */
html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none}
\ No newline at end of file
/** layui-v2.1.4 MIT License By http://www.layui.com */
.laydate-set-ym,.layui-laydate,.layui-laydate *,.layui-laydate-list{box-sizing:border-box}html #layuicss-laydate{display:none;position:absolute;width:1989px}.layui-laydate *{margin:0;padding:0}.layui-laydate{position:absolute;z-index:66666666;margin:5px 0;border-radius:2px;font-size:14px;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-name:laydate-upbit;animation-name:laydate-upbit}.layui-laydate-main{width:272px}.layui-laydate-content td,.layui-laydate-header *,.layui-laydate-list li{transition-duration:.3s;-webkit-transition-duration:.3s}@-webkit-keyframes laydate-upbit{from{-webkit-transform:translate3d(0,20px,0);opacity:.3}to{-webkit-transform:translate3d(0,0,0);opacity:1}}@keyframes laydate-upbit{from{transform:translate3d(0,20px,0);opacity:.3}to{transform:translate3d(0,0,0);opacity:1}}.layui-laydate-static{position:relative;z-index:0;display:inline-block;margin:0;-webkit-animation:none;animation:none}.laydate-ym-show .laydate-next-m,.laydate-ym-show .laydate-prev-m{display:none!important}.laydate-ym-show .laydate-next-y,.laydate-ym-show .laydate-prev-y{display:inline-block!important}.laydate-time-show .laydate-set-ym span[lay-type=month],.laydate-time-show .laydate-set-ym span[lay-type=year],.laydate-time-show .layui-laydate-header .layui-icon,.laydate-ym-show .laydate-set-ym span[lay-type=month]{display:none!important}.layui-laydate-header{position:relative;line-height:30px;padding:10px 70px 5px}.laydate-set-ym span,.layui-laydate-header i{padding:0 5px;cursor:pointer}.layui-laydate-header *{display:inline-block;vertical-align:bottom}.layui-laydate-header i{position:absolute;top:10px;color:#999;font-size:18px}.layui-laydate-header i.laydate-prev-y{left:15px}.layui-laydate-header i.laydate-prev-m{left:45px}.layui-laydate-header i.laydate-next-y{right:15px}.layui-laydate-header i.laydate-next-m{right:45px}.laydate-set-ym{width:100%;text-align:center;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.laydate-time-text{cursor:default!important}.layui-laydate-content{position:relative;padding:10px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.layui-laydate-content table{border-collapse:collapse;border-spacing:0}.layui-laydate-content td,.layui-laydate-content th{width:36px;height:30px;padding:5px;text-align:center}.layui-laydate-content td{position:relative;cursor:pointer}.laydate-day-mark{position:absolute;left:0;top:0;width:100%;height:100%;line-height:30px;font-size:12px;overflow:hidden}.laydate-day-mark::after{position:absolute;content:'';right:2px;top:2px;width:5px;height:5px;border-radius:50%}.layui-laydate-footer{position:relative;height:46px;line-height:26px;padding:10px 20px}.layui-laydate-footer span{margin-right:15px;display:inline-block;cursor:pointer;font-size:12px}.layui-laydate-footer span:hover{color:#5FB878}.laydate-footer-btns{position:absolute;right:10px;top:10px}.laydate-footer-btns span{height:26px;line-height:26px;margin:0 0 0 -1px;padding:0 10px;border:1px solid #C9C9C9;background-color:#fff;white-space:nowrap;vertical-align:top;border-radius:2px}.layui-laydate-list>li,.layui-laydate-range .layui-laydate-main{display:inline-block;vertical-align:middle}.layui-laydate-list{position:absolute;left:0;top:0;width:100%;height:100%;padding:10px;background-color:#fff}.layui-laydate-list>li{position:relative;width:33.3%;height:36px;line-height:36px;margin:3px 0;text-align:center;cursor:pointer}.laydate-month-list>li{width:25%;margin:17px 0}.laydate-time-list>li{height:100%;margin:0;line-height:normal;cursor:default}.laydate-time-list p{position:relative;top:-4px;line-height:29px}.laydate-time-list ol{height:181px;overflow:hidden}.laydate-time-list>li:hover ol{overflow-y:auto}.laydate-time-list ol li{width:130%;padding-left:33px;line-height:30px;text-align:left;cursor:pointer}.layui-laydate-hint{position:absolute;top:115px;left:50%;width:250px;margin-left:-125px;line-height:20px;padding:15px;text-align:center;font-size:12px}.layui-laydate-range{width:546px}.layui-laydate-range .laydate-main-list-0 .laydate-next-m,.layui-laydate-range .laydate-main-list-0 .laydate-next-y,.layui-laydate-range .laydate-main-list-1 .laydate-prev-m,.layui-laydate-range .laydate-main-list-1 .laydate-prev-y{display:none}.layui-laydate-range .laydate-main-list-1 .layui-laydate-content{border-left:1px solid #e2e2e2}.layui-laydate,.layui-laydate-hint{border:1px solid #d2d2d2;box-shadow:0 2px 4px rgba(0,0,0,.12);background-color:#fff;color:#666}.layui-laydate-header{border-bottom:1px solid #e2e2e2}.layui-laydate-header i:hover,.layui-laydate-header span:hover{color:#5FB878}.layui-laydate-content{border-top:none 0;border-bottom:none 0}.layui-laydate-content th{font-weight:400;color:#333}.layui-laydate-content td{color:#666}.layui-laydate-content td.laydate-selected{background-color:#00F7DE}.laydate-selected:hover{background-color:#00F7DE!important}.layui-laydate-content td:hover,.layui-laydate-list li:hover{background-color:#eaeaea;color:#333}.laydate-time-list li ol{margin:0;padding:0;border:1px solid #e2e2e2;border-left-width:0}.laydate-time-list li:first-child ol{border-left-width:1px}.laydate-time-list>li:hover{background:0 0}.layui-laydate-content .laydate-day-next,.layui-laydate-content .laydate-day-prev{color:#d2d2d2}.laydate-selected.laydate-day-next,.laydate-selected.laydate-day-prev{color:#fff!important}.layui-laydate-footer{border-top:1px solid #e2e2e2}.layui-laydate-hint{color:#FF5722}.laydate-day-mark::after{background-color:#5FB878}.layui-laydate-content td.layui-this .laydate-day-mark::after{display:none}.layui-laydate-footer span[lay-type=date]{color:#5FB878}.layui-laydate .layui-this{background-color:#009688!important;color:#fff!important}.layui-laydate .laydate-disabled,.layui-laydate .laydate-disabled:hover{background:0 0!important;color:#d2d2d2!important;cursor:not-allowed!important;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.laydate-theme-molv{border:none}.laydate-theme-molv.layui-laydate-range{width:548px}.laydate-theme-molv .layui-laydate-main{width:274px}.laydate-theme-molv .layui-laydate-header{border:none;background-color:#009688}.laydate-theme-molv .layui-laydate-header i,.laydate-theme-molv .layui-laydate-header span{color:#f6f6f6}.laydate-theme-molv .layui-laydate-header i:hover,.laydate-theme-molv .layui-laydate-header span:hover{color:#fff}.laydate-theme-molv .layui-laydate-content{border:1px solid #e2e2e2;border-top:none;border-bottom:none}.laydate-theme-molv .laydate-main-list-1 .layui-laydate-content{border-left:none}.laydate-theme-grid .laydate-month-list>li,.laydate-theme-grid .laydate-year-list>li,.laydate-theme-grid .layui-laydate-content td,.laydate-theme-grid .layui-laydate-content thead,.laydate-theme-molv .layui-laydate-footer{border:1px solid #e2e2e2}.laydate-theme-grid .laydate-selected,.laydate-theme-grid .laydate-selected:hover{background-color:#f2f2f2!important;color:#009688!important}.laydate-theme-grid .laydate-selected.laydate-day-next,.laydate-theme-grid .laydate-selected.laydate-day-prev{color:#d2d2d2!important}.laydate-theme-grid .laydate-month-list,.laydate-theme-grid .laydate-year-list{margin:1px 0 0 1px}.laydate-theme-grid .laydate-month-list>li,.laydate-theme-grid .laydate-year-list>li{margin:0 -1px -1px 0}.laydate-theme-grid .laydate-year-list>li{height:43px;line-height:43px}.laydate-theme-grid .laydate-month-list>li{height:71px;line-height:71px}
\ No newline at end of file
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
/** layui-v2.1.4 MIT License By http://www.layui.com */
;layui.define("jquery",function(e){"use strict";var i=layui.$,n=(layui.hint(),layui.device(),{config:{},set:function(e){var n=this;return n.config=i.extend({},n.config,e),n},on:function(e,i){return layui.onevent.call(this,t,e,i)}}),t="carousel",a="layui-this",o=">*[carousel-item]>*",l="layui-carousel-left",r="layui-carousel-right",d="layui-carousel-prev",s="layui-carousel-next",u="layui-carousel-arrow",c="layui-carousel-ind",m=function(e){var t=this;t.config=i.extend({},t.config,n.config,e),t.render()};m.prototype.config={width:"600px",height:"280px",full:!1,arrow:"hover",indicator:"inside",autoplay:!0,interval:3e3,anim:"",trigger:"click",index:0},m.prototype.render=function(){var e=this,n=e.config;n.elem=i(n.elem),n.elem[0]&&(e.elemItem=n.elem.find(o),n.index<0&&(n.index=0),n.index>=e.elemItem.length&&(n.index=e.elemItem.length-1),n.interval<800&&(n.interval=800),n.full?n.elem.css({position:"fixed",width:"100%",height:"100%",zIndex:9999}):n.elem.css({width:n.width,height:n.height}),n.elem.attr("lay-anim",n.anim),e.elemItem.eq(n.index).addClass(a),e.indicator(),e.elemItem.length<=1||(e.arrow(),e.autoplay(),e.events()))},m.prototype.reload=function(e){var n=this;clearInterval(n.timer),n.config=i.extend({},n.config,e),n.render()},m.prototype.prevIndex=function(){var e=this,i=e.config,n=i.index-1;return n<0&&(n=e.elemItem.length-1),n},m.prototype.nextIndex=function(){var e=this,i=e.config,n=i.index+1;return n>=e.elemItem.length&&(n=0),n},m.prototype.addIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index+e,n.index>=i.elemItem.length&&(n.index=0)},m.prototype.subIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index-e,n.index<0&&(n.index=i.elemItem.length-1)},m.prototype.autoplay=function(){var e=this,i=e.config;i.autoplay&&(e.timer=setInterval(function(){e.slide()},i.interval))},m.prototype.arrow=function(){var e=this,n=e.config,t=i(['<button class="layui-icon '+u+'" lay-type="sub">'+("updown"===n.anim?"&#xe619;":"&#xe603;")+"</button>",'<button class="layui-icon '+u+'" lay-type="add">'+("updown"===n.anim?"&#xe61a;":"&#xe602;")+"</button>"].join(""));n.elem.attr("lay-arrow",n.arrow),n.elem.find("."+u)[0]&&n.elem.find("."+u).remove(),n.elem.append(t),t.on("click",function(){var n=i(this),t=n.attr("lay-type");e.slide(t)})},m.prototype.indicator=function(){var e=this,n=e.config,t=e.elemInd=i(['<div class="'+c+'"><ul>',function(){var i=[];return layui.each(e.elemItem,function(e){i.push("<li"+(n.index===e?' class="layui-this"':"")+"></li>")}),i.join("")}(),"</ul></div>"].join(""));n.elem.attr("lay-indicator",n.indicator),n.elem.find("."+c)[0]&&n.elem.find("."+c).remove(),n.elem.append(t),"updown"===n.anim&&t.css("margin-top",-(t.height()/2)),t.find("li").on("hover"===n.trigger?"mouseover":n.trigger,function(){var t=i(this),a=t.index();a>n.index?e.slide("add",a-n.index):a<n.index&&e.slide("sub",n.index-a)})},m.prototype.slide=function(e,i){var n=this,o=n.elemItem,u=n.config,c=u.index,m=u.elem.attr("lay-filter");n.haveSlide||("sub"===e?(n.subIndex(i),setTimeout(function(){o.eq(u.index).addClass(d),setTimeout(function(){o.eq(c).addClass(r),o.eq(u.index).addClass(r)},50)},50)):(n.addIndex(i),setTimeout(function(){o.eq(u.index).addClass(s),setTimeout(function(){o.eq(c).addClass(l),o.eq(u.index).addClass(l)},50)},50)),setTimeout(function(){o.removeClass(a+" "+d+" "+s+" "+l+" "+r),o.eq(u.index).addClass(a),n.haveSlide=!1},300),n.elemInd.find("li").eq(u.index).addClass(a).siblings().removeClass(a),n.haveSlide=!0,layui.event.call(this,t,"change("+m+")",{index:u.index,prevIndex:c,item:o.eq(u.index)}))},m.prototype.events=function(){var e=this,i=e.config;i.elem.data("haveEvents")||(i.elem.on("mouseenter",function(){clearInterval(e.timer)}).on("mouseleave",function(){e.autoplay()}),i.elem.data("haveEvents",!0))},n.render=function(e){var i=new m(e);return i},e(t,n)});
\ No newline at end of file
/** layui-v2.1.4 MIT License By http://www.layui.com */
;layui.define("jquery",function(e){"use strict";var a=layui.$,l="http://www.layui.com/doc/modules/code.html";e("code",function(e){var t=[];e=e||{},e.elem=a(e.elem||".layui-code"),e.about=!("about"in e)||e.about,e.elem.each(function(){t.push(this)}),layui.each(t.reverse(),function(t,i){var c=a(i),o=c.html();(c.attr("lay-encode")||e.encode)&&(o=o.replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#39;").replace(/"/g,"&quot;")),c.html('<ol class="layui-code-ol"><li>'+o.replace(/[\r\t\n]+/g,"</li><li>")+"</li></ol>"),c.find(">.layui-code-h3")[0]||c.prepend('<h3 class="layui-code-h3">'+(c.attr("lay-title")||e.title||"code")+(e.about?'<a href="'+l+'" target="_blank">layui.code</a>':"")+"</h3>");var d=c.find(">.layui-code-ol");c.addClass("layui-box layui-code-view"),(c.attr("lay-skin")||e.skin)&&c.addClass("layui-code-"+(c.attr("lay-skin")||e.skin)),(d.find("li").length/100|0)>0&&d.css("margin-left",(d.find("li").length/100|0)+"px"),(c.attr("lay-height")||e.height)&&d.css("max-height",c.attr("lay-height")||e.height)})})}).addcss("modules/code.css","skincodecss");
\ No newline at end of file
/** layui-v2.1.4 MIT License By http://www.layui.com */
;layui.define("jquery",function(i){"use strict";var a=layui.$,t=(layui.hint(),layui.device()),l="element",e="layui-this",n="layui-show",s=function(){this.config={}};s.prototype.set=function(i){var t=this;return a.extend(!0,t.config,i),t},s.prototype.on=function(i,a){return layui.onevent.call(this,l,i,a)},s.prototype.tabAdd=function(i,t){var l=".layui-tab-title",e=a(".layui-tab[lay-filter="+i+"]"),n=e.children(l),s=n.children(".layui-tab-bar"),o=e.children(".layui-tab-content"),c='<li lay-id="'+(t.id||"")+'">'+(t.title||"unnaming")+"</li>";return s[0]?s.before(c):n.append(c),o.append('<div class="layui-tab-item">'+(t.content||"")+"</div>"),y.hideTabMore(!0),y.tabAuto(),this},s.prototype.tabDelete=function(i,t){var l=".layui-tab-title",e=a(".layui-tab[lay-filter="+i+"]"),n=e.children(l),s=n.find('>li[lay-id="'+t+'"]');return y.tabDelete(null,s),this},s.prototype.tabChange=function(i,t){var l=".layui-tab-title",e=a(".layui-tab[lay-filter="+i+"]"),n=e.children(l),s=n.find('>li[lay-id="'+t+'"]');return y.tabClick(null,null,s),this},s.prototype.progress=function(i,t){var l="layui-progress",e=a("."+l+"[lay-filter="+i+"]"),n=e.find("."+l+"-bar"),s=n.find("."+l+"-text");return n.css("width",t),s.text(t),this};var o=".layui-nav",c="layui-nav-item",r="layui-nav-bar",u="layui-nav-tree",d="layui-nav-child",h="layui-nav-more",f="layui-anim layui-anim-upbit",y={tabClick:function(i,t,s){var o=s||a(this),t=t||o.parent().children("li").index(o),c=o.parents(".layui-tab").eq(0),r=c.children(".layui-tab-content").children(".layui-tab-item"),u=o.find("a"),d=c.attr("lay-filter");"javascript:;"!==u.attr("href")&&"_blank"===u.attr("target")||(o.addClass(e).siblings().removeClass(e),r.eq(t).addClass(n).siblings().removeClass(n)),layui.event.call(this,l,"tab("+d+")",{elem:c,index:t})},tabDelete:function(i,t){var l=t||a(this).parent(),n=l.index(),s=l.parents(".layui-tab").eq(0),o=s.children(".layui-tab-content").children(".layui-tab-item");l.hasClass(e)&&(l.next()[0]?y.tabClick.call(l.next()[0],null,n+1):l.prev()[0]&&y.tabClick.call(l.prev()[0],null,n-1)),l.remove(),o.eq(n).remove(),setTimeout(function(){y.tabAuto()},50)},tabAuto:function(){var i="layui-tab-more",l="layui-tab-bar",e="layui-tab-close",n=this;a(".layui-tab").each(function(){var s=a(this),o=s.children(".layui-tab-title"),c=(s.children(".layui-tab-content").children(".layui-tab-item"),'lay-stope="tabmore"'),r=a('<span class="layui-unselect layui-tab-bar" '+c+"><i "+c+' class="layui-icon">&#xe61a;</i></span>');if(n===window&&8!=t.ie&&y.hideTabMore(!0),s.attr("lay-allowClose")&&o.find("li").each(function(){var i=a(this);if(!i.find("."+e)[0]){var t=a('<i class="layui-icon layui-unselect '+e+'">&#x1006;</i>');t.on("click",y.tabDelete),i.append(t)}}),o.prop("scrollWidth")>o.outerWidth()+1){if(o.find("."+l)[0])return;o.append(r),s.attr("overflow",""),r.on("click",function(a){o[this.title?"removeClass":"addClass"](i),this.title=this.title?"":"收缩"})}else o.find("."+l).remove(),s.removeAttr("overflow")})},hideTabMore:function(i){var t=a(".layui-tab-title");i!==!0&&"tabmore"===a(i.target).attr("lay-stope")||(t.removeClass("layui-tab-more"),t.find(".layui-tab-bar").attr("title",""))},clickThis:function(){var i=a(this),t=i.parents(o),n=t.attr("lay-filter"),s=i.find("a");i.find("."+d)[0]||("javascript:;"!==s.attr("href")&&"_blank"===s.attr("target")||(t.find("."+e).removeClass(e),i.addClass(e)),layui.event.call(this,l,"nav("+n+")",i))},clickChild:function(){var i=a(this),t=i.parents(o),n=t.attr("lay-filter");t.find("."+e).removeClass(e),i.addClass(e),layui.event.call(this,l,"nav("+n+")",i)},showChild:function(){var i=a(this),t=i.parents(o),l=i.parent(),e=i.siblings("."+d);t.hasClass(u)&&(e.removeClass(f),l["none"===e.css("display")?"addClass":"removeClass"](c+"ed"))},collapse:function(){var i=a(this),t=i.find(".layui-colla-icon"),e=i.siblings(".layui-colla-content"),s=i.parents(".layui-collapse").eq(0),o=s.attr("lay-filter"),c="none"===e.css("display");if("string"==typeof s.attr("lay-accordion")){var r=s.children(".layui-colla-item").children("."+n);r.siblings(".layui-colla-title").children(".layui-colla-icon").html("&#xe602;"),r.removeClass(n)}e[c?"addClass":"removeClass"](n),t.html(c?"&#xe61a;":"&#xe602;"),layui.event.call(this,l,"collapse("+o+")",{title:i,content:e,show:c})}};s.prototype.init=function(i){var l={tab:function(){y.tabAuto.call({})},nav:function(){var i=200,l={},e={},s={},p=function(o,c,r){var y=a(this),p=y.find("."+d);c.hasClass(u)?o.css({top:y.position().top,height:y.children("a").height(),opacity:1}):(p.addClass(f),o.css({left:y.position().left+parseFloat(y.css("marginLeft")),top:y.position().top+y.height()-5}),l[r]=setTimeout(function(){o.css({width:y.width(),opacity:1})},t.ie&&t.ie<10?0:i),clearTimeout(s[r]),"block"===p.css("display")&&clearTimeout(e[r]),e[r]=setTimeout(function(){p.addClass(n),y.find("."+h).addClass(h+"d")},300))};a(o).each(function(t){var o=a(this),f=a('<span class="'+r+'"></span>'),v=o.find("."+c);o.find("."+r)[0]||(o.append(f),v.on("mouseenter",function(){p.call(this,f,o,t)}).on("mouseleave",function(){o.hasClass(u)||(clearTimeout(e[t]),e[t]=setTimeout(function(){o.find("."+d).removeClass(n),o.find("."+h).removeClass(h+"d")},300))}),o.on("mouseleave",function(){clearTimeout(l[t]),s[t]=setTimeout(function(){o.hasClass(u)?f.css({height:0,top:f.position().top+f.height()/2,opacity:0}):f.css({width:0,left:f.position().left+f.width()/2,opacity:0})},i)})),v.each(function(){var i=a(this),t=i.find("."+d);if(t[0]&&!i.find("."+h)[0]){var l=i.children("a");l.append('<span class="'+h+'"></span>')}i.off("click",y.clickThis).on("click",y.clickThis),i.children("a").off("click",y.showChild).on("click",y.showChild),t.children("dd").off("click",y.clickChild).on("click",y.clickChild)})})},breadcrumb:function(){var i=".layui-breadcrumb";a(i).each(function(){var i=a(this),t=i.attr("lay-separator")||">",l=i.find("a");l.find(".layui-box")[0]||(l.each(function(i){i!==l.length-1&&a(this).append('<span class="layui-box">'+t+"</span>")}),i.css("visibility","visible"))})},progress:function(){var i="layui-progress";a("."+i).each(function(){var t=a(this),l=t.find(".layui-progress-bar"),e=l.attr("lay-percent");l.css("width",e),t.attr("lay-showPercent")&&setTimeout(function(){var a=Math.round(l.width()/t.width()*100);a>100&&(a=100),l.html('<span class="'+i+'-text">'+a+"%</span>")},350)})},collapse:function(){var i="layui-collapse";a("."+i).each(function(){var i=a(this).find(".layui-colla-item");i.each(function(){var i=a(this),t=i.find(".layui-colla-title"),l=i.find(".layui-colla-content"),e="none"===l.css("display");t.find(".layui-colla-icon").remove(),t.append('<i class="layui-icon layui-colla-icon">'+(e?"&#xe602;":"&#xe61a;")+"</i>"),t.off("click",y.collapse).on("click",y.collapse)})})}};return layui.each(l,function(i,a){a()})};var p=new s,v=a(document);p.init();var b=".layui-tab-title li";v.on("click",b,y.tabClick),v.on("click",y.hideTabMore),a(window).on("resize",y.tabAuto),i(l,p)});
\ No newline at end of file
/** layui-v2.1.4 MIT License By http://www.layui.com */
;layui.define("jquery",function(e){"use strict";var l=layui.$,o=function(e){},t='<i class="layui-anim layui-anim-rotate layui-anim-loop layui-icon ">&#xe63e;</i>';o.prototype.load=function(e){var o,i,n,r,a=this,c=0;e=e||{};var f=l(e.elem);if(f[0]){var m=l(e.scrollElem||document),u=e.mb||50,s=!("isAuto"in e)||e.isAuto,v=e.end||"没有更多了",y=e.scrollElem&&e.scrollElem!==document,d="<cite>加载更多</cite>",h=l('<div class="layui-flow-more"><a href="javascript:;">'+d+"</a></div>");f.find(".layui-flow-more")[0]||f.append(h);var p=function(e,t){e=l(e),h.before(e),t=0==t||null,t?h.html(v):h.find("a").html(d),i=t,o=null,n&&n()},g=function(){o=!0,h.find("a").html(t),"function"==typeof e.done&&e.done(++c,p)};if(g(),h.find("a").on("click",function(){l(this);i||o||g()}),e.isLazyimg)var n=a.lazyimg({elem:e.elem+" img",scrollElem:e.scrollElem});return s?(m.on("scroll",function(){var e=l(this),t=e.scrollTop();r&&clearTimeout(r),i||(r=setTimeout(function(){var i=y?e.height():l(window).height(),n=y?e.prop("scrollHeight"):document.documentElement.scrollHeight;n-t-i<=u&&(o||g())},100))}),a):a}},o.prototype.lazyimg=function(e){var o,t=this,i=0;e=e||{};var n=l(e.scrollElem||document),r=e.elem||"img",a=e.scrollElem&&e.scrollElem!==document,c=function(e,l){var o=n.scrollTop(),r=o+l,c=a?function(){return e.offset().top-n.offset().top+o}():e.offset().top;if(c>=o&&c<=r&&!e.attr("src")){var m=e.attr("lay-src");layui.img(m,function(){var l=t.lazyimg.elem.eq(i);e.attr("src",m).removeAttr("lay-src"),l[0]&&f(l),i++})}},f=function(e,o){var f=a?(o||n).height():l(window).height(),m=n.scrollTop(),u=m+f;if(t.lazyimg.elem=l(r),e)c(e,f);else for(var s=0;s<t.lazyimg.elem.length;s++){var v=t.lazyimg.elem.eq(s),y=a?function(){return v.offset().top-n.offset().top+m}():v.offset().top;if(c(v,f),i=s,y>u)break}};if(f(),!o){var m;n.on("scroll",function(){var e=l(this);m&&clearTimeout(m),m=setTimeout(function(){f(null,e)},50)}),o=!0}return f},e("flow",new o)});
\ No newline at end of file
/** layui-v2.1.4 MIT License By http://www.layui.com */
;layui.define("layer",function(e){"use strict";var i=layui.$,t=layui.layer,a=layui.hint(),n=layui.device(),l="form",s=".layui-form",r="layui-this",u="layui-hide",c="layui-disabled",o=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)$)/,"请输入正确的身份证号"]}}};o.prototype.set=function(e){var t=this;return i.extend(!0,t.config,e),t},o.prototype.verify=function(e){var t=this;return i.extend(!0,t.config.verify,e),t},o.prototype.on=function(e,i){return layui.onevent.call(this,l,e,i)},o.prototype.render=function(e,t){var n=this,o=i(s+function(){return t?'[lay-filter="'+t+'"]':""}()),d={select:function(){var e,t="请选择",a="layui-form-select",n="layui-select-title",s="layui-select-none",d="",f=o.find("select"),y=function(t,l){i(t.target).parent().hasClass(n)&&!l||(i("."+a).removeClass(a+"ed "+a+"up"),e&&d&&e.val(d)),e=null},h=function(t,o,f){var h=i(this),p=t.find("."+n),m=p.find("input"),k=t.find("dl"),g=k.children("dd");if(!o){var b=function(){var e=t.offset().top+t.outerHeight()+5-v.scrollTop(),i=k.outerHeight();t.addClass(a+"ed"),g.removeClass(u),e+i>v.height()&&e>=i&&t.addClass(a+"up")},x=function(e){t.removeClass(a+"ed "+a+"up"),m.blur(),e||C(m.val(),function(e){e&&(d=k.find("."+r).html(),m&&m.val(d))})};p.on("click",function(e){t.hasClass(a+"ed")?x():(y(e,!0),b()),k.find("."+s).remove()}),p.find(".layui-edge").on("click",function(){m.focus()}),m.on("keyup",function(e){var i=e.keyCode;9===i&&b()}).on("keydown",function(e){var i=e.keyCode;9===i?x():13===i&&e.preventDefault()});var C=function(e,t,a){var n=0;layui.each(g,function(){var t=i(this),l=t.text(),s=l.indexOf(e)===-1;(""===e||"blur"===a?e!==l:s)&&n++,"keyup"===a&&t[s?"addClass":"removeClass"](u)});var l=n===g.length;return t(l),l},w=function(e){var i=this.value,t=e.keyCode;return 9!==t&&13!==t&&37!==t&&38!==t&&39!==t&&40!==t&&(C(i,function(e){e?k.find("."+s)[0]||k.append('<p class="'+s+'">无匹配项</p>'):k.find("."+s).remove()},"keyup"),void(""===i&&k.find("."+s).remove()))};f&&m.on("keyup",w).on("blur",function(i){e=m,d=k.find("."+r).html(),setTimeout(function(){C(m.val(),function(e){e&&!d&&m.val("")},"blur")},200)}),g.on("click",function(){var e=i(this),a=e.attr("lay-value"),n=h.attr("lay-filter");return!e.hasClass(c)&&(e.hasClass("layui-select-tips")?m.val(""):(m.val(e.text()),e.addClass(r)),e.siblings().removeClass(r),h.val(a).removeClass("layui-form-danger"),layui.event.call(this,l,"select("+n+")",{elem:h[0],value:a,othis:t}),x(!0),!1)}),t.find("dl>dt").on("click",function(e){return!1}),i(document).off("click",y).on("click",y)}};f.each(function(e,l){var s=i(this),u=s.next("."+a),o=this.disabled,d=l.value,f=i(l.options[l.selectedIndex]),y=l.options[0];if("string"==typeof s.attr("lay-ignore"))return s.show();var v="string"==typeof s.attr("lay-search"),p=y?y.value?t:y.innerHTML||t:t,m=i(['<div class="layui-unselect '+a+(o?" layui-select-disabled":"")+'">','<div class="'+n+'"><input type="text" placeholder="'+p+'" value="'+(d?f.html():"")+'" '+(v?"":"readonly")+' class="layui-input layui-unselect'+(o?" "+c:"")+'">','<i class="layui-edge"></i></div>','<dl class="layui-anim layui-anim-upbit'+(s.find("optgroup")[0]?" layui-select-group":"")+'">'+function(e){var i=[];return layui.each(e,function(e,a){0!==e||a.value?"optgroup"===a.tagName.toLowerCase()?i.push("<dt>"+a.label+"</dt>"):i.push('<dd lay-value="'+a.value+'" class="'+(d===a.value?r:"")+(a.disabled?" "+c:"")+'">'+a.innerHTML+"</dd>"):i.push('<dd lay-value="" class="layui-select-tips">'+(a.innerHTML||t)+"</dd>")}),0===i.length&&i.push('<dd lay-value="" class="'+c+'">没有选项</dd>'),i.join("")}(s.find("*"))+"</dl>","</div>"].join(""));u[0]&&u.remove(),s.after(m),h.call(this,m,o,v)})},checkbox:function(){var e={checkbox:["layui-form-checkbox","layui-form-checked","checkbox"],_switch:["layui-form-switch","layui-form-onswitch","switch"]},t=o.find("input[type=checkbox]"),a=function(e,t){var a=i(this);e.on("click",function(){var i=a.attr("lay-filter"),n=(a.attr("lay-text")||"").split("|");a[0].disabled||(a[0].checked?(a[0].checked=!1,e.removeClass(t[1]).find("em").text(n[1])):(a[0].checked=!0,e.addClass(t[1]).find("em").text(n[0])),layui.event.call(a[0],l,t[2]+"("+i+")",{elem:a[0],value:a[0].value,othis:e}))})};t.each(function(t,n){var l=i(this),s=l.attr("lay-skin"),r=(l.attr("lay-text")||"").split("|"),u=this.disabled;"switch"===s&&(s="_"+s);var o=e[s]||e.checkbox;if("string"==typeof l.attr("lay-ignore"))return l.show();var d=l.next("."+o[0]),f=i(['<div class="layui-unselect '+o[0]+(n.checked?" "+o[1]:"")+(u?" layui-checkbox-disbaled "+c:"")+'" lay-skin="'+(s||"")+'">',{_switch:"<em>"+((n.checked?r[0]:r[1])||"")+"</em><i></i>"}[s]||(n.title.replace(/\s/g,"")?"<span>"+n.title+"</span>":"")+'<i class="layui-icon">'+(s?"&#xe605;":"&#xe618;")+"</i>","</div>"].join(""));d[0]&&d.remove(),l.after(f),a.call(this,f,o)})},radio:function(){var e="layui-form-radio",t=["&#xe643;","&#xe63f;"],a=o.find("input[type=radio]"),n=function(a){var n=i(this),r="layui-anim-scaleSpring";a.on("click",function(){var u=n[0].name,c=n.parents(s),o=n.attr("lay-filter"),d=c.find("input[name="+u.replace(/(\.|#|\[|\])/g,"\\$1")+"]");n[0].disabled||(layui.each(d,function(){var a=i(this).next("."+e);this.checked=!1,a.removeClass(e+"ed"),a.find(".layui-icon").removeClass(r).html(t[1])}),n[0].checked=!0,a.addClass(e+"ed"),a.find(".layui-icon").addClass(r).html(t[0]),layui.event.call(n[0],l,"radio("+o+")",{elem:n[0],value:n[0].value,othis:a}))})};a.each(function(a,l){var s=i(this),r=s.next("."+e),u=this.disabled;if("string"==typeof s.attr("lay-ignore"))return s.show();var o=i(['<div class="layui-unselect '+e+(l.checked?" "+e+"ed":"")+(u?" layui-radio-disbaled "+c:"")+'">','<i class="layui-anim layui-icon">'+t[l.checked?0:1]+"</i>","<span>"+(l.title||"未命名")+"</span>","</div>"].join(""));r[0]&&r.remove(),s.after(o),n.call(this,o)})}};return e?d[e]?d[e]():a.error("不支持的"+e+"表单渲染"):layui.each(d,function(e,i){i()}),n};var d=function(){var e=i(this),a=f.config.verify,r=null,u="layui-form-danger",c={},o=e.parents(s),d=o.find("*[lay-verify]"),y=e.parents("form")[0],v=o.find("input,select,textarea"),h=e.attr("lay-filter");return layui.each(d,function(e,l){var s=i(this),c=s.attr("lay-verify").split("|"),o="",d=s.val();if(s.removeClass(u),layui.each(c,function(e,i){var c="function"==typeof a[i];if(a[i]&&(c?o=a[i](d,l):!a[i][0].test(d)))return t.msg(o||a[i][1],{icon:5,shift:6}),n.android||n.ios||l.focus(),s.addClass(u),r=!0}),r)return r}),!r&&(layui.each(v,function(e,i){i.name&&(/^checkbox|radio$/.test(i.type)&&!i.checked||(c[i.name]=i.value))}),layui.event.call(this,l,"submit("+h+")",{elem:this,form:y,field:c}))},f=new o,y=i(document),v=i(window);f.render(),y.on("reset",s,function(){var e=i(this).attr("lay-filter");setTimeout(function(){f.render(null,e)},50)}),y.on("submit",s,d).on("click","*[lay-submit]",d),e(l,f)});
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment