Authored by 王水玲

671

@@ -59,33 +59,10 @@ const index = (req, res, next) => { @@ -59,33 +59,10 @@ const index = (req, res, next) => {
59 59
60 logger.info(`installment index info: client_type=${req.query.client_type},req.user.uid=${req.user.uid},req.query.uid=${req.query.uid},cookies=${JSON.stringify(req.cookies)}`); // eslint-disable-line 60 logger.info(`installment index info: client_type=${req.query.client_type},req.user.uid=${req.user.uid},req.query.uid=${req.query.uid},cookies=${JSON.stringify(req.cookies)}`); // eslint-disable-line
61 Promise.all([ 61 Promise.all([
62 - req.ctx(installmentModel).getStauts(uid),  
63 - req.ctx(installmentModel).getSearchIntallment({  
64 - uid: uid  
65 - }) 62 + req.ctx(installmentModel).getStauts(uid)
66 ]).then((result) => { 63 ]).then((result) => {
67 -  
68 - if (req.yoho.isApp) {  
69 - _.forEach(result[1], goods => {  
70 - goods.url = yasProcess.addParamsToGoodsHref({  
71 - href: goods.url,  
72 - fromPageName: yasProcess.getPname(req),  
73 - fromPageParam: req.originalUrl  
74 - });  
75 - });  
76 - }  
77 -  
78 // openStatus:0 未申请 1审核中 2已开通 3 审核未通过 64 // openStatus:0 未申请 1审核中 2已开通 3 审核未通过
79 let openStatus = result[0]; 65 let openStatus = result[0];
80 - let installmentOnly = {  
81 - title: {  
82 - title: '分期专享',  
83 - more_url: helpers.appUrlFormat(req.originalUrl, 'go.instalmentlist', {  
84 - title: '分期专享'  
85 - })  
86 - },  
87 - goods: result[1]  
88 - };  
89 66
90 if (openStatus === '0') { 67 if (openStatus === '0') {
91 return Promise.all([ 68 return Promise.all([
@@ -102,7 +79,7 @@ const index = (req, res, next) => { @@ -102,7 +79,7 @@ const index = (req, res, next) => {
102 content: data[0], 79 content: data[0],
103 notice: data[1], 80 notice: data[1],
104 notOpen: true, 81 notOpen: true,
105 - installmentOnly: installmentOnly 82 + goHomePath: req.yoho.isApp ? `yohobuy://yohobuy.com/goapp?openby:yohobuy={"action":"go.home","params":{"channel":"1"}}` : '//m.yohobuy.com/boys'
106 }; 83 };
107 }); 84 });
108 } else if (openStatus === '2') { 85 } else if (openStatus === '2') {
@@ -114,17 +91,10 @@ const index = (req, res, next) => { @@ -114,17 +91,10 @@ const index = (req, res, next) => {
114 ]).then((data) => { 91 ]).then((data) => {
115 let params = _.assign({ 92 let params = _.assign({
116 isOverdue: false, 93 isOverdue: false,
117 - installmentOnly: installmentOnly,  
118 content: data[2], 94 content: data[2],
119 notice: data[3] 95 notice: data[3]
120 }, data[0], data[1]); 96 }, data[0], data[1]);
121 97
122 - if (installmentOnly.goods.length > 0) {  
123 - params.installmentOnly = _.assign({  
124 - showMore: true  
125 - }, installmentOnly);  
126 - }  
127 -  
128 // status: 1 正常 2 逾期 3 不可用 4 未开通 98 // status: 1 正常 2 逾期 3 不可用 4 未开通
129 if (data[0].status === '2') { 99 if (data[0].status === '2') {
130 params.replayStatus = '逾期'; 100 params.replayStatus = '逾期';
@@ -14,7 +14,7 @@ const logger = global.yoho.logger; @@ -14,7 +14,7 @@ const logger = global.yoho.logger;
14 const stringProcess = require(`${global.utils}/string-process`); 14 const stringProcess = require(`${global.utils}/string-process`);
15 const API_TIMEOUT = 10000; 15 const API_TIMEOUT = 10000;
16 const codeContent = { 16 const codeContent = {
17 - openN: '0876085ff46bed27f1a1eb6ee8b68987', 17 + openN: 'f53b7228f38994200491692b1f4ac54c',
18 openY: 'c233ad4ca91fef45ed7d0b26d9953e61', 18 openY: 'c233ad4ca91fef45ed7d0b26d9953e61',
19 advertisement: 'f3fe0793a7d59479542a14b15359c47d' 19 advertisement: 'f3fe0793a7d59479542a14b15359c47d'
20 }; 20 };
1 <div class="installment-page installment-bg yoho-page"> 1 <div class="installment-page installment-bg yoho-page">
2 - <div class="loading-tip">下拉刷新</div> 2 + {{#unless notOpen}}
  3 + <div class="loading-tip">下拉刷新</div>
  4 + {{/unless}}
3 <div class="installment-main"> 5 <div class="installment-main">
4 <div class="main-content"> 6 <div class="main-content">
5 {{#if notOpen}} 7 {{#if notOpen}}
6 <input type="hidden" value="false" class="is-open"> 8 <input type="hidden" value="false" class="is-open">
7 - {{# content}}  
8 - {{#if singleImage}}  
9 - {{> resources/banner}}  
10 - {{/if}}  
11 - {{/ content}}  
12 {{#notice}} 9 {{#notice}}
13 {{> installment/installment-notice}} 10 {{> installment/installment-notice}}
14 {{/notice}} 11 {{/notice}}
15 - <div class="open-index">  
16 - <ul class="open-info">  
17 - <li>  
18 - <span class="open-icon-1"></span>  
19 - <span>先消费<br>后还款</span>  
20 - </li>  
21 - <li>  
22 - <span class="open-icon-2"></span>  
23 - <span> 0元首付<br>随心分期</span>  
24 - </li>  
25 - <li>  
26 - <span class="open-icon-3"></span>  
27 - <span>指定商品<br>立享优惠</span>  
28 - </li>  
29 - </ul>  
30 -  
31 - <a href="/home/installment/starting-service" class="open-btn">立即开通</a> 12 + <div class="close-pic"></div>
  13 + <p class="close-installment-desc">很抱歉,来晚了<br>有货分期申请服务已暂停</p>
  14 + <a href="{{goHomePath}}" class="go-yoho-index">去逛逛</a>
  15 + <div class="installment-banner">
  16 + {{# content}}
  17 + {{#if singleImage}}
  18 + {{> resources/banner}}
  19 + {{/if}}
  20 + {{/ content}}
32 </div> 21 </div>
33 {{else}} 22 {{else}}
34 <input type="hidden" value="true" class="is-open"> 23 <input type="hidden" value="true" class="is-open">
35 - <div class="detail-tab">  
36 - <span class="on is-repay">待还款金额</span>  
37 - <span class="is-usable">可用额度</span>  
38 - </div>  
39 <div class="repay installment-cont"> 24 <div class="repay installment-cont">
40 <div class="repay-area detail-bg"> 25 <div class="repay-area detail-bg">
41 <p class="detail-txt1">近7日待还款</p> 26 <p class="detail-txt1">近7日待还款</p>
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 <div data-userverify="{{captchaShow}}" data-geetest="{{useGeetest}}" id="js-img-check" {{#unless useGeetest}} class="full-img-verify" {{/unless}}></div> 21 <div data-userverify="{{captchaShow}}" data-geetest="{{useGeetest}}" id="js-img-check" {{#unless useGeetest}} class="full-img-verify" {{/unless}}></div>
22 <button id="loginBtn" class="login-btn disable" type="button">登录</button> 22 <button id="loginBtn" class="login-btn disable" type="button">登录</button>
23 <div class="other-info"> 23 <div class="other-info">
24 - <a href="{{internationalUrl}}">海外账号登录</a> 24 + {{!-- <a href="{{internationalUrl}}">海外账号登录</a> --}}
25 <a href="{{smsLoginUrl}}">手机验证码登录</a> 25 <a href="{{smsLoginUrl}}">手机验证码登录</a>
26 <a id="getPswrdBtn" href="javascript:void(0);">忘记密码?</a> 26 <a id="getPswrdBtn" href="javascript:void(0);">忘记密码?</a>
27 </div> 27 </div>
@@ -29,7 +29,7 @@ @@ -29,7 +29,7 @@
29 <button id="smsLoginBtn" class="sms-login-btn" type="button">登录</button> 29 <button id="smsLoginBtn" class="sms-login-btn" type="button">登录</button>
30 <div class="other-info"> 30 <div class="other-info">
31 {{#if openPassword}} 31 {{#if openPassword}}
32 - <a href="{{internationalUrl}}">海外账号登录</a> 32 + {{!-- <a href="{{internationalUrl}}">海外账号登录</a> --}}
33 <a href="{{loginUrl}}">账号密码登录</a> 33 <a href="{{loginUrl}}">账号密码登录</a>
34 {{/if}} 34 {{/if}}
35 <a id="getPswrdBtn" href="javascript:void(0);">忘记密码?</a> 35 <a id="getPswrdBtn" href="javascript:void(0);">忘记密码?</a>
@@ -97,7 +97,7 @@ @@ -97,7 +97,7 @@
97 <link rel="apple-touch-startup-image" href="https://cdn.yoho.cn/h5/forios/startup/startup-orange-6.png" media="screen and (min-device-width: 641px) and (max-device-width: 750px)"> 97 <link rel="apple-touch-startup-image" href="https://cdn.yoho.cn/h5/forios/startup/startup-orange-6.png" media="screen and (min-device-width: 641px) and (max-device-width: 750px)">
98 <link rel="apple-touch-startup-image" href="https://cdn.yoho.cn/h5/forios/startup/startup-orange-5.png" media="screen and (max-device-width: 640px)"> 98 <link rel="apple-touch-startup-image" href="https://cdn.yoho.cn/h5/forios/startup/startup-orange-5.png" media="screen and (max-device-width: 640px)">
99 </head> 99 </head>
100 - <body class="{{pageStyle}}{{#if isWechat}} wechat-body{{/if}}{{#if width750}} width750{{/if}}{{#if isPassportPage}} passport-body{{/if}}{{#if isStarIndexPage}} star-index-bg{{/if}}{{#if isStarDetailPage}} star-class-body{{/if}}{{#if isInstallmentPage}} installment-body{{/if}}{{#if @root.isMarsApp}} is-mars-app{{/if}}{{#if @root.isNowApp}} is-now-app{{/if}}"> 100 + <body class="{{pageStyle}}{{#if isWechat}} wechat-body{{/if}}{{#if width750}} width750{{/if}}{{#if isPassportPage}} passport-body{{/if}}{{#if isStarIndexPage}} star-index-bg{{/if}}{{#if isStarDetailPage}} star-class-body{{/if}}{{#if isInstallmentPage}}{{#unless notOpen}} installment-body{{/unless}}{{/if}}{{#if @root.isMarsApp}} is-mars-app{{/if}}{{#if @root.isNowApp}} is-now-app{{/if}}">
101 <div class="main-wrap" id="main-wrap" {{#if appPath}}data-apppath='{{{appPath}}}'{{/if}} {{#if miniPath}}data-miniPath='{{{miniPath}}}'{{/if}} {{#if @root.wap.wechat.backDownload}}data-backDownload='{{@root.wap.wechat.backDownload}}'{{/if}}> 101 <div class="main-wrap" id="main-wrap" {{#if appPath}}data-apppath='{{{appPath}}}'{{/if}} {{#if miniPath}}data-miniPath='{{{miniPath}}}'{{/if}} {{#if @root.wap.wechat.backDownload}}data-backDownload='{{@root.wap.wechat.backDownload}}'{{/if}}>
102 {{#if systemUpdate}} 102 {{#if systemUpdate}}
103 {{> updata}} 103 {{> updata}}
@@ -237,11 +237,10 @@ function loadMore($container, opt, url) { @@ -237,11 +237,10 @@ function loadMore($container, opt, url) {
237 237
238 if (opt.page === 1) { 238 if (opt.page === 1) {
239 loading.hideLoadingMask(); 239 loading.hideLoadingMask();
240 -  
241 - getDynamicData.getDynamicData();  
242 window.rePosFooter();// 插入内容后重新计算底部位置 240 window.rePosFooter();// 插入内容后重新计算底部位置
243 } 241 }
244 242
  243 + getDynamicData.getDynamicData();
245 opt.page++; 244 opt.page++;
246 245
247 searching = false; 246 searching = false;
@@ -23,6 +23,37 @@ @@ -23,6 +23,37 @@
23 height: calc(100vh); 23 height: calc(100vh);
24 } 24 }
25 25
  26 + .close-pic {
  27 + width: 360px;
  28 + height: 360px;
  29 + background: resolve("home/installment-close.png") no-repeat;
  30 + background-size: contain;
  31 + margin: 128px auto 0;
  32 + }
  33 +
  34 + .go-yoho-index {
  35 + width: 410px;
  36 + height: 69px;
  37 + background: #444;
  38 + border-radius: 6px;
  39 + color: #fff;
  40 + text-align: center;
  41 + line-height: 69px;
  42 + display: block;
  43 + margin: 0 auto;
  44 + }
  45 +
  46 + .close-installment-desc {
  47 + line-height: 46px;
  48 + text-align: center;
  49 + font-size: 24px;
  50 + margin: 40px 0;
  51 + }
  52 +
  53 + .installment-banner {
  54 + margin-top: 110px;
  55 + }
  56 +
26 .loading-tip { 57 .loading-tip {
27 position: absolute; 58 position: absolute;
28 width: 100%; 59 width: 100%;