|
@@ -6,13 +6,13 @@ use Dever;
|
|
|
|
|
|
class Handle
|
|
|
{
|
|
|
- public function showUrl($id)
|
|
|
+ public function showUrl_api($id)
|
|
|
{
|
|
|
$info = Dever::db('short/info')->one($id);
|
|
|
$type = Dever::db('short/type')->one($info['type_id']);
|
|
|
$host = Dever::db('short/host')->one($info['host_id']);
|
|
|
|
|
|
- return $host['name'] . Dever::uid($id);
|
|
|
+ return $host['name'] . Dever::encode($id);
|
|
|
}
|
|
|
|
|
|
public function get($host_id, $url, $param, $host = '')
|
|
@@ -40,7 +40,7 @@ class Handle
|
|
|
|
|
|
public function show($str)
|
|
|
{
|
|
|
- $id = Dever::uid($str, 'decode');
|
|
|
+ $id = Dever::decode($str);
|
|
|
if ($id && $id > 0) {
|
|
|
$info = Dever::db('short/info')->one($id);
|
|
|
if ($info && $info['url']) {
|