|
@@ -33,7 +33,7 @@
|
33
|
33
|
<label class="form-label col-xs-4 col-sm-2">
|
34
|
34
|
收件人手机号:</label>
|
35
|
35
|
<div class="formControls col-xs-6 col-sm-6">
|
36
|
|
- <input type="text" class="input-text" value="{{old('receiverMobile')}}" placeholder="" name="receiverMobile">
|
|
36
|
+ <input type="text" class="input-text" value="{{old('receiverMobile')}}" placeholder="" onkeyup="getAddress()" name="receiverMobile">
|
37
|
37
|
</div>
|
38
|
38
|
</div>
|
39
|
39
|
|
|
@@ -355,6 +355,28 @@
|
355
|
355
|
return h+"-"+m+"-"+d+" "+hh+":"+mm+":"+ss;
|
356
|
356
|
}
|
357
|
357
|
|
|
358
|
+ function getAddress(){
|
|
359
|
+ var phone = $('input[name=receiverMobile]').val();
|
|
360
|
+ var reg = /^1\d{10}$/
|
|
361
|
+ if(reg.test(phone)){
|
|
362
|
+ $.ajax({
|
|
363
|
+ 'url': '/admin/order/getAddress?phone='+phone,
|
|
364
|
+ 'type': 'get',
|
|
365
|
+ 'dateType': 'json',
|
|
366
|
+ success:function(data){
|
|
367
|
+ if(data != '0'){
|
|
368
|
+ data = eval("("+data+")");
|
|
369
|
+ $("input[name=receiverState]").val(data.receiverState);
|
|
370
|
+ $("input[name=receiverCity]").val(data.receiverCity);
|
|
371
|
+ $("input[name=receiverDistrict]").val(data.receiverDistrict);
|
|
372
|
+ $("input[name=receiverStreet]").val(data.receiverStreet);
|
|
373
|
+ $("input[name=receiverAddress]").val(data.receiverAddress);
|
|
374
|
+ }
|
|
375
|
+ }
|
|
376
|
+ })
|
|
377
|
+ }
|
|
378
|
+ }
|
|
379
|
+
|
358
|
380
|
|
359
|
381
|
</script>
|
360
|
382
|
</body>
|