Commit 7cfa8a62 by 朱继来

Merge branch 'master' of http://119.23.72.7/zhujilai/Order into zjl_form_duplicate_submit_20191031

parents 5c5ffcdb d8d02b6a
......@@ -96,7 +96,7 @@ Class AddOrderController extends Controller
$UserMainModel = new UserMainModel;
if(!empty($user_id)){
if(!empty($user_id) && strlen($request->input('user_id')<11 ) ){
$user = $UserMainModel->where('user_id', $user_id)->select('user_id', 'email','mobile', 'is_test')->orderBy('create_time', 'desc')->first();
}else{
......
......@@ -31,9 +31,14 @@
var loading = this;
// 获取用户信息
function get_user(){
function get_user(mobile = -1){
// var mobile = $(this).siblings('.search-user').val();
var mobile = getUrlParam('user_id');
if(mobile == -1){
var mobile = getUrlParam('user_id');
}
if (!mobile) return false;
......@@ -44,10 +49,12 @@
$('#business_type').val(1).attr('disabled', false);
}
$.ajax({
url: '/ajax/getUserInfo',
type: 'post',
data: {user_id : mobile.trim(), goods_type: goods_type},
data: {user_id:mobile.trim(), goods_type: goods_type,mobile:mobile},
dataType: 'json',
success: function (resp) {
if (resp.errcode == 0) {
......@@ -102,7 +109,12 @@
})
}
get_user();
get_user();
$('.get-user').click(function(){
var mobile = $(this).siblings('.search-user').val();
get_user(mobile)
})
// 选择收货地址
$('.user-info').delegate('#address', 'change', function() {
......
......@@ -5,7 +5,7 @@
<div class="ibox-content create-order">
<div class="row" style="margin-bottom: 30px;">
<div class="col-sm-12" hidden>
<div class="col-sm-12" >
<input type="text" class="search-user" name="user-mobile" value="" placeholder="请输入会员账号">
<a class="btn btn-info get-user">获取用户信息</a>
......
......@@ -4,7 +4,7 @@
</div>
<div class="ibox-content create-order">
<div class="row" style="margin-bottom: 30px;" hidden>
<div class="row" style="margin-bottom: 30px;">
<div class="col-sm-12">
<input type="text" class="search-user" name="user-mobile" value="" placeholder="请输入会员账号">
<a class="btn btn-info get-user">获取用户信息</a>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment