jQuery(document).ready(function(){
$("#log").click(function() {
jQuery.ajax({
type: "POST",
url: "/API/mockexam/signin.php",
dataType:"json",
data: $('#signupForm').serialize(),
success: function(data) {
if(data.success== 200) {
window.open("/API/mockexam/studentinfo.php", '_blank');
};
if(data.success == 400) {
layui.use('layer', function() {
var layer = layui.layer;
layer.open({
skin: 'demo-class',
type: 1,
anim:1,
shade: [0.6, '#222'],
id: 'LAY_layuipro',
title: '考生登录',
area: ['390px', 'auto'],
icon:1,
content: "<i class='layui-icon layui-icon-about' style='font-size: 18px; color: red;padding-top:10px'></i> "+data.message,
//这里可以直接套上layer自己的表情了
btn: '确定',
yes: function(index, layero) {
layer.closeAll();
$("#checkcode").attr({
src: "/checkcode.php?" + Math.random() * 5
});
},
end: function() {
$("#checkcode").attr({
src: "/checkcode.php?" + Math.random() * 5
});
}
});
})
};
},
});
});
})