Authored by ccbikai(👎🏻🍜)

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

@@ -50,6 +50,7 @@ const _repaymentList = (req, res, opt, params) => { @@ -50,6 +50,7 @@ const _repaymentList = (req, res, opt, params) => {
50 // 开通分期首页 50 // 开通分期首页
51 const index = (req, res) => { 51 const index = (req, res) => {
52 let uid = req.query.uid; 52 let uid = req.query.uid;
  53 +
53 Promise.all([ 54 Promise.all([
54 installmentModel.getStauts(uid), 55 installmentModel.getStauts(uid),
55 installmentModel.getSearchIntallment({ 56 installmentModel.getSearchIntallment({
@@ -98,6 +99,12 @@ const index = (req, res) => { @@ -98,6 +99,12 @@ const index = (req, res) => {
98 notice: data[3] 99 notice: data[3]
99 }, data[0], data[1]); 100 }, data[0], data[1]);
100 101
  102 + if (installmentOnly.goods.length > 0) {
  103 + params.installmentOnly = _.assign({
  104 + showMore: true
  105 + }, installmentOnly);
  106 + }
  107 +
101 // status: 1 正常 2 逾期 3 不可用 4 未开通 108 // status: 1 正常 2 逾期 3 不可用 4 未开通
102 if (data[0].status === '2') { 109 if (data[0].status === '2') {
103 params.replayStatus = '逾期'; 110 params.replayStatus = '逾期';
@@ -308,13 +315,15 @@ const getRepayRecord = (req, res) => { @@ -308,13 +315,15 @@ const getRepayRecord = (req, res) => {
308 // 账号管理 315 // 账号管理
309 const account = (req, res) => { 316 const account = (req, res) => {
310 var url = req.yoho.isApp || req.cookies.appVersion ? '/home/installment/account' : '/home/installment/bank-card'; 317 var url = req.yoho.isApp || req.cookies.appVersion ? '/home/installment/account' : '/home/installment/bank-card';
  318 +
311 if (req.cookies.appVersion) { 319 if (req.cookies.appVersion) {
312 var versions = req.cookies.appVersion.split('.'); 320 var versions = req.cookies.appVersion.split('.');
  321 +
313 if (versions.length >= 2) { 322 if (versions.length >= 2) {
314 - if (versions[0] < 5 || (parseInt(versions[0], 10)===5 && versions[1] <= 1)) { 323 + if (versions[0] < 5 || (parseInt(versions[0], 10) === 5 && versions[1] <= 1)) {
315 url = '/home/installment/bank-card'; 324 url = '/home/installment/bank-card';
316 } else { 325 } else {
317 - url = helpers.appUrlFormat(url, 'go.instalmentMyCard') 326 + url = helpers.appUrlFormat(url, 'go.instalmentMyCard');
318 } 327 }
319 } 328 }
320 } 329 }
@@ -78,6 +78,12 @@ @@ -78,6 +78,12 @@
78 </div> 78 </div>
79 {{# installmentOnly}} 79 {{# installmentOnly}}
80 {{> installment/installment-only}} 80 {{> installment/installment-only}}
  81 +
  82 + {{#if showMore}}
  83 + <div class="see-btn-area">
  84 + <a href="{{title.more_url}}" class="see-more">查看更多可分期商品</a>
  85 + </div>
  86 + {{/if}}
81 {{/ installmentOnly}} 87 {{/ installmentOnly}}
82 </div> 88 </div>
83 {{/if}} 89 {{/if}}
1 -<div class="installment-page installment-result-page"> 1 +<div class="installment-page installment-result-page yoho-page">
2 {{# review}} 2 {{# review}}
3 <i class="review-icon"></i> 3 <i class="review-icon"></i>
4 <p class="font-b">审核中</p> 4 <p class="font-b">审核中</p>
1 -<div class="repayment-list-page" data-pos-id="{{posId}}"> 1 +<div class="repayment-list-page yoho-page" data-pos-id="{{posId}}">
2 <ul class="record-list"></ul> 2 <ul class="record-list"></ul>
3 <div class="no-result" style="display: none;"> 3 <div class="no-result" style="display: none;">
4 <i class="result-icon"></i> 4 <i class="result-icon"></i>
@@ -31,10 +31,10 @@ module.exports = { @@ -31,10 +31,10 @@ module.exports = {
31 // service: 'http://192.168.102.205:8080/gateway/', 31 // service: 'http://192.168.102.205:8080/gateway/',
32 // search: 'http://192.168.102.216:8080/yohosearch/' 32 // search: 'http://192.168.102.216:8080/yohosearch/'
33 33
34 - // api: 'http://api.yoho.yohoops.org/',  
35 - // service: 'http://service.yoho.yohoops.org/',  
36 - // liveApi: 'http://api.live.yoho.cn/',  
37 - // singleApi: 'http://single.yoho.cn/' 34 + api: 'http://api.yoho.yohoops.org/',
  35 + service: 'http://service.yoho.yohoops.org/',
  36 + liveApi: 'http://api.live.yoho.cn/',
  37 + singleApi: 'http://single.yoho.cn/'
38 38
39 // api: 'http://dev-api.yohops.com:9999/', 39 // api: 'http://dev-api.yohops.com:9999/',
40 // service: 'http://dev-service.yohops.com:9999/', 40 // service: 'http://dev-service.yohops.com:9999/',
1 { 1 {
2 "name": "m-yohobuy-node", 2 "name": "m-yohobuy-node",
3 - "version": "5.2.5", 3 + "version": "5.2.6",
4 "private": true, 4 "private": true,
5 "description": "A New Yohobuy Project With Express", 5 "description": "A New Yohobuy Project With Express",
6 "repository": { 6 "repository": {
@@ -31,15 +31,16 @@ var installment = { @@ -31,15 +31,16 @@ var installment = {
31 31
32 if (self.$isOpen.val() === 'true') { 32 if (self.$isOpen.val() === 'true') {
33 self.iscrollAction(); 33 self.iscrollAction();
34 - } 34 + } else {
35 35
36 - // 商品列表翻页加载数据  
37 - new ListData({  
38 - url: '/home/installment/get-goods',  
39 - page: 1,  
40 - boxArea: $('#goods-list'),  
41 - uuid: self.uuidVal  
42 - }); 36 + // 商品列表翻页加载数据
  37 + new ListData({
  38 + url: '/home/installment/get-goods',
  39 + page: 1,
  40 + boxArea: $('#goods-list'),
  41 + uuid: self.uuidVal
  42 + });
  43 + }
43 44
44 if (self.cookieTab) { 45 if (self.cookieTab) {
45 self.$tab.eq(self.cookieTab).addClass('on').siblings().removeClass('on'); 46 self.$tab.eq(self.cookieTab).addClass('on').siblings().removeClass('on');
@@ -148,10 +149,6 @@ var installment = { @@ -148,10 +149,6 @@ var installment = {
148 // 解决部分安卓手机不识别calc(100vh)的问题 149 // 解决部分安卓手机不识别calc(100vh)的问题
149 $('.installment-main').css({height: $(window).height()}); 150 $('.installment-main').css({height: $(window).height()});
150 151
151 - starIScroll.iScroll.on('scroll', function() {  
152 - $(window).trigger('scroll');  
153 - });  
154 -  
155 $('img').on('load', function() { 152 $('img').on('load', function() {
156 starIScroll && starIScroll.iScroll.refresh(); 153 starIScroll && starIScroll.iScroll.refresh();
157 }); 154 });
@@ -498,6 +498,25 @@ @@ -498,6 +498,25 @@
498 .usable { 498 .usable {
499 display: none; 499 display: none;
500 background: #efefef; 500 background: #efefef;
  501 +
  502 + .see-btn-area {
  503 + background: #fff;
  504 + width: 100%;
  505 + padding-bottom: 30px;
  506 + }
  507 +
  508 + .see-more {
  509 + width: 90%;
  510 + height: 90px;
  511 + line-height: 90px;
  512 + text-align: center;
  513 + font-size: 28px;
  514 + color: #fff;
  515 + background: #444;
  516 + display: block;
  517 + margin: 0 auto;
  518 + border-radius: 6px;
  519 + }
501 } 520 }
502 521
503 .usable-area { 522 .usable-area {