<?php
defined('IN_WEB') or die('Include Error!');

/**
* 新手引导相关
*/
class Beginners
{

	/**
	*	检查是否有新手引导
	*/
	public function check($param)
	{
		$uid = oo::functions()->uint($param['uid']);
		$data = oo::commonOprModel('beginners')->check($uid);
		return json_encode($data);
	}


	/**
	*	新手引导领奖
	*/	
	public function reward($param)
	{
		$data = array('code' => -1, 'reward' => array());
		$uid = oo::functions()->uint($param['uid']);
		$version = oo::functions()->escape($param['version']);
		//$times = oo::functions()->escape($param['times']);
		if (empty($uid)) {
			return json_encode($data);
		}
		$data = oo::commonOprModel('beginners')->reward($uid, $version);
		return json_encode($data);
	}
}