Authored by yyq

新页面跳转

{{# refundDetail}}
<div class="refund-datail-wrap" data-id="{{id}}">
<a href="/help?id=43" class="refund-notice">退货须知</a>
<a href="/help?id=43" class="refund-notice" target="_blank">退货须知</a>
{{> returns/returns-status}}
{{# orderReview}}
... ...
{{# refund}}
<div class="refund-wrap">
<a href="/help?id=43" class="refund-notice">退货须知</a>
<a href="/help?id=43" class="refund-notice" target="_blank">退货须知</a>
{{> returns/returns-status}}
<h4 class="third-title">选择退货商品</h4>
... ...
... ... @@ -2,10 +2,10 @@
<div class="center-content">
<ul class="about-us clearfix">
<li><a href="{{siteUrl}}">BLK首页</a></li>
<li><a href="{{siteUrl}}/help">客户服务</a></li>
<li><a href="{{siteUrl}}/help?id=2">支付方式</a></li>
<li><a href="{{siteUrl}}/help?id=31">配送方式</a></li>
<li><a href="{{siteUrl}}/help?id=41">售后服务</a></li>
<li><a href="{{siteUrl}}/help" target="_blank">客户服务</a></li>
<li><a href="{{siteUrl}}/help?id=2" target="_blank">支付方式</a></li>
<li><a href="{{siteUrl}}/help?id=31" target="_blank">配送方式</a></li>
<li><a href="{{siteUrl}}/help?id=41" target="_blank">售后服务</a></li>
</ul>
<div class="record-info">
<p>
... ...
... ... @@ -5,13 +5,67 @@
*/
var $ = require('yoho-jquery');
var $bagNum = $('.bag-num'),
$bagGoodsList = $('.mini-goods-list');
var $searchWrap = $('.search-wrapper'),
$searchForm = $('#search-form'),
$searchKey = $('#search-key'),
$clearInput = $('.clear-input');
var goodsTpl = require('../../tpl/common/bag-goods.hbs');
var delayer;
function handelProduct(data) {
var goods = [],
list = ['commonPros', 'preSalePros', 'noStorage'];
var i, total = 0;
for (i = 0; i < list.length; i++) {
if (data[list[i]].length) {
goods = goods.concat(data[list[i]]);
}
}
$.each(goods, function(key) {
total += +goods[key].buy_number || 0;
});
return {
total: total,
goods: goods
};
}
function refreshBag() {
$.ajax({
type: 'GET',
url: '/shopping/cart/data',
data: {},
success: function(result) {
var data;
if (result.code === 200) {
data = handelProduct(result);
if (data.total) {
$bagNum.text(data.total);
$bagGoodsList.html(goodsTpl(data));
$bagGoodsList.parent().removeClass('bag-empty');
} else {
$bagNum.text('');
$bagGoodsList.empty();
$bagGoodsList.parent().addClass('bag-empty');
}
}
}
})
};
refreshBag();
$('.yoho-group a').hover(function() {
var data = $(this).data();
... ... @@ -89,3 +143,7 @@ $(document).click(function(e) {
$searchWrap.hide();
}
});
module.exports = {
refreshBag
};
... ...
... ... @@ -102,7 +102,7 @@
.icon-bag {
background-image: url('/layout/bag.png');
line-height: 22px;
line-height: 24px;
text-align: center;
}
... ... @@ -166,6 +166,13 @@
background: #fff;
}
.mini-goods-list {
width: 340px;
max-height: 350px;
display: block;
overflow-x: hidden;
}
.go-bag-btn {
font-size: 20px;
line-height: 1;
... ... @@ -198,6 +205,15 @@
height: 64px;
}
.name {
width: 150px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
display: block;
cursor: pointer;
}
.info {
width: 160px;
padding-left: 10px;
... ... @@ -207,6 +223,10 @@
width: 100px;
text-align: right;
}
.del-good-btn {
cursor: pointer;
}
}
}
}
... ...
{{# goods}}
<dd class="goods-item clearfix">
<div class="thumb">
<a href="/product/pro_{{product_id}}_{{goods_id}}/{{cn_alphabet}}.html" target="_blank">
<img src="{{image goods_images 48 64}}">
</a>
</div>
<div class="info">
<a href="/product/pro_{{product_id}}_{{goods_id}}/{{cn_alphabet}}.html" class="name" target="_blank">{{product_name}}</a>
<p>颜色:{{color_name}} 尺码:{{size_name}}</p>
</div>
<div class="price">
<p>¥{{round sales_price 2}} X{{buy_number}}</p>
<span class="del-good-btn">删除</span>
</div>
</dd>
{{/ goods}}
\ No newline at end of file
... ...