Commit 82ea1b07 by 朱继来

内部采购下单

parent 6b098035
...@@ -397,12 +397,13 @@ Class AddOrderController extends Controller ...@@ -397,12 +397,13 @@ Class AddOrderController extends Controller
// 确认订单信息 // 确认订单信息
public function confirm(Request $request) public function confirm(Request $request)
{ {
if ($request->isMethod('post')) { if ($request->isMethod('post')) {
$is_online = $request->input('is_online');
$data['uid'] = $request->input('uid', 0); $data['uid'] = $request->input('uid', 0);
$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'] = $request->input('goods_type'); $data['type'] = !$is_online ? 3 : $request->input('goods_type');
$data['k1'] = time(); $data['k1'] = time();
$data['k2'] = md5(md5($data['k1']).'fh6y5t4rr351d2c3bryi'); $data['k2'] = md5(md5($data['k1']).'fh6y5t4rr351d2c3bryi');
......
...@@ -624,7 +624,7 @@ ...@@ -624,7 +624,7 @@
$.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}, 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},
dataType: "json", dataType: "json",
success: function(resp){console.log(resp); success: function(resp){console.log(resp);
if (resp.errcode == 0) { if (resp.errcode == 0) {
......
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