Authored by 徐炜

Merge remote-tracking branch 'origin/hotfix/installmentPage'

# Conflicts:
#	config/common.js
#	package.json
... ... @@ -50,6 +50,7 @@ const _repaymentList = (req, res, opt, params) => {
// 开通分期首页
const index = (req, res) => {
let uid = req.query.uid;
Promise.all([
installmentModel.getStauts(uid),
installmentModel.getSearchIntallment({
... ... @@ -98,6 +99,12 @@ const index = (req, res) => {
notice: data[3]
}, data[0], data[1]);
if (installmentOnly.goods.length > 0) {
params.installmentOnly = _.assign({
showMore: true
}, installmentOnly);
}
// status: 1 正常 2 逾期 3 不可用 4 未开通
if (data[0].status === '2') {
params.replayStatus = '逾期';
... ... @@ -313,13 +320,15 @@ const getRepayRecord = (req, res) => {
// 账号管理
const account = (req, res) => {
var url = req.yoho.isApp || req.cookies.appVersion ? '/home/installment/account' : '/home/installment/bank-card';
if (req.cookies.appVersion) {
var versions = req.cookies.appVersion.split('.');
if (versions.length >= 2) {
if (versions[0] < 5 || (parseInt(versions[0], 10)===5 && versions[1] <= 1)) {
if (versions[0] < 5 || (parseInt(versions[0], 10) === 5 && versions[1] <= 1)) {
url = '/home/installment/bank-card';
} else {
url = helpers.appUrlFormat(url, 'go.instalmentMyCard')
url = helpers.appUrlFormat(url, 'go.instalmentMyCard');
}
}
}
... ...
... ... @@ -78,6 +78,12 @@
</div>
{{# installmentOnly}}
{{> installment/installment-only}}
{{#if showMore}}
<div class="see-btn-area">
<a href="{{title.more_url}}" class="see-more">查看更多可分期商品</a>
</div>
{{/if}}
{{/ installmentOnly}}
</div>
{{/if}}
... ...
<div class="installment-page installment-result-page">
<div class="installment-page installment-result-page yoho-page">
{{# review}}
<i class="review-icon"></i>
<p class="font-b">审核中</p>
... ...
<div class="repayment-list-page" data-pos-id="{{posId}}">
<div class="repayment-list-page yoho-page" data-pos-id="{{posId}}">
<ul class="record-list"></ul>
<div class="no-result" style="display: none;">
<i class="result-icon"></i>
... ...
... ... @@ -16,16 +16,25 @@ module.exports = {
siteUrl: '//m.yohobuy.com',
assetUrl: '//localhost:5001',
domains: {
api: 'http://api.yoho.cn/',
service: 'http://service.yoho.cn/',
liveApi: 'http://api.live.yoho.cn/',
singleApi: 'http://single.yoho.cn/'
// api: 'http://api.yoho.cn/',
// service: 'http://service.yoho.cn/',
// liveApi: 'http://api.live.yoho.cn/',
// singleApi: 'http://single.yoho.cn/'
// api: 'http://api-test3.yohops.com:9999/',
// service: 'http://service-test3.yohops.com:9999/',
// liveApi: 'http://testapi.live.yohops.com:9999/',
// singleApi: 'http://api-test3.yohops.com:9999/'
// favApi: 'http://192.168.102.31:8092/brower',
// api: 'http://192.168.102.205:8080/gateway/',
// service: 'http://192.168.102.205:8080/gateway/',
// search: 'http://192.168.102.216:8080/yohosearch/'
api: 'http://api.yoho.yohoops.org/',
service: 'http://service.yoho.yohoops.org/',
liveApi: 'http://api.live.yoho.cn/',
singleApi: 'http://single.yoho.cn/'
// api: 'http://dev-api.yohops.com:9999/',
// service: 'http://dev-service.yohops.com:9999/',
... ... @@ -42,11 +51,11 @@ module.exports = {
activity: '//activity.yohobuy.com',
index: '//m.yohobuy.com'
},
useCache: true,
useCache: false,
memcache: {
master: ['127.0.0.1:11211'],
slave: ['127.0.0.1:11211'],
session: ['127.0.0.1:11211'],
master: ['192.168.102.168:12111'],
slave: ['192.168.102.168:12111'],
session: ['192.168.102.168:12111'],
timeout: 1000,
retries: 0
},
... ...
... ... @@ -31,7 +31,7 @@ var installment = {
if (self.$isOpen.val() === 'true') {
self.iscrollAction();
}
} else {
// 商品列表翻页加载数据
new ListData({
... ... @@ -40,6 +40,7 @@ var installment = {
boxArea: $('#goods-list'),
uuid: self.uuidVal
});
}
if (self.cookieTab) {
self.$tab.eq(self.cookieTab).addClass('on').siblings().removeClass('on');
... ... @@ -148,10 +149,6 @@ var installment = {
// 解决部分安卓手机不识别calc(100vh)的问题
$('.installment-main').css({height: $(window).height()});
starIScroll.iScroll.on('scroll', function() {
$(window).trigger('scroll');
});
$('img').on('load', function() {
starIScroll && starIScroll.iScroll.refresh();
});
... ...
... ... @@ -498,6 +498,25 @@
.usable {
display: none;
background: #efefef;
.see-btn-area {
background: #fff;
width: 100%;
padding-bottom: 30px;
}
.see-more {
width: 90%;
height: 90px;
line-height: 90px;
text-align: center;
font-size: 28px;
color: #fff;
background: #444;
display: block;
margin: 0 auto;
border-radius: 6px;
}
}
.usable-area {
... ...