Showing
1 changed file
with
5 additions
and
4 deletions
@@ -55,7 +55,6 @@ e.on("validate", function() { | @@ -55,7 +55,6 @@ e.on("validate", function() { | ||
55 | if (+num > 100000 || +num < 1) { | 55 | if (+num > 100000 || +num < 1) { |
56 | return "数量(范围:1-100000)"; | 56 | return "数量(范围:1-100000)"; |
57 | } | 57 | } |
58 | - | ||
59 | return true; | 58 | return true; |
60 | }); | 59 | }); |
61 | e.on("validate", function() { | 60 | e.on("validate", function() { |
@@ -63,7 +62,6 @@ e.on("validate", function() { | @@ -63,7 +62,6 @@ e.on("validate", function() { | ||
63 | if (skn.length > 8) { | 62 | if (skn.length > 8) { |
64 | return "skn长度不能超过8位"; | 63 | return "skn长度不能超过8位"; |
65 | } | 64 | } |
66 | - | ||
67 | return true; | 65 | return true; |
68 | }); | 66 | }); |
69 | 67 | ||
@@ -79,7 +77,9 @@ e.on("validate", function() { | @@ -79,7 +77,9 @@ e.on("validate", function() { | ||
79 | e.init(); | 77 | e.init(); |
80 | 78 | ||
81 | var submit = function(callback) { | 79 | var submit = function(callback) { |
80 | + | ||
82 | e.submit($("#basicForm").attr("action"), function(option) { | 81 | e.submit($("#basicForm").attr("action"), function(option) { |
82 | + $("#save_brand").addClass('disabled'); | ||
83 | option.success = function(res) { | 83 | option.success = function(res) { |
84 | res = res.data; | 84 | res = res.data; |
85 | if (res.code == "200") { | 85 | if (res.code == "200") { |
@@ -88,8 +88,9 @@ var submit = function(callback) { | @@ -88,8 +88,9 @@ var submit = function(callback) { | ||
88 | }, 'growl-success'); | 88 | }, 'growl-success'); |
89 | } else { | 89 | } else { |
90 | e.$tip(res.message); | 90 | e.$tip(res.message); |
91 | + $("#save_brand").removeClass('disabled'); | ||
91 | }; | 92 | }; |
92 | - $("#save_brand").removeClass('disabled'); | 93 | + |
93 | return false; | 94 | return false; |
94 | }; | 95 | }; |
95 | option.error = function(res) { | 96 | option.error = function(res) { |
@@ -103,7 +104,7 @@ var submit = function(callback) { | @@ -103,7 +104,7 @@ var submit = function(callback) { | ||
103 | 104 | ||
104 | 105 | ||
105 | $("#save_brand").click(function() { | 106 | $("#save_brand").click(function() { |
106 | - $(this).addClass('disabled'); | 107 | + |
107 | submit(function(data) { | 108 | submit(function(data) { |
108 | // 限购码状态0:待审核 1:审核通过 2:驳回 3:过期 4:作废 | 109 | // 限购码状态0:待审核 1:审核通过 2:驳回 3:过期 4:作废 |
109 | if (+data.status == 1) { | 110 | if (+data.status == 1) { |
-
Please register or login to post a comment