TM 表单增加移动端判断,加载不同的试图

master
LiaoYijun 4 years ago
parent 8c659e5f40
commit 9c6d414d98

File diff suppressed because one or more lines are too long

@ -3,11 +3,15 @@
if (!defined('BASEPATH'))
exit('No direct script access allowed');
require_once 'Mobile_Detect.php';
class forms extends CI_Controller {
function __construct() {
parent::__construct();
$this->load->model('Orders_model');
$detect = new Mobile_Detect;
}
//水灯节表单
@ -127,7 +131,7 @@ class forms extends CI_Controller {
$this->load->view('footer');
}
public function tailormade(){
public function tailormade() {
$data['countrylist'] = ['Vietnam','Cambodia','India','Thailand','Myanmar','Japan','Laos','Nepal','Sri Lanka','China','Mongolia','Indonesia'];
$data['action'] = '/orders/triprequest_save';
$data['seo_title'] = "Create my trip | Asia Highlights";
@ -144,7 +148,13 @@ class forms extends CI_Controller {
}
$this->load->view('header', $data);
if ($detect->isMobile() && !$detect->isTablet()) {
$this->load->view('orders/tailormademobile');
} else {
$this->load->view('orders/tailormade');
}
$this->load->view('footer');
}

Loading…
Cancel
Save