Showing
11 changed files
with
91 additions
and
31 deletions
@@ -15,6 +15,17 @@ const _serverCrash = (res, params) => { | @@ -15,6 +15,17 @@ const _serverCrash = (res, params) => { | ||
15 | res.render('installment/server-crash', params); | 15 | res.render('installment/server-crash', params); |
16 | }; | 16 | }; |
17 | 17 | ||
18 | +const _banksInit = () => { | ||
19 | + const banks = ['农业银行', '中国银行', '工商银行', '建设银行', '光大银行', '兴业银行', '邮储银行', '民生银行', '中信银行', '广发银行']; | ||
20 | + | ||
21 | + if (new Date() >= new Date('2016-10-18 00:00:00')) { | ||
22 | + // 2016年10月12日至17日 平安银行业务暂停(平安银行期间不支持服务) | ||
23 | + banks.push('平安银行'); | ||
24 | + } | ||
25 | + | ||
26 | + return banks; | ||
27 | +}; | ||
28 | + | ||
18 | // 还款列表公共处理块 | 29 | // 还款列表公共处理块 |
19 | const _repaymentList = (req, res, opt, params) => { | 30 | const _repaymentList = (req, res, opt, params) => { |
20 | params = _.assign({ | 31 | params = _.assign({ |
@@ -285,24 +296,29 @@ const getRepayRecord = (req, res) => { | @@ -285,24 +296,29 @@ const getRepayRecord = (req, res) => { | ||
285 | 296 | ||
286 | // 账号管理 | 297 | // 账号管理 |
287 | const account = (req, res) => { | 298 | const account = (req, res) => { |
299 | + var url = req.yoho.isApp || req.cookies.isApp ? '/home/installment/account' : '/home/installment/bank-card'; | ||
300 | + | ||
288 | res.render('installment/account', { | 301 | res.render('installment/account', { |
289 | module: 'home', | 302 | module: 'home', |
290 | page: 'account', | 303 | page: 'account', |
291 | title: '账号管理', | 304 | title: '账号管理', |
292 | isInstallmentPage: true, | 305 | isInstallmentPage: true, |
293 | posId: 7, | 306 | posId: 7, |
294 | - url: helpers.appUrlFormat('/home/installment/bank-card', 'go.instalmentMyCard') | 307 | + url: helpers.appUrlFormat(url, 'go.instalmentMyCard') |
295 | }); | 308 | }); |
296 | }; | 309 | }; |
297 | 310 | ||
298 | // 添加新银行卡 | 311 | // 添加新银行卡 |
299 | const bindCard = (req, res) => { | 312 | const bindCard = (req, res) => { |
313 | + const banks = _banksInit(); | ||
314 | + | ||
300 | res.render('installment/bind-card', { | 315 | res.render('installment/bind-card', { |
301 | module: 'home', | 316 | module: 'home', |
302 | page: 'bind-card', | 317 | page: 'bind-card', |
303 | title: req.query.title || '使用新卡还款', | 318 | title: req.query.title || '使用新卡还款', |
304 | bindCard: { | 319 | bindCard: { |
305 | - userName: req.query.name | 320 | + userName: req.query.name, |
321 | + banks: banks | ||
306 | }, | 322 | }, |
307 | isInstallmentPage: true | 323 | isInstallmentPage: true |
308 | }); | 324 | }); |
@@ -325,12 +341,7 @@ const postAccount = (req, res) => { | @@ -325,12 +341,7 @@ const postAccount = (req, res) => { | ||
325 | }; | 341 | }; |
326 | 342 | ||
327 | const startingService = (req, res) => { | 343 | const startingService = (req, res) => { |
328 | - const banks = ['农业银行', '中国银行', '工商银行', '建设银行', '光大银行', '兴业银行', '邮储银行', '民生银行', '中信银行', '广发银行']; | ||
329 | - | ||
330 | - if (new Date() >= new Date('2016-10-18 00:00:00')) { | ||
331 | - // 2016年10月12日至17日 平安银行业务暂停(平安银行期间不支持服务) | ||
332 | - banks.push('平安银行'); | ||
333 | - } | 344 | + const banks = _banksInit(); |
334 | 345 | ||
335 | res.render('installment/starting-service', { | 346 | res.render('installment/starting-service', { |
336 | module: 'home', | 347 | module: 'home', |
@@ -8,6 +8,7 @@ | @@ -8,6 +8,7 @@ | ||
8 | <li> | 8 | <li> |
9 | <label>银行卡</label> | 9 | <label>银行卡</label> |
10 | <input id="cardNo" name="cardNo" type="tel" placeholder="请输入本人银行卡号" size="26" maxlength="23"> | 10 | <input id="cardNo" name="cardNo" type="tel" placeholder="请输入本人银行卡号" size="26" maxlength="23"> |
11 | + <span class="iconfont notice"></span> | ||
11 | </li> | 12 | </li> |
12 | <li id="bank-desc" style="display: none;"> | 13 | <li id="bank-desc" style="display: none;"> |
13 | <div class="bank-info"> | 14 | <div class="bank-info"> |
@@ -22,6 +23,17 @@ | @@ -22,6 +23,17 @@ | ||
22 | </ul> | 23 | </ul> |
23 | <div class="open-btn disabled">下一步</div> | 24 | <div class="open-btn disabled">下一步</div> |
24 | <a href="" class="jumpResult"> </a> | 25 | <a href="" class="jumpResult"> </a> |
26 | + | ||
27 | + <div class="installment-overdue-notice"> | ||
28 | + <div class="mask-bg"></div> | ||
29 | + <div class="notice-area"> | ||
30 | + <div class="notice-cont"> | ||
31 | + <h2>支持银行</h2> | ||
32 | + <p>{{banks}}</p> | ||
33 | + </div> | ||
34 | + <div class="think-ok">我知道了</div> | ||
35 | + </div> | ||
36 | + </div> | ||
25 | {{/bindCard}} | 37 | {{/bindCard}} |
26 | 38 | ||
27 | <div class="success"> | 39 | <div class="success"> |
@@ -23,7 +23,7 @@ | @@ -23,7 +23,7 @@ | ||
23 | </ul> | 23 | </ul> |
24 | <div class="tip-cont"> | 24 | <div class="tip-cont"> |
25 | {{#if isMaster}} | 25 | {{#if isMaster}} |
26 | - <p>如果您更换银行预留手机号,请先新增其他还款银行卡,并将新增银行卡切换为主卡,并解除绑定此卡,再次重新绑定即可。</p> | 26 | + <p>如果您更换银行预留手机号,请先新增其他还款银行卡,并将新增银行卡切换为主卡。然后解除绑定此卡,重新绑定即可。</p> |
27 | {{else}} | 27 | {{else}} |
28 | <p>如果您更换银行预留手机号,请先将银行卡解除绑定,再次重新绑定即可。</p> | 28 | <p>如果您更换银行预留手机号,请先将银行卡解除绑定,再次重新绑定即可。</p> |
29 | 29 |
1 | <div class="notice-wrap clearfix"> | 1 | <div class="notice-wrap clearfix"> |
2 | <div class="notice" data-time="{{time}}"> | 2 | <div class="notice" data-time="{{time}}"> |
3 | <span class="notice-icon"></span> | 3 | <span class="notice-icon"></span> |
4 | - {{#list}} | ||
5 | - <a class="notice-item item-{{@index}}" href="{{url}}"> | ||
6 | - {{title}} | ||
7 | - </a> | ||
8 | - {{/list}} | 4 | + <div class="swiper-wrapper"> |
5 | + {{#list}} | ||
6 | + <a class="notice-item swiper-slide item-{{@index}}" href="{{url}}"> | ||
7 | + {{title}} | ||
8 | + </a> | ||
9 | + {{/list}} | ||
10 | + </div> | ||
9 | </div> | 11 | </div> |
10 | </div> | 12 | </div> |
@@ -39,7 +39,8 @@ var cardDetail = { | @@ -39,7 +39,8 @@ var cardDetail = { | ||
39 | url: '/home/installment/setMasterCard', | 39 | url: '/home/installment/setMasterCard', |
40 | errorText: '切换失败', | 40 | errorText: '切换失败', |
41 | successAction: function() { | 41 | successAction: function() { |
42 | - window.location.href = '/home/installment/card-detail?cardIdNo=' + window.queryString.cardIdNo + '&setMaster=true'; | 42 | + tip.show('切换成功!'); |
43 | + window.location.href = '/home/installment/bank-card?openby:yohobuy={"action":"go.instalmentMyCard"}'; | ||
43 | } | 44 | } |
44 | }); | 45 | }); |
45 | }); | 46 | }); |
@@ -7,10 +7,10 @@ | @@ -7,10 +7,10 @@ | ||
7 | var $ = require('yoho-jquery'), | 7 | var $ = require('yoho-jquery'), |
8 | ellipsis = require('yoho-mlellipsis'), | 8 | ellipsis = require('yoho-mlellipsis'), |
9 | cookie = require('yoho-cookie'), | 9 | cookie = require('yoho-cookie'), |
10 | + Swiper = require('yoho-swiper'), | ||
10 | ListData = require('./installment-goods'), | 11 | ListData = require('./installment-goods'), |
11 | bp = require('./burying-point'), | 12 | bp = require('./burying-point'), |
12 | PullRefresh = require('../plugin/pull-refresh'), | 13 | PullRefresh = require('../plugin/pull-refresh'), |
13 | - noticeScroll = require('../plugin/notice-scroll'), | ||
14 | uuid = require('uuid'); | 14 | uuid = require('uuid'); |
15 | 15 | ||
16 | var installment = { | 16 | var installment = { |
@@ -20,7 +20,7 @@ var installment = { | @@ -20,7 +20,7 @@ var installment = { | ||
20 | self.paramsInit(); | 20 | self.paramsInit(); |
21 | 21 | ||
22 | $(window).on('mousewheel', false); | 22 | $(window).on('mousewheel', false); |
23 | - noticeScroll('.notice', $('.notice').data('time') * 1000); | 23 | + self.noticeScroll('.notice', $('.notice').data('time') * 1000); |
24 | ellipsis.init(); | 24 | ellipsis.init(); |
25 | self.setDetailText(); | 25 | self.setDetailText(); |
26 | 26 | ||
@@ -93,6 +93,14 @@ var installment = { | @@ -93,6 +93,14 @@ var installment = { | ||
93 | 93 | ||
94 | self.setCookies(); | 94 | self.setCookies(); |
95 | }, | 95 | }, |
96 | + noticeScroll: function(selecter, time) { | ||
97 | + new Swiper(selecter, { | ||
98 | + autoplay: time, | ||
99 | + direction: 'vertical', | ||
100 | + speed: 500, | ||
101 | + loop: true | ||
102 | + }); | ||
103 | + }, | ||
96 | setDetailText: function() { // 标题限制行数 | 104 | setDetailText: function() { // 标题限制行数 |
97 | var $this, $title; | 105 | var $this, $title; |
98 | 106 | ||
@@ -166,6 +174,7 @@ var installment = { | @@ -166,6 +174,7 @@ var installment = { | ||
166 | window.setCookie('yhChannel', window.queryString.yh_channel); | 174 | window.setCookie('yhChannel', window.queryString.yh_channel); |
167 | window.setCookie('udid', window.queryString.udid); | 175 | window.setCookie('udid', window.queryString.udid); |
168 | window.setCookie('clientType', window.queryString.client_type); | 176 | window.setCookie('clientType', window.queryString.client_type); |
177 | + window.setCookie('isApp', window.queryString.app_version ? true : false); | ||
169 | } | 178 | } |
170 | }; | 179 | }; |
171 | 180 |
@@ -20,5 +20,8 @@ $('.installment-starting-service-page .notice').on('click', function() { | @@ -20,5 +20,8 @@ $('.installment-starting-service-page .notice').on('click', function() { | ||
20 | return false; | 20 | return false; |
21 | }); | 21 | }); |
22 | 22 | ||
23 | +$('.add-account-page .notice').on('click', function() { | ||
24 | + $notice.show(); | ||
25 | +}); | ||
23 | 26 | ||
24 | $('body').attr('ontouchstart', true); | 27 | $('body').attr('ontouchstart', true); |
@@ -35,7 +35,18 @@ | @@ -35,7 +35,18 @@ | ||
35 | border: none; | 35 | border: none; |
36 | background: transparent; | 36 | background: transparent; |
37 | margin: 23px 0 0 60px; | 37 | margin: 23px 0 0 60px; |
38 | - width: 410px; | 38 | + width: 380px; |
39 | + } | ||
40 | + | ||
41 | + .notice { | ||
42 | + float: left; | ||
43 | + font-size: 28px; | ||
44 | + color: #444; | ||
45 | + height: auto; | ||
46 | + width: auto; | ||
47 | + margin-top: 25px; | ||
48 | + padding: 2px 10px 10px; | ||
49 | + border-bottom: none; | ||
39 | } | 50 | } |
40 | 51 | ||
41 | .username { | 52 | .username { |
@@ -39,11 +39,21 @@ | @@ -39,11 +39,21 @@ | ||
39 | width: 100%; | 39 | width: 100%; |
40 | height: 69px; | 40 | height: 69px; |
41 | border-bottom: 1px solid #efefef; | 41 | border-bottom: 1px solid #efefef; |
42 | + padding-right: 0; | ||
43 | + | ||
44 | + .swiper-wrapper { | ||
45 | + float: left; | ||
46 | + width: 575px; | ||
47 | + background: #fff; | ||
48 | + } | ||
42 | 49 | ||
43 | .notice-item { | 50 | .notice-item { |
44 | - width: 540px; | 51 | + width: 575px; |
45 | line-height: 69px; | 52 | line-height: 69px; |
46 | - float: left; | 53 | + display: block; |
54 | + clear: both; | ||
55 | + padding-right: 30px; | ||
56 | + box-sizing: border-box; | ||
47 | } | 57 | } |
48 | 58 | ||
49 | .notice-icon { | 59 | .notice-icon { |
@@ -142,17 +142,6 @@ | @@ -142,17 +142,6 @@ | ||
142 | color: #444; | 142 | color: #444; |
143 | padding: 2px 10px 10px; | 143 | padding: 2px 10px 10px; |
144 | } | 144 | } |
145 | - | ||
146 | - .installment-overdue-notice { | ||
147 | - .notice-area { | ||
148 | - width: 560px; | ||
149 | - margin: -165px 0 0 -280px; | ||
150 | - } | ||
151 | - | ||
152 | - .notice-cont { | ||
153 | - padding: 28px !important; | ||
154 | - } | ||
155 | - } | ||
156 | } | 145 | } |
157 | 146 | ||
158 | .installment-check-btn { | 147 | .installment-check-btn { |
@@ -178,3 +167,14 @@ | @@ -178,3 +167,14 @@ | ||
178 | } | 167 | } |
179 | } | 168 | } |
180 | } | 169 | } |
170 | + | ||
171 | +.installment-overdue-notice { | ||
172 | + .notice-area { | ||
173 | + width: 560px; | ||
174 | + margin: -165px 0 0 -280px; | ||
175 | + } | ||
176 | + | ||
177 | + .notice-cont { | ||
178 | + padding: 28px !important; | ||
179 | + } | ||
180 | +} |
-
Please register or login to post a comment