diff --git a/WebContent/WEB-INF/jsp/pc/activity/activityList.jsp b/WebContent/WEB-INF/jsp/pc/activity/activityList.jsp
index d1271f0..801671e 100644
--- a/WebContent/WEB-INF/jsp/pc/activity/activityList.jsp
+++ b/WebContent/WEB-INF/jsp/pc/activity/activityList.jsp
@@ -58,24 +58,7 @@
keyword: null
};
- initData(queryObj);
-
- //查询
- form.on('submit(querybtn)', function(data) {
- queryObj.keyword = $("[name=keyword]").val();
- queryObj.page = 1;
- initData(queryObj)
- });
- $(".resetBtn").on("click", function() {
- $("[name=keyword]").val("")
- queryObj.page = 1;
- queryObj.keyword = null;
- initData(queryObj)
- return false
- })
- //初始化数据
- initData(queryObj);
-
+ //初始化方法
function initData(queryObj) {
$.get("/zzhnc/article/getArticlesList", queryObj, function(data) {
var data = data.data;
@@ -101,24 +84,42 @@
$("#tablelist").html(str);
form.render();
toNull_G();
- laypage.render({
- elem: 'page',
- count: data.total,
- limit: queryObj.pagesize,
- curr: queryObj.page,
- skip: true,
- jump: function(obj, first) {
- if(!first) {
- queryObj.page = obj.curr
- initData(queryObj);
- }
- }
- })
}
-
+ laypage.render({
+ elem: 'page',
+ count: data.total,
+ limit: queryObj.pagesize,
+ curr: queryObj.page,
+ layout: ['count', 'prev', 'page', 'next', 'skip'],
+ jump: function(obj, first) {
+ if(!first) {
+ queryObj.page = obj.curr
+ initData(queryObj);
+ }
+ }
+ })
})
}
+ //初始化数据
+ initData(queryObj);
+
+ //查询
+ form.on('submit(querybtn)', function(data) {
+ queryObj.keyword = $("[name=keyword]").val();
+ queryObj.page = 1;
+ initData(queryObj)
+ });
+
+ //重置
+ $(".resetBtn").on("click", function() {
+ $("[name=keyword]").val("")
+ queryObj.page = 1;
+ queryObj.keyword = null;
+ initData(queryObj)
+ return false
+ })
+
//添加文章
$(document).on("click", ".createBtn", function() {
if(parent.tab.exists("添加文章") > 0) {
@@ -131,6 +132,7 @@
title: "添加文章"
});
})
+
//修改文章
$(document).on("click", ".updataBtn", function() {
var id = $(this).parents("tr").attr("data-id");
@@ -144,6 +146,7 @@
title: "修改文章"
});
})
+
//删除文章
$(document).on("click", ".deleteBtn", function() {
var id = $(this).parents("tr").attr("data-id");
diff --git a/WebContent/WEB-INF/jsp/pc/autoresponse/autoresponse.jsp b/WebContent/WEB-INF/jsp/pc/autoresponse/autoresponse.jsp
index ec72d53..fde7c3e 100644
--- a/WebContent/WEB-INF/jsp/pc/autoresponse/autoresponse.jsp
+++ b/WebContent/WEB-INF/jsp/pc/autoresponse/autoresponse.jsp
@@ -47,7 +47,7 @@
-
+
@@ -78,12 +78,13 @@
size: 10,
keyword: null
}
-
+
//页面初始化
function initdata(queryObj) {
$.get("/zzhnc/autoreply/getAutoreplyList", queryObj, function(data) {
var data = data.data;
console.log(data)
+ $("#tablelist").html("");
if(data.rows.length < 1) {
$(".nodata").show();
} else {
@@ -103,23 +104,23 @@
$("#tablelist").html(str);
form.render();
toNull_G();
- laypage.render({
- elem: 'page',
- count: data.total,
- limit: queryObj.size,
- curr: queryObj.page,
- skip: true,
- jump: function(obj, first) {
- if(!first) {
- queryObj.page = obj.curr
- initdata(queryObj);
- }
- }
- })
}
+ laypage.render({
+ elem: 'page',
+ count: data.total,
+ limit: queryObj.size,
+ curr: queryObj.page,
+ layout: ['count', 'prev', 'page', 'next', 'skip'],
+ jump: function(obj, first) {
+ if(!first) {
+ queryObj.page = obj.curr
+ initdata(queryObj);
+ }
+ }
+ })
})
}
-
+
//初始化数据
initdata(queryObj);
@@ -150,7 +151,7 @@
}
})
})
-
+
//添加关键字
$(document).on("click", ".createBtn", function() {
layer.open({
@@ -232,7 +233,7 @@
});
form.render();
},
- success: function(){
+ success: function() {
$.get("/zzhnc/autoreply/getAutoReply", {
id: id
}, function(data) {
diff --git a/WebContent/WEB-INF/jsp/pc/goods/goodsList.jsp b/WebContent/WEB-INF/jsp/pc/goods/goodsList.jsp
index 443d094..a57f1ef 100644
--- a/WebContent/WEB-INF/jsp/pc/goods/goodsList.jsp
+++ b/WebContent/WEB-INF/jsp/pc/goods/goodsList.jsp
@@ -87,7 +87,7 @@
'
' + data.rows[i].sellerName + ' | ' +
'
' + data.rows[i].sellerAddress + ' | ' +
'
' + data.rows[i].sellerPhone + ' | ' +
- '
' + isHome(data.rows[i].isHome) +' | ' +
+ '
' + isHome(data.rows[i].isHome) + ' | ' +
'
修改' +
'删除' +
' | ' +
@@ -96,20 +96,20 @@
$("#tablelist").html(str);
form.render();
toNull_G();
- laypage.render({
- elem: 'page',
- count: data.total,
- limit: queryObj.size,
- curr: queryObj.page,
- skip: true,
- jump: function(obj, first) {
- if(!first) {
- queryObj.page = obj.curr
- initData(queryObj);
- }
- }
- })
}
+ laypage.render({
+ elem: 'page',
+ count: data.total,
+ limit: queryObj.size,
+ curr: queryObj.page,
+ layout: ['count', 'prev', 'page', 'next', 'skip'],
+ jump: function(obj, first) {
+ if(!first) {
+ queryObj.page = obj.curr
+ initData(queryObj);
+ }
+ }
+ })
})
}
@@ -183,10 +183,11 @@
});
});
- function isHome(v){
- if(v){
+ //是否在首页显示的bool值转为是或否
+ function isHome(v) {
+ if(v) {
v = "是"
- }else{
+ } else {
v = "否"
}
return v;
diff --git a/WebContent/WEB-INF/jsp/pc/prize/prizeList.jsp b/WebContent/WEB-INF/jsp/pc/prize/prizeList.jsp
index 9592c10..66f5aa6 100644
--- a/WebContent/WEB-INF/jsp/pc/prize/prizeList.jsp
+++ b/WebContent/WEB-INF/jsp/pc/prize/prizeList.jsp
@@ -333,7 +333,7 @@
console.log(data)
if(data.code == 0) {
//基本信息
- $("[name=beginTime]").val(toTime_G(data.data.beginTime));
+ $("[name=beginTime]").val(data.data.beginTime);
$("[name=status]").val(data.data.status);
$("[name=turn]").val(data.data.turn);
$("[name=planMny]").val(data.data.planMny);
@@ -461,7 +461,7 @@
}
var submitData = {
- //beginTime: e.field.beginTime,
+ beginTime: e.field.beginTime,
status: e.field.status,
turn: e.field.turn,
planMny: e.field.planMny,
@@ -509,14 +509,14 @@
}, function(data) {
console.log(data);
if(data.code == 0) {
- top.layer.msg("开启活动成功");
+ layer.msg("开启活动成功");
} else {
- top.layer.msg(data.msg);
+ layer.msg(data.msg);
}
})
} else {
- top.layer.msg("只有未开启的活动才可以开启");
+ layer.msg("只有未开启的活动才可以开启");
}
});
@@ -529,35 +529,31 @@
}, function(data) {
console.log(data);
if(data.code == 0) {
- top.layer.msg("设置活动结束成功");
-
+ layer.msg("设置活动结束成功");
} else {
- top.layer.msg(data.msg);
+ layer.msg(data.msg);
}
})
} else {
- top.layer.msg("只有进行中的活动可以结束");
+ layer.msg("只有进行中的活动可以结束");
}
-
});
+
//设置下一轮
form.on('submit(nextround)', function(e) {
-
var status = $("select[name=status]").val();
if(status == "3") {
- $.post("/zzhnc/activity/clearActivity", function(data) {
+ $.get("/zzhnc/activity/clearActivity", function(data) {
console.log(data);
if(data.code == 0) {
- top.layer.msg("开启下一轮成功");
-
+ layer.msg("开启下一轮成功");
} else {
- top.layer.msg(data.msg);
+ layer.msg(data.msg);
}
})
} else {
- top.layer.msg("活动结束后才能开启下一轮");
+ layer.msg("活动结束后才能开启下一轮");
}
-
});
//数值转为true或false
diff --git a/WebContent/WEB-INF/jsp/pc/report/fans.jsp b/WebContent/WEB-INF/jsp/pc/report/fans.jsp
index 7744e36..a5f9d43 100644
--- a/WebContent/WEB-INF/jsp/pc/report/fans.jsp
+++ b/WebContent/WEB-INF/jsp/pc/report/fans.jsp
@@ -79,20 +79,20 @@
$("#fanslist").html(str)
form.render()
toNull_G();
- laypage.render({
- elem: 'page',
- count: data.total,
- limit: 10,
- curr: queryObj.page,
- skip: true,
- jump: function(obj, first) {
- if(!first) {
- queryObj.page = obj.curr
- initData(queryObj)
- }
- }
- })
}
+ laypage.render({
+ elem: 'page',
+ count: data.total,
+ limit: 10,
+ curr: queryObj.page,
+ layout: ['count', 'prev', 'page', 'next', 'skip'],
+ jump: function(obj, first) {
+ if(!first) {
+ queryObj.page = obj.curr
+ initData(queryObj)
+ }
+ }
+ })
})
}
diff --git a/WebContent/WEB-INF/jsp/pc/report/goods.jsp b/WebContent/WEB-INF/jsp/pc/report/goods.jsp
index 7bf00a3..617bd76 100644
--- a/WebContent/WEB-INF/jsp/pc/report/goods.jsp
+++ b/WebContent/WEB-INF/jsp/pc/report/goods.jsp
@@ -92,20 +92,20 @@
$("#tablelist").html(str);
form.render();
toNull_G();
- laypage.render({
- elem: 'page',
- count: data.total,
- limit: queryObj.size,
- curr: queryObj.page,
- skip: true,
- jump: function(obj, first) {
- if(!first) {
- queryObj.page = obj.curr
- initData(queryObj);
- }
- }
- })
}
+ laypage.render({
+ elem: 'page',
+ count: data.total,
+ limit: queryObj.size,
+ curr: queryObj.page,
+ layout: ['count', 'prev', 'page', 'next', 'skip'],
+ jump: function(obj, first) {
+ if(!first) {
+ queryObj.page = obj.curr
+ initData(queryObj);
+ }
+ }
+ })
})
}
diff --git a/WebContent/WEB-INF/jsp/pc/report/prize.jsp b/WebContent/WEB-INF/jsp/pc/report/prize.jsp
index 6c83528..20d320e 100644
--- a/WebContent/WEB-INF/jsp/pc/report/prize.jsp
+++ b/WebContent/WEB-INF/jsp/pc/report/prize.jsp
@@ -89,14 +89,12 @@
data = data.data;
$('#moneySum').text(data.sum)
console.log(data)
-
+ $("#tablelist").html("");
var str = "";
if(data.rows.length < 1) {
$(".nodata").show();
- $("#page").hide();
} else {
$(".nodata").hide();
- $("#page").show();
for(var i = 0; i < data.rows.length; i++) {
str += '
' +
'' + ((data.page - 1) * data.pageSize + i + 1) + ' | ' +
@@ -110,21 +108,21 @@
$("#tablelist").html(str);
form.render();
toNull_G();
- laypage.render({
- elem: 'page',
- count: data.total,
- limit: queryObj.pagesize,
- curr: queryObj.page,
- skip: true,
- jump: function(obj, first) {
- if(!first) {
- queryObj.page = obj.curr
- initData(queryObj);
- }
-
- }
- })
}
+ laypage.render({
+ elem: 'page',
+ count: data.total,
+ limit: queryObj.pagesize,
+ curr: queryObj.page,
+ layout: ['count', 'prev', 'page', 'next', 'skip'],
+ jump: function(obj, first) {
+ if(!first) {
+ queryObj.page = obj.curr
+ initData(queryObj);
+ }
+
+ }
+ })
})
}
diff --git a/WebContent/WEB-INF/res/css/basic.css b/WebContent/WEB-INF/res/css/basic.css
index 159f278..3ebcbf2 100644
--- a/WebContent/WEB-INF/res/css/basic.css
+++ b/WebContent/WEB-INF/res/css/basic.css
@@ -107,7 +107,8 @@
margin-right: 5px;
}
-.layui-code, .layui-upload-list{
+.layui-code,
+.layui-upload-list {
margin: 0;
}
@@ -144,11 +145,16 @@
margin-right: 5px;
}
-#upload{
+#upload {
float: left;
margin-right: 10px;
}
+#page {
+ text-align: center;
+}
+
+
/*-----------公共样式 end-----------*/
@@ -172,14 +178,17 @@
margin-bottom: 40px;
color: #666;
}
-.popupbos .layui-form-label{
+
+.popupbos .layui-form-label {
width: 90px;
padding: 9px 0;
}
-.popupbos .layui-input-block{
+
+.popupbos .layui-input-block {
margin-left: 90px;
}
-.popupbos .layui-form-mid{
+
+.popupbos .layui-form-mid {
padding: 0!important;
}
diff --git a/WebContent/WEB-INF/res/css/layout.css b/WebContent/WEB-INF/res/css/layout.css
index fa37c1c..ac59408 100644
--- a/WebContent/WEB-INF/res/css/layout.css
+++ b/WebContent/WEB-INF/res/css/layout.css
@@ -63,7 +63,6 @@ body .layui-layout-admin .footer-demo{height: auto; padding: 5px 0; line-height:
90% {opacity: 0.1; transform: translate3d(0, 0, 0) rotate(3600deg) scale(6);}
100% {opacity: 1; transform: translate3d(0, 0, 0) rotate(3600deg) scale(1);}
}
-
@-webkit-keyframes site-desc {
0% { -webkit-transform: scale(1.1);}
100% {opacity: 1; -webkit-transform: scale(1);}
diff --git a/WebContent/WEB-INF/res/js/index.js b/WebContent/WEB-INF/res/js/index.js
index dfcb5cf..9ee4f58 100644
--- a/WebContent/WEB-INF/res/js/index.js
+++ b/WebContent/WEB-INF/res/js/index.js
@@ -1,197 +1,193 @@
/** index.js By Beginner Emain:zheng_jinfan@126.com HomePage:http://www.zhengjinfan.cn */
-var tab,layer;
+var tab, layer;
layui.config({
- base: '/zzhnc/res/js/',
- version: new Date().getTime()
-}).use(['element', 'layer', 'navbar', 'tab'], function () {
- var element = layui.element,
- $ = layui.jquery,
- navbar = layui.navbar();
- layer = layui.layer
- tab = layui.tab({
- elem: '.admin-nav-card' //设置选项卡容器
- ,
- //maxSetting: {
- // max: 5,
- // tipMsg: '只能开5个哇,不能再开了。真的。'
- //},
- contextMenu: true,
- onSwitch: function (data) {
- /*console.log(data.id); //当前Tab的Id
- console.log(data.index); //得到当前Tab的所在下标
- console.log(data.elem); //得到当前的Tab大容器
+ base: '/zzhnc/res/js/',
+ version: new Date().getTime()
+}).use(['element', 'layer', 'navbar', 'tab'], function() {
+ var element = layui.element,
+ $ = layui.jquery,
+ navbar = layui.navbar();
+ layer = layui.layer
+ tab = layui.tab({
+ elem: '.admin-nav-card', //设置选项卡容器
+ //maxSetting: {
+ // max: 5,
+ // tipMsg: '只能开5个哇,不能再开了。真的。'
+ //},
+ contextMenu: true,
+ onSwitch: function(data) {
+ /*console.log(data.id); //当前Tab的Id
+ console.log(data.index); //得到当前Tab的所在下标
+ console.log(data.elem); //得到当前的Tab大容器
- console.log(tab.getCurrentTabId())*/
- $('iframe[data-id=' + (data.index+1) + ']').each(function () {
- $(this)[0].src = $(this)[0].src;
- });
- }
- });
- //iframe自适应
- $(window).on('resize', function () {
- var $content = $('.admin-nav-card .layui-tab-content');
- $content.height($(this).height() - 147);
- $content.find('iframe').each(function () {
- $(this).height($content.height());
- });
- }).resize();
+ console.log(tab.getCurrentTabId())*/
+ $('iframe[data-id=' + (data.index + 1) + ']').each(function() {
+ $(this)[0].src = $(this)[0].src;
+ });
+ }
+ });
+ //iframe自适应
+ $(window).on('resize', function() {
+ var $content = $('.admin-nav-card .layui-tab-content');
+ $content.height($(this).height() - 147);
+ $content.find('iframe').each(function() {
+ $(this).height($content.height());
+ });
+ }).resize();
-
-
- //设置navbar
- navbar.set({
- spreadOne: true,
- elem: '#admin-navbar-side',
- cached: true,
- data: navs2
+ //设置navbar
+ navbar.set({
+ spreadOne: true,
+ elem: '#admin-navbar-side',
+ cached: true,
+ data: navs2
// cached:true,
// url: '../res/plugins/datas/nav.json'
- });
- //渲染navbar
- navbar.render();
- //监听点击事件
- navbar.on('click(side)', function (data) {
- tab.tabAdd(data.field);
- });
-
- $('.admin-side-toggle').on('click', function () {
- var sideWidth = $('#admin-side').width();
- if (sideWidth === 200) {
- $('#admin-body').animate({
- left: '0'
- }); //admin-footer
- $('#admin-footer').animate({
- left: '0'
- });
- $('#admin-side').animate({
- width: '0'
- });
- } else {
- $('#admin-body').animate({
- left: '200px'
- });
- $('#admin-footer').animate({
- left: '200px'
- });
- $('#admin-side').animate({
- width: '200px'
- });
- }
- });
- $('.admin-side-full').on('click', function () {
- var docElm = document.documentElement;
- //W3C
- if (docElm.requestFullscreen) {
- docElm.requestFullscreen();
- }
- //FireFox
- else if (docElm.mozRequestFullScreen) {
- docElm.mozRequestFullScreen();
- }
- //Chrome等
- else if (docElm.webkitRequestFullScreen) {
- docElm.webkitRequestFullScreen();
- }
- //IE11
- else if (elem.msRequestFullscreen) {
- elem.msRequestFullscreen();
- }
- layer.msg('按Esc即可退出全屏');
- });
-
+ });
+ //渲染navbar
+ navbar.render();
+ //监听点击事件
+ navbar.on('click(side)', function(data) {
+ tab.tabAdd(data.field);
+ });
+ $('.admin-side-toggle').on('click', function() {
+ var sideWidth = $('#admin-side').width();
+ if(sideWidth === 200) {
+ $('#admin-body').animate({
+ left: '0'
+ }); //admin-footer
+ $('#admin-footer').animate({
+ left: '0'
+ });
+ $('#admin-side').animate({
+ width: '0'
+ });
+ } else {
+ $('#admin-body').animate({
+ left: '200px'
+ });
+ $('#admin-footer').animate({
+ left: '200px'
+ });
+ $('#admin-side').animate({
+ width: '200px'
+ });
+ }
+ });
+ $('.admin-side-full').on('click', function() {
+ var docElm = document.documentElement;
+ //W3C
+ if(docElm.requestFullscreen) {
+ docElm.requestFullscreen();
+ }
+ //FireFox
+ else if(docElm.mozRequestFullScreen) {
+ docElm.mozRequestFullScreen();
+ }
+ //Chrome等
+ else if(docElm.webkitRequestFullScreen) {
+ docElm.webkitRequestFullScreen();
+ }
+ //IE11
+ else if(elem.msRequestFullscreen) {
+ elem.msRequestFullscreen();
+ }
+ layer.msg('按Esc即可退出全屏');
+ });
- //锁屏
- $(document).on('keydown', function () {
- var e = window.event;
- if (e.keyCode === 76 && e.altKey) {
- //alert("你按下了alt+l");
- lock($, layer);
- }
- });
- $('#lock').on('click', function () {
- lock($, layer);
- });
+ //锁屏
+ $(document).on('keydown', function() {
+ var e = window.event;
+ if(e.keyCode === 76 && e.altKey) {
+ //alert("你按下了alt+l");
+ lock($, layer);
+ }
+ });
+ $('#lock').on('click', function() {
+ lock($, layer);
+ });
- //手机设备的简单适配
- var treeMobile = $('.site-tree-mobile'),
- shadeMobile = $('.site-mobile-shade');
- treeMobile.on('click', function () {
- $('body').addClass('site-mobile');
- });
- shadeMobile.on('click', function () {
- $('body').removeClass('site-mobile');
- });
+ //手机设备的简单适配
+ var treeMobile = $('.site-tree-mobile'),
+ shadeMobile = $('.site-mobile-shade');
+ treeMobile.on('click', function() {
+ $('body').addClass('site-mobile');
+ });
+ shadeMobile.on('click', function() {
+ $('body').removeClass('site-mobile');
+ });
});
var isShowLock = false;
+
function lock($, layer) {
- if (isShowLock)
- return;
- //自定页
- layer.open({
- title: false,
- type: 1,
- closeBtn: 0,
- anim: 6,
- content: $('#lock-temp').html(),
- shade: [0.9, '#393D49'],
- success: function (layero, lockIndex) {
- isShowLock = true;
- //给显示用户名赋值
- layero.find('div#lockUserName').text('admin');
- layero.find('input[name=lockPwd]').on('focus', function () {
- var $this = $(this);
- if ($this.val() === '输入登录密码解锁..') {
- $this.val('').attr('type', 'password');
- }
- })
- .on('blur', function () {
- var $this = $(this);
- if ($this.val() === '' || $this.length === 0) {
- $this.attr('type', 'text').val('输入登录密码解锁..');
- }
- });
- //在此处可以写一个请求到服务端删除相关身份认证,因为考虑到如果浏览器被强制刷新的时候,身份验证还存在的情况
- //do something...
- //e.g.
+ if(isShowLock)
+ return;
+ //自定页
+ layer.open({
+ title: false,
+ type: 1,
+ closeBtn: 0,
+ anim: 6,
+ content: $('#lock-temp').html(),
+ shade: [0.9, '#393D49'],
+ success: function(layero, lockIndex) {
+ isShowLock = true;
+ //给显示用户名赋值
+ layero.find('div#lockUserName').text('admin');
+ layero.find('input[name=lockPwd]').on('focus', function() {
+ var $this = $(this);
+ if($this.val() === '输入登录密码解锁..') {
+ $this.val('').attr('type', 'password');
+ }
+ })
+ .on('blur', function() {
+ var $this = $(this);
+ if($this.val() === '' || $this.length === 0) {
+ $this.attr('type', 'text').val('输入登录密码解锁..');
+ }
+ });
+ //在此处可以写一个请求到服务端删除相关身份认证,因为考虑到如果浏览器被强制刷新的时候,身份验证还存在的情况
+ //do something...
+ //e.g.
/*
$.post(url,params,callback,'json');
*/
- //绑定解锁按钮的点击事件
- layero.find('button#unlock').on('click', function () {
- var $lockBox = $('div#lock-box');
- if(window.sessionStorage){
- if(sessionStorage.getItem('phone')){
- var userName = sessionStorage.getItem('phone')
- }
- }else{
- if(document.cookie.length > 0){
- if(document.cookie.indexOf("phone") > 0 )
- var userName = document.cookie.slice(6)
- }
- }
-
- var pwd = $lockBox.find('input[name=lockPwd]').val();
- if (pwd === '输入登录密码解锁..' || pwd.length === 0) {
- layer.msg('请输入登录密码..', {
- icon: 2,
- time: 1000
- });
- return;
- }
- unlock(userName, pwd);
- });
+ //绑定解锁按钮的点击事件
+ layero.find('button#unlock').on('click', function() {
+ var $lockBox = $('div#lock-box');
+ if(window.sessionStorage) {
+ if(sessionStorage.getItem('phone')) {
+ var userName = sessionStorage.getItem('phone')
+ }
+ } else {
+ if(document.cookie.length > 0) {
+ if(document.cookie.indexOf("phone") > 0)
+ var userName = document.cookie.slice(6)
+ }
+ }
+
+ var pwd = $lockBox.find('input[name=lockPwd]').val();
+ if(pwd === '输入登录密码解锁..' || pwd.length === 0) {
+ layer.msg('请输入登录密码..', {
+ icon: 2,
+ time: 1000
+ });
+ return;
+ }
+ unlock(userName, pwd);
+ });
/**
* 解锁操作方法
* @param {String} 用户名
* @param {String} 密码
*/
- var unlock = function (un, pwd) {
- var code = ""
- //这里可以使用ajax方法解锁
+ var unlock = function(un, pwd) {
+ var code = ""
+ //这里可以使用ajax方法解锁
/*$.post('api/xx',{username:un,password:pwd},function(data){
//验证成功
if(data.success){
@@ -202,27 +198,32 @@ function lock($, layer) {
}
},'json');
*/
- $.ajax({
- type: 'POST',
- async: false,
- url: "../center/login",
- data: {account:un,pwd:pwd,code:code},
- success: function (data) {
- if(data.code==0){
- isShowLock = false;
- //演示:默认输入密码都算成功
- //关闭锁屏层
- layer.close(lockIndex);
- }else{
-
- layer.msg(data.msg,{icon:2,time:1000});
- }
- }
- });
-
-
-
- };
- }
- });
+ $.ajax({
+ type: 'POST',
+ async: false,
+ url: "../center/login",
+ data: {
+ account: un,
+ pwd: pwd,
+ code: code
+ },
+ success: function(data) {
+ if(data.code == 0) {
+ isShowLock = false;
+ //演示:默认输入密码都算成功
+ //关闭锁屏层
+ layer.close(lockIndex);
+ } else {
+
+ layer.msg(data.msg, {
+ icon: 2,
+ time: 1000
+ });
+ }
+ }
+ });
+
+ };
+ }
+ });
};
\ No newline at end of file
diff --git a/WebContent/WEB-INF/res/js/me.js b/WebContent/WEB-INF/res/js/me.js
index 79c1ba8..fc9ec78 100644
--- a/WebContent/WEB-INF/res/js/me.js
+++ b/WebContent/WEB-INF/res/js/me.js
@@ -9,10 +9,12 @@ function toTime_G(v) {
var day = time.getDate();
var hour = time.getHours();
var min = time.getMinutes();
+ var second = time.getSeconds();
if(mon < 10) mon = "0" + mon
if(day < 10) day = "0" + day
if(hour < 10) hour = "0" + hour
if(min < 10) min = "0" + min
+ if(second < 10) second = "0" + second
return year + "-" + mon + "-" + day + " " + hour + ":" + min
}
}
diff --git a/WebContent/WEB-INF/res/js/tab.js b/WebContent/WEB-INF/res/js/tab.js
index ece8e3f..bce11d8 100644
--- a/WebContent/WEB-INF/res/js/tab.js
+++ b/WebContent/WEB-INF/res/js/tab.js
@@ -152,8 +152,8 @@ layui.define(['element', 'common'], function(exports) {
} else {
element.tabChange(ELEM.tabFilter, that.getTabId(data.title));
//自动刷新
- if (_config.autoRefresh) {
- _config.elem.find('div.layui-tab-content > div').eq(tabIndex).children('iframe')[0].contentWindow.location.reload();
+ if(_config.autoRefresh) {
+ _config.elem.find('div.layui-tab-content > div').eq(tabIndex).children('iframe')[0].contentWindow.location.reload();
}
}
if(_config.contextMenu) {
diff --git a/WebContent/WEB-INF/res/plugins/datas/area_.js b/WebContent/WEB-INF/res/plugins/datas/area_.js
deleted file mode 100644
index 5a5c723..0000000
--- a/WebContent/WEB-INF/res/plugins/datas/area_.js
+++ /dev/null
@@ -1,19 +0,0 @@
-
-var threeSelectData = null //城市数据
-$.ajax({
- url: url_gobol + "public/getDropDownCity",
- type:"get",
- async:false,
- beforeSend:function(){
- top.layer.load()
- },
- success:function(data){
- data = JSON.parse(data.data)
- threeSelectData = data
- top.layer.close(top.layer.load())
- },
- error:function(){
- top.layer.close(top.layer.load())
- top.layer.msg("获取城市数据失败,请刷新重试")
- }
-})