| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <?php defined('BASEPATH') OR exit('No direct script access allowed');
- class Choice extends Start_Controller {
- public function __construct(){
- parent::__construct();
- $this->load->_model("Model_logic_order","logic_order");
- }
- //定义方法的调用规则 获取URI第二段值
- public function _remap($arg,$arg_array)
- {
- if($arg == 'Choices')
- {
- $this->_Choices($arg_array);
- }
- else if($arg == 'check_pm_sku')
- {
- $this->_checkCkpmAndSku();
- }
- else
- {
- $this->_Choice($arg);
- }
- }
- // public function _Choice($arg)//查找重复
- // {
- // $this->data['arg'] = $arg;
- // $this->_Template('choice',$this->data);
- // }
- public function _Choice($arg)//查找重复
- {
- $this->load->driver('cache');
- $cache_key = 'choice_page_' . $arg;
- $cached = $this->cache->get($cache_key);
- if ($cached !== FALSE) {
- echo $cached;
- exit;
- }
- $this->data['arg'] = $arg;
- ob_start();
- $this->_Template('choice', $this->data);
- $html = ob_get_clean();
- $this->cache->save($cache_key, $html, 3600); // 缓存1小时
- echo $html;
- }
- public function _Choices($arg){
- }
- public function _checkCkpmAndSku(){
- $fpdata = $this->input->post('fpdata', TRUE);
- $shipremarks = $this->input->post('shipremarks', TRUE);
- $r = $this->logic_order->checkCkpmAndSku($fpdata,$shipremarks);
- echo json_encode($r,JSON_UNESCAPED_UNICODE);
- }
- }
|