Authored by yyq

merge

... ... @@ -388,8 +388,12 @@ class YoLuckService extends global.yoho.BaseModel {
async getResourceCode(params) {
const result = await this.api._getResourceCode(params);
const url = _.get(result, '[0].data.list[0]', {});
return _.get(result, '[0].data.list[0]', '');
url.width = _.get(result, '[0].data.imageWidth', 0);
url.height = _.get(result, '[0].data.imageHeight', 0);
return url;
}
async getDetailBanner() {
... ... @@ -398,6 +402,11 @@ class YoLuckService extends global.yoho.BaseModel {
contentCode: 'ccc32dbedf164a52b4efa34383878860'
});
if (!result.width) {
result.width = 750;
result.height = 140;
}
return result;
} catch (e) {
return {
... ... @@ -412,6 +421,11 @@ class YoLuckService extends global.yoho.BaseModel {
contentCode: '5a2203f5656fbc9788bd8af70f2823d3'
});
if (!result.width) {
result.width = 750;
result.height = 234;
}
return result;
} catch (e) {
return {
... ... @@ -424,8 +438,8 @@ class YoLuckService extends global.yoho.BaseModel {
try {
let userInfo = await this.api._getUsreInfo(uid);
let userName = userInfo.data.nickname || '';
let userThumb = userInfo.data.head_ico || '';
let userName = _.get(userInfo, 'data.nickname', '');
let userThumb = _.get(userInfo, 'data.head_ico', '');
const result = await this.api.fetchCode({
shareUid,
... ...
... ... @@ -43,7 +43,7 @@
<div class="js-panel-footer">
{{#if ../resource.url}}
<a class="bottom-banner" href="{{../resource.url}}">
<img src="{{image2 ../resource.src w=750 h=140}}" alt="">
<img src="{{image2 ../resource.src w=../resource.width h=../resource.height}}" alt="">
</a>
{{/if}}
</div>
... ...
... ... @@ -6,7 +6,7 @@
{{#if resource.url}}
<a class="banner" href="{{resource.url}}">
<img class="banner-img" src="{{image2 resource.src w=750 h=140}}" alt="">
<img class="banner-img" src="{{image2 resource.src w=resource.width h=resource.height}}" alt="">
</a>
{{/if}}
... ...
... ... @@ -32,13 +32,17 @@ class CouponNew {
req.ctx(CouponNewModel).couponGet({ uid }),
req.ctx(CouponNewModel).getCouponNums({ uid })
]);
// console.log('api:', couponNumApi);
let pageData = _.get(couponsApi, 'data', {});
let couponNum = _.get(couponNumApi, 'data', null);
let couponNumStr = {
notuse: '0',
use: '0',
overtime: '0'
notuse: 0,
use: 0,
overtime: 0
};
let couponNum = Object.assign(couponNumStr, _.get(couponNumApi, 'data', null));
let couponList = _.get(pageData, 'couponList', []);
if (couponList && couponList.length) {
... ...
... ... @@ -29,7 +29,9 @@
<div class="stamp used-stamp"></div>
{{/if}}
{{^}}
<a href="{{useNowLink}}" class="use-now">立即使用</a>
{{#if is_online_avail}}
<a href="{{useNowLink}}" class="use-now">立即使用</a>
{{/if}}
{{#isEqualOr is_overdue_soon 'Y'}}
<span class="top-tip"></span>
{{/isEqualOr}}
... ...
... ... @@ -8,11 +8,19 @@ const headerModel = require('../../../doraemon/models/header'); // 头部model
const aboutModel = require('../../../doraemon/models/about');
const privacy = (req, res) => {
let parameter = {};
if (req.yoho.isApp) {
parameter = {
appVersion: '1'
};
}
res.render('agreement/privacy', {
res.render('agreement/privacy', Object.assign({
title: '隐私条款',
page: 'agreement',
width750: true
});
}, parameter));
};
const newpower = (req, res) => {
... ...
... ... @@ -230,7 +230,7 @@ class Reg {
sendCodeBusyBoy(req, res, next) {
let count = _.get(req.session, 'phoneReg.count');
let expire = _.get(req.session, 'phoneReg.expire');
let expire = _.get(req.session, 'phoneReg.expire') || 0;
if (count) {
return next();
... ...
<div class="agreement-page yoho-page">
<div class="download-protocol">YOHO!BUY有货app服务条款 <span class="download-protocol-btn" data-type="agreement">下载</span></div>
<h3>服务条款</h3>
<p><strong>重要须知:有货(江苏)商贸服务有限公司(下称“YOHO!BUY”)在此特别提醒您仔细阅读</strong>(未成年人应在其法定监护人的陪同下阅读)本《YOHO!BUY用户服务协议》(下称“本协议”)中的各个条款,包括但不限于免除或者限制YOHO!BUY责任的条款、对用户权利进行限制的条款以及约定争议解决方式、司法管辖的条款。您有权选择同意或者不同意本协议。<br>
<p><strong>重要须知:有货(江苏)商贸服务有限公司(下称“YOHO!BUY”)在此特别提醒您仔细阅读</strong>(未成年人应在其法定监护人的陪同下阅读)本《YOHO!BUY用户服务协议》(下称“本协议”)中的各个条款,包括但不限于免除或者限制YOHO!BUY责任的条款、对用户权利进行限制的条款以及约定争议解决方式、司法管辖的条款。您有权选择同意或者不同意本协议。<br>
</p>
<p><strong>您如果通过登录YOHO!BUY网站(http://www.yohobuy.com/)用户注册页面或者YOHO!BUY提供的其他用户注册渠道注册用户账号,即视为您完全同意本协议,愿意接受本协议所有及任何条款的约束。</strong></p><br>
<p><strong>1.名词解释</strong></p><br>
... ... @@ -137,7 +138,7 @@
<p>19.10 本协议及其补充协议签订地为江苏省南京市建邺区,均受中华人民共和国法律、法规管辖,YOHO!BUY保留最终解释权。</p><br>
<div class="select-btn">
<span><i class="iconfont pitch select">&#xe60a;</i>我已阅读并同意遵守YOHO!BUY有货app服务条款</span>
<span><i class="iconfont pitch">&#xe647;</i>我已阅读并同意遵守YOHO!BUY有货app服务条款</span>
<div class="submit-btn" href="">&nbsp;&nbsp;</div>
</div>
... ...
<div class="privacy-page yoho-page">
<div class="download-protocol">YOHO!BUY有货app隐私条款 <span class="download-protocol-btn" data-type="privacy">下载</span></div>
<br />
<p>尊敬的YOHO!BUY有货用户:</p>
<br />
... ... @@ -139,4 +140,5 @@
<br />
<p>如果您就本隐私政策有任何疑问,请与我们客服联系客服热线:400-889-9646。</p>
<br />
<input type="hidden" name="app_version" value="{{appVersion}}">
</div>
\ No newline at end of file
... ...
... ... @@ -31,8 +31,9 @@
<div data-userverify="{{captchaShow}}" data-geetest="{{useGeetest}}" id="js-img-check"{{#unless useGeetest}} class="full-img-verify"{{/unless}}></div>
<button id="regBtn" class="reg-btn" type="button">注册</button>
<div class="protocol">
<span class="iconfont checkbox icon-cb-radio"></span>
我已阅读并同意遵守<a href="/service/qaDetail?keyword=服务条款&sonId=197" title="Yoho!Buy有货服务条款" target="_blank">Yoho!Buy有货服务条款</a>
注册即表示您已阅读并同意<br>
<a href="/service/qaDetail?keyword=服务条款&sonId=340&parentId=250" title="Yoho!Buy有货服务条款" target="_blank">Yoho!Buy有货服务条款</a>
<a href="/service/qaDetail?keyword=隐私条款&sonId=352&parentId=250" title="Yoho!Buy有货隐私政策" target="_blank">Yoho!Buy有货隐私政策</a>
</div>
</form>
</div>
... ...
... ... @@ -116,6 +116,8 @@ module.exports = class extends global.yoho.BaseModel {
color: color || '',
size: size || '',
content: item.content,
reply: item.reply,
replyTitle: item.replyTitle,
time: helpers.dateFormat('YYYY-MM-DD HH:mm:ss', new Date(item.createTime * 1000))
});
});
... ...
... ... @@ -10,6 +10,11 @@
<span class="goods-size">/{{size}}</span>
</div>
<p class="detail-content">{{content}}</p>
{{# reply}}
<p class="comment-reply">
<b>{{../replyTitle}}</b>{{.}}
</p>
{{/ reply}}
<span class="comment-time">{{time}}</span>
</div>
{{/ comments}}
... ...
... ... @@ -20,9 +20,9 @@
<p class="detail-content">
{{content}}
</p>
<span class="comment-time">
{{time}}
</span>
<span class="comment-time">
{{time}}
</span>
{{/ comments}}
</div>
<a class="comment-content-footer tap-hightlight" href="{{commentsUrl}}" rel="nofollow">
... ...
... ... @@ -75,6 +75,16 @@ exports.qaDetail = (req, res, next) => {
let headerData = headerModel.setNav({
navTitle: title
});
let protocolUrl = '';
if (+req.query.sonId === 340) {
protocolUrl = 'https://cdn.yoho.cn/yohobuy/pdf/YOHO!BUY有货用户服务协议2.pdf';
}
if (+req.query.sonId === 352) {
protocolUrl = 'https://cdn.yoho.cn/yohobuy/pdf/YOHO!BUY有货隐私条款.pdf';
}
let responseData = {
pageHeader: headerData,
module: 'service',
... ... @@ -82,7 +92,8 @@ exports.qaDetail = (req, res, next) => {
title: `${title} | Yoho!Buy有货 | 潮流购物逛不停`,
width750: true,
pageFooter: true,
isApp: req.yoho.isApp
isApp: req.yoho.isApp,
protocolUrl: protocolUrl
};
co(function* () {
... ...
... ... @@ -2,7 +2,7 @@
<div class="qa-c clearfix">
<div class="q-c clearfix">
<div class="pic q"></div>
<div class="text">{{caption}}</div>
<div class="text">{{caption}} {{#if @root.protocolUrl}}<a class="download-protocol" href="{{@root.protocolUrl}}" target="_blank">下载</a>{{/if}}</div>
</div>
<div class="a-c clearfix">
<div class="pic a"></div>
... ...
... ... @@ -155,7 +155,9 @@ module.exports = {
}
},
session: {
host: '127.0.0.1',
host: '192.168.102.49',
// host: '127.0.0.1',
port: '6379',
pass: '',
prefix: 'yohobuy_session:'
... ...
{
"name": "yohobuywap-node",
"version": "6.8.59",
"version": "6.8.67",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ... @@ -134,7 +134,7 @@
"workbox-sw": "^2.1.2",
"workbox-webpack-plugin": "^3.4.1",
"yo-cli": "=2.1.9",
"yoho-activity-sdk": "1.1.1",
"yoho-activity-sdk": "1.1.2",
"yoho-cookie": "^1.2.0",
"yoho-fastclick": "^1.0.6",
"yoho-hammer": "^2.0.8",
... ...
... ... @@ -15,17 +15,17 @@
<span class="user-name {{#if userName}}pd-right{{/if}}">
{{{userName}}}
</span>
<span class="goods-spec">
购买了<b>{{color}}</b>
</span>
<span class="goods-size">/{{size}}</span>
</div>
<p class="detail-content">
{{content}}
</p>
<span class="comment-time">
{{time}}
</span>
<span class="goods-spec">
购买了<b>{{color}}</b>
</span>
<span class="goods-size">/{{size}}</span>
</div>
<p class="detail-content">
{{content}}
</p>
<span class="comment-time">
{{time}}
</span>
{{/ comments}}
</div>
<a class="comment-content-footer tap-hightlight" href="{{commentsUrl}}" rel="nofollow">
... ...
... ... @@ -19,7 +19,7 @@ let Lottery = require('./yoluck/lottery');
let versionCompare = require('./yoluck/version');
function reload() {
location = location; //eslint-disable-line
window.location && window.location.reload(); //eslint-disable-line
}
require('js/plugin/modal.alert');
... ...
... ... @@ -24,6 +24,14 @@ class ConponController extends Page {
exchangeBox: $('.exchange-box')
};
if ($('#yoho-header').hasClass('hide')) {
this.view.page.removeClass('cpage-padding284');
}
if ($('#yoho-header').hasClass('hide')) {
this.view.page.removeClass('cpage-padding284');
}
this.view.filterBtn.on('click', this.tabChange.bind(this));
this.view.showFilterBtn.on('click', this.showFilter.bind(this));
this.view.filterItem.on('click', 'button', this.filterCoupons.bind(this));
... ... @@ -209,11 +217,11 @@ class ConponController extends Page {
// 筛选框控制按钮状态、优惠券码兑换输入框状态管理
if (itemClicked.hasClass('no-used')) {
this.view.page.addClass('cpage-padding284').removeClass('cpage-padding194');
this.view.page.removeClass('no-exchange');
this.view.showFilterBtn.addClass('active');
this.view.exchangeBox.removeClass('hide');
} else {
this.view.page.addClass('cpage-padding194').removeClass('cpage-padding284');
this.view.page.addClass('no-exchange');
this.view.showFilterBtn.removeClass('icon-up').addClass('icon-down');
this.view.showFilterBtn.removeClass('active');
this.view.exchangeBox.addClass('hide');
... ...
... ... @@ -46,3 +46,30 @@ $('.submit-btn').on('click', function() {
}
}
});
$('.download-protocol-btn').on('click', function() {
let type = $(this).data('type');
let url = 'https://cdn.yoho.cn/yohobuy/pdf/YOHO!BUY用户服务协议.pdf';
if (type === 'privacy') {
url = 'https://cdn.yoho.cn/yohobuy/pdf/YOHO!BUY有货隐私条款.pdf';
}
if (appVersion === '1') {
let params = {
action: 'go.downloadProtocol',
params: {
url: url,
type: type
}
};
yoho.invokeMethod('go.downloadProtocol', params.params);
} else {
if (type === 'privacy') {
window.open(url);
} else {
window.open(url);
}
}
});
... ...
... ... @@ -44,7 +44,8 @@ class RegisterNew {
this.view.passwordInput.bind('input', this.changeBtnStatus.bind(this));
this.view.passwordEyeIcon.on('click', this.passwordShowStatus.bind(this));
this.view.getVerifyCodeBtn.on('click', this.getVerifyCode.bind(this));
this.view.protocolCheckbox.on('click', this.changePrtclckbxStatus.bind(this));
// this.view.protocolCheckbox.on('click', this.changePrtclckbxStatus.bind(this));
}
... ... @@ -134,8 +135,7 @@ class RegisterNew {
if (this.view.mobileInput.val() &&
this.view.passwordInput.val() &&
this.view.verifyCodeInput.val() &&
this.view.getVerifyCodeBtn.data('oneClick') &&
this.view.protocolCheckbox.hasClass('icon-cb-radio')) {
this.view.getVerifyCodeBtn.data('oneClick')) {
this.view.regBtn.addClass('active');
} else {
this.view.regBtn.removeClass('active');
... ...
... ... @@ -42,6 +42,5 @@
.banner-img {
width: 100%;
height: 234px;
}
}
... ...
... ... @@ -77,7 +77,6 @@
}
.bottom-banner {
height: 234px;
width: 100%;
}
... ...
... ... @@ -8,15 +8,33 @@ body {
left: 0;
}
.cpage-padding284 {
padding-top: 284px;
}
.cpage-padding194 {
.coupon-new-page {
padding-top: 194px;
}
.coupon-new-page {
&.no-exchange {
padding-top: 104px;
}
&.cpage-padding284 {
padding-top: 284px;
&.no-exchange {
padding-top: 194px;
}
.filter-box {
top: 106px;
}
.filter-item {
top: 192px;
}
.exchange-box {
top: 194px;
}
}
.filter-box {
width: 100%;
height: 88px;
... ... @@ -25,7 +43,7 @@ body {
box-shadow: 0 0 16px 0 #eee;
background-color: #fff;
position: fixed;
top: 106px;
top: 0;
left: 0;
z-index: 3;
... ... @@ -58,7 +76,7 @@ body {
align-items: center;
background-color: #fff;
position: fixed;
top: 192px;
top: 86px;
left: 0;
z-index: 3;
... ... @@ -84,7 +102,7 @@ body {
padding: 16px 20px;
background-color: #fff;
position: fixed;
top: 194px;
top: 88px;
left: 0;
z-index: 2;
... ...
... ... @@ -64,6 +64,31 @@
}
}
.download-protocol {
border-bottom: 1px solid #e0e0e0;
position: relative;
height: 102px;
line-height: 102px;
font-weight: bold;
text-align: left;
.download-protocol-btn {
font-weight: normal;
width: 126px;
height: 46px;
line-height: 44px;
text-align: center;
box-sizing: border-box;
border: 1px solid #444;
border-radius: 4px;
float: right;
font-size: 24px;
position: absolute;
right: 26px;
top: 26px;
}
}
.agreement-page {
margin: 0 30px;
font-size: 30px;
... ...
... ... @@ -163,7 +163,7 @@ $disableGray: #b0b0b0;
.protocol {
width: 100%;
text-align: center;
text-align: left;
margin-top: 20px;
font-size: 16px;
color: #444;
... ... @@ -172,6 +172,8 @@ $disableGray: #b0b0b0;
font-size: 16px;
color: #c00;
text-decoration: underline;
margin: 10px 10px 0 0;
display: inline-block;
}
}
}
... ...
... ... @@ -135,6 +135,16 @@
line-height: 62px;
}
.comment-reply {
margin-top: 15px;
padding: 28px;
background: #f0f0f0;
box-sizing: border-box;
line-height: 32px;
color: #999;
font-size: 26px;
}
.goods-spec,
.comment-time {
font-size: 24px;
... ...
... ... @@ -890,6 +890,16 @@ $basicBtnC: #eb0313;
line-height: 62px;
}
.comment-reply {
margin: 15px 28px 0 28px;
padding: 28px;
background: #f0f0f0;
box-sizing: border-box;
line-height: 32px;
color: #999;
font-size: 26px;
}
.detail-content {
color: $mainFontC;
font-size: 28px;
... ...
... ... @@ -369,6 +369,24 @@
border-bottom: solid 1px #e0e0e0;
padding: 20px 30px 20px 0;
line-height: 30px;
position: relative;
}
.download-protocol {
width: 126px;
height: 46px;
line-height: 44px;
text-align: center;
box-sizing: border-box;
border: 1px solid #444;
border-radius: 4px;
float: right;
font-size: 24px;
position: absolute;
right: 26px;
top: 12px;
font-weight: normal;
z-index: 10;
}
}
... ...