Vip.php 1.69 KB
<?php
use Action\WebAction;
use WebPlugin\Helpers;
use Home\UserModel;
use Home\VIPModel;

class VipController extends WebAction
{

    public function indexAction()
    {
        //判断是否登录
        $uid = $this->auditJumpLogin();

        //头部导航
        $channel = Helpers::getChannelNameByCookie();
        $this->setWebNavHeader($channel);
        //面包屑-左侧导航
        $path = UserModel::getCenterCrumb('我的VIP');
        $leftNav = UserModel::getCenterLeftNav('我的VIP', $uid);

        //VIP信息
        $vipInfo = VIPModel::getVIPInfo($uid);

        $data = array(
            'path' => $path,
            'homeNav' => $leftNav,
            'userThumb' => UserModel::getUserHeadImg($uid),
            'yearCost' => $vipInfo['yearCost'],
            'totalCost' => $vipInfo['totalCost'],
            'list' => $vipInfo['enjoyPreferences'],
            'level' => $vipInfo['level'],
            'platinum' => $vipInfo['platinum'],
            'nextCost' => $vipInfo['nextCost'],
            'balan' => $vipInfo['upgradeCost'],
            'proportion' => $vipInfo['proportion'],
            'vipLevel' => $vipInfo['nextTitle'],
            'reach' => $vipInfo['reach'],
            'valid' => $vipInfo['start'],
            'end' => $vipInfo['end'],
            'remainDays' => $vipInfo['remainDays'],
            'doubtLevel' => $vipInfo['isVip'],
            'commonVip' => !$vipInfo['isVip'],
        );

        $morePreferences = Helpers::url('/help', array('category_id' => 91));

        $this->_view->display('vip', array(
            'myVip' => $data,
            'morePreferences' => $morePreferences,
        ));


    }

}