Authored by yyq

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

... ... @@ -143,7 +143,7 @@ const exchangeDeatail = (req, res) => {
navigation: mcHandler.getSideMenu('我的退/换货'),
banner: 'http://placehold.it/{width}x{height}',
returns: {
title: '换货详情',
title: '换货申请',
exchange: result.exchangeDetail
}
}
... ...
... ... @@ -39,12 +39,12 @@ const btnMap = {
classStr: 'btn red pay-btn mr'
},
{
name: '修改订单',
classStr: 'btn white edit-btn mr'
},
{
name: '取消订单',
classStr: 'btn white cancel-btn'
},
{
name: '修改订单',
classStr: 'btn white edit-btn mr'
}
],
cancel: [
... ... @@ -524,6 +524,8 @@ const getOrderDetail = (uid, code) => {
detail.paymentTypeStr = paymentTypeStr[detail.paymentType];
detail.address = detail.area + detail.address;
detail.expressInfo = express;
detail.expressInfo.addressList = _convertAddress(express.expressDetail, detail.createTime);
... ...
... ... @@ -564,9 +564,12 @@ const getChangeGoodsList = (orderCode, uid) => {
if (data.goodsList) {
data.goodsList.forEach(good => {
let cnAlphabet = good.cnAlphabet ? good.cnAlphabet : '';
good.showCheckbox = true;
good.hidePrice = true;
good.buyNumber = 1;
good.goodUrl = helpers.urlFormat(`/product/pro_${good.productId}_${good.goodsId}/${cnAlphabet}.html`); //eslint-disable-line
});
}
}
... ... @@ -586,7 +589,7 @@ const getChangeGoodsList = (orderCode, uid) => {
*/
const _setExchangeDetailData = (data) => {
data = camelCase(data);
console.log(data);
let list = {};
switch (data.status) {
... ... @@ -627,7 +630,7 @@ const _setExchangeDetailData = (data) => {
}
break;
case 20:
case 20:
if (data.deliveryTpyeName === '寄回换货') {
Object.assign(list, {
... ... @@ -640,19 +643,22 @@ const _setExchangeDetailData = (data) => {
if (data.deliveryTpyeName === '寄回换货') {
list.takeGoods = true;
list.auditSuccess = true;
list.view = `//www.yohobuy.com/me/order/detail?code=${data.orderCode}`;
}
break;
case 50:
Object.assign(list, {
send: true,
doubt: true,
auditSuccess: true
auditSuccess: true,
view: `//www.yohobuy.com/me/order/detail?code=${data.orderCode}`
});
break;
case 40:
Object.assign(list, {
finish: true,
auditSuccess: true
auditSuccess: true,
view: `//www.yohobuy.com/me/order/detail?code=${data.orderCode}`
});
break;
case 91:
... ... @@ -661,7 +667,7 @@ const _setExchangeDetailData = (data) => {
default:
break;
}
console.log(list);
return list;
};
... ...
... ... @@ -30,7 +30,7 @@
<div class="way">
{{#if takeGoods}}
<p class="contact">我们会尽快将您的商品发出,请耐心等待,如有疑问,请联系<a href="http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&configID=149091&jid=8732423409"><span class="iconfont">&#xe61c;</span>在线客服</p></a>
<p class="contact">我们会尽快将您的商品发出,请耐心等待,如有疑问,请联系<a href="http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&configID=149091&jid=8732423409"><span class="iconfont">&#xe61c;</span></a>在线客服</p>
{{/if}}
{{#if reminder}}
... ... @@ -50,12 +50,12 @@
{{/if}}
{{#if doubt}}
<p class="contact">如有疑问,请联系<span class="iconfont">&#xe61c;</span>在线客服</p>
<p class="contact">如有疑问,请联系<a href="http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&configID=149091&jid=8732423409"><span class="iconfont">&#xe61c;</span></a>在线客服</p>
{{/if}}
{{#if auditSuccess}}
<div class="order">
<span class="check">查看</span>
<a href="{{view}}" target="_blank"><span class="check">查看</span></a>
<span class="exchange-order">换货订单</span>
</div>
{{/if}}
... ... @@ -75,11 +75,12 @@
<div class="edit-content{{#if expressNumber}} hide{{/if}}"{{# expressList}} data-{{id}}="{{name}}"{{/ expressList}}>
<h4 class="third-title">填写物流</h4>
<p>请您在<span class="blue">天内</span>将商品寄回并填写物流,逾期将自动取消申请</p>
<p>请您在<span class="blue">7天内</span>将商品寄回并填写物流,逾期将自动取消申请</p>
<dl class="express-wrap">
<dd>
物流公司:
<select class="express-company">
<option value="0">选择快递公司</option>
{{# expressList}}
<option value="{{id}}">{{name}}</option>
{{/ expressList}}
... ... @@ -87,7 +88,7 @@
</dd>
<dd>
快递单号:
<input type="text" class="express-code" value="{{number}}">
<input type="text" class="express-code" placeholder="填写快递单号" value="{{number}}">
</dd>
<dd>
<span class="submit-express btn">提交</span>
... ... @@ -147,10 +148,10 @@
<p>×{{num}}</p>
</div>
</div>
<div class="common-column special-border">
<div class="common special-border">
<p class="reason">{{reasonName}}</p>
</div>
<div class="common-column special-border operation">
<div class="common special-border operation">
<p class="subtext">color: {{newColorName}}<br>size: {{newSizeName}}</p>
</div>
</div>
... ...
... ... @@ -15,12 +15,18 @@ const helper = global.yoho.helpers;
// 结算页面
const index = (req, res, next) => {
orderModel.index(req.user.uid).then(result => {
let data = result.data;
// 设置头部路径索引focus
result.data.bcNavFocus = 2;
data.bcNavFocus = 2;
// 构造诡异的配送方式数据【显示普通快递的文字,确用顺丰发货和顺丰的快递费】
data.delivery_way = _.concat(_.assign(_.find(data.delivery_way, {delivery_way_id: 2}), {
delivery_way_name: '普通快递'
}));
// 发票抬头
result.data.invoices.invoiceTitle = [
data.invoices.invoiceTitle = [
{
name: '个人',
value: 1,
... ... @@ -33,17 +39,17 @@ const index = (req, res, next) => {
];
// 返回购物车链接
result.data.goCartLink = helper.urlFormat('/shopping/cart');
data.goCartLink = helper.urlFormat('/shopping/cart');
// 拆单是否显示左右切换
_.forEach(result.data.shopping_cart_data.package_list, i => {
_.forEach(data.shopping_cart_data.package_list, i => {
if (i.goods_list.length > 4) {
i.showToggle = true;
}
});
// 是否打印价格radio
result.data.printPriceRadio = [
data.printPriceRadio = [
{
value: '1',
name: '是'
... ... @@ -56,7 +62,7 @@ const index = (req, res, next) => {
];
res.display('order', {
content: result.data,
content: data,
defaultHeader: false
});
}).catch(next);
... ...
... ... @@ -26,7 +26,7 @@ const Alipay = {
_input_charset: 'utf-8',
notify_url: config.pay.serviceNotify + 'payment/alipay_notify',
return_url: 'http:' + helpers.urlFormat('/shopping/pay/callback/alipay'),
subject: '有货订单号:' + order.orderId,
subject: '有货订单号:' + order.orderCode,
out_trade_no: order.orderCode,
it_b_pay: common.getPayExpireMin(order.payExpire) + 'm',
total_fee: order.paymentAmount,
... ...
... ... @@ -32,9 +32,11 @@
<div class="dispatch-type order-block">
<p class="title">配送方式</p>
<ul class="content">
<li class="chose-row clearfix focus">
<span class="chose-block">普通快递:运费¥10.00</span>
</li>
{{#each delivery_way}}
<li class="chose-row clearfix{{#if @first}} focus{{/if}}" data-id="{{delivery_way_id}}">
<span class="chose-block">{{delivery_way_name}}:运费¥{{round delivery_way_cost 2}}</span>
</li>
{{/each}}
</ul>
</div>
<div class="order-info order-block">
... ... @@ -173,7 +175,9 @@
{{# shopping_cart_data}}
<div class="balance-info left">
<p>
收货信息:<em id="receiver"></em>
{{#with ../delivery_address}}
收货信息:<em id="receiver">{{consignee}} {{mobile}} {{area}} {{address}}</em>
{{/with}}
<span class="right">{{selected_goods_count}}件商品</span>
</p>
<p>
... ...
... ... @@ -18,10 +18,10 @@
<div class="tip-info">
<p class="title">温馨提示:</p>
<p>
1.每天15:00以前成功支付的订单将在当天发货,12:00-00:00成功付款的订单将在第二天发货。
1.每天15:00以前成功支付的订单将在当天发货,15:00-00:00成功付款的订单将在第二天发货。
2.当订单发货后,您可以登录<a class="blue" href="/me/order">订单中心</a>查询快递发货详情。
3.YOHO!BUY有货支持“开箱验货”和“15天退换货保障”收货后请当面验货,如果发现商品有任何问题请致电客服电话400-889-9646,
<a class="blue" href="">“退换货政策”</a>请点击查看。<em class="blue">4.尊敬的用户:近期为网络诈骗高发期,YOHO!BUY有货郑重声明,不会以任何形式索取客户的账户信息或引导转账,敬请提高警惕,谨防诈骗</em>
3.YOHO!BLK有货支持“开箱验货”和“15天退换货保障”收货后请当面验货,如果发现商品有任何问题请致电客服电话400-889-9646,
<a class="blue" href="">“退换货政策”</a>请点击查看。<em class="blue">4.尊敬的用户:近期为网络诈骗高发期,YOHO!BLK有货郑重声明,不会以任何形式索取客户的账户信息或引导转账,敬请提高警惕,谨防诈骗</em>
</p>
</div>
{{/ content}}
... ...
... ... @@ -14,15 +14,16 @@ module.exports = {
appVersion: '4.6.0', // 调用api接口版本
port: 6003,
siteUrl: '//www.yohobuy.com',
signExtend: {
app_type: 1
},
subDomains: {
default: '//www.yohobuy.com'
},
cookieDomain: 'yohobuy.com',
domains: {
api: 'http://testapi.yoho.cn:28078/', // devapi.yoho.cn:58078 testapi.yoho.cn:28078 devapi.yoho.cn:58078
service: 'http://devservice.yoho.cn:58077/', // testservice.yoho.cn:28077 devservice.yoho.cn:58077
// api: 'http://api.yoho.cn/',
// service: 'http://service.yoho.cn/',
service: 'http://testservice.yoho.cn:28077/', // testservice.yoho.cn:28077 devservice.yoho.cn:58077
search: 'http://192.168.102.216:8080/yohosearch/'
},
useOneapm: false,
... ... @@ -48,8 +49,9 @@ module.exports = {
handleExceptions: true
},
udp: { // send by udp
measurement: 'yohoblk_pc_log',
level: 'debug', // logger level
host: 'influxdblog.yohoops.org', // influxdb host
host: '54.222.219.223', // influxdb host
port: '4444' // influxdb port
},
console: {
... ...
... ... @@ -3,7 +3,7 @@
const _ = require('lodash');
const cookie = global.yoho.cookie;
const cache = global.yoho.cache;
const loginService = require('../../apps/passport/models/login-service');
const LoginService = require('../../apps/passport/models/login-service');
/**
* 已登录用户的信息,包括记住我功能。
... ... @@ -41,13 +41,13 @@ module.exports = () => {
let password = data.password;
let area = data.area;
return loginService.signin(area, account, password);
return LoginService.signin(area, account, password);
}).then(result => {
if (result.code !== 200) {
return Promise.reject(new Error(result.message));
}
return loginService.syncUserSession(result.data.uid, req, res);
return LoginService.syncUserSession(result.data.uid, req, res);
}).then(()=> {
return res.redirect(req.getUrl());
}).catch(next);
... ...
... ... @@ -25,7 +25,7 @@ require('yoho-jquery-placeholder');
$('[placeholder]').placeholder();
$(function () {
$(function() {
var address = cascadingAddress({el: '#address'});
/**
... ... @@ -33,7 +33,7 @@ $(function () {
*/
var Bll = {
// 获取输入框输入的值
getInfo: function () {
getInfo: function() {
return {
id: $addressId.val(),
... ... @@ -45,7 +45,7 @@ $(function () {
},
// 清空输入框
clearInput: function () {
clearInput: function() {
$consignee.val('');
$address.val('');
$mobile.val('');
... ... @@ -54,7 +54,7 @@ $(function () {
},
// 校验
check: function (info) {
check: function(info) {
var flag = true;
info.consignee === '' ? $consignee.next().show() : $consignee.next().hide();
... ... @@ -72,7 +72,7 @@ $(function () {
},
// 拼接一条数据的html
getHtml: function (info) {
getHtml: function(info) {
var html = '<tr class="table-body">';
html += '<input type="hidden" id="tr_' + info.address_id + '" value="' + info.address_id + '">' +
... ... @@ -90,7 +90,7 @@ $(function () {
},
// 获取一条数据
setInfo: function (id, td) {
setInfo: function(id, td) {
$addressId.val(id);
$consignee.val(td.eq(0).text());
$address.val(td.eq(2).text());
... ... @@ -99,7 +99,7 @@ $(function () {
},
// 设置表格头部
setTableTile: function () {
setTableTile: function() {
$('.table-title').text('已保存了' + currentLength +
'条地址,还能保存' + leftLength + '条地址');
}
... ... @@ -107,7 +107,7 @@ $(function () {
// 保存收货地址
$(document).on('click', '#save-address', function () {
$(document).on('click', '#save-address', function() {
var info,
area,
areaInfo;
... ... @@ -131,7 +131,7 @@ $(function () {
url: '/me/address/add',
dataType: 'json',
data: info,
success: function (data) {
success: function(data) {
var html;
if (data.code === 200) {
... ... @@ -154,7 +154,7 @@ $(function () {
url: '/me/address/update',
dataType: 'json',
data: info,
success: function (data) {
success: function(data) {
if (data.code === 200) {
info.mobile = info.mobile.substring(0, 3) + '****' + info.mobile.substring(7, 11);
info.address_id = info.id;
... ... @@ -171,7 +171,7 @@ $(function () {
});
// 修改收货地址
$(document).on('click', '.update-address', function () {
$(document).on('click', '.update-address', function() {
var id = $(this).data('id');
var tr = $(this).parents('.table-body');
var td = tr.find('td');
... ... @@ -185,13 +185,13 @@ $(function () {
});
// 删除收货地址
$(document).on('click', '.del-address', function () {
$(document).on('click', '.del-address', function() {
var id = $(this).data('id');
var tr = $(this).parents('.table-body');
var a = new _confirm({
content: '您确定要删除收货地址吗?',
cb: function () {
cb: function() {
$.ajax({
type: 'POST',
url: '/me/address/del',
... ... @@ -199,7 +199,7 @@ $(function () {
data: {
id: id
},
success: function () {
success: function() {
currentLength--;
leftLength++;
tr.remove();
... ... @@ -214,7 +214,7 @@ $(function () {
});
// 设置默认收货地址
$(document).on('click', '.set-default', function () {
$(document).on('click', '.set-default', function() {
var tr = $(this).parents('.table-body');
var tbody = tr.parent();
var id = $(this).data('id');
... ... @@ -227,7 +227,7 @@ $(function () {
data: {
id: id
},
success: function () {
success: function() {
$('.current-default').removeClass('current-default').text('设为默认');
$(self).addClass('current-default').text('默认地址');
tbody.find('.table-body').eq(0).before('<tr class=\'table-body\'>' + tr.html() + '</tr>');
... ...
... ... @@ -451,9 +451,6 @@ $.ajax({
}
dotYou($('.address'));
// 填收货人信息
receiver(data.data[0]);
}
}
});
... ...
... ... @@ -160,13 +160,13 @@
}
.info {
width: 507px;
width: 380px;
text-align: left;
}
.st,
.op {
width: 200px;
width: 260px;
}
}
}
... ... @@ -175,14 +175,16 @@
display: table;
font-size: 14px;
border: 1px solid #f1f1f1;
width: 100%;
}
.goods-info {
width: 516px;
width: 400px;
display: inline-block;
box-sizing: border-box;
border-top: none;
font-weight: normal;
margin: 0;
img {
width: 70px;
... ... @@ -193,7 +195,7 @@
}
.info {
width: 400px;
width: 290px;
padding: 30px 8px 0 0;
float: right;
box-sizing: border-box;
... ... @@ -207,8 +209,8 @@
}
}
.common-column {
width: 208px;
.common {
width: 270px;
display: table-cell;
text-align: center;
vertical-align: top;
... ...
... ... @@ -23,6 +23,13 @@
color: #fff;
}
.good-name-text {
display: -webkit-box;
overflow: hidden;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.good-name-text:hover,
.check-detail:hover {
text-decoration: underline;
... ... @@ -128,7 +135,7 @@
.detail {
width: calc($bigWidth - $goodImgWidth - $space);
padding: $bigSpace $smallSpace 0 0;
padding: $bigSpace 5px 0 0;
float: right;
box-sizing: border-box;
line-height: 1.4;
... ...
... ... @@ -329,10 +329,7 @@ exports.processProduct = (productData, options) => {
}
result.is_soon_sold_out = (productData.is_soon_sold_out === 'Y');
result.url = helpers.urlFormat(`
/product/pro_${productData.product_id}_${productData.goods_list[0].goods_id}
/${productData.cn_alphabet}.html
`, null, 'list');
result.url = helpers.urlFormat(`/product/pro_${productData.product_id}_${productData.goods_list[0].goods_id}/${productData.cn_alphabet}.html`, null, 'list'); //eslint-disable-line
if (options.showTags) {
let tags = {};
... ...