Merge branch 'master' of git.yoho.cn:fe/yohobuywap-node into feature/qrcode
Showing
25 changed files
with
73 additions
and
81 deletions
@@ -8,9 +8,9 @@ | @@ -8,9 +8,9 @@ | ||
8 | const config = require('./config/common'); | 8 | const config = require('./config/common'); |
9 | 9 | ||
10 | // use one apm | 10 | // use one apm |
11 | -// if (config.useOneapm) { | ||
12 | -// require('oneapm'); | ||
13 | -// } | 11 | +if (config.useOneapm) { |
12 | + require('oneapm'); | ||
13 | +} | ||
14 | 14 | ||
15 | const express = require('express'); | 15 | const express = require('express'); |
16 | const path = require('path'); | 16 | const path = require('path'); |
@@ -61,8 +61,7 @@ exports.getCoupon = (req, res, next) => { | @@ -61,8 +61,7 @@ exports.getCoupon = (req, res, next) => { | ||
61 | // 获取信息成功 | 61 | // 获取信息成功 |
62 | couponData.ordercode = ordercode; | 62 | couponData.ordercode = ordercode; |
63 | } | 63 | } |
64 | - | ||
65 | - // console.log(couponData); | 64 | + console.log(couponData); |
66 | res.json({ | 65 | res.json({ |
67 | result: couponData | 66 | result: couponData |
68 | }); | 67 | }); |
@@ -95,8 +94,7 @@ exports.verify = (req, res, next) => { | @@ -95,8 +94,7 @@ exports.verify = (req, res, next) => { | ||
95 | // 获取信息成功 | 94 | // 获取信息成功 |
96 | couponData.ordercode = ordercode; | 95 | couponData.ordercode = ordercode; |
97 | } | 96 | } |
98 | - | ||
99 | - // console.log(couponData); | 97 | + console.log(couponData); |
100 | res.json({ | 98 | res.json({ |
101 | result: couponData | 99 | result: couponData |
102 | }); | 100 | }); |
@@ -29,16 +29,19 @@ exports.index = (req, res, next) => { | @@ -29,16 +29,19 @@ exports.index = (req, res, next) => { | ||
29 | exports.main = (req, res, next) => { | 29 | exports.main = (req, res, next) => { |
30 | const isReplay = /^\/live\/replay\//.test(req.path); | 30 | const isReplay = /^\/live\/replay\//.test(req.path); |
31 | const id = req.params.id; | 31 | const id = req.params.id; |
32 | + const goDownload = req.query.no; | ||
32 | 33 | ||
33 | res.locals.liveRoom = id; | 34 | res.locals.liveRoom = id; |
34 | res.locals.module = 'activity'; | 35 | res.locals.module = 'activity'; |
35 | res.locals.page = 'live-play'; | 36 | res.locals.page = 'live-play'; |
37 | + res.locals.enableFoot = goDownload !== 1; | ||
36 | 38 | ||
37 | model.fetchInfo(id, isReplay) | 39 | model.fetchInfo(id, isReplay) |
38 | .then(result => { | 40 | .then(result => { |
39 | if (!result.data) { | 41 | if (!result.data) { |
40 | return next(); | 42 | return next(); |
41 | } | 43 | } |
44 | + | ||
42 | res.render('live/play', result.data); | 45 | res.render('live/play', result.data); |
43 | }) | 46 | }) |
44 | .catch(next); | 47 | .catch(next); |
@@ -10,11 +10,10 @@ | @@ -10,11 +10,10 @@ | ||
10 | <section class='s-text'> | 10 | <section class='s-text'> |
11 | <h6>权益1:新品立享9折</h6> | 11 | <h6>权益1:新品立享9折</h6> |
12 | <p>1、学生购买原价新品时,可立即享受9折优惠,与VIP折扣不可同时享受。</p> | 12 | <p>1、学生购买原价新品时,可立即享受9折优惠,与VIP折扣不可同时享受。</p> |
13 | - <h6>权益2:每1元返1个有货币</h6> | ||
14 | - <p>1、学生购买商品时,以商品的实际成交金额计算,每1元返1个有货币;</p> | ||
15 | - <p>2、返有货币时间:确认收货7日后,系统将自动将对应数量的有货币返至购买账户;</p> | ||
16 | - <p>3、有货币有效期:获得当日至次年12月31日,逾期自动作废;</p> | ||
17 | - <p>4、查看有货币:登录后,点击“个人中心”在“我的有货币”中可以查看有货币余额及明细。</p> | 13 | + <h6>权益2:每满100返100有货币</h6> |
14 | + <p>1、学生购买商品时,商品金额每满100元即可获得100有货币;</p> | ||
15 | + <p>2、有货币有效期:获得当日至次年12月31日,逾期自动作废;</p> | ||
16 | + <p>3、查看有货币:登录后,点击“个人中心”在“我的有货币”中可以查看有货币余额及明细</p> | ||
18 | <h6>权益3:免单抽奖</h6> | 17 | <h6>权益3:免单抽奖</h6> |
19 | <p>1、每月将在累计购物金额最高的学校中,抽取3名幸运学生用户,获得免单资格;</p> | 18 | <p>1、每月将在累计购物金额最高的学校中,抽取3名幸运学生用户,获得免单资格;</p> |
20 | <p>2、免单用户名单将在每月第1个工作日公布在有货微信公众号上,可关注【有货YOHOBUY】;</p> | 19 | <p>2、免单用户名单将在每月第1个工作日公布在有货微信公众号上,可关注【有货YOHOBUY】;</p> |
@@ -13,6 +13,9 @@ | @@ -13,6 +13,9 @@ | ||
13 | <p>加载中</p> | 13 | <p>加载中</p> |
14 | </div> | 14 | </div> |
15 | <div class="live-loading-cover" style="background-image: url('{{pic}}');"></div> | 15 | <div class="live-loading-cover" style="background-image: url('{{pic}}');"></div> |
16 | + <a href="javascript: history.back();" class="live-btn-close"> | ||
17 | + <i class="iconfont"></i> | ||
18 | + </a> | ||
16 | </div> | 19 | </div> |
17 | 20 | ||
18 | <div id="live_touch_layer"></div> | 21 | <div id="live_touch_layer"></div> |
@@ -65,9 +68,6 @@ | @@ -65,9 +68,6 @@ | ||
65 | <a href="javascript:;" class="live-btn-share"> | 68 | <a href="javascript:;" class="live-btn-share"> |
66 | <i class="iconfont"></i> | 69 | <i class="iconfont"></i> |
67 | </a> | 70 | </a> |
68 | - <a href="javascript: history.back();" class="live-btn-close"> | ||
69 | - <i class="iconfont"></i> | ||
70 | - </a> | ||
71 | </section> | 71 | </section> |
72 | </div> | 72 | </div> |
73 | {{/canPlay}} | 73 | {{/canPlay}} |
@@ -122,6 +122,7 @@ | @@ -122,6 +122,7 @@ | ||
122 | {{/notBegin}} | 122 | {{/notBegin}} |
123 | 123 | ||
124 | {{! footer}} | 124 | {{! footer}} |
125 | + {{#enableFoot}} | ||
125 | <div class="float-layer" id="float-layer-app"> | 126 | <div class="float-layer" id="float-layer-app"> |
126 | <div class="float-layer-left"> | 127 | <div class="float-layer-left"> |
127 | <span class="yoho-icon iconfont"></span> | 128 | <span class="yoho-icon iconfont"></span> |
@@ -135,6 +136,7 @@ | @@ -135,6 +136,7 @@ | ||
135 | 立即下载 | 136 | 立即下载 |
136 | </a> | 137 | </a> |
137 | </div> | 138 | </div> |
139 | + {{/enableFoot}} | ||
138 | </div> | 140 | </div> |
139 | <script> | 141 | <script> |
140 | var live_start_time = {{live_start_time}};//该直播开始时间 | 142 | var live_start_time = {{live_start_time}};//该直播开始时间 |
@@ -142,7 +144,6 @@ | @@ -142,7 +144,6 @@ | ||
142 | var live_room = {{liveRoom}};//房间id,资讯id | 144 | var live_room = {{liveRoom}};//房间id,资讯id |
143 | var replay_total_likes = {{like_num}};//重播总计点赞数,取的是直播最终点赞数 | 145 | var replay_total_likes = {{like_num}};//重播总计点赞数,取的是直播最终点赞数 |
144 | var replay_user_nums = {{audience_num}};//重播观看人数,取的是直播时最终观看人数 | 146 | var replay_user_nums = {{audience_num}};//重播观看人数,取的是直播时最终观看人数 |
145 | - var site_url = ''; | ||
146 | var site_domain = 'http://api.live.yoho.cn/'; | 147 | var site_domain = 'http://api.live.yoho.cn/'; |
147 | 148 | ||
148 | // share data | 149 | // share data |
@@ -110,7 +110,7 @@ const _processIndexData = (dataList) => { | @@ -110,7 +110,7 @@ const _processIndexData = (dataList) => { | ||
110 | let url = `/guang/star/detail?tag=${data.tagName}&openby:yohobuy={"action":"go.h5","params":{"id":"","share":"","shareparam":{},"islogin":"N","type":0,"updateflag":"N","url":"http://m.yohobuy.com/guang/star/detail","param":{"tag":"${data.tagName}"}}}`; // eslint-disable-line | 110 | let url = `/guang/star/detail?tag=${data.tagName}&openby:yohobuy={"action":"go.h5","params":{"id":"","share":"","shareparam":{},"islogin":"N","type":0,"updateflag":"N","url":"http://m.yohobuy.com/guang/star/detail","param":{"tag":"${data.tagName}"}}}`; // eslint-disable-line |
111 | 111 | ||
112 | formatData.starAvatar.push({ | 112 | formatData.starAvatar.push({ |
113 | - noLazy: index < 6, | 113 | + //noLazy: index < 6, |
114 | url: url, | 114 | url: url, |
115 | cover: data.cover ? (data.cover + '?imageView2/2/w/180/h/180') : data.cover | 115 | cover: data.cover ? (data.cover + '?imageView2/2/w/180/h/180') : data.cover |
116 | }); | 116 | }); |
@@ -463,6 +463,7 @@ const checkVerifyCode = (uid, mobile, code) => { | @@ -463,6 +463,7 @@ const checkVerifyCode = (uid, mobile, code) => { | ||
463 | method: method, | 463 | method: method, |
464 | mobile: mobile, | 464 | mobile: mobile, |
465 | snsCheckCode: code, | 465 | snsCheckCode: code, |
466 | + codeType: 1, // 授信 | ||
466 | debug: 'XYZ' | 467 | debug: 'XYZ' |
467 | }, { | 468 | }, { |
468 | timeout: API_TIMEOUT | 469 | timeout: API_TIMEOUT |
@@ -206,7 +206,7 @@ const wechat = { | @@ -206,7 +206,7 @@ const wechat = { | ||
206 | doPassportCallback(openId, nickname, 'wechat', req, res).catch(next); | 206 | doPassportCallback(openId, nickname, 'wechat', req, res).catch(next); |
207 | })(req, res, next); | 207 | })(req, res, next); |
208 | } else { | 208 | } else { |
209 | - return next('Auth State Mismatch'); | 209 | + return next(new Error('Auth State Mismatch')); |
210 | } | 210 | } |
211 | } | 211 | } |
212 | }; | 212 | }; |
@@ -16,6 +16,12 @@ const LOGIN_SUCCSS = '登录成功'; | @@ -16,6 +16,12 @@ const LOGIN_SUCCSS = '登录成功'; | ||
16 | const VERIFY_ERROR = '校验失败'; | 16 | const VERIFY_ERROR = '校验失败'; |
17 | 17 | ||
18 | exports.beforeIn = (req, res, next) => { | 18 | exports.beforeIn = (req, res, next) => { |
19 | + res.set({ | ||
20 | + 'Cache-Control': 'no-cache, no-store, must-revalidate', | ||
21 | + Pragma: 'no-cache', | ||
22 | + Expires: 0 | ||
23 | + }); | ||
24 | + | ||
19 | if (!req.xhr && req.user.uid) { | 25 | if (!req.xhr && req.user.uid) { |
20 | return res.redirect(req.cookies.refer); | 26 | return res.redirect(req.cookies.refer); |
21 | } | 27 | } |
@@ -83,7 +83,7 @@ if (isProduction) { | @@ -83,7 +83,7 @@ if (isProduction) { | ||
83 | domains: { | 83 | domains: { |
84 | api: 'http://api.yoho.yohoops.org/', | 84 | api: 'http://api.yoho.yohoops.org/', |
85 | service: 'http://service.yoho.yohoops.org/', | 85 | service: 'http://service.yoho.yohoops.org/', |
86 | - liveApi: 'http://api.live.yoho.cn/' | 86 | + liveApi: 'http://preapi.live.yoho.cn/' // 'http://api.live.yoho.cn/' |
87 | }, | 87 | }, |
88 | memcache: { | 88 | memcache: { |
89 | master: ['memcache1.yohoops.org:12111', 'memcache2.yohoops.org:12111', 'memcache3.yohoops.org:12111'], | 89 | master: ['memcache1.yohoops.org:12111', 'memcache2.yohoops.org:12111', 'memcache3.yohoops.org:12111'], |
@@ -21,16 +21,10 @@ module.exports = () => { | @@ -21,16 +21,10 @@ module.exports = () => { | ||
21 | 21 | ||
22 | // 判断请求是否来自app | 22 | // 判断请求是否来自app |
23 | yoho.isApp = req.query.app_version || req.query.appVersion; | 23 | yoho.isApp = req.query.app_version || req.query.appVersion; |
24 | - yoho.isWechat = /micromessenger/i.test(req.get('User-Agent') || ''); | ||
25 | 24 | ||
26 | Object.assign(res.locals, yoho); | 25 | Object.assign(res.locals, yoho); |
27 | Object.assign(req.yoho, yoho); | 26 | Object.assign(req.yoho, yoho); |
28 | 27 | ||
29 | - // App 内请求支持跨域 | ||
30 | - if (yoho.isApp) { | ||
31 | - res.set('Access-Control-Allow-Origin', '*'); | ||
32 | - } | ||
33 | - | ||
34 | next(); | 28 | next(); |
35 | }; | 29 | }; |
36 | }; | 30 | }; |
@@ -32,7 +32,7 @@ | @@ -32,7 +32,7 @@ | ||
32 | <link rel="apple-touch-startup-image" sizes="640x920" href="http://static.yohobuy.com/m/v1/img/startup/startup-retina.png" media="screen and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2)"> | 32 | <link rel="apple-touch-startup-image" sizes="640x920" href="http://static.yohobuy.com/m/v1/img/startup/startup-retina.png" media="screen and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2)"> |
33 | <link rel="apple-touch-startup-image" sizes="320x460" href="http://static.yohobuy.com/m/v1/img/startup/startup.png" media="screen and (max-device-width: 320)"> | 33 | <link rel="apple-touch-startup-image" sizes="320x460" href="http://static.yohobuy.com/m/v1/img/startup/startup.png" media="screen and (max-device-width: 320)"> |
34 | </head> | 34 | </head> |
35 | - <body class="{{#if width750}}width750{{/if}} {{#if isWechat}}wechat-body{{/if}} {{#if isPassportPage}}passport-body{{/if}} {{#if isStarIndexPage}}star-index-bg{{/if}} {{#if isStarDetailPage}}star-class-body{{/if}} {{#if isInstallmentPage}}installment-body{{/if}}"> | 35 | + <body class="{{#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}}"> |
36 | <div class="main-wrap"> | 36 | <div class="main-wrap"> |
37 | {{#if systemUpdate}} | 37 | {{#if systemUpdate}} |
38 | {{> updata}} | 38 | {{> updata}} |
1 | -{{#unless isApp}} | ||
2 | <!-- Google Tag Manager --> | 1 | <!-- Google Tag Manager --> |
3 | <noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-W958MG" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> | 2 | <noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-W958MG" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> |
4 | <script> | 3 | <script> |
@@ -12,4 +11,3 @@ function async_load(){ | @@ -12,4 +11,3 @@ function async_load(){ | ||
12 | } | 11 | } |
13 | window.addEventListener('load', async_load, false); | 12 | window.addEventListener('load', async_load, false); |
14 | </script> | 13 | </script> |
15 | -{{/unless}} |
@@ -17,6 +17,7 @@ var prefixes = 'webkit moz ms o'.split(' '); //各浏览器前缀 | @@ -17,6 +17,7 @@ var prefixes = 'webkit moz ms o'.split(' '); //各浏览器前缀 | ||
17 | var requestAnimationFrame = window.requestAnimationFrame; | 17 | var requestAnimationFrame = window.requestAnimationFrame; |
18 | var cancelAnimationFrame = window.cancelAnimationFrame; | 18 | var cancelAnimationFrame = window.cancelAnimationFrame; |
19 | 19 | ||
20 | +var site_url = STATIC_RESOURCE_PATH; | ||
20 | var $btn_play; | 21 | var $btn_play; |
21 | var video_width = 375; | 22 | var video_width = 375; |
22 | var video_height = 667; | 23 | var video_height = 667; |
@@ -673,7 +674,7 @@ function insert_like(obj) { | @@ -673,7 +674,7 @@ function insert_like(obj) { | ||
673 | } | 674 | } |
674 | } | 675 | } |
675 | now_like_nums = num; | 676 | now_like_nums = num; |
676 | - if (now_like_nums > 100000) { | 677 | + if (now_like_nums > 10000) { |
677 | $('#like_num').text((now_like_nums / 10000).toFixed(1) + '万'); | 678 | $('#like_num').text((now_like_nums / 10000).toFixed(1) + '万'); |
678 | } else { | 679 | } else { |
679 | $('#like_num').text(now_like_nums); | 680 | $('#like_num').text(now_like_nums); |
@@ -78,14 +78,13 @@ function isValidate(rules, datas) { | @@ -78,14 +78,13 @@ function isValidate(rules, datas) { | ||
78 | message = rule.name + '不可为空'; | 78 | message = rule.name + '不可为空'; |
79 | break; | 79 | break; |
80 | } | 80 | } |
81 | - | ||
82 | - // if (rule.regex) { | ||
83 | - // reg = $.trim(data).match(rule.regex); | ||
84 | - // if (!reg || (reg && !reg.length)) { | ||
85 | - // message = rule.msg; | ||
86 | - // break; | ||
87 | - // } | ||
88 | - // } | 81 | + if (rule.regex) { |
82 | + reg = $.trim(data).match(rule.regex); | ||
83 | + if (!reg || (reg && !reg.length)) { | ||
84 | + message = rule.msg; | ||
85 | + break; | ||
86 | + } | ||
87 | + } | ||
89 | if (rule.is !== void (0) && data !== rule.is) { | 88 | if (rule.is !== void (0) && data !== rule.is) { |
90 | message = rule.msg; | 89 | message = rule.msg; |
91 | } | 90 | } |
@@ -232,10 +231,10 @@ Filter.prototype = { | @@ -232,10 +231,10 @@ Filter.prototype = { | ||
232 | var html = [], | 231 | var html = [], |
233 | name; | 232 | name; |
234 | 233 | ||
235 | - // if (this.__select__ && this.__title__ && this.__select__[this.__feild__]) { | ||
236 | - // html.push('<h6 class=\'s-title\'>当前地区</h6>'); | ||
237 | - // html.push('<div class=\'s-item close\'>' + this.__select__[this.__feild__] + '</div>'); | ||
238 | - // } | 234 | + if (this.__select__ && this.__title__ && this.__select__[this.__feild__]) { |
235 | + html.push('<h6 class=\'s-title\'>当前地区</h6>'); | ||
236 | + html.push('<div class=\'s-item close\'>' + this.__select__[this.__feild__] + '</div>'); | ||
237 | + } | ||
239 | 238 | ||
240 | for (name in data) { | 239 | for (name in data) { |
241 | if (data.hasOwnProperty(name)) { | 240 | if (data.hasOwnProperty(name)) { |
@@ -274,13 +273,9 @@ Filter.prototype = { | @@ -274,13 +273,9 @@ Filter.prototype = { | ||
274 | 273 | ||
275 | province = new Filter('[data-aslider=province]', '当前地区', 'addresseeName'); | 274 | province = new Filter('[data-aslider=province]', '当前地区', 'addresseeName'); |
276 | 275 | ||
277 | -$.ajax({ | ||
278 | - url: '/activity/student/province', | ||
279 | - cache: true, | ||
280 | - success: function(res) { | ||
281 | - province.set(res.data); | ||
282 | - province.init(); | ||
283 | - } | 276 | +$.get('/activity/student/province', function(res) { |
277 | + province.set(res.data); | ||
278 | + province.init(); | ||
284 | }); | 279 | }); |
285 | 280 | ||
286 | $(document).on('keyup', '#s-search-provinces', function() { | 281 | $(document).on('keyup', '#s-search-provinces', function() { |
@@ -367,13 +362,9 @@ window.JI_getselectvalue = function(type, value) { | @@ -367,13 +362,9 @@ window.JI_getselectvalue = function(type, value) { | ||
367 | $('.s-blue').click(function() { | 362 | $('.s-blue').click(function() { |
368 | localStorage.setItem(STUDENTCOOKIES, JSON.stringify(changeSuccess().data)); | 363 | localStorage.setItem(STUDENTCOOKIES, JSON.stringify(changeSuccess().data)); |
369 | }); | 364 | }); |
370 | -$(function() { | ||
371 | - try { | ||
372 | - setFormByCookes(localStorage.getItem(STUDENTCOOKIES)); | ||
373 | - } catch (e) { | ||
374 | - console.log(e); | ||
375 | - } | ||
376 | -}); | 365 | +setFormByCookes(localStorage.getItem(STUDENTCOOKIES)); |
366 | + | ||
367 | + | ||
377 | 368 | ||
378 | // data-aslider-in="education|fade" | 369 | // data-aslider-in="education|fade" |
379 | $(document).on('click', '#s-education .s-item', function() { | 370 | $(document).on('click', '#s-education .s-item', function() { |
@@ -456,3 +447,8 @@ $(document).on('click', '.s-submit', function() { | @@ -456,3 +447,8 @@ $(document).on('click', '.s-submit', function() { | ||
456 | $('#tb-is-read').change(function() { | 447 | $('#tb-is-read').change(function() { |
457 | changeSuccess(); | 448 | changeSuccess(); |
458 | }); | 449 | }); |
450 | + | ||
451 | + | ||
452 | + | ||
453 | + | ||
454 | + |
@@ -188,8 +188,6 @@ function initAction() { | @@ -188,8 +188,6 @@ function initAction() { | ||
188 | $avatarWrap = $('.avatar-wrap'); | 188 | $avatarWrap = $('.avatar-wrap'); |
189 | bannerLen = $('.avatar-wrap').find('.swiper-slide').length; | 189 | bannerLen = $('.avatar-wrap').find('.swiper-slide').length; |
190 | 190 | ||
191 | - setIndexAction(); | ||
192 | - | ||
193 | // if ($avatarClone) { | 191 | // if ($avatarClone) { |
194 | // $avatarClone.remove(); | 192 | // $avatarClone.remove(); |
195 | // } | 193 | // } |
@@ -202,6 +200,7 @@ function initAction() { | @@ -202,6 +200,7 @@ function initAction() { | ||
202 | effect: 'fadeIn' | 200 | effect: 'fadeIn' |
203 | }); | 201 | }); |
204 | 202 | ||
203 | + setIndexAction(); | ||
205 | } | 204 | } |
206 | 205 | ||
207 | initAction(); | 206 | initAction(); |
@@ -258,7 +257,8 @@ starIScroll.iScroll.on('scrollStart', function() { | @@ -258,7 +257,8 @@ starIScroll.iScroll.on('scrollStart', function() { | ||
258 | bannerSwiper && bannerSwiper.stopAutoplay(); | 257 | bannerSwiper && bannerSwiper.stopAutoplay(); |
259 | }); | 258 | }); |
260 | 259 | ||
261 | -// starIScroll.iScroll.on('scroll', function() { | 260 | + starIScroll.iScroll.on('scroll', function() { |
261 | + $window.trigger('scroll'); | ||
262 | // var avatarOffsetT; | 262 | // var avatarOffsetT; |
263 | // | 263 | // |
264 | // if (this.directionY !== -1) { | 264 | // if (this.directionY !== -1) { |
@@ -300,7 +300,7 @@ starIScroll.iScroll.on('scrollStart', function() { | @@ -300,7 +300,7 @@ starIScroll.iScroll.on('scrollStart', function() { | ||
300 | // } else { | 300 | // } else { |
301 | // $avatarClone.hide(); | 301 | // $avatarClone.hide(); |
302 | // } | 302 | // } |
303 | -// }); | 303 | + }); |
304 | 304 | ||
305 | starIScroll.iScroll.on('scrollEnd', function() { | 305 | starIScroll.iScroll.on('scrollEnd', function() { |
306 | // $loadingTip.slideUp(); | 306 | // $loadingTip.slideUp(); |
@@ -43,18 +43,12 @@ var debounceFn = debounce(function(cardNo, formModel) { | @@ -43,18 +43,12 @@ var debounceFn = debounce(function(cardNo, formModel) { | ||
43 | 43 | ||
44 | var checkCard = function(formModel) { | 44 | var checkCard = function(formModel) { |
45 | // 银行卡格式化 | 45 | // 银行卡格式化 |
46 | - $('#cardNo').keyup(function() { | 46 | + $('#cardNo').on('input', function() { |
47 | var value = $(this).val(); | 47 | var value = $(this).val(); |
48 | var cardNo = $(this).val().replace(/\s/g, ''); | 48 | var cardNo = $(this).val().replace(/\s/g, ''); |
49 | 49 | ||
50 | $(this).val(value.replace(/[^\d]/g, '').replace(/(\d{4})(?=\d)/g, '$1 ')).trigger('change'); | 50 | $(this).val(value.replace(/[^\d]/g, '').replace(/(\d{4})(?=\d)/g, '$1 ')).trigger('change'); |
51 | 51 | ||
52 | - if (cardNo && cardNo.length < 16) { | ||
53 | - $('#bank-desc').hide(); | ||
54 | - } | ||
55 | - }).blur(function() { | ||
56 | - var cardNo = $(this).val().replace(/\s/g, ''); | ||
57 | - | ||
58 | if (cardNo && cardNo.length >= 16) { | 52 | if (cardNo && cardNo.length >= 16) { |
59 | debounceFn(cardNo, formModel); | 53 | debounceFn(cardNo, formModel); |
60 | } else { | 54 | } else { |
@@ -35,14 +35,15 @@ var validateForm = function() { | @@ -35,14 +35,15 @@ var validateForm = function() { | ||
35 | 35 | ||
36 | checkCard(formData); | 36 | checkCard(formData); |
37 | 37 | ||
38 | -// 输入框改变时同时更新模型 | ||
39 | -$('input').on('input', function() { | ||
40 | - var name = $(this).attr('name'); | ||
41 | - | ||
42 | - formData[name] = $(this).val(); | 38 | +// 定时更新模型,解决各种浏览器奇葩问题终极办法 |
39 | +setInterval(function() { | ||
40 | + $('input').each(function() { | ||
41 | + var name = $(this).attr('name'); | ||
43 | 42 | ||
43 | + formData[name] = $(this).val(); | ||
44 | + }); | ||
44 | validateForm(); | 45 | validateForm(); |
45 | -}); | 46 | +}, 500); |
46 | 47 | ||
47 | applyButton.on('click', function() { | 48 | applyButton.on('click', function() { |
48 | var self = this; | 49 | var self = this; |
@@ -131,8 +131,8 @@ var page = { | @@ -131,8 +131,8 @@ var page = { | ||
131 | }) | 131 | }) |
132 | .done(function(res) { | 132 | .done(function(res) { |
133 | if (res.code === 200) { | 133 | if (res.code === 200) { |
134 | + // $nextBtn.off(); | ||
134 | location.href = res.redirect; | 135 | location.href = res.redirect; |
135 | - $nextBtn.off(); | ||
136 | return; | 136 | return; |
137 | } | 137 | } |
138 | 138 |
@@ -76,7 +76,7 @@ var page = { | @@ -76,7 +76,7 @@ var page = { | ||
76 | }) | 76 | }) |
77 | .done(function(data) { | 77 | .done(function(data) { |
78 | if (data.code === 200) { | 78 | if (data.code === 200) { |
79 | - $nextBtn.off(); | 79 | + // $nextBtn.off(); |
80 | location.href = data.redirect; | 80 | location.href = data.redirect; |
81 | } else { | 81 | } else { |
82 | tip.show(data.message); | 82 | tip.show(data.message); |
@@ -56,7 +56,7 @@ var page = { | @@ -56,7 +56,7 @@ var page = { | ||
56 | }) | 56 | }) |
57 | .done(function(res) { | 57 | .done(function(res) { |
58 | if (res.code === 200) { | 58 | if (res.code === 200) { |
59 | - $nextBtn.off(); | 59 | + // $nextBtn.off(); |
60 | location.href = res.redirect; | 60 | location.href = res.redirect; |
61 | return; | 61 | return; |
62 | } | 62 | } |
@@ -203,8 +203,6 @@ | @@ -203,8 +203,6 @@ | ||
203 | padding-left: 1.75rem; | 203 | padding-left: 1.75rem; |
204 | display: inline-block; | 204 | display: inline-block; |
205 | color: #ffffff; | 205 | color: #ffffff; |
206 | - border-radius: 0.3rem; | ||
207 | - background-color: rgba(0, 0, 0, 0.32); | ||
208 | font-size: 0.6rem; | 206 | font-size: 0.6rem; |
209 | 207 | ||
210 | } | 208 | } |
@@ -224,7 +222,9 @@ | @@ -224,7 +222,9 @@ | ||
224 | font-size: 22px; | 222 | font-size: 22px; |
225 | font-weight: lighter; | 223 | font-weight: lighter; |
226 | color: rgba(255,255,255,0.8); | 224 | color: rgba(255,255,255,0.8); |
225 | + background-color: rgba(0, 0, 0, 0.32); | ||
227 | overflow: hidden; | 226 | overflow: hidden; |
227 | + border-radius: 0.3rem; | ||
228 | } | 228 | } |
229 | 229 | ||
230 | .live-item2_2 { | 230 | .live-item2_2 { |
@@ -234,6 +234,7 @@ | @@ -234,6 +234,7 @@ | ||
234 | line-height: 1.2; | 234 | line-height: 1.2; |
235 | font-weight: normal; | 235 | font-weight: normal; |
236 | color: #FFFFFF; | 236 | color: #FFFFFF; |
237 | + border-radius: 0.3rem; | ||
237 | } | 238 | } |
238 | 239 | ||
239 | .live-item2 img { | 240 | .live-item2 img { |
@@ -242,7 +243,7 @@ | @@ -242,7 +243,7 @@ | ||
242 | top: 0; | 243 | top: 0; |
243 | display: inline-block; | 244 | display: inline-block; |
244 | width: 2.5rem; | 245 | width: 2.5rem; |
245 | - height: 100%; | 246 | + border-radius: 0.3rem; |
246 | } | 247 | } |
247 | 248 | ||
248 | .live-item2-head { | 249 | .live-item2-head { |
@@ -435,7 +435,6 @@ | @@ -435,7 +435,6 @@ | ||
435 | display: block; | 435 | display: block; |
436 | width: 100%; | 436 | width: 100%; |
437 | height: 100%; | 437 | height: 100%; |
438 | - background: resolve("guang/star/lazy-img.jpg"); | ||
439 | background-color: #000; | 438 | background-color: #000; |
440 | background-repeat: no-repeat; | 439 | background-repeat: no-repeat; |
441 | background-size: contain; | 440 | background-size: contain; |
@@ -62,7 +62,7 @@ a { | @@ -62,7 +62,7 @@ a { | ||
62 | text-decoration: none; | 62 | text-decoration: none; |
63 | font-style: normal; | 63 | font-style: normal; |
64 | font-size: 24px; | 64 | font-size: 24px; |
65 | - font-family: 'iconfont' !important; | 65 | + font-family: "iconfont" !important; |
66 | -webkit-font-smoothing: antialiased; | 66 | -webkit-font-smoothing: antialiased; |
67 | -webkit-text-stroke-width: 0.4px; | 67 | -webkit-text-stroke-width: 0.4px; |
68 | -moz-osx-font-smoothing: grayscale; | 68 | -moz-osx-font-smoothing: grayscale; |
-
Please register or login to post a comment