Authored by htoooth

change css

... ... @@ -292,8 +292,6 @@ const _getSkuDataByProductBaseInfo = (data) => {
return acc;
}
console.log(cur);
if (cur.images_list) {
// 商品列表
goodsGroup.productSkc = cur.product_skc;
... ... @@ -1160,7 +1158,6 @@ const _detailDataPkg = (origin, uid, vipLevel, cookies) => {
result.marketPrice = propOrigin('format_market_price');
result.salePrice = propOrigin('format_sales_price');
result.hasOtherPrice = true;
result.promotion = '8.5折';
if (result.salePrice === '0') {
delete result.salePrice;
... ... @@ -1175,6 +1172,14 @@ const _detailDataPkg = (origin, uid, vipLevel, cookies) => {
result.vipPrice = _getVipDataByProductBaseInfo(origin, vipLevel, uid);
}
// 计算折扣比例
let marketPriceNum = propOrigin('market_price', 0);
let salePriceNum = propOrigin('sales_price', 0);
if (marketPriceNum && salePriceNum) {
result.promotion = ((salePriceNum / marketPriceNum) * 10).toFixed(1);
}
// 促销活动banner,虚拟商品无促销
if (propOrigin('attribute') !== 3) {
result.activity = _getActivityDataByProductBaseInfo(promotionData);
... ...
... ... @@ -29,7 +29,7 @@
</div>
{{/if}}
<div class="share-row"><span class="title pull-left">分享商品:</span> {{> common/share }} </div>
<!--<div class="share-row"><span class="title pull-left">分享商品:</span> {{> common/share }} </div>-->
{{!-- 因接口原因,暂存size的title的值 --}}
<div id="size-title-json" style="display: none;">{{sizeTitleJson}}</div>
... ...
{{#if activity}}
<ul class="activity">
<div class="row activity-wrapper clearfix">
<span class="title pull-left">&nbsp;&nbsp;销: </span>
{{#if_cond activity.length '>=' 3}}
<div class="activity-title">展开全部促销</div>
<div class="activity-title">展开全部促销 <span class="iconfont index">&#xe610;</span> </div>
<div class="activity-container"></div>
{{/if_cond}}
{{#each activity}}
<li class="activity-item {{#if_cond @index '>=' 3}}hide{{/if_cond}}">
{{#if activityImg}}
<a class="img-link" href="{{url}}">
<img src="{{activityImg}}">
</a>
{{^}}
<span class="ac-type">{{type}}</span>
<span class="ac-des">{{des}}</span>
{{/if}}
</li>
{{/each}}
</ul>
<div class="pull-left">
<ul class="activity">
{{#each activity}}
<li class="promotion-item {{#if_cond @index '>=' 3}}hide{{/if_cond}}">
{{#if activityImg}}
<a class="img-link" href="{{url}}">
<img src="{{activityImg}}">
</a>
{{^}}
<span class="ac-type">{{type}}</span>
<span class="ac-des">{{des}}</span>
{{/if}}
</li>
{{/each}}
</ul>
</div>
</div>
{{/if}}
... ...
... ... @@ -30,6 +30,7 @@
{{/ tags}}
</div>
<img id="img-show" class="img-show" src="{{img}}">
<div class="share-row"><span class="title pull-left">分享:</span> {{> common/share }} </div>
</div>
<div id="thumbs" class="pull-right thumbs">
{{# colors}}
... ... @@ -128,15 +129,19 @@
{{/if}}
{{#if addToCart}}
<span id="add-to-cart" class="buy-btn item-buy add-to-cart"> <i class="iconfont">
&#xe61b;</i> 添加到购物车 </span>
&#xe61b;</i> 加入到购物车 </span>
{{/if}}
{{/unless}}
{{/if}}
<span id="sold-out" class="buy-btn dis{{#unless soldOut}} hide{{/unless}}">
<i class="iconfont"> &#xe61c;</i> 已售罄
</span>
<span id="enable-notify" class="buy-btn hide"> <i class="iconfont">
&#xe63d;</i> 到货通知</span>
<span id="collect-product" class="{{#if isCollect}}coled {{/if}}collect-product">
<i class="iconfont">&#xe611;</i> {{#if isCollect}} <em>已收藏</em> {{^}} <em>收藏商品</em> {{/if}}
</span>
... ...
<p class="market-price">
<span class="title">吊牌价:</span>
<span class="price{{#if hasOtherPrice}} has-other-price{{/if}}">{{marketPrice}}</span>
</p>
<div class="sale-price">
{{#if marketPrice}}
<br>
<span class="title">吊牌价:</span>
<span class="price{{#if hasOtherPrice}} has-other-price{{/if}}">{{marketPrice}}</span>
{{/if}}
{{#if salePrice}}
<br>
<span>
<span class="title">促销价:</span>
<span class="price">{{salePrice}}</span>
... ... @@ -13,6 +15,7 @@
{{/if}}
{{#if studentsPrice}}
<br>
<p class="students-price">
<span class="title">学生价</span>
<span class="price">{{studentsPrice}}</span>
... ... @@ -20,6 +23,7 @@
{{/if}}
{{#if presalePrice}}
<br>
<span class="presale-price">
<span class="title">预售价:</span>
<span class="price">{{presalePrice}}</span>
... ... @@ -29,6 +33,7 @@
{{/if}}
{{#if advancePrice}}
<br>
<span class="advance-price">
<span class="title">先行价:</span>
<span class="price">{{advancePrice}}</span>
... ... @@ -36,9 +41,7 @@
{{/if}}
{{#if promotion}}
<span class="promotion">
8.5折
</span>
<span class="promotion">{{promotion}}</span>
{{/if}}
{{# vipPrice}}
... ... @@ -50,23 +53,15 @@
{{#if normalUser}}
<span class="vip-price-item">您当前是普通会员,成为VIP享受更多优惠!</span>
<a class="vip-schedual" href="{{vipSchedualUrl}}">查看我的VIP进度</a>
{{/if}}
<div class="vip-level-1"></div>
{{# prices}}
<span class="vip-level-{{vipLevel}}">
</span>
<em class="cur">
{{price}}
</em>
<span class="vip-level"></span>
<span class="vip-level-{{vipLevel}}"> </span>
<em class="cur"> {{price}} </em>
{{/ prices}}
</span>
</span>
{{/ vipPrice}}
</div>
... ...
... ... @@ -17,11 +17,11 @@ module.exports = {
cookieDomain: '.yohobuy.com',
domains: {
favApi: 'http://192.168.102.31:8092/brower',
//api: 'http://api-test3.yohops.com:9999/',
//service: 'http://service-test3.yohops.com:9999/',
api: 'http://api-test3.yohops.com:9999/',
service: 'http://service-test3.yohops.com:9999/',
//
api: 'http://api.yoho.cn/',
service: 'http://service.yoho.cn/',
// api: 'http://api.yoho.cn/',
// service: 'http://service.yoho.cn/',
//api: 'http://dev-api.yohops.com:9999/',
// service: 'http://dev-service.yohops.com:9999/',
... ...
No preview for this file type
... ... @@ -2,7 +2,7 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>
Created by FontForge 20120731 at Thu Dec 1 17:35:41 2016
Created by FontForge 20120731 at Fri Dec 2 11:50:29 2016
By admin
</metadata>
<defs>
... ... @@ -187,6 +187,11 @@ t-16 -38.5z" />
<glyph glyph-name="iconshuchushouqifuzhi01" unicode="&#xe63b;"
d="M512 630q8 0 14 -6l308 -307q6 -6 6 -14.5t-6 -14.5t-14.5 -6t-14.5 6l-273 272v-504q0 -8 -6 -14t-14 -6t-14 6t-6 14v553q0 14 12 19q4 2 8 2zM860 732h-696q-9 0 -15 -6t-6 -14.5t6 -14.5t15 -6h696q9 0 15 6t6 14.5t-6 14.5t-15 6zM389.5 507q8.5 0 14.5 -6t6 -14.5
t-6 -14.5l-185 -184q-6 -6 -14.5 -6t-14.5 6t-6 14.5t6 14.5l185 184q6 6 14.5 6z" />
<glyph glyph-name="naozhongxuanzhong" unicode="&#xe63d;" horiz-adv-x="1026"
d="M586 1q2 -2 2 -3q8 -22 1.5 -41.5t-21.5 -31.5q-1 -1 -1 -1.5t-2 -1.5q-12 -7 -26.5 -11t-28.5 -4q-27 0 -51.5 15t-43 32t-28.5 32t-6 15h205zM437 1h205q4 0 -6 -15t-28.5 -32.5t-43 -32t-51.5 -14.5zM866 105q-17 30 -39 66t-41.5 77.5t-32.5 88.5q-1 2 -1 5v0
q-2 6 -4 14q-8 38 -8 79q-1 98 -41 157q-21 32 -41.5 49t-51.5 27q5 5 5 23q0 40 -28.5 67.5t-68.5 27.5v0h-7q-40 0 -68 -27.5t-28 -67.5l2 -23q-30 -11 -49.5 -27.5t-40.5 -48.5q-40 -58 -41 -157q0 -51 -13.5 -98t-33 -88.5t-41.5 -77.5t-38 -66q-11 -17 -4.5 -28
t20.5 -11h677q15 0 21 11t-4 28zM533 691q-1 -1 -1 -2v0h-1v-0.5t-1 -0.5v0l-0.5 -0.5l-0.5 -0.5h-1v-1h-1l-1 -1v0h-1v-1h-1v0q-1 0 -2 -1v0h-1v0l-1 -1v0q-4 -1 -8 -1v0h-2q-13 1 -22 9.5t-9 21.5t9 22t23 9h2h2v0h1v0q4 -1 7 -2l1 -1v0h1l0.5 -0.5l0.5 -0.5l0.5 -0.5
t1 -0.5h0.5l0.5 -0.5l0.5 -0.5l0.5 -0.5l0.5 -0.5l1 -1v0q1 0 1 -1q10 -9 10 -22t-9 -21z" />
<glyph glyph-name="zhengchang" unicode="&#xe612;"
d="M0 896h1024v-1024h-1024v1024zM85 -43h854v854h-854v-854z" />
<glyph glyph-name="weibiaoti7" unicode="&#xe613;"
... ...
No preview for this file type
No preview for this file type
... ... @@ -80,6 +80,8 @@ bindEvent.add(function() {
var $lcContainer = $('.lc-container'),
$itemBuy = $('.item-buy');
var $enableNofifyGoods = $('#enable-notify');
var $qrcode = $('.qr-code');
var $descColor = $('#desc-color');
... ... @@ -214,10 +216,12 @@ bindEvent.add(function() {
if (maxStock === 0 || ($color && ~~$color.data('total') === 0)) {
$itemBuy.addClass('hide'); // 隐藏加入购物车、即将开售、立即购买等相同位置的按钮
$soldOut.removeClass('hide');
$enableNofifyGoods.removeClass('hide');
} else {
// 包括默认的-1情况下
$itemBuy.removeClass('hide');
$soldOut.addClass('hide');
$enableNofifyGoods.addClass('hide');
}
}
... ...
... ... @@ -73,13 +73,13 @@
.img {
position: relative;
width: 420px;
height: 560px;
height: 600px;
}
.img-show {
display: block;
width: 100%;
height: 100%;
width: 420px;
height: 560px;
}
.tags {
... ... @@ -180,6 +180,7 @@
.market-price {
margin-top: 8px;
}
.sale-price {
... ... @@ -195,8 +196,15 @@
.promotion {
display: inline-block;
color: red;
border: 1px red solid;
font-size: 13px;
font-size: 12px;
margin-left: 20px;
margin-right: 20px;
margin-bottom: 2px;
padding-left: 3px;
padding-right: 3px;
height: 16px;
}
.has-other-price {
... ... @@ -214,14 +222,17 @@
.vip-price {
line-height: 14px;
color: #222;
color: #707070;
margin-top: 5px;
font-size: 13px;
display: inline-block;
height: 22px;
.login-url,
.cur {
color: #f02200;
font-weight: bold;
font-size: 13px;
}
.vip-price-item {
... ... @@ -234,36 +245,40 @@
margin-left: 5px;
}
//普通会员
.vip-level-0 {
.vip-level {
display: inline-block;
width: 22px;
height: 22px;
background-color: red;
width: 43px;
height: 18px;
margin-right: 10px;
margin-bottom: -2px;
background: resolve("product/vip.png") no-repeat;
}
// 银卡会员
.vip-level-1 {
display: inline-block;
width: 22px;
height: 22px;
background-color: red;
width: 30px;
height: 18px;
margin-right: 10px;
margin-bottom: -2px;
background: resolve("product/vip-1.png") no-repeat;
}
// 金卡会员
.vip-level-2 {
display: inline-block;
width: 22px;
height: 22px;
background-color: red;
width: 30px;
height: 18px;
margin-right: 10px;
margin-bottom: -2px;
background: resolve("product/vip-2.png") no-repeat;
}
// 白金会员
.vip-level-3 {
display: inline-block;
width: 22px;
height: 22px;
background-color: red;
width: 30px;
height: 18px;
margin-right: 10px;
margin-bottom: -2px;
background: resolve("product/vip-3.png") no-repeat;
}
}
... ... @@ -289,13 +304,16 @@
}
}
.activity {
margin-top: 12px;
.activity-wrapper {
margin-top: 22px;
position: relative;
width: 100%;
li {
line-height: 20px;
.activity {
li {
margin-bottom: 10px;
}
}
.activity-title {
... ... @@ -303,11 +321,21 @@
position: absolute;
right: 0;
top: 0;
background-color: red;
font-size: 12px;
cursor: pointer;
z-index: 6;
.index {
font-size: 10px;
}
}
.activity-container {
position: absolute;
width: 100%;
height: 10px;
background: #b3b3b3;
z-index: 5;
}
}
... ... @@ -379,8 +407,8 @@
.ac-type {
display: inline-block;
width: 60px;
height: 16px;
line-height: 16px;
height: 20px;
line-height: 20px;
margin-right: 5px;
text-align: center;
background: #999;
... ... @@ -396,6 +424,7 @@
margin-bottom: 22px;
}
.trade-content {
padding-top: 20px;
margin-top: 20px;
... ... @@ -419,7 +448,7 @@
li {
margin-right: 10px;
cursor: pointer;
border: 1px solid white;
border: 1px solid #bbbbbb;
height: 34px;
&.focus {
... ... @@ -453,7 +482,7 @@
margin-right: 10px;
margin-bottom: 5px;
padding: 0 5px;
border: 1px solid #eaeceb;
border: 1px solid #bbbbbb;
text-align: center;
cursor: pointer;
min-width: 28px;
... ... @@ -470,12 +499,12 @@
}
.size-wrapper {
width: 380px;
width: 510px;
}
.size {
float: left;
color: #666;
color: black;
}
.size-ruler {
... ... @@ -538,7 +567,7 @@
display: block;
width: 25px;
height: 25px;
line-height: 8px;
line-height: 25px;
font-size: 12px;
-moz-user-select: none;
color: black;
... ... @@ -639,7 +668,7 @@
text-align: center;
color: #fff;
background: $theme-color;
font-size: 14px;
font-size: 16px;
cursor: pointer;
&.hover {
... ... @@ -663,7 +692,7 @@
color: #222;
border: 1px solid #ccc;
font-weight: bold;
font-size: 12px;
font-size: 16px;
cursor: pointer;
.iconfont {
... ... @@ -771,8 +800,6 @@
}
.comfort {
width: 470px;
border: 1px solid #eaeceb;
... ...