You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
1.6 KiB
63 lines
1.6 KiB
|
|
layui.use(['form','table'], function(){
|
|
var form = layui.form;
|
|
var table = layui.table;
|
|
table.render({
|
|
elem: '#taskTable'
|
|
// ,url: '#' //数据接口
|
|
,data: []
|
|
,cols: [[ //表头
|
|
{field: 'cu', title: 'Name', width: '14%', align: 'center'}
|
|
,{field: 'money', title: 'Date', width: '14%', align: 'center'}
|
|
,{field: 'time', title: 'Level', width: '14%', align: 'center'}
|
|
]]
|
|
,skin: 'line'
|
|
,page: { //支持传入 laypage 组件的所有参数(某些参数除外,如:jump/elem) - 详见文档
|
|
layout: ['count', 'prev', 'page', 'next'], //自定义分页布局
|
|
groups: 7, // 只显示 1 个连续页码
|
|
first: false, //不显示首页
|
|
last: false //不显示尾页
|
|
}
|
|
});
|
|
|
|
//切换标签tab页
|
|
$('#tabHead li').on('click',function(){
|
|
$('#tabHead li').removeClass('activeLi');
|
|
$(this).addClass('activeLi')
|
|
let name = $(this).data('name');
|
|
$("#tab-panel section").hide()
|
|
$("#tab-panel section[data-name='"+name+"']").show()
|
|
})
|
|
|
|
//绑定
|
|
$(".bind").on('click',function(){
|
|
$('.account-detail').hide()
|
|
$(this).parents('li').find('.account-detail').show();
|
|
})
|
|
|
|
|
|
$("#passwordForm").validate({
|
|
rules: {
|
|
oldPassword: "required",
|
|
newPassword: "required",
|
|
surePassword: {
|
|
required: true,
|
|
equalTo: "#newPassword",
|
|
}
|
|
},
|
|
messages: {
|
|
oldPassword: {
|
|
required: "请输入旧的登录密码"
|
|
},
|
|
newPassword: {
|
|
required: "请输入新的登录密码"
|
|
},
|
|
surePassword: {
|
|
required: "请输入密码",
|
|
equalTo: "两次密码输入不一致",
|
|
}
|
|
}
|
|
});
|
|
|
|
|
|
});
|