<?php
/** wap
 * 开单控制器
 * @Copyright (C) 2016 汉潮 All rights reserved.
 * @License http://www.hanchao9999.com
 * @Author xiaol <xiaol@sina.cn>
 */
namespace App\Controller;
use Common\Controller\HanchaoController;
class TakeoutController extends BaseController {
    public function _initialize(){
        parent::_initialize ();
    }

    public function location_index(){
        $return=array('status'=>1,'msg'=>'');
        $postdata = I('request.');
        $result = D('Takeout')->location_index($postdata);
        $return=$result;
        $this->ajaxReturn($return);
    }
    public function goods_info(){
        /*$result = array('status'=>3,'msg'=>'');
        $goods_sn = I('sn');
        if(empty($goods_sn)){
            $result['status'] = 3;
            $result['msg']='未获取到商品信息';
            $this->ajaxReturn($result);
        }
        $result = D('Takeout')->goods_info($goods_sn);
        $this->ajaxReturn($result);*/
        $return=array('status'=>1,'msg'=>'');
        $sid=I('sid');
        $token=I('token');
        $postdata=I('param.');
        $result=D('Common/InvoicingOrder')->search_by_sn($postdata);
        if($result['status']==0){
            $return['status']=3;
            $return['msg']=$result['msg'];
            $this->ajaxReturn($return);
        }
        $return['data']=$result['data'];
        $this->ajaxReturn($return);
    }
}
