Commit a968461aa99a6dab73844347032bc173c38537be

Authored by u123231312
1 parent 14e4a603

no message

@@ -43,16 +43,23 @@ @@ -43,16 +43,23 @@
43 layui.use('form', function () { 43 layui.use('form', function () {
44 var form = layui.form, $ = layui.jquery; 44 var form = layui.form, $ = layui.jquery;
45 form.on('submit(submit)', function (data) { 45 form.on('submit(submit)', function (data) {
46 - var loading = layer.load(1, {shade: [0.1, '#fff']});  
47 - $.post("{:url('createcode')}", data.field, function (res) {  
48 - layer.close(loading);  
49 - if (res.code == 1) {  
50 - layer.msg(res.msg, {time: 1000, icon: 1}, function () {  
51 - location.href = "{:url('index')}";  
52 - });  
53 - } else {  
54 - layer.msg("code:"+res.code+" "+res.msg, {time: 1000, icon: 2});  
55 - } 46 + var num_total = document.getElementsByName("num")[0].value;
  47 + var flag_attr = document.getElementsByName("flag")[0].value;
  48 + if(flag_attr==2) flag_attr = "红色";
  49 + else flag_attr = "白色";
  50 + var str = flag_attr+":"+num_total;
  51 + layer.confirm('请再次确认生成信息:'+str+"个", {icon: 3}, function (index) {
  52 + var loading = layer.load(1, {shade: [0.1, '#fff']});
  53 + $.post("{:url('createcode')}", data.field, function (res) {
  54 + layer.close(loading);
  55 + if (res.code == 1) {
  56 + layer.msg(res.msg, {time: 1000, icon: 1}, function () {
  57 + location.href = "{:url('index')}";
  58 + });
  59 + } else {
  60 + layer.msg("code:"+res.code+" "+res.msg, {time: 1000, icon: 2});
  61 + }
  62 + });
56 }); 63 });
57 }) 64 })
58 }); 65 });