<?php namespace Phpcmf\Controllers;

class Api extends \Phpcmf\Common
{

    public function kuaidi() {

        $sn = \Phpcmf\Service::L('Input')->get('sn');
        $code = \Phpcmf\Service::L('Input')->get('code');

        $data = json_decode(dr_catcher_data('http://api.kuaidi100.com/api?id='.$this->mall_info['order']['kuaidi_id'].'&com='.$code.'&nu='.$sn.'&valicode=&show=0&muti=1&order=asc'), true);
        if ($data['status'] != 1) {
            exit('<font color="red">'.$data['message'].'</font>');
        }

        \Phpcmf\Service::V()->assign([
            'data' => $data,
        ]);
        \Phpcmf\Service::V()->admin();
        \Phpcmf\Service::V()->display('api_kuaidi.html');
    }


}
