Yuanxiao.php 1.96 KB
<?php

use Action\HuodongAction;
use Plugin\Helpers;
use LibModels\Wap\Cuxiao\ActivityData;
use Api\Yohobuy;

/**
 * 元宵抽签活动
 */
class YuanxiaoController extends HuodongAction
{
    const STATIC_FILE = 'http://cdn.yoho.cn/huodong/2016yuanxiao/1.0.0';
    /**
     * 元宵抽签
     */
    public function indexAction()
    {
        $this->_view->display('index', array(
            'staticTitle' => '元宵抽签',
            'staticFile' => self::STATIC_FILE
        ));
    }

    /**
     * 元宵抽签 信息
     */
    public function infoAction()
    {
        $this->_view->display('info', array(
            'staticTitle' => '元宵抽签',
            'staticFile' => self::STATIC_FILE,
            'staticJS' => array(
                'info.js'
            ),
            'gender' => 1
        ));
    }

    /**
     * 元宵抽签 等待
     */
    public function waitAction()
    {
        $this->_view->display('wait', array(
            'staticTitle' => '元宵抽签',
            'staticFile' => self::STATIC_FILE
        ));
    }

    /**
     * 元宵抽签 结果
     */
    public function resultAction()
    {
        $this->_view->display('result', array(
            'staticTitle' => '元宵抽签',
            'staticFile' => self::STATIC_FILE,
            'result' => array(
                'name' => '张大龙',
                'type' => 'F4'
            ),
            'staticJS' => array(
                'result.js'
            )
        ));
    }

    /**
     * 元宵抽签 分享
     */
    public function shareAction()
    {
        $this->_view->display('share', array(
            'staticTitle' => '元宵抽签',
            'staticFile' => self::STATIC_FILE,
            'result' => array(
                'name' => '张大龙',
                'type' => 'P1'
            ),
            'count' => '78999', // 过万转换成 “16万” 这种形式
            'staticJS' => array(
                'share.js'
            )
        ));
    }
}