Authored by 郭成尧

feature_coupon

9.77 KB | W: | H:

9.87 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

17.3 KB | W: | H:

17.1 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
<html>
<head>
<meta charset="UTF-8">
<title>领券楼层</title>
</head>
<body>
<div>
{{#if showTitle}}
<h4>{{title}}</h4>
{{/if}}
{{# coupons}}
<div>
<div><a href=""><img src="{{picUrl}}" alt=""></a></div>
<div>
<div>状态:{{status}} 剩余数量:{{num}}</div>
<div><a href="{{go}}">去逛逛</a></div>
</div>
</div>
{{/ coupons}}
</div>
</body>
</html>
\ No newline at end of file
... ...
<?php
/**
* Created by PhpStorm.
* User: Targaryen
* Date: 2016/4/11
* Time: 16:31
*/
use Action\AbstractAction;
class CouponController extends AbstractAction
{
/**
* 领券中心
*/
public function indexAction()
{
var_dump('123456');
}
/**
* 领券楼层
*/
public function floorAction()
{
$data =[
'title' => '领券中心',
'showTitle' => 1,
'coupons' => [
[
'picUrl' => 'http://img12.static.yhbimg.com/yhb-img01/2016/01/19/11/02039485d87cc1b100b883244cf386e62d.jpg?imageView/2/w/640/h/200',
'status' => 1,
'num' => '123',
'go'=>'http://m.dev.yohobuy.com/boys',
],
[
'picUrl' => 'http://img12.static.yhbimg.com/yhb-img01/2016/01/19/11/02039485d87cc1b100b883244cf386e62d.jpg?imageView/2/w/640/h/200',
'status' => 2,
'num' => '0',
'go'=>'http://m.dev.yohobuy.com/boys',
],
[
'picUrl' => 'http://img12.static.yhbimg.com/yhb-img01/2016/01/19/11/02039485d87cc1b100b883244cf386e62d.jpg?imageView/2/w/640/h/200',
'status' => 3,
'num'=>'456',
'go'=>'http://m.dev.yohobuy.com/boys',
],
]
];
$this->_view->display('index', $data);
}
}
\ No newline at end of file
... ...