当前位置: 首页>>代码示例>>PHP>>正文


PHP Order::item方法代码示例

本文整理汇总了PHP中app\Order::item方法的典型用法代码示例。如果您正苦于以下问题:PHP Order::item方法的具体用法?PHP Order::item怎么用?PHP Order::item使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在app\Order的用法示例。


在下文中一共展示了Order::item方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getTakeorder

 public function getTakeorder(Request $request, $shop_id, $offer_id, $product_amount)
 {
     $user = $request->user();
     $business = Business::apiFind($shop_id);
     $offer = Offer::apiFind($shop_id, $offer_id);
     $coupon_id = $request->input('coupon_id');
     $item = Order::item($offer_id, $product_amount);
     $check = Offer::apiCheck($item, $shop_id, $coupon_id);
     $mobile = $request->input('mobile');
     $touch = $request->input('touch');
     $sex = $request->input('sex');
     $url = '/business/takeorder/' . $shop_id . '/' . $offer_id . '/' . $product_amount . '?mobile=' . $mobile . '&touch=' . $touch . '&sex=' . $sex;
     session(['url' => $url]);
     return view('auth.business.takeorder', ['TITLE' => '下单', 'META_KEYWORDS' => META_KEYWORDS, 'META_DESC' => META_DESC, 'PAGE_CODE' => 'auth.business.takeorder', 'user' => $user, 'business' => $business, 'offer' => $offer, 'check' => $check, 'product_amount' => $product_amount, 'mobile' => $mobile, 'touch' => $touch, 'sex' => $sex, 'coupon_id' => $coupon_id, 'url' => $url]);
 }
开发者ID:verchielxy,项目名称:ttx,代码行数:15,代码来源:BusinessController.php

示例2: getTakeorder

 public function getTakeorder(Request $request, $staffer_id, $tote_id, $product_amount)
 {
     $user = $request->user();
     $abd_id = $request->input('abd_id');
     $days = $request->input('days');
     $moment = $request->input('moment');
     $time = $request->input('time');
     $coupon_id = $request->input('coupon_id');
     $staffer = Staffer::apiFind($staffer_id);
     $address = Address::apiFind($abd_id);
     $item = Order::item($tote_id, $product_amount);
     $check = Tote::apiCheck($item, $staffer_id, $abd_id, $days, $moment, $coupon_id);
     $tote = Tote::apiFind($tote_id);
     $url = URL::full();
     session(['url' => $url]);
     return view('auth.staffer.takeorder', ['TITLE' => '下单', 'META_KEYWORDS' => META_KEYWORDS, 'META_DESC' => META_DESC, 'PAGE_CODE' => 'auth.staffer.takeorder', 'user' => $user, 'staffer' => $staffer, 'address' => $address, 'check' => $check, 'tote' => $tote, 'staffer_id' => $staffer_id, 'tote_id' => $tote_id, 'product_amount' => $product_amount, 'abd_id' => $abd_id, 'days' => $days, 'moment' => $moment, 'time' => $time, 'coupon_id' => $coupon_id, 'url' => $url]);
 }
开发者ID:verchielxy,项目名称:ttx,代码行数:17,代码来源:StafferController.php

示例3: postAddoffer

 public function postAddoffer(request $request)
 {
     $user = $request->user();
     $offer_id = $request->input('offer_id');
     $product_amount = $request->input('product_amount');
     $item = Order::item($offer_id, $product_amount);
     $shop_id = $request->input('shop_id');
     $coupon_id = $request->input('coupon_id');
     $mobile = $request->input('mobile');
     $touch = $request->input('touch');
     $sex = $request->input('sex');
     $url = $request->input('url');
     $response = Offer::apiCheck($item, $shop_id, $coupon_id);
     if ($response) {
         $params = ['item_id' => $shop_id, 'item' => $item, 'mobile' => $mobile, 'touch' => $touch, 'sex' => $sex];
         if ($coupon_id) {
             $params['coupon_id'] = $coupon_id;
         }
         $order = Order::apiCreateZd($params);
         if (is_object($order)) {
             $business = new Business(env('WECHAT_APPID'), env('WECHAT_APPSECRET'), env('WECHAT_MCHID'), env('WECHAT_KEY'));
             $wxorder = new WxOrder();
             $wxorder->body = $order->odrno;
             $wxorder->out_trade_no = $order->odrno;
             $wxorder->total_fee = $order->final * 100;
             // 单位为 “分”, 字符串类型
             $wxorder->openid = $user->user_open_id;
             $wxorder->notify_url = API_PAY_CALLBACK_URL;
             $unifiedOrder = new UnifiedOrder($business, $wxorder);
             $payment = new Payment($unifiedOrder);
             $res = redirect('/pay')->with(['payment' => $payment, 'order' => $order, 'wxorder' => $wxorder, 'url' => $url, 'type' => 'ZD']);
         } else {
             $res = redirect()->back()->with('msgError', $order);
         }
     } else {
         $res = redirect()->back()->with('msgError', '订单信息错误');
     }
     return $res;
 }
开发者ID:verchielxy,项目名称:ttx,代码行数:39,代码来源:OrderController.php

示例4: apiAbodeMomentGet

 public static function apiAbodeMomentGet($tote_id, $qt, $staffer_id, $range = '4')
 {
     $client = new Client();
     $apiUri = '/v1/tote/abode_moment.json';
     $user = new User();
     $item = Order::item($tote_id, $qt);
     $params = ['item' => $item, 'staffer_id' => $staffer_id, 'range' => $range];
     $request = $client->post(API_URL . $apiUri, ['form_params' => $params, 'headers' => User::headers($apiUri)]);
     if ($request->getStatusCode() == '200') {
         $response = json_decode($request->getBody());
         if (isset($response->success) && !$response->success) {
             $res = '';
         } else {
             $res = $response;
         }
     } else {
         $res = '';
     }
     return $res;
 }
开发者ID:verchielxy,项目名称:ttx,代码行数:20,代码来源:Staffer.php


注:本文中的app\Order::item方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。