Authored by 毕凯

元宵活动 代码整理

... ... @@ -5,9 +5,9 @@
<div class="flower flower-l"></div>
<div class="flower flower-r"></div>
</div>
<a class="start animated fadeInDown" href="/cuxiao/yuanxiao/info"></a>
<a class="start" href="/cuxiao/yuanxiao/info"></a>
<div class="footer">
<div class="arrow"></div>
<a class="arrow animated infinite pulse" href="/cuxiao/yuanxiao/info"></a>
<div class="yohobuy"></div>
</div>
</div>
... ...
... ... @@ -7,7 +7,7 @@
<div class="sub-title">&nbsp;开运测试</div>
</div>
<form class="user">
<form class="user" method="POST">
<div class="user-info nick">
<div class="title">
昵称
... ... @@ -18,18 +18,19 @@
<div class="title">
生日
</div>
<input type="date" name="nick" value="2011-12-13">
<input type="date" name="birthday" value="2011-12-13">
</div>
<div class="gender">
<div class="title">
性<br>别
</div>
<div class="icon boy">
<span class="check"></span>
<span class="check {{#if gender}}checked{{/if}}" data-gender="{{#if gender}}1{{/if}}"></span>
</div>
<div class="icon girl">
<span class="check checked"></span>
<span class="check {{#unless gender}}checked{{/if}}" data-gender="{{#if gender}}0{{/if}}"></span>
</div>
<input type="hidden" name="gender" id="gender" value="{{gender}}">
</div>
</form>
... ... @@ -39,7 +40,7 @@
</div>
</div>
<div class="mask">
<div class="mask hide">
<div class="modal">
<div class="icon close"></div>
<div class="text">
... ...
... ... @@ -23,78 +23,5 @@
</div>
</div>
</div>
<script type="text/tmpl" id="P1">
<div class="bg-guang"></div>
<div class="bg-yuan"></div>
<div class="title">成为一个大写加粗的</div>
<div class="chaoren animated infinite pulse"></div>
</script>
<script type="text/tmpl" id="P2">
<div class="bg-bige animated zoomIn"></div>
<div class="bg-manzai animated zoomIn"></div>
<div class="bg-ren"></div>
<div class="title animated infinite pulse"></div>
<div class="yzbb animated slideInDown"></div>
</script>
<script type="text/tmpl" id="P3">
<div class="bg-yunqi animated zoomIn"></div>
<div class="shoes animated infinite swing"></div>
<div class="yeezy animated slideInDown"></div>
</script>
<script type="text/tmpl" id="P4">
<div class="bg-car"></div>
<div class="hands animated infinite swing"></div>
<div class="wanghong animated slideInRight"></div>
</script>
<script type="text/tmpl" id="M1">
<div class="bg-majia"></div>
<div class="bg-yifei animated slideInUp"></div>
<div class="flyman animated infinite "></div>
</script>
<script type="text/tmpl" id="M2">
<div class="bg-bamei animated slideInRight"></div>
<div class="meizi animated infinite swing"></div>
<div class="shoes"></div>
</script>
<script type="text/tmpl" id="M3">
<div class="bg-cloud1 animated slideInRight"></div>
<div class="bg-chuanzhe animated slideInLeft"></div>
<div class="shan"></div>
<div class="rensheng"></div>
<div class="cloud2 animated slideInRight"></div>
<div class="shoes animated infinite swing"></div>
</script>
<script type="text/tmpl" id="M4">
<div class="bg-guang"></div>
<div class="bg-jin1 animated slideInright"></div>
<div class="ren"></div>
<div class="jin2 animated slideInDown"></div>
<div class="jin3 animated slideInDown"></div>
<div class="shuaiqi animated slideInDown"></div>
</script>
<script type="text/tmpl" id="F1">
<div class="bg-hezi1 animated slideInLeft"></div>
<div class="bg-hezi2 animated slideInDown"></div>
<div class="bg-hezi3 animated slideInRight"></div>
<div class="sun animated infinite zoomIn"></div>
<div class="kuaidi animated slideInDown"></div>
</script>
<script type="text/tmpl" id="F2">
<div class="bg-love1 animated infinite zoomIn"></div>
<div class="bg-love2"></div>
<div class="boy animated slideInRight"></div>
<div class="girl animated slideInLeft"></div>
<div class="bidong animated slideInRight"></div>
</script>
<script type="text/tmpl" id="F3">
<div class="bg-bra animated infinite pulse"></div>
<div class="xiongda animated zoomIn"></div>
</script>
<script type="text/tmpl" id="F4">
<div class="bg-guang animated infinite zoomIn"></div>
<div class="bg-shoes1 animated slideInLeft"></div>
<div class="bg-shoes2 animated slideInRight"></div>
<div class="bg-shoes3 animated slideInDown"></div>
<div class="style animated slideInUp"></div>
</script>
{{> cuxiao/yuanxiao/type}}
{{> cuxiao/yuanxiao/footer}}
... ...
... ... @@ -20,9 +20,10 @@
</div>
<div class="footer">
<div class="entry">
<a class="entry" href="/cuxiao/yuanxiao/index">
我也要测
</a>
</div>
</div>
</div>
{{> cuxiao/yuanxiao/type}}
{{> cuxiao/yuanxiao/footer}}
... ...
... ... @@ -15,4 +15,9 @@
<div class="footer">
</div>
</div>
<script type="text/javascript">
setTimeout(function (){
location.href = "/cuxiao/yuanxiao/result";
}, 2000);
</script>
{{> cuxiao/yuanxiao/footer}}
... ...
<script type="text/javascript" src="{{staticFile}}/js/libs.js"></script>
{{#staticJS}}
<script type="text/javascript" src="{{.}}"></script>
<script type="text/javascript" src="{{../staticFile}}/js/{{.}}"></script>
{{/staticJS}}
</body>
... ...
... ... @@ -12,6 +12,6 @@
<script type="text/javascript">
(function(d,c){var e=d.documentElement,a="orientationchange" in window?"orientationchange":"resize",b=function(){var f=e.clientWidth;if(!f){return}if(f>=640){e.style.fontSize="40px"}else{e.style.fontSize=40*(f/640)+"px"}};if(!d.addEventListener){return}b();c.addEventListener(a,b,false);d.addEventListener("DOMContentLoaded",b,false)})(document,window);
</script>
<link rel="stylesheet" href="{{staticCSS}}">
<link rel="stylesheet" href="{{staticFile}}/css/style.css">
</head>
<body>
... ...
<script type="text/tmpl" id="P1">
<div class="bg-guang"></div>
<div class="bg-yuan"></div>
<div class="title">成为一个大写加粗的</div>
<div class="chaoren animated infinite pulse"></div>
</script>
<script type="text/tmpl" id="P2">
<div class="bg-bige animated zoomIn"></div>
<div class="bg-manzai animated zoomIn"></div>
<div class="bg-ren"></div>
<div class="title animated infinite pulse"></div>
<div class="yzbb animated slideInDown"></div>
</script>
<script type="text/tmpl" id="P3">
<div class="bg-yunqi animated zoomIn"></div>
<div class="shoes animated infinite swing"></div>
<div class="yeezy animated slideInDown"></div>
</script>
<script type="text/tmpl" id="P4">
<div class="bg-car"></div>
<div class="hands animated infinite swing"></div>
<div class="wanghong animated slideInRight"></div>
</script>
<script type="text/tmpl" id="M1">
<div class="bg-majia"></div>
<div class="bg-yifei animated slideInUp"></div>
<div class="flyman animated infinite "></div>
</script>
<script type="text/tmpl" id="M2">
<div class="bg-bamei animated slideInRight"></div>
<div class="meizi animated infinite swing"></div>
<div class="shoes"></div>
</script>
<script type="text/tmpl" id="M3">
<div class="bg-cloud1 animated slideInRight"></div>
<div class="bg-chuanzhe animated slideInLeft"></div>
<div class="shan"></div>
<div class="rensheng"></div>
<div class="cloud2 animated slideInRight"></div>
<div class="shoes animated infinite swing"></div>
</script>
<script type="text/tmpl" id="M4">
<div class="bg-guang"></div>
<div class="bg-jin1 animated slideInright"></div>
<div class="ren"></div>
<div class="jin2 animated slideInDown"></div>
<div class="jin3 animated slideInDown"></div>
<div class="shuaiqi animated slideInDown"></div>
</script>
<script type="text/tmpl" id="F1">
<div class="bg-hezi1 animated slideInLeft"></div>
<div class="bg-hezi2 animated slideInDown"></div>
<div class="bg-hezi3 animated slideInRight"></div>
<div class="sun animated infinite zoomIn"></div>
<div class="kuaidi animated slideInDown"></div>
</script>
<script type="text/tmpl" id="F2">
<div class="bg-love1 animated infinite zoomIn"></div>
<div class="bg-love2"></div>
<div class="boy animated slideInRight"></div>
<div class="girl animated slideInLeft"></div>
<div class="bidong animated slideInRight"></div>
</script>
<script type="text/tmpl" id="F3">
<div class="bg-bra animated infinite pulse"></div>
<div class="xiongda animated zoomIn"></div>
</script>
<script type="text/tmpl" id="F4">
<div class="bg-guang animated infinite zoomIn"></div>
<div class="bg-shoes1 animated slideInLeft"></div>
<div class="bg-shoes2 animated slideInRight"></div>
<div class="bg-shoes3 animated slideInDown"></div>
<div class="style animated slideInUp"></div>
</script>
... ...
... ... @@ -10,6 +10,7 @@ use Api\Yohobuy;
*/
class YuanxiaoController extends HuodongAction
{
const STATIC_FILE = 'http://cdn.yoho.cn/huodong/2016yuanxiao/1.0.0';
/**
* 元宵抽签
*/
... ... @@ -17,11 +18,7 @@ class YuanxiaoController extends HuodongAction
{
$this->_view->display('index', array(
'staticTitle' => '元宵抽签',
'staticCSS' => 'http://localhost:2222/assets/1.0.0/css/style.css',
'staticJS' => array(
'http://localhost:2222/assets/1.0.0/js/main.js',
'http://localhost:2222/assets/1.0.0/js/home.js'
)
'staticFile' => self::STATIC_FILE
));
}
... ... @@ -32,11 +29,11 @@ class YuanxiaoController extends HuodongAction
{
$this->_view->display('info', array(
'staticTitle' => '元宵抽签',
'staticCSS' => 'http://localhost:2222/assets/1.0.0/css/style.css',
'staticFile' => self::STATIC_FILE,
'staticJS' => array(
'http://localhost:2222/assets/1.0.0/js/main.js',
'http://localhost:2222/assets/1.0.0/js/info.js'
)
'info.js'
),
'gender' => 1
));
}
... ... @@ -47,11 +44,7 @@ class YuanxiaoController extends HuodongAction
{
$this->_view->display('wait', array(
'staticTitle' => '元宵抽签',
'staticCSS' => 'http://localhost:2222/assets/1.0.0/css/style.css',
'staticJS' => array(
'http://localhost:2222/assets/1.0.0/js/main.js',
'http://localhost:2222/assets/1.0.0/js/wait.js'
)
'staticFile' => self::STATIC_FILE
));
}
... ... @@ -62,14 +55,13 @@ class YuanxiaoController extends HuodongAction
{
$this->_view->display('result', array(
'staticTitle' => '元宵抽签',
'staticFile' => self::STATIC_FILE,
'result' => array(
'name' => '张大龙',
'type' => 'F4'
),
'staticCSS' => 'http://localhost:2222/assets/1.0.0/css/style.css',
'staticJS' => array(
'http://localhost:2222/assets/1.0.0/js/main.js',
'http://localhost:2222/assets/1.0.0/js/result.js'
'result.js'
)
));
}
... ... @@ -81,15 +73,14 @@ class YuanxiaoController extends HuodongAction
{
$this->_view->display('share', array(
'staticTitle' => '元宵抽签',
'staticFile' => self::STATIC_FILE,
'result' => array(
'name' => '张大龙',
'type' => 'P1'
),
'count' => '78999', // 过万转换成 “16万” 这种形式
'staticCSS' => 'http://localhost:2222/assets/1.0.0/css/style.css',
'staticJS' => array(
'http://localhost:2222/assets/1.0.0/js/main.js',
// 'http://localhost:2222/assets/1.0.0/js/share.js'
'share.js'
)
));
}
... ...