Authored by 郭成尧

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

... ... @@ -18,8 +18,7 @@ let channels = {
exports.promotion = (req, res, next) => {
let uid = req.user.uid,
isApp = req.yoho.isApp,
contentCode = req.app.locals.isProduction ? 'b2b5cde8144aff3073573c3b323344ab' :
'fa046a09b7c2c0e06927162404d95111'; // 产品线上线下配的资源码不一样
contentCode = 'b2b5cde8144aff3073573c3b323344ab';
req.ctx(expandModel).promotionData(uid, isApp, contentCode).then(result => {
res.render('expand-new/my-promotion', {
... ... @@ -100,8 +99,7 @@ exports.friendInvite = (req, res, next) => {
let page = req.query.page || 1;
let isApp = req.yoho.isApp;
let inciteCode = req.query.inviteCode;
let contentCode = req.app.locals.isProduction ? '319f92c4b072c3c40ea4cb4499b78bb4' :
'bc31b5d58b5af4e3999e8b994fb2bbc1';
let contentCode = '319f92c4b072c3c40ea4cb4499b78bb4';
req.ctx(expandModel).friendInvite(inciteCode, yhChannel, limit, page, contentCode).then(result => {
res.render('expand-new/friend-invite', {
... ...
... ... @@ -219,7 +219,7 @@ const payCod = (req, res, next) => {
payModel.getPayCod(param).then(result => {
if (result.match === true) {
aboutModel.about(req.yoho.isApp).then(resu => {
req.ctx(aboutModel).about(req.yoho.isApp).then(resu => {
res.render('pay/pay-cod', Object.assign(responseData, result, {wxFooter: resu}));
});
} else {
... ... @@ -272,7 +272,7 @@ const payAli = (req, res, next) => {
payModel.getPayAli(param).then(result => {
if (result.match === true) {
aboutModel.about(req.yoho.isApp).then(resu => {
req.ctx(aboutModel).about(req.yoho.isApp).then(resu => {
res.render('pay/pay-ali', Object.assign(responseData, result, {wxFooter: resu}));
});
} else {
... ...
... ... @@ -275,7 +275,7 @@ const index = (req, res, next) => {
// 标识有微信分享
data.hasWxShare = true;
let resu = yield aboutModel.about(req.yoho.isApp);
let resu = yield req.ctx(aboutModel).about(req.yoho.isApp);
data.guang.wxFooter = resu;
res.render('info/index', Object.assign({
... ...
... ... @@ -21,7 +21,8 @@ exports.index = (req, res, next) => {
let params = {
uid: req.user.uid,
channel: req.query.channel || 1,
udid: require('yoho-md5')(req.ip)
udid: require('yoho-md5')(req.ip),
contentCode: 'b2b5cde8144aff3073573c3b323344ab'
};
let studentSwitch = !_.get(req.app.locals.wap, 'user.removeStudentIdentification', true);
... ...
... ... @@ -5,8 +5,7 @@ const tideCommandModel = require('../models/tide-command');
exports.tideCommand = (req, res, next) => {
let uid = req.user.uid,
contentCode = req.app.locals.isProduction ? '29958987ef0c0f830fad03d7e54f6061' :
'29958987ef0c0f830fad03d7e5';
contentCode = '29958987ef0c0f830fad03d7e54f6061';
req.ctx(tideCommandModel).invitionData(uid, contentCode).then(result => {
res.render('tide-command', {
... ...
... ... @@ -123,9 +123,9 @@ const _getCode = (uid) => {
});
};
const _getTrendPop = () => {
const _getTrendPop = (contentCode) => {
return service.get('operations/api/v5/resource/get', {
content_code: 'fa046a09b7c2c0e06927162404d95111',
content_code: contentCode,
}).then(result => {
if (result && result.code === 200 && result.data) {
return result.data[0];
... ... @@ -163,7 +163,7 @@ const index = (params) => {
_getAddressData(params),
_getRes(),
_getCode(params.uid),
_getTrendPop()
_getTrendPop(params.contentCode)
]).then(result => {
if (result[0] && result[0].data) {
Object.assign(finalResult, {
... ...
... ... @@ -27,7 +27,7 @@
{{/ shopInfo}}
<!-- 优惠卷 -->
<div class="coupon-group">
<div class="shop-coupon coupon-group">
{{> reds-shop/coupon}}
</div>
... ...
... ... @@ -20,7 +20,7 @@
</div>
{{!--shop-tab-nav: 首页 | 全部商品--}}
<div class="tab">
<ul class="shop-tabs tab-navs" data-sticky>
<ul class="shop-tabs tab-navs">
<li class="shop-tab-nav tab-nav active">
<span data-target="#red-index" data-trigger="tab" data-funHome>首页</span>
</li>
... ...
... ... @@ -54,7 +54,7 @@
<div id="home-page" class="main">
<div id="nav-main" class="nav-main">
<!-- 优惠卷 -->
<div class="coupon-group"></div>
<div class="shop-coupon coupon-group"></div>
<!-- 大导航 -->
{{#if brandList}}
... ...
{{#couponData}}
<div class="coupon-content">
<div class="swiper-wrapper">
{{#if couponsOne}}
{{#each coupons}}
<div class="swiper-slide coupon-big" data-id = "{{id}}">
<div class='coupon-left'>
{{#if couponsOne}}
{{#each coupons}}
<div class="coupon-center coupon-big" data-id = "{{id}}">
<div class='coupon-left'>
<span class="coupon-left-price">
<span class="coupon-sign">¥</span>
<span class="coupon-price">{{money}}</span>
</span>
<span class="coupon-left-name">
{{name}}
</span>
</div>
<div class='coupon-right receive-btn'>
立即领取
</div>
</div><!--/coupon-big-->
{{/each}}
{{^}}
{{#each coupons}}
<div class="coupon-center coupon-small" data-id = "{{id}}">
<div class='coupon-left'>
<span class="coupon-left-price">
<span class="coupon-sign">¥</span>
<span class="coupon-price">{{money}}</span>
</span>
<span class="coupon-left-name">
{{name}}
{{name}}
</span>
</div>
<div class='coupon-right receive-btn'>
立即领取
</div>
</div><!--/coupon-big-->
{{/each}}
{{^}}
{{#each coupons}}
<div class="swiper-slide coupon-small" data-id = "{{id}}">
<div class='coupon-left'>
<span class="coupon-left-price">
<span class="coupon-sign">¥</span>
<span class="coupon-price">{{money}}</span>
</span>
<span class="coupon-left-name">
{{name}}
</span>
</div>
<div class='coupon-right receive-btn'>
立即领取
</div>
</div><!--/coupon-small-->
{{/each}}
{{/if}}
</div>
</div>
</div>
<div class='coupon-right receive-btn'>
立即领取
</div>
</div><!--/coupon-small-->
{{/each}}
{{/if}}
{{/couponData}}
\ No newline at end of file
... ...
... ... @@ -110,7 +110,7 @@
{{#ifor brandHome baseShopHome}}
{{!--优惠卷--}}
<div class="coupon-group"></div>
<div class="shop-coupon coupon-group"></div>
{{/ifor}}
{{!--筛选tab--}}
... ...
<div class="coupon-content">
<div class="swiper-wrapper">
{{#if shopCouponsOne}}
{{#each shopCoupons}}
<div class="swiper-slide coupon-big" data-id = "{{id}}">
{{#if shopCouponsOne}}
{{#each shopCoupons}}
<div class="coupon-center coupon-big" data-id = "{{id}}">
<div class='coupon-left'>
<span class="coupon-left-price">
<span class="coupon-sign">¥</span>
<span class="coupon-price">{{money}}</span>
</span>
<span class="coupon-left-name">
{{name}}
</span>
</div>
{{#if status}}
<div class='coupon-right receive-btn'>
立即领取
</div>
{{^}}
<div class='coupon-right receive-btn'>
已领取
</div>
{{/if}}
</div><!--/coupon-big-->
{{/each}}
{{^}}
{{#each shopCoupons}}
<div class="coupon-center coupon-small" data-id = "{{id}}">
<div class='coupon-left'>
<span class="coupon-left-price">
<span class="coupon-sign">¥</span>
<span class="coupon-price">{{money}}</span>
</span>
<span class="coupon-left-name">
{{name}}
</span>
<span class="coupon-left-price">
<span class="coupon-sign">¥</span>
<span class="coupon-price">{{money}}</span>
</span>
<span class="coupon-left-name">
{{name}}
</span>
</div>
{{#if status}}
<div class='coupon-right receive-btn'>
... ... @@ -21,31 +42,6 @@
已领取
</div>
{{/if}}
</div><!--/coupon-big-->
{{/each}}
{{^}}
{{#each shopCoupons}}
<div class="swiper-slide coupon-small" data-id = "{{id}}">
<div class='coupon-left'>
<span class="coupon-left-price">
<span class="coupon-sign">¥</span>
<span class="coupon-price">{{money}}</span>
</span>
<span class="coupon-left-name">
{{name}}
</span>
</div>
{{#if status}}
<div class='coupon-right receive-btn'>
立即领取
</div>
{{^}}
<div class='coupon-right receive-btn'>
已领取
</div>
{{/if}}
</div><!--/coupon-small-->
{{/each}}
{{/if}}
</div>
</div>
\ No newline at end of file
</div><!--/coupon-small-->
{{/each}}
{{/if}}
... ...
... ... @@ -6,8 +6,7 @@
</div>
<div class="main">
<div class="title"></div>
<textarea type="text" class="trend-world-area trend-code" maxlength="15"
placeholder="请设置15位以内的潮流口令">{{#if trendWord}}{{trendWord}}{{/if}}</textarea>
<textarea type="text" class="trend-world-area trend-code" maxlength="15" placeholder="请设置15位以内的潮流口令">{{#if trendWord}}{{trendWord}}{{/if}}</textarea>
<div class="explain">
<span class="explain-title">玩转潮流口令,超值福利等你拿</span>
<div class="show-explain">
... ...
{{#if coupons}}
<div class="coupon-content">
<div class="swiper-wrapper">
{{#if couponsOne}}
{{#each coupons}}
<div class="swiper-slide coupon-big" data-id = "{{id}}">
<div class='coupon-left'>
{{#if couponsOne}}
{{#each coupons}}
<div class="coupon-center coupon-big" data-id = "{{id}}">
<div class='coupon-left'>
<span class="coupon-left-price">
<span class="coupon-sign">¥</span>
<span class="coupon-price">{{money}}</span>
</span>
<span class="coupon-left-name">
{{name}}
</span>
</div>
{{#if status}}
<div class='coupon-right receive-btn'>
立即领取
</div>
{{^}}
<div class='coupon-right receive-btn'>
已领取
</div>
{{/if}}
</div><!--/coupon-big-->
{{/each}}
{{^}}
{{#each coupons}}
<div class="coupon-center coupon-small" data-id = "{{id}}">
<div class='coupon-left'>
<span class="coupon-left-price">
<span class="coupon-sign">¥</span>
<span class="coupon-price">{{money}}</span>
</span>
<span class="coupon-left-name">
{{name}}
{{name}}
</span>
</div>
{{#if status}}
<div class='coupon-right receive-btn'>
立即领取
</div>
{{#if status}}
<div class='coupon-right receive-btn'>
立即领取
</div>
{{^}}
<div class='coupon-right receive-btn'>
已领取
</div>
{{/if}}
</div><!--/coupon-big-->
{{/each}}
{{^}}
{{#each coupons}}
<div class="swiper-slide coupon-small" data-id = "{{id}}">
<div class='coupon-left'>
<span class="coupon-left-price">
<span class="coupon-sign">¥</span>
<span class="coupon-price">{{money}}</span>
</span>
<span class="coupon-left-name">
{{name}}
</span>
</div>
{{#if status}}
<div class='coupon-right receive-btn'>
立即领取
</div>
{{^}}
<div class='coupon-right receive-btn'>
已领取
</div>
{{/if}}
</div><!--/coupon-small-->
{{/each}}
{{/if}}
</div>
</div>
{{/if}}
\ No newline at end of file
{{^}}
<div class='coupon-right receive-btn'>
已领取
</div>
{{/if}}
</div><!--/coupon-small-->
{{/each}}
{{/if}}
... ...

8.36 KB | W: | H:

8.15 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
... ... @@ -19,6 +19,8 @@ const productListWithFilterModel =
productListWithFilterModel.getFilter();
require('./shop/coupon');
/**
* 添加或者取消收藏处理
* @param {*} opt
... ...
let $ = require('yoho-jquery'),
Swiper = require('yoho-swiper'),
tip = require('plugin/tip');
require('common');
... ... @@ -9,7 +8,7 @@ let shopCoupon = {};
shopCoupon = {
common: {
appVersion: window.queryString.app_version || window.queryString.appVersion,
shopId: parseInt($('.shop-id').val() || $('.shopId').val(), 10) || null,
shopId: parseInt($('.shop-id').val() || $('.shopId').val() || $('#shopId').val(), 10) || null,
couponTemplate: require('product/shop/coupon.hbs')
},
init: function() {
... ... @@ -42,11 +41,6 @@ shopCoupon = {
},
success: function(result) {
$('.coupon-group').html(that.common.couponTemplate(result));
new Swiper('.coupon-content', {
slideElement: '.coupon-small',
slidesPerView: 'auto',
watchSlidesVisibility: true
});
that.userCoupon();
}
});
... ... @@ -54,7 +48,7 @@ shopCoupon = {
userCoupon: function() {
let $self = this;
$('.coupon-content .receive-btn').closest('.swiper-slide').on('click', function() {
$('.coupon-group .receive-btn').closest('.coupon-center').on('click', function() {
let that = this,
code = $(this).data('id') || '';
... ...
... ... @@ -153,7 +153,7 @@ body.passport-body {
.invite-code {
position: absolute;
left: 15PX;
line-height: 3;
line-height: 2.5;
}
.phone-container {
... ... @@ -162,7 +162,6 @@ body.passport-body {
.code-container {
padding-left: 70PX;
font-size: 32px;
}
.input {
... ... @@ -177,8 +176,7 @@ body.passport-body {
}
.code {
font-size: 28px;
padding-left: 21PX;
padding-left: 35PX;
}
.btn {
... ...
.coupon-content {
.shop-coupon {
overflow: auto;
width: 100%;
color: #fff;
height: 180px;
overflow: hidden;
white-space: nowrap;
-webkit-overflow-scrolling: touch;
.coupon-big {
height: 120px;
width: 580px;
height: 140px;
width: 680px;
background: resolve("product/coupon-big.png") no-repeat;
background-size: 580px 120px;
margin: 30px;
background-size: contain;
margin: 35px;
position: relative;
display: inline-block;
white-space: normal;
.coupon-left {
position: absolute;
margin: 10px 0;
margin: 11px 0;
}
.coupon-left .coupon-left-price {
margin: 0 25px;
margin: 0 58px;
float: left;
}
.coupon-left .coupon-left-price .coupon-sign {
font-size: 50px;
float: left;
margin-top: 25px;
width: 35px;
}
.coupon-left .coupon-left-price .coupon-price {
font-size: 72px;
float: left;
}
.coupon-left .coupon-left-name {
font-size: 22px;
width: 250px;
height: 100px;
width: 322px;
height: 117px;
float: left;
align-items: center;
display: flex;
... ... @@ -41,68 +49,77 @@
.coupon-right {
width: 20px;
font-size: 22px;
right: 5%;
right: 37px;
position: absolute;
height: inherit;
line-height: 1.2em;
align-items: center;
display: flex;
transform: scale(0.88);
}
}
.coupon-small {
height: 120px;
width: 245px;
height: 140px;
width: 287px;
background: resolve("product/coupon-small.png") no-repeat;
background-size: 245px 120px;
margin: 30px 0 30px 30px;
background-size: contain;
margin: 35px 0 35px 35px;
position: relative;
float: left;
display: table;
display: inline-block;
white-space: normal;
&:last-child {
margin-right: 35px;
}
.coupon-left {
position: absolute;
width: 165px;
width: 158px;
overflow: hidden;
margin: 0 30px;
margin: 0 35px;
height: inherit;
}
.coupon-left .coupon-left-price {
width: inherit;
display: inline-block;
height: 60px;
height: 64px;
overflow: hidden;
float: left;
}
.coupon-left .coupon-left-price .coupon-sign {
font-size: 42px;
float: left;
width: 33px;
margin-top: 15px;
}
.coupon-left .coupon-left-price .coupon-price {
font-size: 52px;
float: left;
width: 100px;
overflow: hidden;
}
.coupon-left .coupon-left-name {
font-size: 16px;
width: 150px;
overflow: hidden;
word-break: break-all;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
float: left;
}
.coupon-right {
width: 20px;
width: 23px;
font-size: 18px;
right: 7.5%;
right: 22px;
position: absolute;
height: inherit;
line-height: 1.2em;
align-items: center;
display: flex;
transform: scale(0.88);
}
}
}
... ...
.shop-coupon {
overflow: auto;
width: 100%;
color: #fff;
white-space: nowrap;
-webkit-overflow-scrolling: touch;
.coupon-big {
height: 120px;
width: 580px;
background: resolve("product/coupon-big.png") no-repeat;
background-size: contain;
margin: 30px;
position: relative;
display: inline-block;
white-space: normal;
.coupon-left {
position: absolute;
margin: 10px 0;
}
.coupon-left .coupon-left-price {
margin: 0 25px;
float: left;
}
.coupon-left .coupon-left-price .coupon-sign {
font-size: 50px;
float: left;
margin-top: 20px;
width: 30px;
}
.coupon-left .coupon-left-price .coupon-price {
font-size: 72px;
float: left;
}
.coupon-left .coupon-left-name {
font-size: 22px;
width: 250px;
height: 100px;
float: left;
align-items: center;
display: flex;
}
.coupon-right {
width: 20px;
font-size: 22px;
right: 5%;
position: absolute;
height: inherit;
line-height: 1.2em;
align-items: center;
display: flex;
}
}
.coupon-small {
height: 120px;
width: 245px;
background: resolve("product/coupon-small.png") no-repeat;
background-size: contain;
margin: 30px 0 30px 30px;
position: relative;
display: inline-block;
white-space: normal;
&:last-child {
margin-right: 30px;
}
.coupon-left {
position: absolute;
width: 165px;
overflow: hidden;
margin: 0 30px;
height: inherit;
}
.coupon-left .coupon-left-price {
width: inherit;
height: 60px;
overflow: hidden;
float: left;
}
.coupon-left .coupon-left-price .coupon-sign {
font-size: 42px;
float: left;
width: 30px;
margin-top: 10px;
}
.coupon-left .coupon-left-price .coupon-price {
font-size: 52px;
float: left;
overflow: hidden;
}
.coupon-left .coupon-left-name {
font-size: 16px;
overflow: hidden;
word-break: break-all;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
float: left;
}
.coupon-right {
width: 20px;
font-size: 18px;
right: 7.5%;
position: absolute;
height: inherit;
line-height: 1.2em;
align-items: center;
display: flex;
}
}
}
... ...
... ... @@ -17,5 +17,5 @@
@import "../shop/shop-index";
@import "../shop/shop-prodfile";
@import "../shop/product-category";
@import "../shop/shop-index-coupon";
@import "../shop/shop_coupon_640";
@import "home/hot-category";
... ...