Authored by 郭成尧

Merge branch 'release/6.0' of git.yoho.cn:fe/yohobuywap-node into release/6.0

@@ -18,8 +18,7 @@ let channels = { @@ -18,8 +18,7 @@ let channels = {
18 exports.promotion = (req, res, next) => { 18 exports.promotion = (req, res, next) => {
19 let uid = req.user.uid, 19 let uid = req.user.uid,
20 isApp = req.yoho.isApp, 20 isApp = req.yoho.isApp,
21 - contentCode = req.app.locals.isProduction ? 'b2b5cde8144aff3073573c3b323344ab' :  
22 - 'fa046a09b7c2c0e06927162404d95111'; // 产品线上线下配的资源码不一样 21 + contentCode = 'b2b5cde8144aff3073573c3b323344ab';
23 22
24 req.ctx(expandModel).promotionData(uid, isApp, contentCode).then(result => { 23 req.ctx(expandModel).promotionData(uid, isApp, contentCode).then(result => {
25 res.render('expand-new/my-promotion', { 24 res.render('expand-new/my-promotion', {
@@ -100,8 +99,7 @@ exports.friendInvite = (req, res, next) => { @@ -100,8 +99,7 @@ exports.friendInvite = (req, res, next) => {
100 let page = req.query.page || 1; 99 let page = req.query.page || 1;
101 let isApp = req.yoho.isApp; 100 let isApp = req.yoho.isApp;
102 let inciteCode = req.query.inviteCode; 101 let inciteCode = req.query.inviteCode;
103 - let contentCode = req.app.locals.isProduction ? '319f92c4b072c3c40ea4cb4499b78bb4' :  
104 - 'bc31b5d58b5af4e3999e8b994fb2bbc1'; 102 + let contentCode = '319f92c4b072c3c40ea4cb4499b78bb4';
105 103
106 req.ctx(expandModel).friendInvite(inciteCode, yhChannel, limit, page, contentCode).then(result => { 104 req.ctx(expandModel).friendInvite(inciteCode, yhChannel, limit, page, contentCode).then(result => {
107 res.render('expand-new/friend-invite', { 105 res.render('expand-new/friend-invite', {
@@ -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 {
@@ -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({
@@ -21,7 +21,8 @@ exports.index = (req, res, next) => { @@ -21,7 +21,8 @@ exports.index = (req, res, next) => {
21 let params = { 21 let params = {
22 uid: req.user.uid, 22 uid: req.user.uid,
23 channel: req.query.channel || 1, 23 channel: req.query.channel || 1,
24 - udid: require('yoho-md5')(req.ip) 24 + udid: require('yoho-md5')(req.ip),
  25 + contentCode: 'b2b5cde8144aff3073573c3b323344ab'
25 }; 26 };
26 27
27 let studentSwitch = !_.get(req.app.locals.wap, 'user.removeStudentIdentification', true); 28 let studentSwitch = !_.get(req.app.locals.wap, 'user.removeStudentIdentification', true);
@@ -5,8 +5,7 @@ const tideCommandModel = require('../models/tide-command'); @@ -5,8 +5,7 @@ const tideCommandModel = require('../models/tide-command');
5 5
6 exports.tideCommand = (req, res, next) => { 6 exports.tideCommand = (req, res, next) => {
7 let uid = req.user.uid, 7 let uid = req.user.uid,
8 - contentCode = req.app.locals.isProduction ? '29958987ef0c0f830fad03d7e54f6061' :  
9 - '29958987ef0c0f830fad03d7e5'; 8 + contentCode = '29958987ef0c0f830fad03d7e54f6061';
10 9
11 req.ctx(tideCommandModel).invitionData(uid, contentCode).then(result => { 10 req.ctx(tideCommandModel).invitionData(uid, contentCode).then(result => {
12 res.render('tide-command', { 11 res.render('tide-command', {
@@ -123,9 +123,9 @@ const _getCode = (uid) => { @@ -123,9 +123,9 @@ const _getCode = (uid) => {
123 }); 123 });
124 }; 124 };
125 125
126 -const _getTrendPop = () => { 126 +const _getTrendPop = (contentCode) => {
127 return service.get('operations/api/v5/resource/get', { 127 return service.get('operations/api/v5/resource/get', {
128 - content_code: 'fa046a09b7c2c0e06927162404d95111', 128 + content_code: contentCode,
129 }).then(result => { 129 }).then(result => {
130 if (result && result.code === 200 && result.data) { 130 if (result && result.code === 200 && result.data) {
131 return result.data[0]; 131 return result.data[0];
@@ -163,7 +163,7 @@ const index = (params) => { @@ -163,7 +163,7 @@ const index = (params) => {
163 _getAddressData(params), 163 _getAddressData(params),
164 _getRes(), 164 _getRes(),
165 _getCode(params.uid), 165 _getCode(params.uid),
166 - _getTrendPop() 166 + _getTrendPop(params.contentCode)
167 ]).then(result => { 167 ]).then(result => {
168 if (result[0] && result[0].data) { 168 if (result[0] && result[0].data) {
169 Object.assign(finalResult, { 169 Object.assign(finalResult, {
@@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
27 {{/ shopInfo}} 27 {{/ shopInfo}}
28 28
29 <!-- 优惠卷 --> 29 <!-- 优惠卷 -->
30 - <div class="coupon-group"> 30 + <div class="shop-coupon coupon-group">
31 {{> reds-shop/coupon}} 31 {{> reds-shop/coupon}}
32 </div> 32 </div>
33 33
@@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
20 </div> 20 </div>
21 {{!--shop-tab-nav: 首页 | 全部商品--}} 21 {{!--shop-tab-nav: 首页 | 全部商品--}}
22 <div class="tab"> 22 <div class="tab">
23 - <ul class="shop-tabs tab-navs" data-sticky> 23 + <ul class="shop-tabs tab-navs">
24 <li class="shop-tab-nav tab-nav active"> 24 <li class="shop-tab-nav tab-nav active">
25 <span data-target="#red-index" data-trigger="tab" data-funHome>首页</span> 25 <span data-target="#red-index" data-trigger="tab" data-funHome>首页</span>
26 </li> 26 </li>
@@ -54,7 +54,7 @@ @@ -54,7 +54,7 @@
54 <div id="home-page" class="main"> 54 <div id="home-page" class="main">
55 <div id="nav-main" class="nav-main"> 55 <div id="nav-main" class="nav-main">
56 <!-- 优惠卷 --> 56 <!-- 优惠卷 -->
57 - <div class="coupon-group"></div> 57 + <div class="shop-coupon coupon-group"></div>
58 58
59 <!-- 大导航 --> 59 <!-- 大导航 -->
60 {{#if brandList}} 60 {{#if brandList}}
1 {{#couponData}} 1 {{#couponData}}
2 -<div class="coupon-content">  
3 - <div class="swiper-wrapper">  
4 - {{#if couponsOne}}  
5 - {{#each coupons}}  
6 - <div class="swiper-slide coupon-big" data-id = "{{id}}">  
7 - <div class='coupon-left'> 2 +{{#if couponsOne}}
  3 + {{#each coupons}}
  4 + <div class="coupon-center coupon-big" data-id = "{{id}}">
  5 + <div class='coupon-left'>
  6 + <span class="coupon-left-price">
  7 + <span class="coupon-sign">¥</span>
  8 + <span class="coupon-price">{{money}}</span>
  9 + </span>
  10 + <span class="coupon-left-name">
  11 + {{name}}
  12 + </span>
  13 + </div>
  14 + <div class='coupon-right receive-btn'>
  15 + 立即领取
  16 + </div>
  17 + </div><!--/coupon-big-->
  18 + {{/each}}
  19 +{{^}}
  20 + {{#each coupons}}
  21 + <div class="coupon-center coupon-small" data-id = "{{id}}">
  22 + <div class='coupon-left'>
8 <span class="coupon-left-price"> 23 <span class="coupon-left-price">
9 <span class="coupon-sign">¥</span> 24 <span class="coupon-sign">¥</span>
10 <span class="coupon-price">{{money}}</span> 25 <span class="coupon-price">{{money}}</span>
11 </span> 26 </span>
12 <span class="coupon-left-name"> 27 <span class="coupon-left-name">
13 - {{name}} 28 + {{name}}
14 </span> 29 </span>
15 - </div>  
16 - <div class='coupon-right receive-btn'>  
17 - 立即领取  
18 - </div>  
19 - </div><!--/coupon-big-->  
20 - {{/each}}  
21 - {{^}}  
22 - {{#each coupons}}  
23 - <div class="swiper-slide coupon-small" data-id = "{{id}}">  
24 - <div class='coupon-left'>  
25 - <span class="coupon-left-price">  
26 - <span class="coupon-sign">¥</span>  
27 - <span class="coupon-price">{{money}}</span>  
28 - </span>  
29 - <span class="coupon-left-name">  
30 - {{name}}  
31 - </span>  
32 - </div>  
33 - <div class='coupon-right receive-btn'>  
34 - 立即领取  
35 - </div>  
36 - </div><!--/coupon-small-->  
37 - {{/each}}  
38 - {{/if}}  
39 - </div>  
40 -</div> 30 + </div>
  31 + <div class='coupon-right receive-btn'>
  32 + 立即领取
  33 + </div>
  34 + </div><!--/coupon-small-->
  35 + {{/each}}
  36 +{{/if}}
41 {{/couponData}} 37 {{/couponData}}
@@ -110,7 +110,7 @@ @@ -110,7 +110,7 @@
110 110
111 {{#ifor brandHome baseShopHome}} 111 {{#ifor brandHome baseShopHome}}
112 {{!--优惠卷--}} 112 {{!--优惠卷--}}
113 - <div class="coupon-group"></div> 113 + <div class="shop-coupon coupon-group"></div>
114 {{/ifor}} 114 {{/ifor}}
115 115
116 {{!--筛选tab--}} 116 {{!--筛选tab--}}
1 -<div class="coupon-content">  
2 -<div class="swiper-wrapper">  
3 - {{#if shopCouponsOne}}  
4 - {{#each shopCoupons}}  
5 - <div class="swiper-slide coupon-big" data-id = "{{id}}"> 1 +{{#if shopCouponsOne}}
  2 + {{#each shopCoupons}}
  3 + <div class="coupon-center coupon-big" data-id = "{{id}}">
  4 + <div class='coupon-left'>
  5 + <span class="coupon-left-price">
  6 + <span class="coupon-sign">¥</span>
  7 + <span class="coupon-price">{{money}}</span>
  8 + </span>
  9 + <span class="coupon-left-name">
  10 + {{name}}
  11 + </span>
  12 + </div>
  13 + {{#if status}}
  14 + <div class='coupon-right receive-btn'>
  15 + 立即领取
  16 + </div>
  17 + {{^}}
  18 + <div class='coupon-right receive-btn'>
  19 + 已领取
  20 + </div>
  21 + {{/if}}
  22 + </div><!--/coupon-big-->
  23 + {{/each}}
  24 +{{^}}
  25 + {{#each shopCoupons}}
  26 + <div class="coupon-center coupon-small" data-id = "{{id}}">
6 <div class='coupon-left'> 27 <div class='coupon-left'>
7 - <span class="coupon-left-price">  
8 - <span class="coupon-sign">¥</span>  
9 - <span class="coupon-price">{{money}}</span>  
10 - </span>  
11 - <span class="coupon-left-name">  
12 - {{name}}  
13 - </span> 28 + <span class="coupon-left-price">
  29 + <span class="coupon-sign">¥</span>
  30 + <span class="coupon-price">{{money}}</span>
  31 + </span>
  32 + <span class="coupon-left-name">
  33 + {{name}}
  34 + </span>
14 </div> 35 </div>
15 {{#if status}} 36 {{#if status}}
16 <div class='coupon-right receive-btn'> 37 <div class='coupon-right receive-btn'>
@@ -21,31 +42,6 @@ @@ -21,31 +42,6 @@
21 已领取 42 已领取
22 </div> 43 </div>
23 {{/if}} 44 {{/if}}
24 - </div><!--/coupon-big-->  
25 - {{/each}}  
26 - {{^}}  
27 - {{#each shopCoupons}}  
28 - <div class="swiper-slide coupon-small" data-id = "{{id}}">  
29 - <div class='coupon-left'>  
30 - <span class="coupon-left-price">  
31 - <span class="coupon-sign">¥</span>  
32 - <span class="coupon-price">{{money}}</span>  
33 - </span>  
34 - <span class="coupon-left-name">  
35 - {{name}}  
36 - </span>  
37 - </div>  
38 - {{#if status}}  
39 - <div class='coupon-right receive-btn'>  
40 - 立即领取  
41 - </div>  
42 - {{^}}  
43 - <div class='coupon-right receive-btn'>  
44 - 已领取  
45 - </div>  
46 - {{/if}}  
47 - </div><!--/coupon-small-->  
48 - {{/each}}  
49 - {{/if}}  
50 -</div>  
51 -</div>  
  45 + </div><!--/coupon-small-->
  46 + {{/each}}
  47 +{{/if}}
@@ -6,8 +6,7 @@ @@ -6,8 +6,7 @@
6 </div> 6 </div>
7 <div class="main"> 7 <div class="main">
8 <div class="title"></div> 8 <div class="title"></div>
9 - <textarea type="text" class="trend-world-area trend-code" maxlength="15"  
10 - placeholder="请设置15位以内的潮流口令">{{#if trendWord}}{{trendWord}}{{/if}}</textarea> 9 + <textarea type="text" class="trend-world-area trend-code" maxlength="15" placeholder="请设置15位以内的潮流口令">{{#if trendWord}}{{trendWord}}{{/if}}</textarea>
11 <div class="explain"> 10 <div class="explain">
12 <span class="explain-title">玩转潮流口令,超值福利等你拿</span> 11 <span class="explain-title">玩转潮流口令,超值福利等你拿</span>
13 <div class="show-explain"> 12 <div class="show-explain">
1 -{{#if coupons}}  
2 -<div class="coupon-content">  
3 - <div class="swiper-wrapper">  
4 - {{#if couponsOne}}  
5 - {{#each coupons}}  
6 - <div class="swiper-slide coupon-big" data-id = "{{id}}">  
7 - <div class='coupon-left'> 1 +{{#if couponsOne}}
  2 + {{#each coupons}}
  3 + <div class="coupon-center coupon-big" data-id = "{{id}}">
  4 + <div class='coupon-left'>
  5 + <span class="coupon-left-price">
  6 + <span class="coupon-sign">¥</span>
  7 + <span class="coupon-price">{{money}}</span>
  8 + </span>
  9 + <span class="coupon-left-name">
  10 + {{name}}
  11 + </span>
  12 + </div>
  13 + {{#if status}}
  14 + <div class='coupon-right receive-btn'>
  15 + 立即领取
  16 + </div>
  17 + {{^}}
  18 + <div class='coupon-right receive-btn'>
  19 + 已领取
  20 + </div>
  21 + {{/if}}
  22 + </div><!--/coupon-big-->
  23 + {{/each}}
  24 +{{^}}
  25 + {{#each coupons}}
  26 + <div class="coupon-center coupon-small" data-id = "{{id}}">
  27 + <div class='coupon-left'>
8 <span class="coupon-left-price"> 28 <span class="coupon-left-price">
9 <span class="coupon-sign">¥</span> 29 <span class="coupon-sign">¥</span>
10 <span class="coupon-price">{{money}}</span> 30 <span class="coupon-price">{{money}}</span>
11 </span> 31 </span>
12 <span class="coupon-left-name"> 32 <span class="coupon-left-name">
13 - {{name}} 33 + {{name}}
14 </span> 34 </span>
  35 + </div>
  36 + {{#if status}}
  37 + <div class='coupon-right receive-btn'>
  38 + 立即领取
15 </div> 39 </div>
16 - {{#if status}}  
17 - <div class='coupon-right receive-btn'>  
18 - 立即领取  
19 - </div>  
20 - {{^}}  
21 - <div class='coupon-right receive-btn'>  
22 - 已领取  
23 - </div>  
24 - {{/if}}  
25 - </div><!--/coupon-big-->  
26 - {{/each}}  
27 - {{^}}  
28 - {{#each coupons}}  
29 - <div class="swiper-slide coupon-small" data-id = "{{id}}">  
30 - <div class='coupon-left'>  
31 - <span class="coupon-left-price">  
32 - <span class="coupon-sign">¥</span>  
33 - <span class="coupon-price">{{money}}</span>  
34 - </span>  
35 - <span class="coupon-left-name">  
36 - {{name}}  
37 - </span>  
38 - </div>  
39 - {{#if status}}  
40 - <div class='coupon-right receive-btn'>  
41 - 立即领取  
42 - </div>  
43 - {{^}}  
44 - <div class='coupon-right receive-btn'>  
45 - 已领取  
46 - </div>  
47 - {{/if}}  
48 - </div><!--/coupon-small-->  
49 - {{/each}}  
50 - {{/if}}  
51 - </div>  
52 -</div>  
53 -{{/if}}  
  40 + {{^}}
  41 + <div class='coupon-right receive-btn'>
  42 + 已领取
  43 + </div>
  44 + {{/if}}
  45 + </div><!--/coupon-small-->
  46 + {{/each}}
  47 +{{/if}}

8.36 KB | W: | H:

8.15 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
@@ -19,6 +19,8 @@ const productListWithFilterModel = @@ -19,6 +19,8 @@ const productListWithFilterModel =
19 19
20 productListWithFilterModel.getFilter(); 20 productListWithFilterModel.getFilter();
21 21
  22 +require('./shop/coupon');
  23 +
22 /** 24 /**
23 * 添加或者取消收藏处理 25 * 添加或者取消收藏处理
24 * @param {*} opt 26 * @param {*} opt
1 let $ = require('yoho-jquery'), 1 let $ = require('yoho-jquery'),
2 - Swiper = require('yoho-swiper'),  
3 tip = require('plugin/tip'); 2 tip = require('plugin/tip');
4 3
5 require('common'); 4 require('common');
@@ -9,7 +8,7 @@ let shopCoupon = {}; @@ -9,7 +8,7 @@ let shopCoupon = {};
9 shopCoupon = { 8 shopCoupon = {
10 common: { 9 common: {
11 appVersion: window.queryString.app_version || window.queryString.appVersion, 10 appVersion: window.queryString.app_version || window.queryString.appVersion,
12 - shopId: parseInt($('.shop-id').val() || $('.shopId').val(), 10) || null, 11 + shopId: parseInt($('.shop-id').val() || $('.shopId').val() || $('#shopId').val(), 10) || null,
13 couponTemplate: require('product/shop/coupon.hbs') 12 couponTemplate: require('product/shop/coupon.hbs')
14 }, 13 },
15 init: function() { 14 init: function() {
@@ -42,11 +41,6 @@ shopCoupon = { @@ -42,11 +41,6 @@ shopCoupon = {
42 }, 41 },
43 success: function(result) { 42 success: function(result) {
44 $('.coupon-group').html(that.common.couponTemplate(result)); 43 $('.coupon-group').html(that.common.couponTemplate(result));
45 - new Swiper('.coupon-content', {  
46 - slideElement: '.coupon-small',  
47 - slidesPerView: 'auto',  
48 - watchSlidesVisibility: true  
49 - });  
50 that.userCoupon(); 44 that.userCoupon();
51 } 45 }
52 }); 46 });
@@ -54,7 +48,7 @@ shopCoupon = { @@ -54,7 +48,7 @@ shopCoupon = {
54 userCoupon: function() { 48 userCoupon: function() {
55 let $self = this; 49 let $self = this;
56 50
57 - $('.coupon-content .receive-btn').closest('.swiper-slide').on('click', function() { 51 + $('.coupon-group .receive-btn').closest('.coupon-center').on('click', function() {
58 let that = this, 52 let that = this,
59 code = $(this).data('id') || ''; 53 code = $(this).data('id') || '';
60 54
@@ -153,7 +153,7 @@ body.passport-body { @@ -153,7 +153,7 @@ body.passport-body {
153 .invite-code { 153 .invite-code {
154 position: absolute; 154 position: absolute;
155 left: 15PX; 155 left: 15PX;
156 - line-height: 3; 156 + line-height: 2.5;
157 } 157 }
158 158
159 .phone-container { 159 .phone-container {
@@ -162,7 +162,6 @@ body.passport-body { @@ -162,7 +162,6 @@ body.passport-body {
162 162
163 .code-container { 163 .code-container {
164 padding-left: 70PX; 164 padding-left: 70PX;
165 - font-size: 32px;  
166 } 165 }
167 166
168 .input { 167 .input {
@@ -177,8 +176,7 @@ body.passport-body { @@ -177,8 +176,7 @@ body.passport-body {
177 } 176 }
178 177
179 .code { 178 .code {
180 - font-size: 28px;  
181 - padding-left: 21PX; 179 + padding-left: 35PX;
182 } 180 }
183 181
184 .btn { 182 .btn {
1 -.coupon-content { 1 +.shop-coupon {
  2 + overflow: auto;
  3 + width: 100%;
2 color: #fff; 4 color: #fff;
3 - height: 180px;  
4 - overflow: hidden; 5 + white-space: nowrap;
  6 + -webkit-overflow-scrolling: touch;
5 7
6 .coupon-big { 8 .coupon-big {
7 - height: 120px;  
8 - width: 580px; 9 + height: 140px;
  10 + width: 680px;
9 background: resolve("product/coupon-big.png") no-repeat; 11 background: resolve("product/coupon-big.png") no-repeat;
10 - background-size: 580px 120px;  
11 - margin: 30px; 12 + background-size: contain;
  13 + margin: 35px;
12 position: relative; 14 position: relative;
  15 + display: inline-block;
  16 + white-space: normal;
13 17
14 .coupon-left { 18 .coupon-left {
15 position: absolute; 19 position: absolute;
16 - margin: 10px 0; 20 + margin: 11px 0;
17 } 21 }
18 22
19 .coupon-left .coupon-left-price { 23 .coupon-left .coupon-left-price {
20 - margin: 0 25px; 24 + margin: 0 58px;
21 float: left; 25 float: left;
22 } 26 }
23 27
24 .coupon-left .coupon-left-price .coupon-sign { 28 .coupon-left .coupon-left-price .coupon-sign {
25 font-size: 50px; 29 font-size: 50px;
  30 + float: left;
  31 + margin-top: 25px;
  32 + width: 35px;
26 } 33 }
27 34
28 .coupon-left .coupon-left-price .coupon-price { 35 .coupon-left .coupon-left-price .coupon-price {
29 font-size: 72px; 36 font-size: 72px;
  37 + float: left;
30 } 38 }
31 39
32 .coupon-left .coupon-left-name { 40 .coupon-left .coupon-left-name {
33 font-size: 22px; 41 font-size: 22px;
34 - width: 250px;  
35 - height: 100px; 42 + width: 322px;
  43 + height: 117px;
36 float: left; 44 float: left;
37 align-items: center; 45 align-items: center;
38 display: flex; 46 display: flex;
@@ -41,68 +49,77 @@ @@ -41,68 +49,77 @@
41 .coupon-right { 49 .coupon-right {
42 width: 20px; 50 width: 20px;
43 font-size: 22px; 51 font-size: 22px;
44 - right: 5%; 52 + right: 37px;
45 position: absolute; 53 position: absolute;
46 height: inherit; 54 height: inherit;
47 line-height: 1.2em; 55 line-height: 1.2em;
48 align-items: center; 56 align-items: center;
49 display: flex; 57 display: flex;
50 - transform: scale(0.88);  
51 } 58 }
52 } 59 }
53 60
54 .coupon-small { 61 .coupon-small {
55 - height: 120px;  
56 - width: 245px; 62 + height: 140px;
  63 + width: 287px;
57 background: resolve("product/coupon-small.png") no-repeat; 64 background: resolve("product/coupon-small.png") no-repeat;
58 - background-size: 245px 120px;  
59 - margin: 30px 0 30px 30px; 65 + background-size: contain;
  66 + margin: 35px 0 35px 35px;
60 position: relative; 67 position: relative;
61 - float: left;  
62 - display: table; 68 + display: inline-block;
  69 + white-space: normal;
  70 +
  71 + &:last-child {
  72 + margin-right: 35px;
  73 + }
63 74
64 .coupon-left { 75 .coupon-left {
65 position: absolute; 76 position: absolute;
66 - width: 165px; 77 + width: 158px;
67 overflow: hidden; 78 overflow: hidden;
68 - margin: 0 30px; 79 + margin: 0 35px;
69 height: inherit; 80 height: inherit;
70 } 81 }
71 82
72 .coupon-left .coupon-left-price { 83 .coupon-left .coupon-left-price {
73 width: inherit; 84 width: inherit;
74 - display: inline-block;  
75 - height: 60px; 85 + height: 64px;
  86 + overflow: hidden;
  87 + float: left;
76 } 88 }
77 89
78 .coupon-left .coupon-left-price .coupon-sign { 90 .coupon-left .coupon-left-price .coupon-sign {
79 font-size: 42px; 91 font-size: 42px;
  92 + float: left;
  93 + width: 33px;
  94 + margin-top: 15px;
80 } 95 }
81 96
82 .coupon-left .coupon-left-price .coupon-price { 97 .coupon-left .coupon-left-price .coupon-price {
83 font-size: 52px; 98 font-size: 52px;
  99 + float: left;
  100 + width: 100px;
  101 + overflow: hidden;
84 } 102 }
85 103
86 .coupon-left .coupon-left-name { 104 .coupon-left .coupon-left-name {
87 font-size: 16px; 105 font-size: 16px;
88 - width: 150px;  
89 overflow: hidden; 106 overflow: hidden;
90 word-break: break-all; 107 word-break: break-all;
91 display: -webkit-box; 108 display: -webkit-box;
92 -webkit-box-orient: vertical; 109 -webkit-box-orient: vertical;
93 -webkit-line-clamp: 2; 110 -webkit-line-clamp: 2;
  111 + float: left;
94 } 112 }
95 113
96 .coupon-right { 114 .coupon-right {
97 - width: 20px; 115 + width: 23px;
98 font-size: 18px; 116 font-size: 18px;
99 - right: 7.5%; 117 + right: 22px;
100 position: absolute; 118 position: absolute;
101 height: inherit; 119 height: inherit;
102 line-height: 1.2em; 120 line-height: 1.2em;
103 align-items: center; 121 align-items: center;
104 display: flex; 122 display: flex;
105 - transform: scale(0.88);  
106 } 123 }
107 } 124 }
108 } 125 }
  1 +.shop-coupon {
  2 + overflow: auto;
  3 + width: 100%;
  4 + color: #fff;
  5 + white-space: nowrap;
  6 + -webkit-overflow-scrolling: touch;
  7 +
  8 + .coupon-big {
  9 + height: 120px;
  10 + width: 580px;
  11 + background: resolve("product/coupon-big.png") no-repeat;
  12 + background-size: contain;
  13 + margin: 30px;
  14 + position: relative;
  15 + display: inline-block;
  16 + white-space: normal;
  17 +
  18 + .coupon-left {
  19 + position: absolute;
  20 + margin: 10px 0;
  21 + }
  22 +
  23 + .coupon-left .coupon-left-price {
  24 + margin: 0 25px;
  25 + float: left;
  26 + }
  27 +
  28 + .coupon-left .coupon-left-price .coupon-sign {
  29 + font-size: 50px;
  30 + float: left;
  31 + margin-top: 20px;
  32 + width: 30px;
  33 + }
  34 +
  35 + .coupon-left .coupon-left-price .coupon-price {
  36 + font-size: 72px;
  37 + float: left;
  38 + }
  39 +
  40 + .coupon-left .coupon-left-name {
  41 + font-size: 22px;
  42 + width: 250px;
  43 + height: 100px;
  44 + float: left;
  45 + align-items: center;
  46 + display: flex;
  47 + }
  48 +
  49 + .coupon-right {
  50 + width: 20px;
  51 + font-size: 22px;
  52 + right: 5%;
  53 + position: absolute;
  54 + height: inherit;
  55 + line-height: 1.2em;
  56 + align-items: center;
  57 + display: flex;
  58 + }
  59 + }
  60 +
  61 + .coupon-small {
  62 + height: 120px;
  63 + width: 245px;
  64 + background: resolve("product/coupon-small.png") no-repeat;
  65 + background-size: contain;
  66 + margin: 30px 0 30px 30px;
  67 + position: relative;
  68 + display: inline-block;
  69 + white-space: normal;
  70 +
  71 + &:last-child {
  72 + margin-right: 30px;
  73 + }
  74 +
  75 + .coupon-left {
  76 + position: absolute;
  77 + width: 165px;
  78 + overflow: hidden;
  79 + margin: 0 30px;
  80 + height: inherit;
  81 + }
  82 +
  83 + .coupon-left .coupon-left-price {
  84 + width: inherit;
  85 + height: 60px;
  86 + overflow: hidden;
  87 + float: left;
  88 + }
  89 +
  90 + .coupon-left .coupon-left-price .coupon-sign {
  91 + font-size: 42px;
  92 + float: left;
  93 + width: 30px;
  94 + margin-top: 10px;
  95 + }
  96 +
  97 + .coupon-left .coupon-left-price .coupon-price {
  98 + font-size: 52px;
  99 + float: left;
  100 + overflow: hidden;
  101 + }
  102 +
  103 + .coupon-left .coupon-left-name {
  104 + font-size: 16px;
  105 + overflow: hidden;
  106 + word-break: break-all;
  107 + display: -webkit-box;
  108 + -webkit-box-orient: vertical;
  109 + -webkit-line-clamp: 2;
  110 + float: left;
  111 + }
  112 +
  113 + .coupon-right {
  114 + width: 20px;
  115 + font-size: 18px;
  116 + right: 7.5%;
  117 + position: absolute;
  118 + height: inherit;
  119 + line-height: 1.2em;
  120 + align-items: center;
  121 + display: flex;
  122 + }
  123 + }
  124 +}
@@ -17,5 +17,5 @@ @@ -17,5 +17,5 @@
17 @import "../shop/shop-index"; 17 @import "../shop/shop-index";
18 @import "../shop/shop-prodfile"; 18 @import "../shop/shop-prodfile";
19 @import "../shop/product-category"; 19 @import "../shop/product-category";
20 -@import "../shop/shop-index-coupon"; 20 +@import "../shop/shop_coupon_640";
21 @import "home/hot-category"; 21 @import "home/hot-category";