Authored by Aiden Xu

分期订单

<div class="installment-order-page yoho-page">
{{#order}}
<div class="order-info">
{{#if refundNum}}
<div class="refund-text">
该订单已退款¥{{refundNum}}
</div>
{{/if}}
<div class="order-detail">
{{#orderGoods}}
<div class="image-box">
... ... @@ -22,7 +27,7 @@
</div>
<div class="installment-box">
<div>分期服务</div>
<div>分期手续</div>
<div>¥{{avgFeeAmt}}</div>
</div>
... ...
... ... @@ -11,11 +11,11 @@
</div>
</div>
<div class="repayment-bottom">
<div class="repayment-bottom" style="display: none;">
<input id="repayment-total" type="checkbox" class="installment-check-btn" {{#if isAllChecked}}checked{{/if}}/>
<label for="repayment-total">
<p class="repay-price">待支付:<span>¥<span class="curr-amt">{{round currAmtCount}}</span></span></p>
<p class="serve-price" {{#if isCurrFee}}style="display:block;"{{/if}}>含服务费¥<span class="curr-fee">{{round currFeeCount}}</span></p>
</label>
<a href='' class="repayment-btn">立即还款</a>
</div>
\ No newline at end of file
</div>
... ...
... ... @@ -15,8 +15,11 @@ module.exports = {
port: 6001,
siteUrl: '//m.yohobuy.com',
domains: {
api: 'http://192.168.102.14:8080/gateway/',
service: 'http://192.168.102.14:8080/gateway/'
// api: 'http://192.168.102.14:8080/gateway/',
// service: 'http://192.168.102.14:8080/gateway/'
api: 'http://api-test3.yohops.com:9999/',
service: 'http://service-test3.yohops.com:9999/'
// api: 'http://172.16.6.179:8080/gateway/',
// service: 'http://172.16.6.179:8080/gateway/'
... ...
... ... @@ -45,7 +45,7 @@ const dist = {
const postcssPlugin = (et) => {
var sprites = {
spritesmith: {
padding: 2
padding: 4
},
filterBy(file) {
// base64 的图片没有 url 过滤掉
... ...

18.3 KB | W: | H:

18.8 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

29.3 KB | W: | H:

29.3 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

7.14 KB | W: | H:

7.14 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

47.3 KB | W: | H:

47.4 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

2.5 KB | W: | H:

2.51 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
... ... @@ -57,6 +57,24 @@ $('.status').each(function() {
});
$(CHECKBOX_SELECTOR + ':checkbox').click(function() {
// var selection = repayment.getSelection();
// var isSkipped = false;
// var curSel = $(this).data('sortId');
// var isChecked = $(this).is(':checked');
//
//
// if (isChecked && selection[0] !== curSel ||
// !isChecked && selection[selection.length] !== curSel) {
// isSkipped = true;
// }
// if (isSkipped) {
// setTimeout(function() {
// tip.show($(this).is(':checked') ? '请按时间顺序取消选择,不可以跨期' : '请按时间顺序添加还款,不可以跨期');
// }, 0);
// return false;
// }
var selection = repayment.getSelection();
var isSkipped = false;
var lastIndex = $('input:first').data('sortId');
... ...
var $ = require('yoho-jquery');
var debounce = require('lodash/debounce');
var search = {
pageIndex: 1,
type: null
... ... @@ -45,6 +47,15 @@ var loadOrderList = function(pageIndex, type) {
}
};
var scrollFn = debounce(function() {
if ($(window).scrollTop() >= $(document).height() - $(window).height() - 10) {
// alert('end of page');
loadOrderList(search.type, ++search.pageIndex);
}
}, 500);
/**
* 顶部TAB
*/
... ... @@ -59,13 +70,10 @@ $('.header-tab a').click(function() {
// 默认加载第一页
loadOrderList(search.pageIndex, 1);
// 滚屏分页
$(window).scroll(function() {
var scrollTop = $(window).scrollTop();
if (scrollTop > $('.installment-list').height() - 200) {
loadOrderList(search.type, ++search.pageIndex);
}
scrollFn();
});
... ...
... ... @@ -164,13 +164,14 @@ Repayment.prototype.update = function() {
});
$.get('/home/installment/total-amount.json?prices=' + total.join(',')).then(function(result) {
// 计算总金额
if (result.code === 200) {
self.total = result.data;
self._updateUI();
}
});
$.get('/home/installment/total-amount.json?prices=' + fee.join(',')).then(function(result) {
}).then(function() {
return $.get('/home/installment/total-amount.json?prices=' + fee.join(','));
}).then(function(result) {
// 计算手续费
if (result.code === 200) {
self.fee = result.data;
self._updateUI();
... ... @@ -185,8 +186,6 @@ Repayment.prototype.update = function() {
}
$('#repayment-total').prop('checked', totalCheck).data('checked', totalCheck);
this._updateUI();
};
// 跳转到还款详情
... ...
... ... @@ -5,6 +5,13 @@
position: fixed;
width: 100%;
top: 0;
z-index: 2;
}
.refund-text {
background: #707070;
color: white;
padding: 17px 35px;
}
.header-tab {
... ... @@ -158,7 +165,7 @@
.detail-index {
float: left;
margin-top: 20px;
margin-right: 20px;
margin-left: -20px;
}
.detail-box {
... ...
... ... @@ -120,9 +120,8 @@
position: absolute;
content: "";
display: inline-block;
width: 32px;
height: 32px;
font-size: 27px;
width: 19PX;
height: 19PX;
background: url("/home/circle-check-off.png");
background-size: cover;
margin-left: -40px;
... ...