Authored by uedxwg

update

... ... @@ -6,14 +6,17 @@
var $ = require('jquery');
var $userAvatar = $('.user-avatar'),
$listItem = $('.list-item');
var myImage = new Image();
var myImage = new Image(),
avatar;
require('../product/recommend-for-you.js');
require('../product/suspend-cart.js');
myImage.src = $userAvatar.attr('src');
myImage.onerror = function() {
$userAvatar.attr('src', 'http://static.dev.yohobuy.com/img/me/index/user-avatar.png');
// 部分老用户没有头像,显示默认头像
avatar = $userAvatar.data('avatar');
myImage.src = avatar;
myImage.onload = function() {
$userAvatar.css('background-image', 'url(' + avatar + ')');
};
$('.yoho-page').on('touchstart', '.list-item, .type-item', function() {
... ...
... ... @@ -5,9 +5,12 @@
*/
var $ = require('jquery');
var $userAvatar = $('.user-avatar');
var myImage = new Image();
var myImage = new Image(),
avatar;
myImage.src = $userAvatar.attr('src');
myImage.onerror = function() {
$userAvatar.attr('src', 'http://static.dev.yohobuy.com/img/me/index/user-avatar.png');
// 部分老用户没有头像,显示默认头像
avatar = $userAvatar.data('avatar');
myImage.src = avatar;
myImage.onload = function() {
$userAvatar.css('background-image', 'url(' + avatar + ')');
};
... ...
... ... @@ -47,15 +47,6 @@ function search() {
slidesPerView: 'auto'
});
//优选
// recommendSwiper = new Swiper('#swiper-recommend', {
// slidesPerView: 'auto',
// grabCursor: true,
// slideElement: 'li',
// lazyLoading: true,
// watchSlidesVisibility: true
// });
searching = false;
end = true;
loading.hideLoadingMask();
... ...
... ... @@ -12,7 +12,6 @@ var goodsSwiper;
require('./desc');
require('./comments-consults');
require('./like');
require('../recommend-for-you.js');
lazyLoad($('img.lazy'));
... ...
... ... @@ -44,6 +44,6 @@ likeHammer.on('tap', function(e) {
});
$('#likeBtn').on('click', function(e) {
return false;
});
\ No newline at end of file
// $('#likeBtn').on('click', function(e) {
// return false;
// });
\ No newline at end of file
... ...
... ... @@ -25,6 +25,8 @@
height: pxToRem(126px);
border-radius: 50%;
border: pxToRem(6px) solid #a7a8a9;
background-image: image-url("me/index/user-avatar.png");
background-size: 100%;
}
.username {
... ...
... ... @@ -17,6 +17,14 @@
}
height: 80rem / $pxConvertRem;
border-bottom: 1px solid #e0e0e0;
.user-avatar {
width: 100%;
height: 100%;
background-image: image-url("me/index/user-avatar.png");
background-size: 100%;
}
span{
&:first-of-type{
color: #444;
... ...
... ... @@ -39,6 +39,7 @@
}
.goods-consults-page {
background-color: #f0f0f0;
.goto-consult {
padding: 0 pxToRem(28px);
height: pxToRem(120px);
... ... @@ -60,6 +61,7 @@
}
.goods-consults {
.consult-item {
margin-top: pxToRem(30px);
padding: pxToRem(20px) pxToRem(28px);
background-color: #fff;
.question {
... ... @@ -99,10 +101,10 @@
}
}
}
.gap-block {
min-height: 30rem/$pxConvertRem;
background-color: #f0f0f0;
}
// .gap-block {
// min-height: 30rem/$pxConvertRem;
// background-color: #f0f0f0;
// }
}
.consult-form-page {
... ...
... ... @@ -235,35 +235,37 @@ $basicBtnC:#eb0313;
padding-right: pxToRem(28px);
min-height: pxToRem(88px);
background-color: #fff;
font-size: pxToRem(22px);
color: #999999;
border-bottom: 1px solid $borderC;
.icons-item {
float: left;
width: 33.3%;
height: pxToRem(88px);
margin: 0;
span {
vertical-align: middle;
display: inline-block;
line-height: pxToRem(88px);
}
.vip-img {
padding-right: pxToRem(22px);
.img {
.vip-img {
width: pxToRem(53px);
height: pxToRem(32px);
}
&:nth-child(3n-3) .img {
background: image-url('product/silver.png') no-repeat;
}
&:nth-child(3n-2) .img {
background: image-url('product/golden.png') no-repeat;
}
&:nth-child(3n-1) .img {
background: image-url('product/platinum.png') no-repeat;
}
}
&:nth-child(3) .vip-img{
background: image-url('product/silver.png') no-repeat;
}
&:nth-child(2) .vip-img{
background: image-url('product/golden.png') no-repeat;
}
&:nth-child(1) .vip-img{
background: image-url('product/platinum.png') no-repeat;
}
&:first-child {
float: left;
text-align: left;
}
&:last-child {
float: right;
text-align: right;
}
}
}
... ...
... ... @@ -45,20 +45,17 @@
line-height: 1;
span {
display: block;
display: inline-block;
// chrome 最小支持12px, 设计图是 10px ,用CSS3变换
@include transform(scale(0.875));
}
.sale-price {
color: #d9134f;
margin-left: pxToRem(-10px);
margin-right: pxToRem(8px);
}
.old-price {
position: absolute;
top: 0;
right: pxToRem(-4px);
color: #b0b0b0;
text-decoration: line-through;
}
... ...
... ... @@ -3,7 +3,7 @@
<div class="my-header">
{{#isLogin}}
<a class="user-info" href="/home/mydetails">
<img class="user-avatar" src="{{head_ico}}">
<span class="user-avatar" data-avatar="{{head_ico}}"></span>
<span class="username">{{profile_name}}</span>
{{#vip_info}}
<span class="vip-icon vip-{{next_level}}"></span>
... ...
{{> layout/header}}
<div class="goods-comments-page yoho-page">
{{#comments}}
<div class="goods-comments">
<div class="goods-comments" id="goods-comments">
{{#list}}
<div class="comment-item">
<span class="user-name">
... ... @@ -20,7 +20,10 @@
{{/list}}
</div>
{{/comments}}
{{#if loadmore}}
<input id="loadMoreUrl" type="hidden" value={{loadMoreUrl}}>
{{/if}}
</div>
{{> layout/footer}}
... ...
... ... @@ -3,12 +3,11 @@
<div class="goto-consult">
<i class="iconfont consult-logo">&#xe639;</i>
<span>我要咨询</span>
<a href="/product/detail/consultform" class="iconfont enter-consult-page">&#xe604;</a>
<a href="/consultform" class="iconfont enter-consult-page">&#xe604;</a>
</div>
{{# consults}}
<div class="goods-consults">
<div class="goods-consults" id="goods-consults">
{{#list}}
<div class="gap-block"></div>
<div class="consult-item">
<div class="question">
<span class="iconfont">&#xe639;</span>
... ... @@ -27,5 +26,9 @@
{{/list}}
</div>
{{/ consults}}
{{#if loadmore}}
<input id="loadMoreUrl" type="hidden" value={{loadMoreUrl}}>
{{/if}}
</div>
{{> layout/footer}}
... ...
... ... @@ -52,20 +52,20 @@
{{/ periodOfMarket}}
</div>
<!-- {{# vipLevel}}
{{# vipLevel}}
<ul class="vip-level clearfix">
{{# list}}
<li class="icons-item">
<span class="vip-img">
<div class="img" alt="" style="background-size:cover;"></div>
<span class="vip-img" style="background-size:cover;">
<!-- <div class="img" alt="" style="background-size:cover;"></div> -->
</span>
<span class="vip-price">{{text}}</span>
</li>
{{/ list}}
</ul>
{{/vipLevel}} -->
{{/vipLevel}}
{{# vipLevel}}
<!-- {{# vipLevel}}
<div class="vipLevel">
{{# list}}
<span class="vip-img">
... ... @@ -74,7 +74,7 @@
<span class="vip-price">{{text}}</span>
{{/ list}}
</div>
{{/ vipLevel}}
{{/ vipLevel}} -->
{{# goodsDiscount}}
<div class="goodsDiscount">
... ... @@ -132,7 +132,7 @@
<a href="javascript:;" class="sold-out">已售罄</a>
{{/if}}
<a href="#" id="likeBtn" class="favorite iconfont {{#isCollect}}liked{{/isCollect}}">&#xe605;</a>
<a href="javascript:;" id="likeBtn" class="favorite iconfont {{#isCollect}}liked{{/isCollect}}">&#xe605;</a>
</div>
{{/cartInfo}}
... ...