<?php

namespace app\mob\controller;

use app\mob\controller\Base;
use app\common\model\Activity as ActivityModel;


class Activity extends Base
{
    public function index($id)
    {
    	$activity = ActivityModel::get($id);
    	if ($activity) {
    		if ($activity->type==1) {
    			$this->assign('activity', $activity);
    			return view();
    		}else{
    			$this->redirect( $activity->link );
    		}
    	}else{
    		$this->error('没有找到次活动');
    	}
    }
}





