Showing
8 changed files
with
316 additions
and
129 deletions
1 | 'use strict'; | 1 | 'use strict'; |
2 | 2 | ||
3 | const mRoot = '../models'; | 3 | const mRoot = '../models'; |
4 | +const library = '../../../library'; | ||
4 | 5 | ||
5 | -// const couponModel = require(`${mRoot}/coupon`); // 领取优惠券 model | ||
6 | -// const cookie = require('../../../utils/cookie'); | 6 | +const couponModel = require(`${mRoot}/coupon`); // 领取优惠券 model |
7 | +const log = require(`${library}/logger`); | ||
7 | 8 | ||
8 | exports.index = (req, res) => { | 9 | exports.index = (req, res) => { |
10 | + var renderData = { | ||
11 | + module: 'coupon', | ||
12 | + page: 'index' | ||
13 | + }, | ||
14 | + ordercode = req.query.ordercode, | ||
15 | + uid = req.query.uid, | ||
16 | + mobile = req.query.mobile; | ||
9 | 17 | ||
10 | - // var renderData = { | ||
11 | - // layout: false, // 原有活动移植,忽略公有模板 | ||
12 | - // module: 'coupon/index', | ||
13 | - // title: 'YOHO!BUY有货微信分享', | ||
14 | - // isApp: req.isApp, | ||
15 | - // appUrl: 'http://www.yohoshow.com/about/index/yohobuyqr', // APP 下载地址 | ||
16 | - // }; | ||
17 | - | ||
18 | - // var uid = cookie.getUid(req); | ||
19 | - // var couponId = res.app.locals.proEnv ? '22184' : '13061'; | ||
20 | - | ||
21 | - // couponModel({ | ||
22 | - // uid: uid, | ||
23 | - // couponId: couponId, | ||
24 | - // }).then((couponData) => { | ||
25 | - // var couponInfo = JSON.parse(couponData[0]); | ||
26 | - | ||
27 | - // if (couponData.length && couponInfo.code === 200) { | ||
28 | - // //领券成功 | ||
29 | - // console.log('领券成功'); | ||
30 | - | ||
31 | - // } | ||
32 | - // }).then((couponData) => { | ||
33 | - // var couponInfo = JSON.parse(couponData[0]); | ||
34 | - | ||
35 | - // if (couponInfo.code === 401) { | ||
36 | - // renderData.geted = true; | ||
37 | - // } | ||
38 | - | ||
39 | - // if (couponInfo.code !== 401 && couponInfo.code !== 200) { | ||
40 | - // renderData.fail = true; | ||
41 | - // } | ||
42 | - | ||
43 | - // res.render('coupon/index', renderData); // 渲染页面 | ||
44 | - // }).catch((err) => { | ||
45 | - // errUtil.webError(err, res); // 抓取 Promise 链的错误 | ||
46 | - // }); | ||
47 | - | ||
48 | - res.render('coupon', { | 18 | + renderData.uid = uid; |
19 | + renderData.mobile = mobile; | ||
20 | + renderData.ordercode = ordercode; | ||
21 | + | ||
22 | + // 测试假数据 | ||
23 | + // res.render('coupon', renderData); // 渲染页面 | ||
24 | + couponModel.getPageInfo({ | ||
25 | + ordercode: ordercode, | ||
26 | + uid: uid | ||
27 | + }).then((couponData) => { | ||
28 | + if (couponData.code === 200) { | ||
29 | + // 获取信息成功 | ||
30 | + couponData.ordercode = ordercode; | ||
31 | + } | ||
32 | + res.render('coupon', { | ||
33 | + result: couponData, | ||
34 | + module: 'coupon', | ||
35 | + page: 'index', | ||
36 | + title: couponData.title | ||
37 | + }); | ||
38 | + }).catch((err) => { | ||
39 | + log.error('频道页面渲染错误:' + JSON.stringify(err)); | ||
40 | + }); | ||
41 | +}; | ||
42 | + | ||
43 | +exports.getCoupon = (req, res) => { | ||
44 | + var renderData = { | ||
45 | + module: 'coupon', | ||
46 | + page: 'index' | ||
47 | + }; | ||
48 | + | ||
49 | + var ordercode = req.query.ordercode, | ||
50 | + mobile = req.query.mobile; | ||
51 | + | ||
52 | + renderData.mobile = mobile; | ||
53 | + renderData.ordercode = ordercode; | ||
54 | + | ||
55 | + // //测试假数据 | ||
56 | + // res.render('coupon', renderData); // 渲染页面 | ||
57 | + couponModel.getCoupon({ | ||
58 | + ordercode: ordercode, | ||
59 | + mobile: mobile | ||
60 | + }).then((couponData) => { | ||
61 | + if (couponData.code === 200) { | ||
62 | + // 获取信息成功 | ||
63 | + couponData.ordercode = ordercode; | ||
64 | + } | ||
65 | + console.log(couponData); | ||
66 | + res.json({ | ||
67 | + result: couponData | ||
68 | + }); | ||
69 | + }).catch((err) => { | ||
70 | + log.error('频道页面渲染错误:' + JSON.stringify(err)); | ||
71 | + }); | ||
72 | +}; | ||
73 | + | ||
74 | +exports.verify = (req, res) => { | ||
75 | + var renderData = { | ||
49 | module: 'coupon', | 76 | module: 'coupon', |
50 | page: 'index' | 77 | page: 'index' |
78 | + }; | ||
79 | + | ||
80 | + | ||
81 | + var ordercode = req.query.ordercode, | ||
82 | + mobile = req.query.mobile, | ||
83 | + identifycode = req.query.identifycode; | ||
84 | + | ||
85 | + renderData.mobile = mobile; | ||
86 | + renderData.ordercode = ordercode; | ||
87 | + renderData.identifycode = identifycode; | ||
88 | + | ||
89 | + // //测试假数据 | ||
90 | + // res.render('coupon', renderData); // 渲染页面 | ||
91 | + couponModel.registerAndSendCoupon({ | ||
92 | + ordercode: ordercode, | ||
93 | + mobile: mobile, | ||
94 | + identifycode: identifycode | ||
95 | + }).then((couponData) => { | ||
96 | + if (couponData.code === 200) { | ||
97 | + // 获取信息成功 | ||
98 | + couponData.ordercode = ordercode; | ||
99 | + } | ||
100 | + console.log(couponData); | ||
101 | + res.json({ | ||
102 | + result: couponData | ||
103 | + }); | ||
104 | + }).catch((err) => { | ||
105 | + log.error('频道页面渲染错误:' + JSON.stringify(err)); | ||
51 | }); | 106 | }); |
52 | }; | 107 | }; |
@@ -23,7 +23,7 @@ app.engine('.hbs', hbs({ | @@ -23,7 +23,7 @@ app.engine('.hbs', hbs({ | ||
23 | defaultLayout: 'layout', | 23 | defaultLayout: 'layout', |
24 | layoutsDir: doraemon, | 24 | layoutsDir: doraemon, |
25 | partialsDir: ['./views/partial', `${doraemon}/partial`], | 25 | partialsDir: ['./views/partial', `${doraemon}/partial`], |
26 | - helpers: 'helpers' | 26 | + helpers: require(`${global.library}/helpers`) |
27 | })); | 27 | })); |
28 | 28 | ||
29 | // router | 29 | // router |
1 | +var API = require('../../../library/api').API; | ||
2 | +var api = new API(); | ||
3 | +const library = '../../../library'; | ||
4 | +const sign = require(`${library}/sign`); | ||
1 | 5 | ||
6 | +/** | ||
7 | + * 分享页面基础参数 | ||
8 | + * @param {object} sizeInfo [接口原始数据] | ||
9 | + * @return {object} [description] | ||
10 | + */ | ||
11 | +const getPageInfo = (pageInfo) => { | ||
12 | + var dest = {}; | ||
2 | 13 | ||
3 | -// var Http = require('../../../library/api'); | 14 | + dest.code = pageInfo.code; |
15 | + dest.title = pageInfo.data.h5Title; | ||
16 | + dest.activityDesc = pageInfo.data.activityDesc; | ||
17 | + dest.couponPic = pageInfo.data.couponPic; | ||
18 | + if (pageInfo.data.flag === 1) { | ||
19 | + dest.couponGoing = true; | ||
20 | + dest.bgImg = pageInfo.data.activityNormalPic; | ||
21 | + } else if (pageInfo.data.flag !== 1) { | ||
22 | + dest.bgImg = pageInfo.data.activityEndPic; | ||
23 | + dest.ended = true; | ||
24 | + } | ||
25 | + dest.message = pageInfo.data.returnMsg; | ||
4 | 26 | ||
5 | -// var http = new Http(); | 27 | + // 清空变量,释放内存 |
28 | + pageInfo = {}; | ||
29 | + return dest; | ||
30 | +}; | ||
6 | 31 | ||
7 | -// module.exports = (data) => { | ||
8 | -// var defaultParam = { | ||
9 | -// method: 'app.promotion.getCoupon' | ||
10 | -// }, | ||
11 | -// requestList = [], | ||
12 | -// requestData = _.cloneDeep(data); | 32 | +const getUserStatus = (param) => { |
33 | + var dest = {}; | ||
13 | 34 | ||
14 | -// // 处理完成后,发给后端 | ||
15 | -// data = Object.assign(defaultParam, data); | ||
16 | -// return api.get('/', data); // 所有数据返回一个 Promise,方便 Promise.all 调用 | 35 | + dest.code = param.code; |
36 | + dest.title = param.data.h5Title; | ||
37 | + dest.returnCode = param.data.returnCode; | ||
38 | + if (param.data.returnCode === 0) { | ||
39 | + dest.geted = true; | ||
40 | + } else if (param.data.returnCode === 1) { | ||
41 | + dest.wrongNumb = true; | ||
42 | + } else if (param.data.returnCode === 2) { | ||
43 | + dest.newUser = true; | ||
44 | + } else { | ||
45 | + dest.ended = true; | ||
46 | + } | ||
47 | + dest.message = param.data.returnMsg; | ||
17 | 48 | ||
18 | -// var defaultParam = { | ||
19 | -// method: 'app.promotion.getCoupon' | ||
20 | -// }, | ||
21 | -// requestList = [], | ||
22 | -// requestData = _.cloneDeep(data); | 49 | + // 清空变量,释放内存 |
50 | + param = {}; | ||
51 | + return dest; | ||
52 | +}; | ||
23 | 53 | ||
24 | -// // 根据券号取优惠券 | ||
25 | -// if (data.couponId) { | ||
26 | -// return http.post(defaultParam,data); | ||
27 | -// }; | ||
28 | 54 | ||
29 | -// // 处理完成后,发给后端 | ||
30 | -// data = Object.assign(defaultParam, data); | ||
31 | -// return http.get('/', data); // 所有数据返回一个 Promise,方便 Promise.all 调用 | ||
32 | -// }; | 55 | +/** |
56 | + * 获取分享页面数据 | ||
57 | + */ | ||
58 | +exports.getPageInfo = (data) => { | ||
59 | + var defaultParam = { | ||
60 | + | ||
61 | + method: 'app.activity.getInfoOfOrderShare' | ||
62 | + }, | ||
63 | + | ||
64 | + // 处理完成后,发给后端 | ||
65 | + infoData = Object.assign(defaultParam, data); | ||
66 | + return api.get('', sign.apiSign(infoData)).then(result => { | ||
67 | + return getPageInfo(result); | ||
68 | + }); // 所有数据返回一个 Promise,方便 Promise.all 调用 | ||
69 | +}; | ||
70 | + | ||
71 | +/** | ||
72 | + * 输入手机号领券,新用户返回验证码 | ||
73 | + */ | ||
74 | +exports.getCoupon = (data) => { | ||
75 | + var defaultParam = { | ||
76 | + method: 'wap.order.drawOrderShareCoupon' | ||
77 | + }, | ||
78 | + | ||
79 | + // 处理完成后,发给后端 | ||
80 | + phoneData = Object.assign(defaultParam, data); | ||
81 | + | ||
82 | + return api.get('', sign.apiSign(phoneData)).then(result => { | ||
83 | + return getUserStatus(result); | ||
84 | + }); // 所有数据返回一个 Promise,方便 Promise.all 调用 | ||
85 | +}; | ||
86 | + | ||
87 | + | ||
88 | +/** | ||
89 | + * 验证注册码进行注册并发券 | ||
90 | + */ | ||
91 | +exports.registerAndSendCoupon = (data) => { | ||
92 | + var defaultParam = { | ||
93 | + method: 'wap.order.registerAndSendCoupon' | ||
94 | + }, | ||
95 | + | ||
96 | + // 处理完成后,发给后端 | ||
97 | + verifyData = Object.assign(defaultParam, data); | ||
98 | + | ||
99 | + return api.get('', sign.apiSign(verifyData)).then(result => { | ||
100 | + return getUserStatus(result); | ||
101 | + }); // 所有数据返回一个 Promise,方便 Promise.all 调用 | ||
102 | +}; |
@@ -15,4 +15,8 @@ const coupon = require(`${cRoot}/coupon`); | @@ -15,4 +15,8 @@ const coupon = require(`${cRoot}/coupon`); | ||
15 | 15 | ||
16 | router.get('/index', coupon.index); | 16 | router.get('/index', coupon.index); |
17 | 17 | ||
18 | +router.get('/phone', coupon.getCoupon); | ||
19 | + | ||
20 | +router.get('/verify', coupon.verify); | ||
21 | + | ||
18 | module.exports = router; | 22 | module.exports = router; |
1 | +{{# result}} | ||
1 | <div class="receive-coupon-page"> | 2 | <div class="receive-coupon-page"> |
3 | + <div class="bg-contain"> | ||
4 | + <img src="{{image bgImg 640 1136}}"> | ||
5 | + </div> | ||
6 | + <p class="hidden" id="orderCode">{{ordercode}}</p> | ||
2 | <div class="page"> | 7 | <div class="page"> |
3 | - <div class="coupon-header"> | 8 | + <div class="gain-coupon-centent hidden"> |
9 | + <div class="coupon"> | ||
10 | + <img src={{couponPic}}> | ||
11 | + </div> | ||
12 | + <p class="phone" id="mobile"></p> | ||
13 | + <p>登录Yoho!Buy有货客户端即可使用</p> | ||
14 | + | ||
15 | + <div class="use-coupon-btn"> | ||
16 | + 马上去Yoho!Buy有货使用 | ||
17 | + </div> | ||
18 | + <span class="description">活动说明</span> | ||
4 | </div> | 19 | </div> |
20 | + | ||
5 | <div class="coupon-centent"> | 21 | <div class="coupon-centent"> |
6 | <div class="title"> | 22 | <div class="title"> |
7 | <img src="../img/coupon/coupon-title.png"> | 23 | <img src="../img/coupon/coupon-title.png"> |
8 | </div> | 24 | </div> |
9 | - | ||
10 | - <div class="input-content hidden"> | 25 | + |
26 | + <div class="input-content phone-input-content"> | ||
11 | <input id="phone" type="text" placeholder="请输入手机号" maxlength="11"/> | 27 | <input id="phone" type="text" placeholder="请输入手机号" maxlength="11"/> |
12 | <div>获取红包</div> | 28 | <div>获取红包</div> |
13 | </div> | 29 | </div> |
14 | 30 | ||
15 | - <div class="input-content"> | 31 | + <div class="input-content vertify-input-content hidden"> |
16 | <input id="verification" type="text" placeholder="请输入验证码" maxlength="4"/> | 32 | <input id="verification" type="text" placeholder="请输入验证码" maxlength="4"/> |
17 | <div>验证领红包</div> | 33 | <div>验证领红包</div> |
18 | </div> | 34 | </div> |
@@ -21,38 +37,23 @@ | @@ -21,38 +37,23 @@ | ||
21 | <span></span> | 37 | <span></span> |
22 | </div> | 38 | </div> |
23 | </div> | 39 | </div> |
40 | + </div> | ||
41 | + | ||
42 | + <div class="tip-wrap hidden"> | ||
43 | + <div class="tip fail"> | ||
44 | + <div class="header"> | ||
45 | + </div> | ||
24 | 46 | ||
25 | - <div class="gain-coupon-centent hidden"> | ||
26 | - <div class="coupon"> | ||
27 | - <!-- <img src="{{img}}"> --> | ||
28 | - <img src="../img/coupon/coupon.png"> | 47 | + <div class="title"> |
48 | + {{message}} | ||
49 | + <!-- 优惠券已领光 --> | ||
29 | </div> | 50 | </div> |
30 | - <p class="phone" id="mobile"></p> | ||
31 | - <p>登录Yoho!Buy有货客户端即可使用</p> | ||
32 | 51 | ||
33 | - <div class="use-coupon-btn"> | ||
34 | - 马上去Yoho!Buy有货使用 | 52 | + <div class="logo"> |
35 | </div> | 53 | </div> |
36 | - <span class="description">活动说明</span> | ||
37 | </div> | 54 | </div> |
38 | </div> | 55 | </div> |
39 | 56 | ||
40 | - {{#if fail}} | ||
41 | - <div class="tip-wrap"> | ||
42 | - <div class="tip fail"> | ||
43 | - <div class="header"> | ||
44 | - </div> | ||
45 | - | ||
46 | - <div class="title"> | ||
47 | - 本次活动已结束 | ||
48 | - <!-- 优惠券已领光 --> | ||
49 | - </div> | ||
50 | - | ||
51 | - <div class="logo"> | ||
52 | - </div> | ||
53 | - </div> | ||
54 | - </div> | ||
55 | - {{/if}} | ||
56 | <div class="messages hidden" id="dialog"> | 57 | <div class="messages hidden" id="dialog"> |
57 | <div class="content"></div> | 58 | <div class="content"></div> |
58 | </div> | 59 | </div> |
@@ -71,4 +72,5 @@ | @@ -71,4 +72,5 @@ | ||
71 | </div> | 72 | </div> |
72 | 73 | ||
73 | 74 | ||
74 | -</div> | ||
75 | +</div> | ||
76 | +{{/result}} |
@@ -12,9 +12,15 @@ const isTest = process.env.NODE_ENV === 'test'; | @@ -12,9 +12,15 @@ const isTest = process.env.NODE_ENV === 'test'; | ||
12 | module.exports = { | 12 | module.exports = { |
13 | port: 6001, | 13 | port: 6001, |
14 | siteUrl: 'http://m.yohobuy.com', | 14 | siteUrl: 'http://m.yohobuy.com', |
15 | + | ||
16 | + // domains: { | ||
17 | + // api: 'http://testapi.yoho.cn:28078/', // http://192.168.102.205:8080/gateway | ||
18 | + // service: 'http://testservice.yoho.cn:28077/' | ||
19 | + // }, | ||
15 | domains: { | 20 | domains: { |
16 | - api: 'http://testapi.yoho.cn:28078/', // http://192.168.102.205:8080/gateway | ||
17 | - service: 'http://testservice.yoho.cn:28077/' | 21 | + api: 'http://devapi.yoho.cn:58078/', |
22 | + service: 'http://devservice.yoho.cn:58077/', | ||
23 | + search: 'http://192.168.10.64:8080/yohosearch/' | ||
18 | }, | 24 | }, |
19 | useOneapm: false, | 25 | useOneapm: false, |
20 | useCache: false, | 26 | useCache: false, |
1 | 1 | ||
2 | var $ = require('yoho-jquery'), | 2 | var $ = require('yoho-jquery'), |
3 | - num = 0, | ||
4 | phone, | 3 | phone, |
5 | - reg, | ||
6 | - time; | 4 | + reg; |
5 | + | ||
6 | +var orderCode = $('#orderCode').html(); | ||
7 | 7 | ||
8 | $('#phone').bind('input propertychange', function() { | 8 | $('#phone').bind('input propertychange', function() { |
9 | if ($(this).val().length === 11) { | 9 | if ($(this).val().length === 11) { |
@@ -36,28 +36,38 @@ $('.input-content').on('click', '.verification-code', function() { | @@ -36,28 +36,38 @@ $('.input-content').on('click', '.verification-code', function() { | ||
36 | return; | 36 | return; |
37 | } | 37 | } |
38 | $.ajax({ | 38 | $.ajax({ |
39 | - url: '/activity/cocacola/CocacolaController/sendSms', | 39 | + url: '/coupon/phone', |
40 | data: { | 40 | data: { |
41 | - mobile: $('#phone').val() | 41 | + mobile: $('#phone').val(), |
42 | + ordercode: orderCode | ||
42 | }, | 43 | }, |
43 | dataType: 'json', | 44 | dataType: 'json', |
44 | success: function(data) { | 45 | success: function(data) { |
45 | - if (data.code === 200) { | ||
46 | - time = setInterval(function() { | ||
47 | - num++; | ||
48 | - if (num > 60) { | ||
49 | - num = 0; | ||
50 | - $('.input-content div').eq('0').addClass('verification-code').html('获取验证码'); | ||
51 | - clearInterval(time); | ||
52 | - | ||
53 | - } else { | ||
54 | - $('.input-content div').eq('0').removeClass('verification-code').html('重新发送' + (60 - num)); | ||
55 | - } | ||
56 | - }, 1000); | 46 | + if (data.result.code === 200) { |
47 | + if (data.result.ended) { | ||
48 | + $('.tip-wrap').removeClass('hidden'); | ||
49 | + $('.tip-wrap .title').html(data.result.message); | ||
50 | + } else if (data.result.geted) { | ||
51 | + $('.page .gain-coupon-centent').removeClass('hidden'); | ||
52 | + $('.page .coupon-centent').addClass('hidden'); | ||
53 | + } else if (data.result.newUser) { | ||
54 | + $('.coupon-centent .phone-input-content').addClass('hidden'); | ||
55 | + $('.coupon-centent .vertify-input-content').removeClass('hidden'); | ||
56 | + } else if (data.result.wrongNumb) { | ||
57 | + $('#dialog').removeClass('hidden'); | ||
58 | + $('.keep-out').removeClass('hidden'); | ||
59 | + $('#dialog .content').html('<p class="phone-error">手机号错误,请重新输入。<p>'); | ||
60 | + setTimeout(function() { | ||
61 | + $('.messages').addClass('hidden'); | ||
62 | + $('.keep-out').addClass('hidden'); | ||
63 | + $('#dialog .content').html(' '); | ||
64 | + }, 1400); | ||
65 | + return; | ||
66 | + } | ||
57 | } else { | 67 | } else { |
58 | $('#dialog').removeClass('hidden'); | 68 | $('#dialog').removeClass('hidden'); |
59 | $('.keep-out').removeClass('hidden'); | 69 | $('.keep-out').removeClass('hidden'); |
60 | - $('#dialog .content').html('<p class="phone-error">' + data.message + '<p>'); | 70 | + $('#dialog .content').html('<p class="phone-error">' + 网络错误 + '<p>'); |
61 | setTimeout(function() { | 71 | setTimeout(function() { |
62 | $('.messages').addClass('hidden'); | 72 | $('.messages').addClass('hidden'); |
63 | $('.keep-out').addClass('hidden'); | 73 | $('.keep-out').addClass('hidden'); |
@@ -71,20 +81,39 @@ $('.input-content').on('click', '.get', function() { | @@ -71,20 +81,39 @@ $('.input-content').on('click', '.get', function() { | ||
71 | $('.input-content div').eq('1').removeClass('get'); | 81 | $('.input-content div').eq('1').removeClass('get'); |
72 | if ($(this).siblings('input').val().length === 4) { | 82 | if ($(this).siblings('input').val().length === 4) { |
73 | $.ajax({ | 83 | $.ajax({ |
74 | - url: '/activity/cocacola/CocacolaController/validRegCodeAndSendCode', | 84 | + url: '/coupon/verify', |
75 | data: { | 85 | data: { |
76 | - code: $('#verification').val(), | 86 | + identifycode: $('#verification').val(), |
77 | mobile: $('#phone').val(), | 87 | mobile: $('#phone').val(), |
78 | - client_id: $.cookie('_yasvd') | 88 | + ordercode: orderCode |
79 | }, | 89 | }, |
80 | dataType: 'json', | 90 | dataType: 'json', |
81 | success: function(data) { | 91 | success: function(data) { |
82 | - if (data.code === 200) { | ||
83 | - location.href = 'gain.html?mobile=' + $('#phone').val(); | 92 | + if (data.result.code === 200) { |
93 | + if (data.result.ended) { | ||
94 | + $('.tip-wrap').removeClass('hidden'); | ||
95 | + $('.tip-wrap .title').html(data.result.message); | ||
96 | + } else if (data.result.geted) { | ||
97 | + $('.page .gain-coupon-centent').removeClass('hidden'); | ||
98 | + $('.page .coupon-centent').addClass('hidden'); | ||
99 | + } else if (data.result.newUser) { | ||
100 | + $('.coupon-centent .phone-input-content').addClass('hidden'); | ||
101 | + $('.coupon-centent .vertify-input-content').removeClass('hidden'); | ||
102 | + } else if (data.result.wrongNumb) { | ||
103 | + $('#dialog').removeClass('hidden'); | ||
104 | + $('.keep-out').removeClass('hidden'); | ||
105 | + $('#dialog .content').html('<p class="phone-error">手机号错误,请重新输入。<p>'); | ||
106 | + setTimeout(function() { | ||
107 | + $('.messages').addClass('hidden'); | ||
108 | + $('.keep-out').addClass('hidden'); | ||
109 | + $('#dialog .content').html(' '); | ||
110 | + }, 1400); | ||
111 | + return; | ||
112 | + } | ||
84 | } else { | 113 | } else { |
85 | $('#dialog').removeClass('hidden'); | 114 | $('#dialog').removeClass('hidden'); |
86 | $('.keep-out').removeClass('hidden'); | 115 | $('.keep-out').removeClass('hidden'); |
87 | - $('#dialog .content').html('<p class="phone-error">' + data.message + '<p>'); | 116 | + $('#dialog .content').html('<p class="phone-error">' + data.result.message + '<p>'); |
88 | setTimeout(function() { | 117 | setTimeout(function() { |
89 | $('.messages').addClass('hidden'); | 118 | $('.messages').addClass('hidden'); |
90 | $('.keep-out').addClass('hidden'); | 119 | $('.keep-out').addClass('hidden'); |
@@ -5,11 +5,24 @@ | @@ -5,11 +5,24 @@ | ||
5 | font-size: 14px; | 5 | font-size: 14px; |
6 | } | 6 | } |
7 | 7 | ||
8 | + .bg-contain { | ||
9 | + width: 100%; | ||
10 | + height: 100%; | ||
11 | + position: absolute; | ||
12 | + | ||
13 | + img { | ||
14 | + width: 100%; | ||
15 | + height: auto; | ||
16 | + } | ||
17 | + } | ||
18 | + | ||
8 | .page { | 19 | .page { |
9 | width: 100%; | 20 | width: 100%; |
10 | height: 100%; | 21 | height: 100%; |
11 | padding-bottom: 60px; | 22 | padding-bottom: 60px; |
12 | - background: #c4211a; | 23 | + position: absolute; |
24 | + top: 0; | ||
25 | + bottom: 0; | ||
13 | } | 26 | } |
14 | .coupon-header { | 27 | .coupon-header { |
15 | width: 100%; | 28 | width: 100%; |
@@ -20,8 +33,10 @@ | @@ -20,8 +33,10 @@ | ||
20 | 33 | ||
21 | .coupon-centent, | 34 | .coupon-centent, |
22 | .gain-coupon-centent { | 35 | .gain-coupon-centent { |
36 | + margin-top: 428px !important; | ||
23 | height: 520px; | 37 | height: 520px; |
24 | - margin: 0 30px; | 38 | + margin-left: 30px; |
39 | + margin-right: 30px; | ||
25 | background: #9d1a15; | 40 | background: #9d1a15; |
26 | } | 41 | } |
27 | 42 | ||
@@ -65,6 +80,7 @@ | @@ -65,6 +80,7 @@ | ||
65 | line-height: 88px; | 80 | line-height: 88px; |
66 | } | 81 | } |
67 | 82 | ||
83 | + .verification-code, | ||
68 | .get { | 84 | .get { |
69 | background: #fff; | 85 | background: #fff; |
70 | color: #444; | 86 | color: #444; |
@@ -189,10 +205,11 @@ | @@ -189,10 +205,11 @@ | ||
189 | 205 | ||
190 | .activity-message h3 { | 206 | .activity-message h3 { |
191 | width: 100%; | 207 | width: 100%; |
192 | - height: 3.4rem; | ||
193 | - padding-top: 0.6rem; | ||
194 | - line-height: 3.4rem; | ||
195 | - font-size: 1.2rem; | 208 | + height: 40px; |
209 | + margin-top: 40px; | ||
210 | + margin-bottom: 10px; | ||
211 | + line-height: 40px; | ||
212 | + font-size: 32px; | ||
196 | text-align: center; | 213 | text-align: center; |
197 | } | 214 | } |
198 | 215 | ||
@@ -201,7 +218,11 @@ | @@ -201,7 +218,11 @@ | ||
201 | height: auto; | 218 | height: auto; |
202 | overflow: hidden; | 219 | overflow: hidden; |
203 | margin: 0 auto; | 220 | margin: 0 auto; |
204 | - line-height: 2rem; | 221 | + font-size: 26px; |
222 | + line-height: 40px; | ||
223 | + | ||
224 | + padding-left: 40px; | ||
225 | + text-indent: -40px; | ||
205 | } | 226 | } |
206 | 227 | ||
207 | .messages { | 228 | .messages { |
-
Please register or login to post a comment