Authored by 姜枫

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

/**
* [个人中心]yoho
* [个人中心]有货
* @author: jiangmin
* @date: 2016/07/11
*/
... ... @@ -36,7 +36,7 @@ const getDate = (time)=> {
};
/**
* yoho币页面加载
* 有货币页面加载
*/
const index = (req, res, next) => {
let uid = req.user.uid;
... ... @@ -67,12 +67,12 @@ const index = (req, res, next) => {
page: 'currency',
isMe: true,
content: {
nav: mcHandler.getMeCrumb('我的YOHO币'),
navigation: mcHandler.getSideMenu('我的YOHO币'),
nav: mcHandler.getMeCrumb('我的有货币'),
navigation: mcHandler.getSideMenu('我的有货币'),
banner: thumb,
currency: true,
tabs: result[0].list.tabs,
title: '我的YOHO币',
title: '我的有货币',
currentYear: new Date().getFullYear(),
data: result[0].list.coinList,
paginationOpts: result[0].list.paginationOpts,
... ...
/**
* [个人中心]YOHO
* [个人中心]有货
* @author: jiangmin
* @date: 2016/07/11
*/
... ... @@ -10,7 +10,7 @@ const api = global.yoho.API;
const camelCase = global.yoho.camelCase;
/**
* yoho币列表数据
* 有货币列表数据
* @param uid
* @param page
* @param queryType
... ... @@ -87,7 +87,7 @@ const yohoCoinList = (uid, page, queryType, beginTime) => {
};
/**
* yoho币总数
* 有货币总数
* @returns {*}
*/
const yohoCoinTotal = (uid)=> {
... ... @@ -105,7 +105,7 @@ const yohoCoinTotal = (uid)=> {
};
/**
* 获取yoho币相关数据
* 获取有货币相关数据
* @param uid
* @param page
* @param queryType
... ...
... ... @@ -57,7 +57,7 @@ const navigation = [
},
{
link: url('/me/currency'),
name: '我的YOHO币'
name: '我的有货币'
},
{
link: url('/me/setting'),
... ...
... ... @@ -56,7 +56,7 @@ router.post('/address/default', auth, address.setDefaultAddress);
router.get('/address/list', address.getAddressList); // 获取地址列表
router.get('/address/areas/:areaId', address.getAddressData);
// 个人中心首页/YOHO
// 个人中心首页/有货
router.get('/currency', auth, currency.index);
// 个人中心首页/个人设置
... ...
... ... @@ -60,7 +60,7 @@
{{> message}}
{{/if}}
{{!-- 我的YOHO币 --}}
{{!-- 我的有货币 --}}
{{#if currency}}
{{> currency}}
{{/if}}
... ...
... ... @@ -5,7 +5,7 @@
</div>
<div class="inline-block total-yohocoin">
<div class="current-yohocoin">目前可用YOHO币:<span class="blue">{{num.yohocoin_num}}</span></div>
<div class="current-yohocoin">目前可用有货币:<span class="blue">{{num.yohocoin_num}}</span></div>
<div class="left-yohocoin">{{currentYear}}年12月31日即将过期:<span class="blue">{{num.nearExpCoinNum}}</span></div>
</div>
</div>
... ...
... ... @@ -23,10 +23,7 @@ const index = (req, res, next) => {
// 设置头部路径索引focus
data.bcNavFocus = 2;
// 构造诡异的配送方式数据【显示普通快递的文字,确用顺丰发货和顺丰的快递费】
data.delivery_way = _.concat(_.assign(_.find(data.delivery_way, {delivery_way_id: 2}), {
delivery_way_name: '普通快递'
}));
data.delivery_way = _.concat(_.find(data.delivery_way, {delivery_way_id: 1}));
// 发票抬头
data.invoices.invoiceTitle = [
... ...
... ... @@ -88,7 +88,7 @@ const index = uid => {
* @param number uid user id
* @param number $deliveryWay 配送方式,1表示普通快递,2表示顺丰速运
* @param int $paymentType 支付方式,1表示在线支付,2表示货到付款
* @param number $yohoCoin 使用的YOHO币数量
* @param number $yohoCoin 使用的有货币数量
* */
const _computeApi = (uid, deliveryWay, paymentType, yohoCoin) => api.get('', {
method: 'app.Shopping.compute',
... ... @@ -105,12 +105,12 @@ const _computeApi = (uid, deliveryWay, paymentType, yohoCoin) => api.get('', {
*/
const compute = (uid, yohoCoin) => {
// 目前仅支持普通快递和在线支付
let deliveryWay = 2;
let deliveryWay = 1;
let paymentType = 1;
let coin;
// YOHO币稀释
// 有货币稀释
if (yohoCoin) {
coin = yohoCoin / 100;
}
... ... @@ -166,7 +166,7 @@ const submit = (uid, other) => {
Object.assign(theOther, other, {
delivery_time: 2, // 平时和周末都送货
delivery_way: 2, // blk统一为顺丰
delivery_way: 1, // blk统一为普通垮堤
payment_id: 1, // 支付宝
payment_type: 1, // 在线支付
use_yoho_coin: other.use_yoho_coin / 100 // 有货币稀释
... ...
<div class="fregit-remark">
<span>免运费</span>
满399免运费
</div>
<div class="cart-statement">
<div class="actions">
<div class="action">
... ...
... ... @@ -10,7 +10,6 @@ const LoginService = require('../../apps/passport/models/login-service');
*/
module.exports = () => {
return (req, res, next) => {
req.user.uid = 8039837;
// 从 SESSION 中获取到当前登录用户的 UID
if (req.session && _.isNumber(req.session._LOGIN_UID)) {
... ...
... ... @@ -20,7 +20,7 @@
<a href="{{../siteUrl}}/me">{{userName}}</a>
<a href="{{../siteUrl}}/passport/logout">[退出]</a>
{{^}}
<a href="{{../siteUrl}}/passport/login">登录</a> |
<a href="{{../siteUrl}}/passport/login">登录</a> |
<a href="{{../siteUrl}}/passport/reg">注册</a>
{{/if}}
</li>
... ... @@ -46,7 +46,7 @@
</a>
<div class="mini-bag-box sub-wrapper bag-empty">
<div class="bag-goods">
<dl class="mini-goods-list"></dl>
<div class="mini-goods-list-wrap nano"><div class="nano-content"><dl class="mini-goods-list"></dl></div></div>
<div class="go-bag-btn">
<a href="{{../siteUrl}}/shopping/cart">去购物车结算</a>
</div>
... ...
... ... @@ -15,6 +15,9 @@ var $searchWrap = $('.search-wrapper'),
var goodsTpl = require('../../tpl/common/bag-goods.hbs');
require('yoho-jquery-nanoscroller');
var delayer;
function handelProduct(data) {
... ... @@ -63,6 +66,7 @@ function refreshBag() {
$bagGoodsList.empty();
$miniBag.addClass('bag-empty');
}
$('.nano').nanoScroller({disableResize: true});
}
}
... ...
... ... @@ -38,3 +38,5 @@ if (!$cate.hasClass('big-category')) {
$('.parentId-' + parentID).show();
$('.cateId-' + parentID).find('.plus').css('background-image', 'url(\'../img/help/minus.png\')');
}
$('.center-content').css('border-top-color', '#fff');
\ No newline at end of file
... ...
/**
* [个人中心]YOHO
* [个人中心]有货
* @author: jiangmin
* @date: 2016/07/11
*/
... ...
... ... @@ -19,7 +19,7 @@ var $applyBtn = $('#apply-btn');
var orderCode = $('#order-code').val() || 0,
specialReason = $refundTable.data() || {},
payInfo = { // 退款信息
type: $refundType.find('.type-item.cur').data('id') // 1--原卡返回 2--银行卡 3--支付宝 4--yoho
type: $refundType.find('.type-item.cur').data('id') // 1--原卡返回 2--银行卡 3--支付宝 4--有货
};
var imgBoxTpl = require('../../tpl/me/thumbnail.hbs');
... ...
... ... @@ -172,7 +172,7 @@
background: #fff;
}
.mini-goods-list {
.mini-goods-list-wrap {
width: 340px;
max-height: 350px;
display: block;
... ... @@ -235,6 +235,9 @@
.del-good-btn {
cursor: pointer;
color: #999;
&:hover{
color: #1b1b1b;
}
}
}
}
... ...
... ... @@ -123,23 +123,18 @@
padding: 8px 0 8px 10px;
}
.select-row {
border: solid 2px black;
height: 54px;
}
.width-name {
width: 60px;
width: 70px;
word-break: break-all;
}
.width-address {
width: 145px;
width: 165px;
word-break: break-all;
}
.width-fulladdress {
width: 240px;
width: 260px;
word-break: break-all;
}
... ...
... ... @@ -3,8 +3,10 @@
hr {
color: #f0f0f0;
margin-bottom: 20px;
}
p {
padding-bottom: 20px;
font-size: 14px;
}
}
... ...
... ... @@ -251,6 +251,10 @@
width: 304px;
padding-left: 15px;
margin: 0 auto;
.weixin-share-box {
left: 6px;
}
}
.balance-wrapper {
... ...
... ... @@ -2,9 +2,6 @@ $hoverColor: #379ed6;
.blk-cart-page {
.pros-group {
/*margin-bottom: 30px;
border-top: 1px solid #eee;*/
&:first-child {
border-top: none;
}
... ... @@ -22,9 +19,10 @@ $hoverColor: #379ed6;
font-weight: normal !important;
display: inline-block !important;
}
&:hover {
cursor: pointer;
border: 1px dashed #e92601;
border: 1px dashed #3ca1db;
}
}
}
... ... @@ -75,6 +73,7 @@ $hoverColor: #379ed6;
.checked {
display: inline-block;
}
.not-checked {
display: none;
}
... ... @@ -96,7 +95,6 @@ $hoverColor: #379ed6;
font-size: 18px;
font-weight: bold;
line-height: 50px;
overflow: hidden;
text-overflow: ellipsis !important;
white-space: nowrap !important;
... ... @@ -175,18 +173,21 @@ $hoverColor: #379ed6;
.editable {
padding: 5px 0;
width: 200px;
width: 180px;
position: relative;
.iconfont {
display: none;
}
.sizes-list {
width: 195px;
}
.colors-list {
width: 195px;
}
.size-item {
height: 20px;
border: 1px solid #e8e8e8;
... ... @@ -220,22 +221,26 @@ $hoverColor: #379ed6;
}
}
}
.mr20 {
margin-right: 20px;
}
.mr10 {
margin-right: 10px;
}
.mb10 {
margin-bottom: 10px;
}
.mb20 {
margin-bottom: 20px;
}
.mb30 {
margin-bottom: 30px;
}
}
.invalid-pros {
... ...
.blk-cart-page {
.edit-color-size {
position: absolute;
left: 180px;
left: 190px;
width: 354px;
border: 2px solid #bbb;
top: -113px;
... ...
.blk-cart-page {
.fregit-remark {
margin: 50px 0 20px;
padding-left: 30px;
font-size: 12px;
span {
display: inline-block;
width: 50px;
height: 20px;
line-height: 22px;
text-align: center;
background: #424242;
border-radius: 12px;
color: #fff;
margin-right: 10px;
}
}
.cart-statement {
margin: 50px auto;
margin-bottom: 50px;
width: 100%;
height: 194px;
padding: 30px;
border: 1px solid #eee;
.toggle-chk {
.not-checked {
color: #999;
... ... @@ -19,6 +38,7 @@
.checked {
display: inline-block;
}
.not-checked {
display: none;
}
... ...
... ... @@ -25,7 +25,9 @@ shelljs.ls(path.join(__dirname, '/js/**/*.page.js')).forEach((f) => {
'yoho-jquery-lazyload',
'yoho-slider',
'yoho-jquery-accordion',
'yoho-jquery-nanoscroller'
'yoho-jquery-nanoscroller',
'yoho-jquery-placeholder',
'yoho-jquery-dotdotdot'
];
});
... ...