Authored by xuqi

Merge branch 'release/1.0' of http://git.yoho.cn/fe/yoho-blk into release/1.0

... ... @@ -13,14 +13,14 @@ const helpModel = require('../models/help');
* @returns {*}
*/
/* const getData = (id)=> {
let contentData = helpModel.contentData().content;
let contentData = helpModel.contentData().content;
for (var i = 0; i < contentData.length; i++) {
if (contentData[i].id === id) {
return contentData[i]
}
}
};*/
for (var i = 0; i < contentData.length; i++) {
if (contentData[i].id === id) {
return contentData[i]
}
}
};*/
/**
* 根据id获取当前所在位置,拼接面包屑
... ... @@ -57,7 +57,7 @@ const getNav = (id)=> {
/**
* 主界面
*/
const index = (req, res) => {
const index = (req, res,next) => {
let id = req.query.id || '11';
helpModel.getHelpDetail('81', 1, 15, '').then(result=> {
... ... @@ -73,13 +73,15 @@ const index = (req, res) => {
}
];
nav = nav.concat(getNav(id));
if (!(typeof (getNav(id)) === "undefined")) {
nav = nav.concat(getNav(id));
}
res.display('detail', {
module: 'help',
page: 'help',
content: Object.assign({nav}, data)
});
});
}).catch(next);
/* let data = Object.assign(getData(id), helpModel.menuData());
let nav = [
... ... @@ -100,7 +102,6 @@ const index = (req, res) => {
};
module.exports = {
index
};
... ...
{{# refund}}
<div class="refund-wrap">
<a href="/help?id=43" class="refund-notice">退货须知</a>
{{> returns/returns-status}}
<h4 class="third-title">选择退货商品</h4>
... ...
... ... @@ -314,7 +314,7 @@ const relateMobile = (req, res, next) => {
let areaCode = req.body.areaCode || '86';
let sourceType = req.body.sourceType;
return BindService.relateMobileAsync(openId, sourceType, mobile, areaCode).then(result => {
BindService.relateMobileAsync(openId, sourceType, mobile, areaCode).then(result => {
if (result && result.code) {
if (result.code === 200 && result.data && result.data.uid) {
let refer = helpers.urlFormat('/passport/thirdlogin/relatesuccess', {
... ...
... ... @@ -193,7 +193,7 @@ let msgCaptcha = (req, res, next) => {
};
/**
* 注册接口
* 手机注册
*/
let mobileRegister = (req, res, next) => {
Promise.coroutine(function*() {
... ...
... ... @@ -3,9 +3,9 @@
<ul class="about-us clearfix">
<li><a href="{{siteUrl}}">BLK首页</a></li>
<li><a href="{{siteUrl}}/help">客户服务</a></li>
<li><a href="{{siteUrl}}/#">支付方式</a></li>
<li><a href="{{siteUrl}}/#">配送方式</a></li>
<li><a href="{{siteUrl}}/#">售后服务</a></li>
<li><a href="{{siteUrl}}/help?id=2">支付方式</a></li>
<li><a href="{{siteUrl}}/help?id=31">配送方式</a></li>
<li><a href="{{siteUrl}}/help?id=41">售后服务</a></li>
</ul>
<div class="record-info">
<p>
... ...
... ... @@ -61,7 +61,7 @@
"uuid": "^2.0.2",
"winston": "^2.2.0",
"winston-daily-rotate-file": "^1.1.4",
"yoho-node-lib": "0.0.30"
"yoho-node-lib": "0.0.31"
},
"devDependencies": {
"autoprefixer": "^6.3.6",
... ...
... ... @@ -450,6 +450,18 @@ function bindUploadEvent() {
});
}
function bindKeyUpEvent() {
$('.mark-text').on('keyup', function() {
var $this = $(this),
str = $.trim($this.val());
if (str.length > 100) {
str = str.substring(0, 100);
}
$this.val(str);
});
}
$(document).on('ready', function() {
getProductInfo();
bindSelectEvent();
... ... @@ -459,4 +471,5 @@ $(document).on('ready', function() {
initAddr($('#city').data('code'));
bindBlurEvent();
bindUploadEvent();
bindKeyUpEvent();
});
... ...
... ... @@ -59,7 +59,7 @@ function cancelOrder(code, onCancel) {
]
}).show();
} else {
new _alert('<h1>出错了!修改失败!</h1>').show();
new _alert('<h1>' + result.message + '</h1>').show();
}
}).fail(function(err) {
... ...
... ... @@ -11,8 +11,11 @@ module.exports = function(code) {
if (result.code === 200) {
location.href = '/shopping/cart';
} else {
new _alert('出错了,请重试!').show();
new _alert(result.message).show();
}
}).fail(function(err) {
console.log(err);
new _alert('出错了!').show();
});
};
... ...
... ... @@ -223,6 +223,11 @@ $refundTable.on('change', '.refund-reason', function() {
upload.up({
callback: function(result) {
if (result && result.code === 200) {
// 避免异步上传导致数量不统一
num = $this.data('num') || 0;
if (num > 3) {
return;
}
$this.siblings('.img-up-tip').text(++num + '/4');
$this.data('num', num);
$this.before(imgFn(result));
... ...
... ... @@ -318,9 +318,9 @@ exports.init = function() {
var name = $clickItem.data('value');
var $selectedItem = $clickItem.siblings('.selected');
$selectedItem.find('.iconfont').html('').removeClass('selected');
$selectedItem.find('.iconfont').html('').end().removeClass('selected');
$clickItem.find('.iconfont').html(selectedIcon).addClass('selected');
$clickItem.find('.iconfont').html(selectedIcon).end().addClass('selected');
$regionSelectHeader.find('.name').html(name);
$regionCodeText.text(areaCode);
... ...
... ... @@ -287,9 +287,9 @@ $regionSelectList.on('click', '.option', function() {
var name = $clickItem.data('value');
var $selectedItem = $clickItem.siblings('.selected');
$selectedItem.find('.iconfont').html('').removeClass('selected');
$selectedItem.find('.iconfont').html('').end().removeClass('selected');
$clickItem.find('.iconfont').html(selectedIcon).addClass('selected');
$clickItem.find('.iconfont').html(selectedIcon).end().addClass('selected');
$regionSelectHeader.find('.name').html(name);
$regionCodeText.text(areaCode);
... ...
... ... @@ -534,9 +534,8 @@ exports.init = function() {
var name = $clickItem.data('value');
var $selectedItem = $clickItem.siblings('.selected');
$selectedItem.find('.iconfont').html('').removeClass('selected');
$clickItem.find('.iconfont').html(selectedIcon).addClass('selected');
$selectedItem.find('.iconfont').html('').end().removeClass('selected');
$clickItem.find('.iconfont').html(selectedIcon).end().addClass('selected');
$regionSelectHeader.find('.name').html(name);
$regionCodeText.text(areaCode);
... ...
.refund-wrap {
position: relative;
.refund-notice {
width: 70px;
height: 24px;
line-height: 26px;
text-align: center;
font-size: 12px;
border: 1px solid #eee;
display: block;
cursor: pointer;
position: absolute;
top: -64px;
right: 0;
}
.returns-status {
margin-bottom: 40px;
}
... ...