<?php
namespace admin\action;
use \model\country;
class countryAction  extends \action{
	
	public function getTree()
	{
		$req = \mvc::$req;
		$country = new country();
		$data = $country->getTree($req['type']);
		$this->successJson($data);
	}

	public function changeLink()
	{
		$req = \mvc::$req;
		$country = new country();
		$data = $country->changeLink($req['table'], $req['actType'], explode(',', $req['valids']), explode(',', $req['ccids']));
		$this->successJson($data);
	}
	
	public function resetProCountryCache()
	{
		$req = \mvc::$req;
		$country = new country();
		$data = $country->resetProCountryCache();
		$this->successJson($data);
	}
}