Files
OMS/app/desktop/controller/autocomplete.php
2025-12-28 23:13:25 +08:00

25 lines
746 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
/**
* Copyright © ShopeX http://www.shopex.cn. All rights reserved.
* See LICENSE file for license details.
*/
class desktop_ctl_autocomplete extends base_controller{
function index(){
$this->_request = kernel::single('base_component_request');
$params = $this->_request->get_get('params');
$params = explode(':',$params);
$svckey = $params[0];
$cols = explode(',',$params[1]);
$key = $this->_request->get_get($cols[0]);
$autocomplete = kernel::servicelist('autocomplete.'.$svckey);
foreach($autocomplete as $service){
$return = $service->get_data($key,$cols);
}
echo "window.autocompleter_json=".json_encode($return)."";
}
}