1. /*
    2. 订单详情
    3. author:咔咔
    4. time:2018.6.12
    5. */
    6. public function foodorderdetail(){
    7. // 获取订单id
    8. $orderId = I('id');
    9. // 订单信息
    10. $orderDatail = D('foodorder')->where([
    11. 'id'=>$orderId
    12. ])->find();
    13. // 订单地址
    14. $address_data = D('foodaddress')->where([
    15. 'id'=>$orderDatail['address_id']
    16. ])->find();
    17. // 商品详情
    18. $order_detail = json_decode($orderDatail['cartorder'],true);
    19. // dump($order_detail);die;
    20. $this->assign([
    21. // 订单详情
    22. 'order_detail'=>$order_detail,
    23. // 订单信息
    24. 'orderDatail'=>$orderDatail,
    25. // 订单地址
    26. 'address_data'=>$address_data
    27. ]);
    28. $this->display();
    29. }