From 9b1cff73da149b838e9f00675f7526297c375692 Mon Sep 17 00:00:00 2001 From: uedxwg <xieweiguang11@163.com> Date: Wed, 11 Nov 2015 19:38:22 +0800 Subject: [PATCH] 个人中心-优惠卷,yoho币 --- static/img/me/employ/employ.jpg | Bin 0 -> 11636 bytes static/js/me/order.js | 4 +--- static/sass/me/_index.scss | 2 +- static/sass/me/_personal-details.scss | 11 +++++++++++ static/sass/me/coupons.scss | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ template/m.yohobuy.com/actions/index/home/coupons.phtml | 20 ++++++++++++++++++++ template/m.yohobuy.com/actions/index/home/currency.phtml | 0 template/m.yohobuy.com/actions/index/home/personal-details.phtml | 10 ++++++++-- template/m.yohobuy.com/partials/layout/not-footer.phtml | 38 ++++++++++++++++++++++++++++++++++++++ yohobuy/m.yohobuy.com/application/controllers/Home.php | 11 ++++++++--- 10 files changed, 148 insertions(+), 9 deletions(-) create mode 100644 static/img/me/employ/employ.jpg create mode 100644 static/sass/me/coupons.scss create mode 100644 template/m.yohobuy.com/actions/index/home/coupons.phtml create mode 100644 template/m.yohobuy.com/actions/index/home/currency.phtml create mode 100644 template/m.yohobuy.com/partials/layout/not-footer.phtml diff --git a/static/img/me/employ/employ.jpg b/static/img/me/employ/employ.jpg new file mode 100644 index 0000000..371d368 Binary files /dev/null and b/static/img/me/employ/employ.jpg differ diff --git a/static/js/me/order.js b/static/js/me/order.js index b9d5b5b..3220035 100644 --- a/static/js/me/order.js +++ b/static/js/me/order.js @@ -33,6 +33,4 @@ navHammer.on('tap', function(e) { $curContainer.addClass('hide'); $curContainer = $orderContainer.children(':eq(' + index + ')').removeClass('hide'); -}); - - +}); \ No newline at end of file diff --git a/static/sass/me/_index.scss b/static/sass/me/_index.scss index e7e61e6..537a63e 100644 --- a/static/sass/me/_index.scss +++ b/static/sass/me/_index.scss @@ -1 +1 @@ -@import "home", "vip-grade", "order", "personal-details"; \ No newline at end of file +@import "home", "vip-grade", "order", "personal-details", "coupons"; \ No newline at end of file diff --git a/static/sass/me/_personal-details.scss b/static/sass/me/_personal-details.scss index 7038828..5e9f739 100644 --- a/static/sass/me/_personal-details.scss +++ b/static/sass/me/_personal-details.scss @@ -42,6 +42,17 @@ display: inline-block; margin-top: 25rem / $pxConvertRem; } + .vip-3 { + @include rem-sprite($vip, vip-3); + } + + .vip-2 { + @include rem-sprite($vip, vip-2); + } + + .vip-1 { + @include rem-sprite($vip, vip-1); + } &:last-of-type{ color: #b0b0b0; text-align: right; diff --git a/static/sass/me/coupons.scss b/static/sass/me/coupons.scss new file mode 100644 index 0000000..78ac735 --- /dev/null +++ b/static/sass/me/coupons.scss @@ -0,0 +1,61 @@ +.employ{ + width: 100%; + height: 90rem / $pxConvertRem; + overflow: hidden; + border-bottom:1px solid #e0e0e0; + span{ + width: 49%; + height: 48rem / $pxConvertRem; + line-height: 48rem / $pxConvertRem; + overflow: hidden; + border-right: 2px solid #e0e0e0; + margin: 21rem / $pxConvertRem 0; + float: left; + text-align: center; + font-size: 48em / $pxConvertRem; + color: #b0b0b0; + &:last-of-type{ + border:none; + } + &.active{ + color: #444444; + } + } +} +.employ-list{ + width:100%; + height: auto; + overflow:hidden; + .employ-main{ + width: 90.625%; + height: 180rem / $pxConvertRem; + overflow: hidden; + margin: 20rem / $pxConvertRem auto; + background: url('../img/me/employ/employ.jpg') top center no-repeat; + background-size: 100% 100%; + color: #fff; + span{ + width: 34.482759%; + height: 100%; + float: left; + text-align: center; + line-height: 180rem / $pxConvertRem; + font-size: 180em / $pxConvertRem; + } + p{ + width: 55.517241%; + height: auto; + padding: 0 5% 10em / $pxConvertRem;; + float: left; + font-size: 44em / $pxConvertRem; + &:first-of-type{ + padding-top:30em / $pxConvertRem; + font-size: 60em / $pxConvertRem; + } + } + } + +} +.none{ + display: none; +} \ No newline at end of file diff --git a/template/m.yohobuy.com/actions/index/home/coupons.phtml b/template/m.yohobuy.com/actions/index/home/coupons.phtml new file mode 100644 index 0000000..3c5db67 --- /dev/null +++ b/template/m.yohobuy.com/actions/index/home/coupons.phtml @@ -0,0 +1,20 @@ +{{> layout/header}} +<div class="employ"> + <span class="active">未使用</span> + <span>已使用</span> +</div> +<div class="employ-list"> + <div class="employ-main"> + <span>50</span> + <p>【summer sale】下装满¥399减¥50券</p> + <p>有效期:2014.07.28 - 2014.09.15</p> + </div> +</div> +<div class="employ-list not none"> + <div class="employ-main"> + <span>60</span> + <p>【summer sale】下装满¥399减¥60券</p> + <p>有效期:2014.07.28 - 2014.09.15</p> + </div> +</div> +{{> layout/not-footer}} \ No newline at end of file diff --git a/template/m.yohobuy.com/actions/index/home/currency.phtml b/template/m.yohobuy.com/actions/index/home/currency.phtml new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/template/m.yohobuy.com/actions/index/home/currency.phtml diff --git a/template/m.yohobuy.com/actions/index/home/personal-details.phtml b/template/m.yohobuy.com/actions/index/home/personal-details.phtml index 2fde915..5b7774c 100644 --- a/template/m.yohobuy.com/actions/index/home/personal-details.phtml +++ b/template/m.yohobuy.com/actions/index/home/personal-details.phtml @@ -3,9 +3,15 @@ <ul> <li><span>头像</span><span><i class="head-portrait"><img src="{{ head_ico }}"></i></span></li> <li><span>昵称</span><span>{{ username }}</span></li> - <li><span>性别</span><span>{{ sex }}</span></li> + <li><span>性别</span><span></span></li> <li><span>生日</span><span>{{ birthday }}</span></li> - <li><span>会员等级</span><span><i class="grade vip-icon"></i></span></li> + <li><span>会员等级</span> + <span> + {{# vip_info}} + <i class="grade vip-icon vip-{{ next_level }}"></i> + {{/ vip_info}} + </span> + </li> </ul> </div> {{> layout/footer}} \ No newline at end of file diff --git a/template/m.yohobuy.com/partials/layout/not-footer.phtml b/template/m.yohobuy.com/partials/layout/not-footer.phtml new file mode 100644 index 0000000..9786f2b --- /dev/null +++ b/template/m.yohobuy.com/partials/layout/not-footer.phtml @@ -0,0 +1,38 @@ + +{{#if hasWxShare}} + <script type="text/javascript" charset="utf-8" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script> +{{/if}} +{{#if rlsEnv}} +<script src="http://cdn.yoho.cn/myohobuy/{{version}}/lib.js"></script> +<script src="http://cdn.yoho.cn/myohobuy/{{version}}/index.js"></script> +{{/if}} +{{#if preEnv}} +<script src="http://cdn.yoho.cn/myohobuy/{{version}}/lib.js"></script> +<script src="http://cdn.yoho.cn/myohobuy/{{version}}/index.js"></script> +{{/if}} +{{#if testEnv}} +<script src="http://static.buy.test.yoho.cn/dist/myohobuy/{{version}}/lib.js"></script> +<script src="http://static.buy.test.yoho.cn/dist/myohobuy/{{version}}/index-debug.js"></script> +{{/if}} +{{#if devEnv}} +<script src="http://localhost:8000/static/js/sea.js?nowrap"></script> +<script>seajs.config({base: 'http://localhost:8000/'});</script> +{{/if}} + +<script type="text/javascript"> + (function(w,d,s,j,f){ + w['YohoAcquisitionObject']=f; + w[f]=function(){w[f].p=arguments;}; + var a=d.createElement(s); + var m=d.getElementsByTagName(s)[0]; + a.async=1; + a.src=j; + m.parentNode.insertBefore(a,m); + })(window,document,'script','http://cdn.yoho.cn/yas-jssdk/1.0.8/yas.js','_yas'); +</script> + +{{> layout/use}} + +{{> layout/analysis}} +</body> +</html> \ No newline at end of file diff --git a/yohobuy/m.yohobuy.com/application/controllers/Home.php b/yohobuy/m.yohobuy.com/application/controllers/Home.php index 3b887a5..57d0aa3 100644 --- a/yohobuy/m.yohobuy.com/application/controllers/Home.php +++ b/yohobuy/m.yohobuy.com/application/controllers/Home.php @@ -115,6 +115,7 @@ class HomeController extends AbstractAction // $uid = $this->getUid(); $uid = 967016; $data = \Index\UserModel::getUserProfileData($uid); + $data['pageFooter'] = true; $this->_view->display('personal-details', $data); @@ -125,8 +126,9 @@ class HomeController extends AbstractAction */ public function currencyAction() { - $uid = $this->getUid(); + // $uid = $this->getUid(); + $uid = 967016; $favBrands = \Index\UserModel::getYohoCoinData($uid); print_r($favBrands); @@ -139,12 +141,15 @@ class HomeController extends AbstractAction */ public function couponsAction() { - $uid = $this->getUid(); + // $uid = $this->getUid(); + + $uid = 967016; $status = $this->get('status', 0); $coupons = \Index\UserModel::getCouponData($uid, $status); - print_r($coupons); + $this->_view->display('coupons', $coupons); + } /** -- libgit2 0.24.0