Authored by 张孝茹

好友邀请验收修改

'use strict';
const expandModel = require('../models/expand-new'),
headerModel = require('../../../doraemon/models/header');
headerModel = require('../../../doraemon/models/header'),
stringProcess = require(`${global.utils}/string-process`);
let yhchannels = {
'1,3': 1,
... ... @@ -100,7 +101,7 @@ exports.friendInvite = (req, res, next) => {
let isApp = req.yoho.isApp;
let inciteCode = req.query.inviteCode;
let contentCode = '319f92c4b072c3c40ea4cb4499b78bb4';
let token = req.query.token ? decodeURIComponent(req.query.token) : req.query.token;
let token = req.query.token ? stringProcess.decodeURIComponent(req.query.token) : '';
req.ctx(expandModel).friendInvite(inciteCode, yhChannel, limit, page, contentCode, token).then(result => {
res.render('expand-new/friend-invite', {
... ...
... ... @@ -179,6 +179,8 @@ module.exports = class extends global.yoho.BaseModel {
}).then((result) => {
if (result && result.code === 200) {
return result.data;
} else {
return Promise.resolve({});
}
});
}
... ... @@ -195,7 +197,7 @@ module.exports = class extends global.yoho.BaseModel {
_getOrderGoods(token) {
if (!token) {
return;
return Promise.resolve({});
}
return api.get('', {
method: 'app.SpaceOrders.getProductList',
... ...
<div class="friend-invite-page yoho-page">
{{# friendInviteData}}
<div class="banner">
<span class="title">您的好友{{nickname}}<br><b>{{#if payText}}发现了好物并完成下单{{else}}邀请您来有货玩潮流{{/if}}</b></span>
<span class="title">您的好友{{nickname}}<br><b>{{#if payText}}发现了好物并推荐给您{{else}}邀请您来有货玩潮流{{/if}}</b></span>
<span class="ico-left"></span>
<span class="ico-right"></span>
{{#if friendsGoods}}
... ... @@ -11,7 +11,7 @@
{{# friendsGoods}}
<li class="order-good swiper-slide">
<a href="{{goodUrl}}">
<img class="" src="{{image imgSrc 240 320}}">
<img src="{{image imgSrc 240 320}}">
</a>
<li>
{{/ friendsGoods}}
... ...
... ... @@ -38,7 +38,7 @@ $('.goods-info').click(function() {
}
});
if (bannerLen > 0) {
if (bannerLen > 0 && bannerLen < 3) {
new Swiper($avatarWrap.find('.avatar-swiper')[0], {
lazyLoading: true,
lazyLoadingInPrevNextAmount: 3,
... ... @@ -50,4 +50,17 @@ if (bannerLen > 0) {
watchSlidesVisibility: true,
spaceBetween: 6
});
} else if (bannerLen >= 3) {
new Swiper($avatarWrap.find('.avatar-swiper')[0], {
lazyLoading: true,
lazyLoadingInPrevNextAmount: 3,
initialSlide: 1,
centeredSlides: true,
slidesPerView: 'auto',
loopedSlides: bannerLen,
watchSlidesProgress: true,
watchSlidesVisibility: true,
spaceBetween: 6,
loop: true
});
}
... ...
... ... @@ -18,9 +18,10 @@
.title {
display: inline-block;
transform: rotate(-2deg);
transform: rotate(-1.6deg);
font-size: 32px;
font-weight: 700;
margin-top: 3px;
b {
font-size: 37px;
... ... @@ -103,7 +104,7 @@
background-image: resolve("activity/expand-new/recommed-title.png");
background-size: 100%;
background-repeat: no-repeat;
margin: 0 auto 30px;
margin: 50px auto 30px;
}
}
... ...