Commit 2301f6f6 by 朱继来

调整内部下单

parent 2ddfee18
...@@ -381,15 +381,22 @@ Class AddOrderController extends Controller ...@@ -381,15 +381,22 @@ Class AddOrderController extends Controller
$data['address_id'] = $request->input('address_id', 0); $data['address_id'] = $request->input('address_id', 0);
$data['cart_id'] = $request->input('cart_ids', ''); $data['cart_id'] = $request->input('cart_ids', '');
$data['user_coupon_id'] = $request->input('user_coupon_id', 0); $data['user_coupon_id'] = $request->input('user_coupon_id', 0);
$data['type'] = !$is_online ? 3 : $request->input('goods_type'); if ($is_online == 0) {
$data['type'] = 3; // 自营线下
} else if ($is_online == 2) {
$data['type'] = 4; // 自营其他业务
$data['business_type'] = $request->input('business_type', 0); // 业务类型
} else {
$data['type'] = $request->input('goods_type');
}
$data['k1'] = time(); $data['k1'] = time();
$data['k2'] = md5(md5($data['k1']).'fh6y5t4rr351d2c3bryi'); $data['k2'] = md5(md5($data['k1']).'fh6y5t4rr351d2c3bryi');
$url = Config('website.api_domain').'cart/confirm'; $url = Config('website.api_domain').'cart/confirm';
$response = json_decode(curlApi($url, $data), true); $response = json_decode(curlApi($url, $data), true);
if ($response['err_code'] == 0) { if ($response['err_code'] == 0) {
return ['errcode' => $response['err_code'], 'errmsg' => $response['err_msg'], 'data'=>$response['data']]; return ['errcode' => $response['err_code'], 'errmsg' => $response['err_msg'], 'data'=>$response['data']];
} else { } else {
......
...@@ -867,11 +867,18 @@ ...@@ -867,11 +867,18 @@
// 确认订单信息 // 确认订单信息
confirm: function(user_id, address_id, cart_ids, user_coupon_id, goods_type, is_online=1) { confirm: function(user_id, address_id, cart_ids, user_coupon_id, goods_type, is_online=1) {
var self = this; var self = this;
var business_type = $('#business_type'); // 自营其他业务
if (business_type.length > 0) {
business_type = business_type.val();
} else {
business_type = 0;
}
$.ajax({ $.ajax({
type: 'post', type: 'post',
url: '/ajax/confirm', url: '/ajax/confirm',
data: {uid: user_id, address_id: address_id, cart_ids: cart_ids, user_coupon_id: user_coupon_id, goods_type: goods_type, is_online: is_online}, data: {uid: user_id, address_id: address_id, cart_ids: cart_ids, user_coupon_id: user_coupon_id, goods_type: goods_type, is_online: is_online, business_type: business_type},
dataType: "json", dataType: "json",
success: function(resp){console.log(resp); success: function(resp){console.log(resp);
if (resp.errcode == 0) { if (resp.errcode == 0) {
......
...@@ -559,7 +559,7 @@ ...@@ -559,7 +559,7 @@
@endif @endif
<tr> <tr>
<td>{{ isset($order_temp_info) && $order_temp_info['order_type'] == 3 ? '(自营内部采购下单享95折优惠)' : '' }}订单总额:</td> <td>{{ isset($order_temp_info) && $order_temp_info['order_type'] == 3 && !$order_temp_info['business_type'] ? '(自营内部采购下单享95折优惠)' : '' }}订单总额:</td>
<td> <td>
<span style="color:red;font-size:20px">{{$currency}} <span style="color:red;font-size:20px">{{$currency}}
<span class="amount">{{$order_info['order_amount']}}</span> <span class="amount">{{$order_info['order_amount']}}</span>
......
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