Item.php 16.9 KB
<?php

use Action\AbstractAction;
use Plugin\Helpers;

class ItemController extends AbstractAction
{
    public function indexAction()
    {
        $data = array(
            'productDetailPage' => true,
            'detail' => array(
                'banner' => array(
                    'id' => '',
                    'bgColor' => '#abab43',
                    'bgImg' => 'http://img10.static.yhbimg.com/brandBanner/2015/03/20/09/018e4c599a3ca16fe5c67f77ef05cea723.jpg',
                    'logo' => 'http://img10.static.yhbimg.com/brandLogo/2015/12/04/16/0144f2beb0c06d554d3819394ab974ac45.jpg?imageView/3/w/500/h/45',
                    'alt' => 'BRISTON',
                    'homeUrl' => '',
                    'liked' => true
                ),
                'pathNav' => array(
                    array(
                        'href' => '/boys',
                        'name' => 'BOYS首页'
                    ),
                    array(
                        'href' => '/boys?sort=1',
                        'name' => '服配'
                    ),
                    array(
                        'href' => '/boys?sort=1&msort=232',
                        'name' => '手表'
                    ),
                    array(
                        'name' => 'BRISTON 手表Clubmaster CHRONO black Silver - Black dial基本系列黑盘 '
                    )
                ),
                'goodInfo' => array(
                    'skn' => '',
                    'img' => 'http://img11.static.yhbimg.com/goodsimg/2015/12/08/06/013ded7a84dbd3087594553e4333c92f80.jpg?imageMogr2/thumbnail/420x560/extent/420x560/background/d2hpdGU=/position/center/quality/90',
                    'tags' => array(
                        'isNew' => true,
                        'isLimit' => true,
                        'isNewFestival' => true
                    ),
                    'name' => 'BRISTON 手表Clubmaster CHRONO black Silver - Black dial基本系列黑盘',
                    'brandUrl' => '',
                    'brandName' => 'BRISTON',
                    'marketPrice' => '2180.00',
                    'activity' => array(
                        array(
                            'url' => '',
                            'sizeImg' => 'http://img11.static.yhbimg.com/productbanner/2015/12/11/00/01ba262a2fbac23b022eeace17cf5c3685.jpg'
                        ),
                        array(
                            'type' => '加价购',
                            'des' => '全场99元加价购'
                        ),
                        array(
                            'type' => '加价购',
                            'des' => '全场59元加价购'
                        ),
                        array(
                            'type' => '加价购',
                            'des' => '全场19元加价购'
                        )
                    ),
                    'colors' => array(
                        array(
                            'focus' => true,
                            'title' => 'BRISTON 手表Clubmaster CHRONO black Silver - Black dial基本系列黑盘  黑色',
                            'src' => 'http://img11.static.yhbimg.com/goodsimg/2015/12/08/06/013ded7a84dbd3087594553e4333c92f80.jpg?imageMogr2/thumbnail/40x40/extent/40x40/background/d2hpdGU=/position/center/quality/90',
                            'thumbs' => array(
                                array(
                                    'url' => '',
                                    'shower' => 'http://img11.static.yhbimg.com/goodsimg/2015/12/08/06/013ded7a84dbd3087594553e4333c92f80.jpg?imageMogr2/thumbnail/420x560/extent/420x560/background/d2hpdGU=/position/center/quality/90',
                                    'img' => 'http://img11.static.yhbimg.com/goodsimg/2015/12/08/06/013ded7a84dbd3087594553e4333c92f80.jpg?imageMogr2/thumbnail/75x100/extent/75x100/background/d2hpdGU=/position/center/quality/90'
                                )
                            ),
                            'size' => array(
                                array(
                                    'name' => 'F',
                                    'title' => '胸围 106cm / 肩宽 43cm',
                                    'sku' => '956638',
                                    'num' => 5
                                ),
                                array(
                                    'name' => 'L',
                                    'title' => '胸围 110cm / 肩宽 45cm',
                                    'sku' => '956634',
                                    'num' => 2, //num为数字0或者不传则售罄
                                )
                            )
                        ),
                        array(
                            'title' => 'GOGO HARRIS 圆圈手势套头卫衣  灰色',
                            'src' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/25/03/02b0d2195e1f1a285c4473a581e03f2e79.jpg?imageMogr2/thumbnail/40x40/extent/40x40/background/d2hpdGU=/position/center/quality/90',
                            'thumbs' => array(
                                array(
                                    'url' => '',
                                    'shower' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/25/03/02b0d2195e1f1a285c4473a581e03f2e79.jpg?imageMogr2/thumbnail/420x560/extent/420x560/background/d2hpdGU=/position/center/quality/90',
                                    'img' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/25/03/02b0d2195e1f1a285c4473a581e03f2e79.jpg?imageMogr2/thumbnail/75x100/extent/75x100/background/d2hpdGU=/position/center/quality/90'
                                )
                            ),
                            'size' => array(
                                array(
                                    'name' => 'L',
                                    'title' => '胸围 106cm / 肩宽 43cm',
                                    'sku' => '956638',
                                    'num' => 0
                                ),
                                array(
                                    'name' => 'XL',
                                    'title' => '胸围 110cm / 肩宽 45cm',
                                    'sku' => '956634',
                                    'num' => 2,
                                )
                            )
                        )
                    )
                ),
                'description' => array(
                    'basic' => array(
                        array(
                            'key' => '编号',
                            'value' => '51183240'
                        ),
                        array(
                            'key' => '颜色',
                            'value' => '黑色'
                        ),
                        array(
                            'key' => '性别',
                            'value' => '通用'
                        ),
                        array(
                            'key' => '显示方式',
                            'value' => '指针'
                        ),
                        array(
                            'key' => '款式',
                            'value' => '石英表'
                        )
                    ),
                    'comfort' => array(
                        array(
                            'name' => '弹性',
                            'minDes' => '小',
                            'blocks' => array(
                                array(
                                ),
                                array(
                                    'cur' => true
                                ),
                                array(
                                ),
                                array(
                                ),
                                array(
                                )
                            ),
                            'maxDes' => '大'
                        ),
                        array(
                            'name' => '厚度',
                            'minDes' => '薄',
                            'blocks' => array(
                                array(
                                ),
                                array(
                                ),
                                array(
                                    'cur' => true
                                ),
                                array(
                                ),
                                array(
                                )
                            ),
                            'maxDes' => '厚'
                        ),
                        array(
                            'name' => '柔软度',
                            'minDes' => '软',
                            'blocks' => array(
                                array(
                                ),
                                array(
                                ),
                                array(
                                ),
                                array(
                                ),
                                array(
                                    'cur' => true
                                )
                            ),
                            'maxDes' => '硬'
                        ),
                        array(
                            'name' => '透气性',
                            'minDes' => '弱',
                            'blocks' => array(
                                array(
                                ),
                                array(
                                ),
                                array(
                                ),
                                array(
                                    'cur' => true
                                ),
                                array(
                                )
                            ),
                            'maxDes' => '强'
                        )
                    )
                ),
                'material' => array(
                    'detail' => array(
                        'img' => 'http://img10.static.yhbimg.com/material/2012/03/06/20/0176f9410824167f9eca0cea7bd2b3df70.jpg',
                        'name' => '涤纶/聚酯纤维',
                        'enName' => 'Polyester',
                        'text' => '涤纶类的服装可机洗,可手洗,可干洗,可用毛刷刷洗。不可曝晒,不宜烘干。熨烫温度不能超过110度,熨烫时一定要打蒸汽,不能干烫 。在日光下晾晒时,将里面朝外。'
                    ),
                    'wash' => array(
                        array(
                            'img' => 'http://static.yohobuy.com/images/wash_2.png',
                            'name' => '不可转笼翻转干燥'
                        ),
                        array(
                            'img' => 'http://static.yohobuy.com/images/wash_4.png',
                            'name' => '不可氯洗'
                        ),
                        array(
                            'img' => 'http://static.yohobuy.com/images/wash_7.png',
                            'name' => '分色洗涤'
                        )
                    )
                ),
                'size' => array(
                    'thead' => array(
                        array(
                            'width' => 110,
                            'name' => '吊牌尺码'
                        ),
                        array(
                            'width' => 110,
                            'name' => '表带长'
                        ),
                        array(
                            'width' => 110,
                            'name' => '表盘厚度'
                        ),
                        array(
                            'width' => 110,
                            'name' => '表盘直径'
                        )
                    ),
                    'tbody' => array(
                        array(
                            'F', '20', '1', '4'
                        )
                    ),
                    'sizeImg' => 'http://static.yohobuy.com/images/1.jpg'
                ),
                'reference' => array(
                    'thead' => array(
                        array(
                            'width' => 26,
                            'name' => ''
                        ),
                        array(
                            'width' => 90,
                            'name' => '模特'
                        ),
                        array(
                            'width' => 110,
                            'name' => '身高'
                        ),
                        array(
                            'width' => 110,
                            'name' => '体重'
                        ),
                        array(
                            'width' => 110,
                            'name' => '三围'
                        ),
                        array(
                            'width' => 110,
                            'name' => '吊牌尺码'
                        ),
                        array(
                            'width' => 110,
                            'name' => '试穿描述'
                        )
                    ),
                    'tbody' => array(
                        array(
                            'http://img11.static.yhbimg.com/modelCard/2015/07/18/01/011c7aa0035212351482ec01a41afb1fd2.jpg',
                            'Oliver',
                            '175',
                            '51',
                            '78/70/87',
                            'M',
                            '合适'
                        )
                    )
                ),
                'details' => '精致细腻的剪裁,搭配假拉链装饰,摒弃棉衣的臃肿,十分有型。中长款设计,内里夹棉,足够帮你抵御冬天的严寒。<br><br><p><img border="0" src="http://img02.static.yohobuy.com/product/2015/11/16/15/02b665cffb4ab07dbfacf922e7e7697134.jpg"></p>',
                'consultComment' => array(
                    'consultNum' => 125,
                    'commentNum' => 122,
                    'commentUrl' => '',
                    'hasMoreComments' => true,
                    'comments' => array(
                        array(
                            'avatar' => 'http://static.yohobuy.com/images/v3/boy.jpg',
                            'userName' => '哦嚯',
                            'color' => '绿色',
                            'size' => 'L',
                            'date' => '2015-12-19 16:44:02',
                            'comment' => '好看'
                        )
                    ),
                    'consults' => array(
                        array(
                            'avatar' => 'http://static.yohobuy.com/images/v3/boy.jpg',
                            'question' => '黑色其他型号 L 不会再出了吗?',
                            'date' => '2015-12-19 16:44:02',
                            'answer' => '该款商品补货时间暂时无法确定,绿色目前是有货的。您还可以“收藏”该商品同时“关注”该品牌,实时关注并登录“MY有货”点击查看“收藏商品”,补货到仓后可直接购买,感谢您对Yoho!Buy有货的支持,祝您购物愉快!'
                        )
                    )
                ),
                'recentView' => array(
                    array(
                        'url' => '',
                        'img' => 'http://img11.static.yhbimg.com/goodsimg/2015/12/08/06/013ded7a84dbd3087594553e4333c92f80.jpg?imageMogr2/thumbnail/195x260/extent/195x260/background/d2hpdGU=/position/center/quality/90',
                        'name' => 'BRISTON 手表Clubmaster CHRONO black Silver - Black dial基本系列黑盘 ',
                        'marketPrice' => '2180'
                    ),
                    array(
                        'url' => '',
                        'img' => 'http://img11.static.yhbimg.com/goodsimg/2015/10/14/06/017fc64072bb2acb5dfa6b4d33e812afd5.jpg?imageMogr2/thumbnail/195x260/extent/195x260/background/d2hpdGU=/position/center/quality/90',
                        'name' => 'GAWS 街头风金属拉链装饰棉服',
                        'marketPrice' => '639',
                        'salePrice' => '419'
                    )
                )
            )
        );

        $this->_view->display('index', $data);
    }

    public function collectAction()
    {
        $this->echoJson(array(
            'code' => 200
        ));
    }

    public function addToCartAction()
    {
        $this->echoJson(array(
            'code' => 200,
            'num' => 5
        ));
    }

    public function commentsAction()
    {
        echo(' ');
    }
}