assign('data', $ret['data']); $this->assign('home_seo_site_title', SeoService::BrowserSeoTitle('订单查询', 1)); return $this->fetch('../../../plugins/view/touristbuy/index/index'); } else { return $ret['msg']; } } /** * 订单详情 * @author Devil * @blog http://gong.gg/ * @version 1.0.0 * @datetime 2019-03-15T23:51:50+0800 * @param [array] $params [输入参数] */ public function detail($params = []) { // 请求参数 $p = [ [ 'checked_type' => 'empty', 'key_name' => 'order_no', 'error_msg' => '请输入订单号', ], [ 'checked_type' => 'empty', 'key_name' => 'name', 'error_msg' => '请输入收件人姓名', ], [ 'checked_type' => 'empty', 'key_name' => 'tel', 'error_msg' => '请输入收件人电话', ], ]; $ret = ParamsChecked($params, $p); if($ret !== true) { $this->assign('msg', $ret); return $this->fetch('public/tips_error'); } // 参数 $params['user_type'] = 'user'; // 条件 $where = OrderService::OrderListWhere($params); $where[] = ['order_no', '=', $params['order_no']]; $where[] = ['receive_name', '=', $params['name']]; $where[] = ['receive_tel', '=', $params['tel']]; // 获取列表 $data_params = array( 'm' => 0, 'n' => 1, 'where' => $where, ); $data = OrderService::OrderList($data_params); if(!empty($data['data'][0])) { $this->assign('data', $data['data'][0]); $this->assign('home_seo_site_title', SeoService::BrowserSeoTitle('订单详情', 1)); // 参数 $this->assign('params', $params); return $this->fetch('../../../plugins/view/touristbuy/index/detail'); } else { $this->assign('msg', '没有相关数据'); return $this->fetch('public/tips_error'); } } /** * 游客登录 * @author Devil * @blog http://gong.gg/ * @version 1.0.0 * @datetime 2019-03-15T22:31:29+0800 * @param [array] $params [输入参数] */ public function login($params = []) { $ret = Service::TouristReg(); if($ret['code'] == 0) { if(isset($params['is_parent']) && $params['is_parent'] == 1) { return ''; } else { return $this->redirect(__MY_URL__); } } else { $this->assign('msg', $ret['msg']); return $this->fetch('public/error'); } } } ?>