Commit a968461aa99a6dab73844347032bc173c38537be

Authored by u123231312
1 parent 14e4a603

no message

... ... @@ -43,16 +43,23 @@
layui.use('form', function () {
var form = layui.form, $ = layui.jquery;
form.on('submit(submit)', function (data) {
var loading = layer.load(1, {shade: [0.1, '#fff']});
$.post("{:url('createcode')}", data.field, function (res) {
layer.close(loading);
if (res.code == 1) {
layer.msg(res.msg, {time: 1000, icon: 1}, function () {
location.href = "{:url('index')}";
});
} else {
layer.msg("code:"+res.code+" "+res.msg, {time: 1000, icon: 2});
}
var num_total = document.getElementsByName("num")[0].value;
var flag_attr = document.getElementsByName("flag")[0].value;
if(flag_attr==2) flag_attr = "红色";
else flag_attr = "白色";
var str = flag_attr+":"+num_total;
layer.confirm('请再次确认生成信息:'+str+"个", {icon: 3}, function (index) {
var loading = layer.load(1, {shade: [0.1, '#fff']});
$.post("{:url('createcode')}", data.field, function (res) {
layer.close(loading);
if (res.code == 1) {
layer.msg(res.msg, {time: 1000, icon: 1}, function () {
location.href = "{:url('index')}";
});
} else {
layer.msg("code:"+res.code+" "+res.msg, {time: 1000, icon: 2});
}
});
});
})
});
... ...