Authored by 毕凯

Merge branch 'release/6.0' into release/6.0.1

@@ -122,9 +122,6 @@ exports.inviteReg = (req, res, next) => { @@ -122,9 +122,6 @@ exports.inviteReg = (req, res, next) => {
122 122
123 req.ctx(expandModel).promotionData(uid, isApp).then(result => { 123 req.ctx(expandModel).promotionData(uid, isApp).then(result => {
124 res.render('expand-new/invite-reg', { 124 res.render('expand-new/invite-reg', {
125 - pageHeader: headerModel.setNav({  
126 - navTitle: '注册完成'  
127 - }),  
128 isApp: isApp, 125 isApp: isApp,
129 width750: true, 126 width750: true,
130 localCss: true, 127 localCss: true,
@@ -219,7 +219,7 @@ const payCod = (req, res, next) => { @@ -219,7 +219,7 @@ const payCod = (req, res, next) => {
219 219
220 payModel.getPayCod(param).then(result => { 220 payModel.getPayCod(param).then(result => {
221 if (result.match === true) { 221 if (result.match === true) {
222 - aboutModel.about(req.yoho.isApp).then(resu => { 222 + req.ctx(aboutModel).about(req.yoho.isApp).then(resu => {
223 res.render('pay/pay-cod', Object.assign(responseData, result, {wxFooter: resu})); 223 res.render('pay/pay-cod', Object.assign(responseData, result, {wxFooter: resu}));
224 }); 224 });
225 } else { 225 } else {
@@ -272,7 +272,7 @@ const payAli = (req, res, next) => { @@ -272,7 +272,7 @@ const payAli = (req, res, next) => {
272 272
273 payModel.getPayAli(param).then(result => { 273 payModel.getPayAli(param).then(result => {
274 if (result.match === true) { 274 if (result.match === true) {
275 - aboutModel.about(req.yoho.isApp).then(resu => { 275 + req.ctx(aboutModel).about(req.yoho.isApp).then(resu => {
276 res.render('pay/pay-ali', Object.assign(responseData, result, {wxFooter: resu})); 276 res.render('pay/pay-ali', Object.assign(responseData, result, {wxFooter: resu}));
277 }); 277 });
278 } else { 278 } else {
@@ -10,11 +10,11 @@ @@ -10,11 +10,11 @@
10 <div class="coupon-tab"> 10 <div class="coupon-tab">
11 <ul class="tab-navs" data-sticky> 11 <ul class="tab-navs" data-sticky>
12 <li class="tab-nav pull-left active"> 12 <li class="tab-nav pull-left active">
13 - <span data-target="#couponAvailable" data-trigger="tab" data-funHome>可用优惠券</span> 13 + <span data-target="#couponAvailable" data-trigger="tab" data-funCouponAvailable>可用优惠券</span>
14 </li> 14 </li>
15 <em class="pull-left">|</em> 15 <em class="pull-left">|</em>
16 <li class="tab-nav pull-left"> 16 <li class="tab-nav pull-left">
17 - <span data-target="#couponUnavailable" data-trigger="tab" data-funGetNewGoods>不可用优惠券</span> 17 + <span data-target="#couponUnavailable" data-trigger="tab" data-funCouponUnavailable>不可用优惠券</span>
18 </li> 18 </li>
19 </ul> 19 </ul>
20 </div> 20 </div>
@@ -275,7 +275,7 @@ const index = (req, res, next) => { @@ -275,7 +275,7 @@ const index = (req, res, next) => {
275 // 标识有微信分享 275 // 标识有微信分享
276 data.hasWxShare = true; 276 data.hasWxShare = true;
277 277
278 - let resu = yield aboutModel.about(req.yoho.isApp); 278 + let resu = yield req.ctx(aboutModel).about(req.yoho.isApp);
279 279
280 data.guang.wxFooter = resu; 280 data.guang.wxFooter = resu;
281 res.render('info/index', Object.assign({ 281 res.render('info/index', Object.assign({
@@ -180,8 +180,8 @@ @@ -180,8 +180,8 @@
180 {{#unless @root.wap.ucenter.removePrefer}} 180 {{#unless @root.wap.ucenter.removePrefer}}
181 {{> common/recommend-for-you}} 181 {{> common/recommend-for-you}}
182 {{/unless}} 182 {{/unless}}
183 - </div>  
184 183
185 -{{> common/set-trend-world}} 184 + {{> common/set-trend-world}}
  185 + </div>
186 {{> footer-tab}} 186 {{> footer-tab}}
187 187
@@ -23,9 +23,9 @@ @@ -23,9 +23,9 @@
23 </a> 23 </a>
24 </span> 24 </span>
25 </li> 25 </li>
26 - <li> 26 + <li class="trend-word">
27 <span>我的潮流口令</span> 27 <span>我的潮流口令</span>
28 - <span> 28 + <span class="trend-right">
29 <a href="//m.yohobuy.com/home/tide-command" class="command"> 29 <a href="//m.yohobuy.com/home/tide-command" class="command">
30 {{#if trendWord}} 30 {{#if trendWord}}
31 {{trendWord}} 31 {{trendWord}}
1 {{#each list}} 1 {{#each list}}
2 - <div class="coupon-group" data-coupon-id={{couponId}}> 2 + <div class="coupon-group{{#is-equal-or couponType '5'}} usable-frees{{/is-equal-or}}" data-coupon-id={{couponId}}>
3 <div class="coupon-header">{{couponDetailInfomation}}</div> 3 <div class="coupon-header">{{couponDetailInfomation}}</div>
4 <div class="coupon-content"> 4 <div class="coupon-content">
5 <div class="coupon-content-group1"> 5 <div class="coupon-content-group1">
@@ -4,6 +4,10 @@ require('common'); @@ -4,6 +4,10 @@ require('common');
4 4
5 let tip = require('plugin/tip'); 5 let tip = require('plugin/tip');
6 6
  7 +$('.invite-reg-page').css('min-height', function() {
  8 + return $(window).height();
  9 +});
  10 +
7 // 埋点 11 // 埋点
8 function point(type, trend) { 12 function point(type, trend) {
9 let pointJosn = { 13 let pointJosn = {
@@ -33,6 +37,12 @@ $('.set').click(function() { @@ -33,6 +37,12 @@ $('.set').click(function() {
33 success: function(result) { 37 success: function(result) {
34 tip.show(result.message); 38 tip.show(result.message);
35 point(1, $('.command-textarea').val()); 39 point(1, $('.command-textarea').val());
  40 +
  41 + if (result.code === 200) {
  42 + setTimeout(function() {
  43 + location.href = window.cookie('refer');
  44 + }, 500);
  45 + }
36 } 46 }
37 }); 47 });
38 }); 48 });
@@ -13,8 +13,6 @@ let $ = require('yoho-jquery'), @@ -13,8 +13,6 @@ let $ = require('yoho-jquery'),
13 conponNotAvaliableTmpl = require('cart/select-coupon/coupon-not-avaliable.hbs'), 13 conponNotAvaliableTmpl = require('cart/select-coupon/coupon-not-avaliable.hbs'),
14 orderInfo = require('cart/buynow/order-info').orderInfo; 14 orderInfo = require('cart/buynow/order-info').orderInfo;
15 15
16 -require('plugin/tab');  
17 -  
18 let isGetData; 16 let isGetData;
19 17
20 let $newCoupon = $('#new-coupon'), 18 let $newCoupon = $('#new-coupon'),
@@ -5,9 +5,20 @@ @@ -5,9 +5,20 @@
5 */ 5 */
6 const $couponCodeInput = $('input[name=couponCode]'); 6 const $couponCodeInput = $('input[name=couponCode]');
7 const $submit = $('.submit'); 7 const $submit = $('.submit');
  8 +const $useCouponBtnGroup = $('.use-coupon-btn-group');
  9 +
  10 +let Tab = require('plugin/tab');
  11 +
  12 +Tab.prototype.couponavailable = () => {
  13 + $useCouponBtnGroup.removeClass('disable');
  14 +};
  15 +
  16 +Tab.prototype.couponunavailable = () => {
  17 + $useCouponBtnGroup.addClass('disable');
  18 +};
8 19
9 $('.select-coupon-page').css('min-height', function() { 20 $('.select-coupon-page').css('min-height', function() {
10 - return $(window).height() - $('#yoho-header').height(); 21 + return $(window).height() - $('#yoho-header').height() + 20;
11 }); 22 });
12 23
13 /** 24 /**
@@ -12,8 +12,6 @@ let $ = require('yoho-jquery'), @@ -12,8 +12,6 @@ let $ = require('yoho-jquery'),
12 conponNotAvaliableTmpl = require('cart/select-coupon/coupon-not-avaliable.hbs'), 12 conponNotAvaliableTmpl = require('cart/select-coupon/coupon-not-avaliable.hbs'),
13 orderInfo = require('./order-info').orderInfo; 13 orderInfo = require('./order-info').orderInfo;
14 14
15 -require('plugin/tab');  
16 -  
17 let isGetData; 15 let isGetData;
18 16
19 let $newCoupon = $('#new-coupon'), 17 let $newCoupon = $('#new-coupon'),
  1 +module.exports = function() {
  2 + let args = Array.prototype.slice.call(arguments);
  3 + let v1 = args[0];
  4 + let opt = args[args.length - 1];
  5 + let isTrue = false;
  6 +
  7 + for (let i = 1; i < args.length - 1; i++) {
  8 + if (v1 === args[i]) {
  9 + isTrue = true;
  10 + break;
  11 + }
  12 + }
  13 +
  14 + if (isTrue) {
  15 + return opt.fn(this); // eslint-disable-line
  16 + } else {
  17 + return opt.inverse(this); // eslint-disable-line
  18 + }
  19 +};
@@ -82,3 +82,8 @@ $('.withhold').click(function() { @@ -82,3 +82,8 @@ $('.withhold').click(function() {
82 point(2); 82 point(2);
83 $('.set-trend-world').hide(); 83 $('.set-trend-world').hide();
84 }); 84 });
  85 +
  86 +$('.set-trend-world').on('mousewheel touchmove', function(e) {
  87 + e.preventDefault();
  88 + return false;
  89 +});
@@ -17,11 +17,13 @@ @@ -17,11 +17,13 @@
17 width: 350px; 17 width: 350px;
18 line-height: 45px; 18 line-height: 45px;
19 display: inline-block; 19 display: inline-block;
  20 + position: relative;
  21 + top: -34px;
20 } 22 }
21 } 23 }
22 24
23 .invite-pass { 25 .invite-pass {
24 - margin: 66px 30px 0; 26 + margin: 20px 30px 0;
25 width: 692px; 27 width: 692px;
26 height: 661px; 28 height: 661px;
27 background-image: resolve("activity/expand-new/invite-state.png"); 29 background-image: resolve("activity/expand-new/invite-state.png");
@@ -46,7 +48,7 @@ @@ -46,7 +48,7 @@
46 .instructions-title { 48 .instructions-title {
47 text-align: center; 49 text-align: center;
48 line-height: 48px; 50 line-height: 48px;
49 - font-weight: 200; 51 + font-weight: 700;
50 font-size: 24px; 52 font-size: 24px;
51 } 53 }
52 54
@@ -202,6 +202,10 @@ $fontSizeSmall: 16px; @@ -202,6 +202,10 @@ $fontSizeSmall: 16px;
202 } 202 }
203 } 203 }
204 204
  205 + .disable {
  206 + display: none;
  207 + }
  208 +
205 .null { 209 .null {
206 position: absolute; 210 position: absolute;
207 left: 50%; 211 left: 50%;
1 .set-trend-world { 1 .set-trend-world {
  2 + position: fixed;
  3 + top: 0;
  4 + width: 100%;
  5 + height: 100%;
  6 + z-index: 5;
  7 +
2 .back { 8 .back {
3 width: 100%; 9 width: 100%;
4 height: 100%; 10 height: 100%;
@@ -9,7 +15,6 @@ @@ -9,7 +15,6 @@
9 bottom: 0; 15 bottom: 0;
10 background: #000; 16 background: #000;
11 opacity: 0.65; 17 opacity: 0.65;
12 - z-index: 5;  
13 } 18 }
14 19
15 .set-content { 20 .set-content {
@@ -24,7 +29,6 @@ @@ -24,7 +29,6 @@
24 border-bottom-right-radius: 10px; 29 border-bottom-right-radius: 10px;
25 border-bottom-left-radius: 10px; 30 border-bottom-left-radius: 10px;
26 padding-bottom: 35px; 31 padding-bottom: 35px;
27 - z-index: 5;  
28 32
29 .banner { 33 .banner {
30 width: 100%; 34 width: 100%;
@@ -68,11 +72,12 @@ @@ -68,11 +72,12 @@
68 text-align: left; 72 text-align: left;
69 width: 430px; 73 width: 430px;
70 margin-left: 55px; 74 margin-left: 55px;
71 - line-height: 50px; 75 + line-height: 36px;
72 margin-bottom: 20px; 76 margin-bottom: 20px;
73 height: 0; 77 height: 0;
74 overflow: hidden; 78 overflow: hidden;
75 - font-size: 22px; 79 + font-size: 21px;
  80 + font-weight: 700;
76 81
77 .hide-explain { 82 .hide-explain {
78 display: block; 83 display: block;
@@ -136,3 +141,48 @@ @@ -136,3 +141,48 @@
136 padding: 64px 60px 40px; 141 padding: 64px 60px 40px;
137 } 142 }
138 } 143 }
  144 +
  145 +.my-page {
  146 + .set-content {
  147 + width: 460px;
  148 + margin-top: 134px;
  149 + margin-left: -224px;
  150 + padding-bottom: 29px;
  151 +
  152 + .banner {
  153 + height: 204px;
  154 + }
  155 +
  156 + .title {
  157 + height: 43px;
  158 + width: 284px;
  159 + margin: 17px 85px;
  160 + }
  161 +
  162 + .trend-world-area {
  163 + width: 422px;
  164 + height: 55px;
  165 + margin-left: 18px;
  166 + line-height: 55px;
  167 + }
  168 +
  169 + .explain-main {
  170 + width: 400px;
  171 + margin-left: 30px;
  172 + line-height: 34px;
  173 + margin-bottom: 17px;
  174 +
  175 + .hide-explain {
  176 + width: 18px;
  177 + height: 22px;
  178 + }
  179 + }
  180 +
  181 + .btn {
  182 + height: 58px;
  183 + width: 204px;
  184 + margin-left: 17px;
  185 + line-height: 58px;
  186 + }
  187 + }
  188 +}
@@ -103,10 +103,15 @@ @@ -103,10 +103,15 @@
103 line-height: 46px; 103 line-height: 46px;
104 overflow: hidden; 104 overflow: hidden;
105 105
  106 + .trend-code {
  107 + display: inline-block;
  108 + vertical-align: top;
  109 + }
  110 +
106 .code-set { 111 .code-set {
107 margin-left: 8px; 112 margin-left: 8px;
108 - width: 36px;  
109 - height: 32px; 113 + width: 37px;
  114 + height: 52px;
110 background: url("/home/index/code-set.png"); 115 background: url("/home/index/code-set.png");
111 background-size: 100%; 116 background-size: 100%;
112 background-repeat: no-repeat; 117 background-repeat: no-repeat;
@@ -115,4 +115,17 @@ @@ -115,4 +115,17 @@
115 } 115 }
116 } 116 }
117 } 117 }
  118 +
  119 + .trend-word {
  120 + position: relative;
  121 +
  122 + .trend-right {
  123 + padding-right: 28px;
  124 + }
  125 +
  126 + .iconfont {
  127 + position: absolute;
  128 + right: 50px;
  129 + }
  130 + }
118 } 131 }
@@ -170,16 +170,6 @@ $usable-frees-background-color: #444; @@ -170,16 +170,6 @@ $usable-frees-background-color: #444;
170 } 170 }
171 } 171 }
172 172
173 - .coupon-tab2 {  
174 - .coupon-header {  
175 - background-color: #b0b0b0;  
176 - }  
177 -  
178 - .coupon-content {  
179 - border-top: 2px dashed #b0b0b0;  
180 - }  
181 - }  
182 -  
183 .coupon-not-result { 173 .coupon-not-result {
184 width: 100%; 174 width: 100%;
185 height: auto; 175 height: auto;
@@ -52,7 +52,8 @@ @@ -52,7 +52,8 @@
52 .more { 52 .more {
53 color: #4a90e2; 53 color: #4a90e2;
54 display: block; 54 display: block;
55 - padding-bottom: 20px; 55 + padding-bottom: 8px;
  56 + line-height: 50px;
56 } 57 }
57 } 58 }
58 59