param(); $user_id = $param['uid']?Crypt::decrypt($param['uid']):''; if(!$user_id){ return unauthorized('请先授权'); } $action = $param['action']; $info = Order::info($param, $user_id); if (!$info) { return client_error('商品信息不存在'); } if($info['code'] == 0) { return client_error($info['msg']); } if ($action == 'info') { return success($info['data']); } $order = Order::add($user_id, $info['data'], $param); if($order['code']==0){ return client_error($order['msg']); } return success($order['data']['order_sn'],'下单成功,正在调取支付'); } }