正在显示
3 个修改的文件
包含
14 行增加
和
8 行删除
@@ -275,7 +275,7 @@ class MemberSalesController extends HomeBaseController | @@ -275,7 +275,7 @@ class MemberSalesController extends HomeBaseController | ||
275 | $mobile = ''; | 275 | $mobile = ''; |
276 | $v['options'] = json_decode($v['options'],true); | 276 | $v['options'] = json_decode($v['options'],true); |
277 | foreach ($v['options'] as $ko=>$vo) { | 277 | foreach ($v['options'] as $ko=>$vo) { |
278 | - if($vo['id'] == 10) { | 278 | + if($vo['id'] == 49) { |
279 | $mobile = $vo['user_choose']; | 279 | $mobile = $vo['user_choose']; |
280 | } | 280 | } |
281 | } | 281 | } |
@@ -323,7 +323,7 @@ class MemberSalesController extends HomeBaseController | @@ -323,7 +323,7 @@ class MemberSalesController extends HomeBaseController | ||
323 | $mobile = ''; | 323 | $mobile = ''; |
324 | $v['options'] = json_decode($v['options'],true); | 324 | $v['options'] = json_decode($v['options'],true); |
325 | foreach ($v['options'] as $ko=>$vo) { | 325 | foreach ($v['options'] as $ko=>$vo) { |
326 | - if($vo['id'] == 10) { | 326 | + if($vo['id'] == 49) { |
327 | $mobile = $vo['user_choose']; | 327 | $mobile = $vo['user_choose']; |
328 | } | 328 | } |
329 | } | 329 | } |
@@ -262,6 +262,8 @@ | @@ -262,6 +262,8 @@ | ||
262 | 262 | ||
263 | // 提交订单 | 263 | // 提交订单 |
264 | $('.submit_btn').click(function() { | 264 | $('.submit_btn').click(function() { |
265 | + var btn = $(this); | ||
266 | + var text = btn.text(); | ||
265 | if(submit_common('.form_data',form_data)) { | 267 | if(submit_common('.form_data',form_data)) { |
266 | allow_submit = false; | 268 | allow_submit = false; |
267 | var data = { | 269 | var data = { |
@@ -275,6 +277,9 @@ | @@ -275,6 +277,9 @@ | ||
275 | type: "POST", | 277 | type: "POST", |
276 | data: data, | 278 | data: data, |
277 | dataType: "JSON", | 279 | dataType: "JSON", |
280 | + beforeSend: function(){ | ||
281 | + btn.text(text+'中...').prop('disabled', true); | ||
282 | + }, | ||
278 | success: function (res) { | 283 | success: function (res) { |
279 | console.log(res); | 284 | console.log(res); |
280 | if (res.code == 1) { | 285 | if (res.code == 1) { |
@@ -309,6 +314,7 @@ | @@ -309,6 +314,7 @@ | ||
309 | }, | 314 | }, |
310 | complete: function(XHR,TS) { | 315 | complete: function(XHR,TS) { |
311 | allow_submit = true; | 316 | allow_submit = true; |
317 | + btn.text(text).prop('disabled', false); | ||
312 | } | 318 | } |
313 | }); | 319 | }); |
314 | } | 320 | } |
@@ -229,27 +229,27 @@ | @@ -229,27 +229,27 @@ | ||
229 | 229 | ||
230 | // 提交订单 | 230 | // 提交订单 |
231 | $('.submit_btn').click(function() { | 231 | $('.submit_btn').click(function() { |
232 | + var btn = $(this); | ||
233 | + var text = btn.text(); | ||
232 | if(submit_common('.form_data',form_data)) { | 234 | if(submit_common('.form_data',form_data)) { |
233 | allow_submit = false; | 235 | allow_submit = false; |
234 | var data = { | 236 | var data = { |
235 | id: "{$typeInfo.id}", | 237 | id: "{$typeInfo.id}", |
236 | param: form_data.join(',') | 238 | param: form_data.join(',') |
237 | }; | 239 | }; |
238 | - // console.log(data); | ||
239 | - // _common("{:url('submit_form')}",data,[$('.num').html(res.data),$('.mask').show()]) | ||
240 | $.ajax({ | 240 | $.ajax({ |
241 | url: "{:url('submit_form')}", | 241 | url: "{:url('submit_form')}", |
242 | type: "POST", | 242 | type: "POST", |
243 | data: data, | 243 | data: data, |
244 | dataType: "JSON", | 244 | dataType: "JSON", |
245 | + beforeSend: function(){ | ||
246 | + btn.text(text+'中...').prop('disabled', true); | ||
247 | + }, | ||
245 | success: function (res) { | 248 | success: function (res) { |
246 | // console.log(res); | 249 | // console.log(res); |
247 | if (res.code == 1) { | 250 | if (res.code == 1) { |
248 | $('.num').html(res.data); | 251 | $('.num').html(res.data); |
249 | $('.mask').show() | 252 | $('.mask').show() |
250 | - // setTimeout(function() { | ||
251 | - // window.location.href = res.url; | ||
252 | - // },1000); | ||
253 | } else { | 253 | } else { |
254 | _error(res.msg); | 254 | _error(res.msg); |
255 | } | 255 | } |
@@ -259,10 +259,10 @@ | @@ -259,10 +259,10 @@ | ||
259 | }, | 259 | }, |
260 | complete: function(XHR,TS) { | 260 | complete: function(XHR,TS) { |
261 | allow_submit = true; | 261 | allow_submit = true; |
262 | + btn.text(text).prop('disabled', false); | ||
262 | } | 263 | } |
263 | }); | 264 | }); |
264 | } | 265 | } |
265 | - // $('.mask').show() | ||
266 | }); | 266 | }); |
267 | 267 | ||
268 | $('.order_long').click(function() { | 268 | $('.order_long').click(function() { |
-
请 注册 或 登录 后发表评论