Authored by xuqi

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

... ... @@ -25,7 +25,8 @@ const _processListData = (list) => {
list = camelCase(list);
let listKey = [];
//console.log(list)
// console.log(list)
_.forEach(list.data.allList, function(value, index) {
... ... @@ -38,8 +39,6 @@ const _processListData = (list) => {
}
});
console.log(list)
listKey.sort();
listKey.push('0-9');
... ...
... ... @@ -135,9 +135,9 @@ const statusMap = {
// 订单类型为手机的订单
const isMobileOrder = {
3: true,
4: true,
6: true
18: true,
19: true,
21: true
};
// 转换时间戳
... ...
... ... @@ -156,7 +156,6 @@ const _calcStatusRate = (num, total) => {
*/
const submitChange = (data, uid) => {
return returnsAPI.changeSubmitAsync(data, uid).then(result => {
console.log(result);
return result;
});
};
... ... @@ -731,7 +730,6 @@ const getExchangeDetailData = (id, uid) => {
if (result[0] && result[0].data) {
let data = result[0].data;
// console.log(data)
_.forEach(data.goods_list, function(value) {
_.forEach(value.evidence_images, function(list, index) {
value.evidence_images[index] = list.substring(0, list.indexOf('?'));
... ...
... ... @@ -11,7 +11,7 @@
</div>
<div class="brand-info" data-id="{{brandId}}">
<div class="brand-icon">
<img src="{{image brandIco 145 126}}" alt="">
<img src="{{image brandIco 145 126}}" alt="" width="145" height="126">
</div>
<div class="brand-name">
{{brandName}}
... ...
... ... @@ -26,7 +26,8 @@
{{/stateText}}
</div>
<div class="desc">
<span class="name">{{productName}}</span>
<div class="brand-name">{{brandName}}</div>
<div class="product-name">{{productName}}</div>
<p class="price">¥{{round salesPrice 2}}</p>
</div>
... ...
... ... @@ -5,8 +5,8 @@
</div>
<div class="inline-block total-yohocoin">
<div class="current-yohocoin">目前可用YOHO币:<span class="blue">{{num.yohocoin_num}}</span></div>
<div class="left-yohocoin">{{currentYear}}年12月31日即将过期:<span class="blue">{{num.nearExpCoinNum}}</span></div>
<div class="current-yohocoin">目前可用YOHO币:<span class="blue">{{num.yohocoin_num}}</span></div>
<div class="left-yohocoin">{{currentYear}}年12月31日即将过期:<span class="blue">{{num.nearExpCoinNum}}</span></div>
</div>
</div>
{{> currency/nav}}
... ...
... ... @@ -18,7 +18,11 @@
{{!-- 新品banner --}}
{{#if banner.src}}
<div class="banner-img"
style="height: 200px;margin-bottom:30px; background:url({{image banner.src 850 200 2}}) no-repeat top center;"></div>
style="height: 200px;margin-bottom:30px;">
<a href="{{banner.url}}" target="_blank">
<img src="{{image banner.src 850 200 1}}" alt="{{banner.alt}}" width="850" height="200">
</a>
</div>
{{/if}}
{{!-- 已选中条件 --}}
{{#filter}}
... ...
... ... @@ -88,7 +88,7 @@
</div>
<div class="brand-btns">
<span class="btn disable large confirm">确定</span>
<span class="btn large cancel">取消</span>
<span class="btn white large cancel">取消</span>
</div>
</div>
</div>
... ... @@ -180,7 +180,7 @@
</div>
<div class="style-btns">
<span class="btn disable large confirm">确定</span>
<span class="btn large cancel">取消</span>
<span class="btn white large cancel">取消</span>
</div>
</div>
{{/if}}
... ...
... ... @@ -3,7 +3,7 @@
<div class="goods" data-id="{{productId}}" data-url="{{url}}">
<div class="goods-img">
<a href="{{url}}" target="_blank">
<img class="lazy" data-original="{{image defaultImages 263 344}}" width="263" height="344" alt="">
<img class="lazy" data-original="{{image defaultImages 267 354}}" width="267" height="354" alt="">
</a>
</div>
{{#if showBrand}}
... ... @@ -22,7 +22,7 @@
</div>
<div class="goods-list hide">
{{#each goodsList}}
<i data-url="{{url}}">{{image imagesUrl 256 343}}</i>
<i data-url="{{url}}">{{image imagesUrl 267 354}}</i>
{{/each}}
</div>
</div>
... ...
... ... @@ -32,7 +32,7 @@ const online = (req, res, next) => {
_.forEach(promotion, p => {
if (p.promotion === 'YOHO币') {
coin = parseInt(parseFloat(p.promotionAmount.substring(2, p.promotionAmount.length)) * 100);
coin = parseInt(parseFloat(p.promotionAmount.substring(2, p.promotionAmount.length)) * 100, 10);
}
});
... ... @@ -111,7 +111,7 @@ const callback = (req, res) => {
_.forEach(promotion, p => {
if (p.promotion === 'YOHO币') {
coin = _.toNumber(p.promotionAmount.substring(2, p.promotionAmount.length)) * 100;
coin = parseInt(parseFloat(p.promotionAmount.substring(2, p.promotionAmount.length)) * 100, 10);
}
});
... ...
... ... @@ -3,6 +3,6 @@
<div class="tips">
<span class="tip">哎呀,您访问的页面走丢了...</span>
<span class="tips-english">404 File Not Found, Sorry</span>
<span>建议您:<a href="javascript:location.reload()">刷新该网页/ </a><a href="javascript:history.go(-1)">返回上一页/</a> <a href="">去首页看看</a></span>
<span>建议您:<a href="javascript:location.reload()">刷新该网页/ </a><a href="javascript:history.go(-1)">返回上一页/</a> <a href="http://www.yohoblk.com">去首页看看</a></span>
</div>
</div>
\ No newline at end of file
... ...
... ... @@ -3,6 +3,6 @@
<div class="tips">
<span class="tip">哎呀,程序出错了...</span>
<span class="tips-english">500-Server Internal Error</span>
<span>建议您:<a href="javascript:location.reload()">刷新该网页/ </a><a href="javascript:history.go(-1)">返回上一页/</a> <a href="">去首页看看</a></span>
<span>建议您:<a href="javascript:location.reload()">刷新该网页/ </a><a href="javascript:history.go(-1)">返回上一页/</a> <a href="http://www.yohoblk.com">去首页看看</a></span>
</div>
</div>
\ No newline at end of file
... ...
... ... @@ -144,6 +144,11 @@ function bindSizeEvent() {
var id = $this.data('size');
var $s = $this.closest('.group.size').find('.size-text');
if ($this.hasClass('disable')) {
return false;
}
$this.parent().find('.active').removeClass('active');
$this.addClass('active');
... ...
... ... @@ -272,7 +272,11 @@ $applyBtn.click(function() {
var $tip = $applyBtn.siblings('.apply-tip'),
param = packApplyInfo();
if (!param) {
if ($(this).hasClass('disable')) {
return;
}
if (!param || !param.goods) {
$tip.removeClass('hide');
return;
} else {
... ...
... ... @@ -59,6 +59,15 @@ function changeThumb($dom) {
}
}
function chooseDefaultSize() {
var $item = $sizeList.not('.hide').children();
if ($colorItem && $colorItem.length === 1 &&
$item && $item.length === 1) {
$item.trigger('click');
}
}
function getBuyProduct() {
var sku;
... ... @@ -324,3 +333,5 @@ $sizeInfo.on('click', '.show-img', function() {
btns: []
}).show();
});
chooseDefaultSize(); // 如果size只有一个则默认选中
... ...
... ... @@ -324,7 +324,7 @@ var YohoListPage = {
},
openStyleMulit: function() {
$('.style-btns', this.rootDoc).removeClass('hide');
$('.style-btns', this.rootDoc).show();
$('.style-body .input-radio', this.rootDoc).check({
type: 'checkbox'
});
... ... @@ -333,7 +333,7 @@ var YohoListPage = {
},
closeStyleMulit: function() {
$('.style-btns', this.rootDoc).addClass('hide');
$('.style-btns', this.rootDoc).hide();
$('.style-body .input-radio', this.rootDoc).check('unCheckAll');
$('.style-body .input-radio', this.rootDoc).check({
type: 'radio'
... ...
.brand-text-box {
$size: 18px;
$size: 14px;
$line-height: 1.8;
$lines-to-show: 3;
... ... @@ -13,7 +13,7 @@
h4 {
height: 18px;
line-height: 18px;
padding-right: 10px;
padding-right: 20px;
display: -webkit-box;
font-size: 16px;
font-weight: bold;
... ... @@ -26,7 +26,7 @@
display: -webkit-box;
height: calc($size*$line-height*$lines-to-show);
margin: 25px 0;
padding-right: 25px;
padding-right: 20px;
font-size: $size;
line-height: $line-height;
overflow: hidden;
... ...
... ... @@ -33,7 +33,7 @@
min-height: 50px;
padding: $space;
position: absolute;
bottom: 2px;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
color: #fff;
font-size: 14px;
... ...
... ... @@ -25,7 +25,7 @@
@extend .cursor-pointer;
padding-bottom: 3px;
border-bottom: 1px solid #000;
border-bottom: 2px solid #000;
&.top {
line-height: 30px;
... ...
... ... @@ -51,7 +51,6 @@
margin: 15px 0;
padding-right: $space;
font-size: $size;
font-weight: bold;
line-height: $line-height;
overflow: hidden;
-webkit-line-clamp: $lines-to-show;
... ...
... ... @@ -26,7 +26,7 @@
&:hover {
height: 50px;
> * {
> a {
color: #9a9a9a;
}
... ... @@ -264,6 +264,10 @@
.cur > a {
color: #1b1b1b;
}
li:hover > a {
color: #1b1b1b;
}
}
.main-logo {
... ... @@ -308,7 +312,9 @@
li:hover > a {
display: inline-block;
height: 40px;
border-bottom: 2px solid #fff;
color: #219dd6;
/* border-bottom: 2px solid #fff; */
}
}
... ...
... ... @@ -21,8 +21,6 @@
img {
width: 100%;
height: 100%;
margin-top: -1px;
margin-left: 0.1px;
}
}
... ... @@ -35,7 +33,7 @@
}
&.cur .icon-round {
color: #1d1d1d;
color: #1b1b1b;
font-weight: bold;
}
}
... ...
.favorite-products {
margin-top: 20px;
.products-cates {
font-size: 14px;
background-color: #eee;
... ... @@ -14,7 +12,6 @@
a {
color: #bbb;
}
}
.label.focus {
... ... @@ -28,7 +25,6 @@
}
.product-list {
margin: 0 -10px;
padding-bottom: 30px;
border-bottom: 1px solid #eee;
... ... @@ -86,13 +82,28 @@
padding: 0 15px;
}
.brand-name {
padding: 10px 0;
font-size: 14px;
font-weight: 700;
}
.product-name {
padding: 5px 0;
font-size: 14px;
}
.price {
padding: 13px;
font-size: 14px;
}
.thumb {
width: 216px;
height: 293px;
}
.tool-area {
text-align: center;
margin-top: 15px;
height: 26px;
... ... @@ -103,7 +114,6 @@
color: #666;
border-color: #666;
}
}
}
... ... @@ -122,5 +132,4 @@
}
}
}
}
... ...
... ... @@ -123,12 +123,13 @@
}
.good-info {
width: 377px;
height: 154px;
display: inline-block;
box-sizing: border-box;
border: 1px solid $borderColor;
border-top: none;
font-weight: normal;
width: 377px;
.iconfont {
font-weight: normal;
... ...
... ... @@ -230,6 +230,12 @@
color: #fff;
border-color: #1b1b1b;
}
&.disable {
background-color: #d1d1d1;
color: #fff;
cursor: not-allowed;
}
}
}
}
... ...
... ... @@ -31,7 +31,7 @@
.nano > .nano-pane {
background: #eee;
position: absolute;
width: 5px;
width: 3px;
right: 0;
top: 0;
bottom: 0;
... ...
.yoho-product-list {
@import "order-area";
font-size: 14px;
.btn {
... ... @@ -10,10 +11,12 @@
.left {
width: 250px;
}
.right {
width: 850px;
}
}
.input-radio {
padding: 10px 1px;
cursor: pointer;
... ... @@ -35,14 +38,16 @@
}
}
}
.input-radio span {
margin-left: 0;
font-size: 14px;
display: inline-block;
}
.input-radio label {
font-size: 14px;
font-weight: 700;
font-weight: normal;
margin-left: 10px;
cursor: pointer;
}
... ... @@ -50,9 +55,11 @@
.input-radio label.round-color {
margin-left: 0;
}
.blank-div {
height: 70px;
}
.title {
font-size: 14px;
font-weight: 700;
... ... @@ -69,6 +76,7 @@
max-height: 240px;
overflow-y: auto;
}
.style-body {
max-height: 240px;
overflow-y: auto;
... ... @@ -90,8 +98,10 @@
color: #111;
}
}
.brand-body {
margin: 5px 0;
.brand-search {
border: 0;
background-color: #eae9e9;
... ... @@ -102,10 +112,12 @@
font-weight: 700;
}
}
.brand-letter-items {
margin: 15px 0;
font-size: 12px;
font-weight: bolder;
span {
padding: 5px 0;
margin: 5px 11px 5px 0;
... ... @@ -123,26 +135,36 @@
cursor: pointer;
}
}
.brand-btns,
.style-btns {
text-align: center;
margin-top: 10px;
display: none;
height: 38px;
.btn {
margin: 0 10px;
width: auto;
padding: 0 42px;
float: left;
}
.btn.cancel {
float: right;
}
}
.btn {
display: inline-block;
}
.btn.large {
height: 38px;
line-height: 38px;
font-size: 14px;
}
.price-btns {
.price-btns {
.price-input {
background-color: #eee;
width: 72px;
... ... @@ -175,6 +197,7 @@
margin-left: 4px;
}
}
.yoho-ui-accordion {
h3 {
font-size: 14px;
... ... @@ -185,12 +208,14 @@
display: block;
cursor: pointer;
position: relative;
.ui-accordion-header-icon {
position: absolute;
right: 0.5em;
top: 50%;
margin-top: -20px;
}
.ui-accordion-header-icon:after {
font-family: "iconfont" !important;
display: inline-block;
... ... @@ -205,6 +230,7 @@
content: "\e617";
}
}
> .body {
padding: 10px 0;
border-bottom: 1px solid #eee;
... ... @@ -224,7 +250,7 @@
label.cancel {
float: right;
color: #878787;
margin: 22px 20px 0 0;
margin: 27px 20px 0 0;
cursor: pointer;
}
... ... @@ -270,12 +296,11 @@
}
.goods-area {
margin: 0 -12px;
position: relative;
.goods {
margin: 10px 0;
margin: 10px 0 26px;
padding: 10px;
float: left;
text-align: center;
... ... @@ -294,8 +319,8 @@
.goods-img {
position: relative;
overflow: hidden;
width: 265px;
height: 344px;
width: 267px;
height: 354px;
img {
margin: 0;
... ... @@ -312,8 +337,9 @@
color: #fff;
}
}
.goods-name {
padding: 10px;
padding: 4px 10px 10px;
width: 265px;
overflow: hidden;
text-overflow: ellipsis;
... ... @@ -350,7 +376,7 @@
}
.goods-img-list {
margin: 2px 13px;
margin: 2px 10px;
float: left;
.goods-img-col {
... ... @@ -363,7 +389,6 @@
margin: 8px 0;
cursor: pointer;
}
}
}
}
... ... @@ -386,7 +411,6 @@
}
.yoho-list-empty {
height: 800px;
.tip-search {
... ...
... ... @@ -38,6 +38,7 @@
.iconfont.up {
top: -2px;
}
.iconfont.down {
top: 8px;
}
... ... @@ -50,9 +51,11 @@
.order-page {
height: 24px;
line-height: 24px;
margin-top: 12px;
margin-top: 14px;
float: right;
label {
line-height: 24px;
color: #1b1b1b;
font-weight: 700;
display: inline-block;
... ... @@ -80,5 +83,13 @@
color: #878787;
border: 2px solid #878787;
}
.page.page-next {
line-height: 20px;
}
.page.page-pre {
line-height: 20px;
}
}
}
... ...
... ... @@ -2,7 +2,7 @@
{{#goodsList}}
<div class="{{#unless @first}}hide{{/unless}} size-list" data-index="{{@index}}">
{{#sizeList}}
<span data-size="{{sizeName}}" data-sku="{{productSku}}" data-id="{{goodsId}}">{{sizeName}}</span>
<span data-size="{{sizeName}}" data-sku="{{productSku}}" data-id="{{goodsId}}" {{#unless storageNumber}}class="disable"{{/unless}}>{{sizeName}}</span>
{{/sizeList}}
</div>
{{/goodsList}}
... ...