Authored by 陈峰

Merge branch 'release/6.8.4' into 'master'

Release/6.8.4



See merge request !414
... ... @@ -66,6 +66,15 @@ exports.detail = (req, res, next) => {
req.ctx(helpModel).detailData(params).then(result => {
let newData = result.newData;
let headerData = result.headerData;
let protocolUrl = '';
if (+req.query.id === 254) {
protocolUrl = 'https://cdn.yoho.cn/yohobuy/pdf/YOHO!BUY有货用户服务协议2.pdf';
}
if (+req.query.id === 256) {
protocolUrl = 'https://cdn.yoho.cn/yohobuy/pdf/YOHO!BUY有货隐私条款.pdf';
}
if (result.newData.data.menuData.length === 0) {
return next();
... ... @@ -80,7 +89,7 @@ exports.detail = (req, res, next) => {
res.render('detail', Object.assign({
module: 'help',
page: 'help',
isProtocol: +req.query.contId === 197,
protocolUrl: protocolUrl,
content: Object.assign({
isHelp: true,
pathNav: nav,
... ...
... ... @@ -10,7 +10,9 @@
<div class="help-cont">
{{#cont}}
<h2 class="nav-title">{{caption}} {{#if @root.isProtocol}}<a class="download-protocol" href="https://cdn.yoho.cn/yohobuy/pdf/YOHO!BUY有货用户服务协议2.pdf">下载</a>{{/if}}</h2>
<h2 class="nav-title">
{{caption}} {{#if @root.protocolUrl}}<a class="download-protocol" href="{{@root.protocolUrl}}">下载</a>{{/if}}
</h2>
<div class="cont">{{{content}}}</div>
{{/cont}}
</div>
... ...
... ... @@ -107,7 +107,9 @@ function getCommentList(uid, isComment, page, limit) {
url: helpers.image(cm.url, 100, 100),
sourceUrl: helpers.image(cm.url, 400, 400),
height: cm.height,
weight: cm.weight
weight: cm.weight,
reply: cm.reply,
replyTitle: cm.replyTitle
};
});
... ...
... ... @@ -136,6 +136,9 @@
</div>
</div>
{{/if}}
{{# reply}}
<p class="comment-reply"><b>{{../replyTitle}}</b>{{.}}</p>
{{/ reply}}
<p class="color-gray">评论时间:{{createTime}}</p>
</div>
{{/each}}
... ... @@ -171,6 +174,9 @@
<i class="view view-only">查看</i>
</div>
</div>
\{{# reply}}
<p class="comment-reply"><b>\{{../replyTitle}}</b>\{{.}}</p>
\{{/ reply}}
<p class="color-gray">评论时间:\{{createTime}}</p>
</div>
</script>
... ...
... ... @@ -49,9 +49,11 @@
</label>
{{/if}}
</div>
{{# toUse}}
<a href="{{.}}" class="use-now-btn" target="_blank">立即使用</a>
{{/ toUse}}
{{#if is_online_avail}}
{{# toUse}}
<a href="{{.}}" class="use-now-btn" target="_blank">立即使用</a>
{{/ toUse}}
{{/if}}
</div>
{{/ couponList}}
... ...
... ... @@ -36,9 +36,8 @@ const bind = {
sourceType: sourceType,
nickName: nickName,
region: req.ctx(passportHelper).getCountry(),
serviceUrl: helpers.urlFormat('/help', {
category_id: 9
}),
serviceUrl: helpers.urlFormat('/help/detail', {id: 254}),
privacyUrl: helpers.urlFormat('/help/detail', {id: 256}),
simpleHeader: simpleHeaderModel.setSimpleHeaderData(),
module: 'passport',
page: 'bind',
... ...
... ... @@ -21,10 +21,8 @@ const cert = {
res.render('cert/index', {
region: req.ctx(passportHelper).getCountry(),
refer: refer,
serviceUrl: helpers.urlFormat('/help', {
category_id: 9
}),
simpleHeader: simpleHeaderModel.setSimpleHeaderData(),
serviceUrl: helpers.urlFormat('/help/detail', {id: 254}),
privacyUrl: helpers.urlFormat('/help/detail', {id: 256}),
module: 'passport',
page: 'cert',
title: '登录完善信息'
... ...
... ... @@ -84,7 +84,8 @@ let index = (req, res, next) => {
location: area || '+86',
defaultMobile: mobile,
captchaUrl: helpers.urlFormat('/passport/imagesNode', {t: Date.now()}),
itemUrl: helpers.urlFormat('/help/detail', {id: 150, contId: 197}),
itemUrl: helpers.urlFormat('/help/detail', {id: 254}),
privacyUrl: helpers.urlFormat('/help/detail', {id: 256}),
referUrl: refer,
loginUrl: helpers.urlFormat('/signin.html', {refer: refer}),
coverHref: result.url,
... ...
... ... @@ -72,11 +72,10 @@
</form>
<div class="protoctolwrapper">
<div class="choosewrapper">
<input type="checkbox" class="choosetag" checked='checked'></div>
<span>
我已阅读并同意遵守
绑定即表示您已阅读并同意<br>
<a target="_blank" href="{{serviceUrl}}" class="protoctol">YOHO!BUY 有货服务条款</a>
<a class="protoctol" href="{{privacyUrl}}" target="_blank">YOHO!BUY 有货隐私政策</a>
</span>
</div>
<div class="btnwrapper">
... ...
... ... @@ -70,11 +70,10 @@
</form>
<div class="protoctolwrapper">
<div class="choosewrapper">
<input type="checkbox" class="choosetag" checked='checked'></div>
<span>
我已阅读并同意遵守
绑定即表示您已阅读并同意<br>
<a target="_blank" href="{{serviceUrl}}" class="protoctol">YOHO!BUY 有货服务条款</a>
<a class="protoctol" href="{{privacyUrl}}" target="_blank">YOHO!BUY 有货隐私政策</a>
</span>
</div>
<div class="btnwrapper clearfix">
... ...
... ... @@ -44,8 +44,9 @@
<li class="items-container clearfix">
<span>
注册即表示您已阅读并同意
注册即表示您已阅读并同意<br>
<a class="link go-yoho-items" href="{{itemUrl}}" target="_blank">YOHO!BUY 有货服务条款</a>
<a class="link go-yoho-items" href="{{privacyUrl}}" target="_blank">YOHO!BUY 有货隐私政策</a>
</span>
</li>
<li class="clearfix reg-btn-area">
... ...
... ... @@ -160,7 +160,9 @@ const indexComment = (req, res, next) => {
star: _.get(item, 'satisfied', 1),
comfort: _.get(item, 'size', 'MIDDLE'),
height: _.get(item, 'height', ''),
weight: _.get(item, 'weight', '')
weight: _.get(item, 'weight', ''),
reply: _.get(item, 'reply'),
replyTitle: _.get(item, 'replyTitle')
};
})
});
... ...
{
"name": "yohobuy-node",
"version": "6.8.31",
"version": "6.8.32",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ...
... ... @@ -6,40 +6,50 @@
<span class="star-{{star}} active"></span>
</span>
</div>
<dl class="pull-right">
{{#if color}}<dd>颜色:{{color}}</dd>{{/if}}
{{#if size}}<dd>{{skuTitle}}{{size}}</dd>{{/if}}
{{#if height}}<dd>身高:{{height}} 厘米</dd>{{/if}}
{{#if weight}}<dd>体重:{{weight}} 公斤</dd>{{/if}}
<dd>尺码符合度:
{{#if_cond comfort "===" "MIDDLE"}}合适{{/if_cond}}
{{#if_cond comfort "===" "SMALL"}}偏小{{/if_cond}}
{{#if_cond comfort "===" "BIG"}}偏大{{/if_cond}}
</dd>
</dl>
<!-- <div style="clear:both"></div> -->
<div class="comment-detail">
<p class="comment">{{comment}}</p>
{{#if url}}
<div class="img-preview">
<a class="img-thumb" href="javascript:void(0);">
<img src="{{image2 url w=70 h=100 mode=1}}" />
</a>
<div class="img-detail">
<dl class="toolbar">
<dd data-role="preview-close"><i class="iconfont">&#xe6cf;</i>收起</dd>
<dd data-role="preview-left"><i class="iconfont">&#xe6d1;</i>向左旋转</dd>
<dd data-role="preview-right"><i class="iconfont">&#xe6d2;</i>向右旋转</dd>
</dl>
<div class="img-wrap">
<img src="{{image2 url w=345 h=345}}" />
<div class="comment-cont">
<dl class="pull-right">
{{#if color}}<dd>颜色:{{color}}</dd>{{/if}}
{{#if size}}<dd>{{skuTitle}}{{size}}</dd>{{/if}}
{{#if height}}<dd>身高:{{height}} 厘米</dd>{{/if}}
{{#if weight}}<dd>体重:{{weight}} 公斤</dd>{{/if}}
<dd>尺码符合度:
{{#if_cond comfort "===" "MIDDLE"}}合适{{/if_cond}}
{{#if_cond comfort "===" "SMALL"}}偏小{{/if_cond}}
{{#if_cond comfort "===" "BIG"}}偏大{{/if_cond}}
</dd>
</dl>
<!-- <div style="clear:both"></div> -->
<div class="comment-detail">
<p class="comment">{{comment}}</p>
{{#if url}}
<div class="img-preview">
<a class="img-thumb" href="javascript:void(0);">
<img src="{{image2 url w=70 h=100 mode=1}}" />
</a>
<div class="img-detail">
<dl class="toolbar">
<dd data-role="preview-close"><i class="iconfont">&#xe6cf;</i>收起</dd>
<dd data-role="preview-left"><i class="iconfont">&#xe6d1;</i>向左旋转</dd>
<dd data-role="preview-right"><i class="iconfont">&#xe6d2;</i>向右旋转</dd>
</dl>
<div class="img-wrap">
<img src="{{image2 url w=345 h=345}}" />
</div>
</div>
</div>
</div>
{{/if}}
<span class="comment-date">{{date}}</span>
{{/if}}
{{#unless reply}}
<p class="comment-date">{{date}}</p>
{{/unless}}
</div>
</div>
{{# reply}}
<p class="comment-reply"><b>{{../replyTitle}}</b>{{.}}</p>
<p class="comment-date">{{../date}}</p>
{{/ reply}}
</li>
{{/each}}
... ...
... ... @@ -10,7 +10,6 @@ var phoneRegx = require('../common/mail-phone-regx').phoneRegx;
var nopermissionoption = $('#nopermissionmessage').html(); // 倒计时dom
var sendmessagehtml = $('.validatewrapper').html(); // 发送短信dom
var second = +$('.second').text(); // 倒计时秒数
var choosedpic = 'https://cdn.yoho.cn/yohobuy/assets/img/passport/choosed.png';// 已选择图片
var $wrapper = $('.bindwrapper'),
$phoneTip = $wrapper.find('.phone-err-tip'),
... ... @@ -30,39 +29,6 @@ passwordCaptchaImg.onSuccess(function() {
require('../../simple-header');
/**
* 选择协议
* @return {[type]} [description]
*/
function chooseProtocol() {
$('.choosetag').on('change', function() {
var btnColor = '#f02200';
if ($(this).attr('checked') === 'checked') {
$('.choosewrapper').css({
'background-image': 'url("' + choosedpic + '")'
});
} else {
$('.choosewrapper').css({
'background-image': 'none'
});
btnColor = '#CCCCCC';
}
$nextBtn.css({
'background-color': btnColor
});
});
}
/**
* 判断是否同意协议
* @return {[type]} [description]
*/
function isagree() {
return $('.choosetag').attr('checked') === 'checked';
}
/**
* 选择区域的开关
* @return {[type]} [description]
... ... @@ -232,9 +198,6 @@ function nextStep() {
areaCode = $('#areanum').text();
regx = phoneRegx['+' + areaCode];
if (!isagree()) {
return;
}
if (mobile === '' || !regx || !regx.test(mobile)) {
$phoneTip.find('em').text('手机格式错误');
$phoneTip.removeClass('hide');
... ... @@ -295,7 +258,6 @@ $wrapper.on('keydown', '.phonenum', function(e) {
function init() {
fixAreaNum(); // 去掉所有区域的+
sendMessageValidate(); // 有交互的发送短信
chooseProtocol(); // 选择协议
chooseArea(); // 选择区域
chooseAreaToogle(); // 选择区域展示或关闭
cancelChooseArea(); // 取消选择区域
... ...
... ... @@ -6,7 +6,6 @@
var $ = require('yoho-jquery');
var Captcha = require('../../plugins/captcha');
var phoneRegx = require('../common/mail-phone-regx').phoneRegx;
var choosedpic = 'https://cdn.yoho.cn/yohobuy/assets/img/passport/choosed.png';// 已选择图片
var $wrapper = $('.bindwrapper'),
$phoneTip = $wrapper.find('.phone-err-tip'),
... ... @@ -47,30 +46,6 @@ function circleTime() {
window.setTimeout(changeSecond, 1000);
}
/**
* 选择协议
* @return {[type]} [description]
*/
function chooseProtocol() {
$('.choosetag').on('change', function() {
var btnColor = '#f02200';
if ($(this).prop('checked')) {
$('.choosewrapper').css({
'background-image': 'url("' + choosedpic + '")'
});
} else {
$('.choosewrapper').css({
'background-image': 'none'
});
btnColor = '#CCCCCC';
}
$nextBtn.css({
'background-color': btnColor
});
});
}
function sendMessageValidate() {
var mobile = '';
var area = '';
... ... @@ -102,14 +77,6 @@ function sendMessageValidate() {
}
/**
* 判断是否同意协议
* @return {[type]} [description]
*/
function isagree() {
return $('.choosetag').prop('checked');
}
/**
* 选择区域的开关
* @return {[type]} [description]
*/
... ... @@ -204,9 +171,6 @@ function nextStep() {
regx = phoneRegx['+' + areaCode];
smsCode = $('#smscode').val();
if (!isagree()) {
return;
}
if (mobile === '' || !regx || !regx.test(mobile)) {
$phoneTip.find('em').text('手机格式错误');
$phoneTip.removeClass('hide');
... ... @@ -261,7 +225,6 @@ $wrapper.on('keydown', '.phonenum', function(e) {
function init() {
fixAreaNum(); // 去掉所有区域的+
chooseProtocol(); // 选择协议
chooseArea(); // 选择区域
chooseAreaToogle(); // 选择区域展示或关闭
cancelChooseArea(); // 取消选择区域
... ...
... ... @@ -23,12 +23,14 @@
thead {
td {
background: #eee;
font-weight: bold;
}
}
td {
line-height: 40px;
text-align: center;
color: #171717;
}
td:first-child {
... ...
... ... @@ -336,6 +336,16 @@
margin-right: 50px;
}
}
.comment-reply {
background: #f2f2f2;
padding: 15px;
color: #999;
b {
font-weight: bold;
}
}
}
.comment-star {
... ...
... ... @@ -163,9 +163,14 @@
/* 服务条款 */
&.items-container {
text-align: right;
text-align: left;
white-space: nowrap;
font-size: 13px;
.link {
margin: 8px 10px 0 0;
display: inline-block;
}
}
/* 立即注册 */
... ...
... ... @@ -379,6 +379,7 @@
margin: 38px auto 0;
padding-left: 85px;
width: 350px;
text-align: left;
.choosewrapper {
float: left;
... ... @@ -409,6 +410,8 @@
.protoctol {
color: #f02200;
text-decoration: underline;
margin: 8px 10px 0 0;
display: inline-block;
}
&:after {
... ...
... ... @@ -1569,6 +1569,9 @@
}
.comment-detail {
float: left;
width: 700px;
.comment-date {
font-size: 14px;
color: #b0b0b0;
... ... @@ -1631,6 +1634,26 @@
}
}
.comment-reply {
width: 850px;
padding: 15px;
background: #f0f0f0;
line-height: 20px;
margin-bottom: 10px;
font-size: 14px;
color: #999;
b {
font-weight: bold;
}
}
.comment-cont {
height: auto;
overflow: hidden;
word-break: break-word;
}
dl {
line-height: 1.5;
color: #999;
... ...