Showing
8 changed files
with
21 additions
and
27 deletions
@@ -6,10 +6,10 @@ const library = '../../../library'; | @@ -6,10 +6,10 @@ const library = '../../../library'; | ||
6 | const couponModel = require(`${mRoot}/coupon`); // 领取优惠券 model | 6 | const couponModel = require(`${mRoot}/coupon`); // 领取优惠券 model |
7 | const log = require(`${library}/logger`); | 7 | const log = require(`${library}/logger`); |
8 | 8 | ||
9 | -exports.index = (req, res) => { | 9 | +exports.index = (req, res, next) => { |
10 | var renderData = { | 10 | var renderData = { |
11 | - module: 'coupon', | ||
12 | - page: 'index', | 11 | + module: 'activity', |
12 | + page: 'coupon', | ||
13 | appDownLoadLink: 'http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho' | 13 | appDownLoadLink: 'http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho' |
14 | }, | 14 | }, |
15 | ordercode = req.query.ordercode, | 15 | ordercode = req.query.ordercode, |
@@ -33,19 +33,17 @@ exports.index = (req, res) => { | @@ -33,19 +33,17 @@ exports.index = (req, res) => { | ||
33 | couponData.appDownLoadLink = renderData.appDownLoadLink; | 33 | couponData.appDownLoadLink = renderData.appDownLoadLink; |
34 | res.render('coupon', { | 34 | res.render('coupon', { |
35 | result: couponData, | 35 | result: couponData, |
36 | - module: 'coupon', | ||
37 | - page: 'index', | 36 | + module: 'activity', |
37 | + page: 'coupon', | ||
38 | title: couponData.title | 38 | title: couponData.title |
39 | }); | 39 | }); |
40 | - }).catch((err) => { | ||
41 | - log.error('频道页面渲染错误:' + JSON.stringify(err)); | ||
42 | - }); | 40 | + }).catch(next); |
43 | }; | 41 | }; |
44 | 42 | ||
45 | -exports.getCoupon = (req, res) => { | 43 | +exports.getCoupon = (req, res, next) => { |
46 | var renderData = { | 44 | var renderData = { |
47 | - module: 'coupon', | ||
48 | - page: 'index' | 45 | + module: 'activity', |
46 | + page: 'coupon' | ||
49 | }; | 47 | }; |
50 | 48 | ||
51 | var ordercode = req.query.ordercode, | 49 | var ordercode = req.query.ordercode, |
@@ -68,15 +66,13 @@ exports.getCoupon = (req, res) => { | @@ -68,15 +66,13 @@ exports.getCoupon = (req, res) => { | ||
68 | res.json({ | 66 | res.json({ |
69 | result: couponData | 67 | result: couponData |
70 | }); | 68 | }); |
71 | - }).catch((err) => { | ||
72 | - log.error('频道页面渲染错误:' + JSON.stringify(err)); | ||
73 | - }); | 69 | + }).catch(next); |
74 | }; | 70 | }; |
75 | 71 | ||
76 | -exports.verify = (req, res) => { | 72 | +exports.verify = (req, res, next) => { |
77 | var renderData = { | 73 | var renderData = { |
78 | - module: 'coupon', | ||
79 | - page: 'index' | 74 | + module: 'activity', |
75 | + page: 'coupon' | ||
80 | }; | 76 | }; |
81 | 77 | ||
82 | 78 | ||
@@ -103,7 +99,5 @@ exports.verify = (req, res) => { | @@ -103,7 +99,5 @@ exports.verify = (req, res) => { | ||
103 | res.json({ | 99 | res.json({ |
104 | result: couponData | 100 | result: couponData |
105 | }); | 101 | }); |
106 | - }).catch((err) => { | ||
107 | - log.error('频道页面渲染错误:' + JSON.stringify(err)); | ||
108 | - }); | 102 | + }).catch(next); |
109 | }; | 103 | }; |
@@ -21,7 +21,7 @@ const getPageInfo = (pageInfo) => { | @@ -21,7 +21,7 @@ const getPageInfo = (pageInfo) => { | ||
21 | dest.couponPic = pageInfo.data.couponPic; | 21 | dest.couponPic = pageInfo.data.couponPic; |
22 | dest.oldUserCouponPic = pageInfo.data.oldUserCouponPic; | 22 | dest.oldUserCouponPic = pageInfo.data.oldUserCouponPic; |
23 | dest.mobile = pageInfo.data.mobile; | 23 | dest.mobile = pageInfo.data.mobile; |
24 | - | 24 | + dest.wechatShare = true; |
25 | // 强制活动开始,活动上线产品要求这样设置 | 25 | // 强制活动开始,活动上线产品要求这样设置 |
26 | pageInfo.data.flag = 1; | 26 | pageInfo.data.flag = 1; |
27 | if (pageInfo.data.flag === 1) { | 27 | if (pageInfo.data.flag === 1) { |
@@ -44,7 +44,7 @@ | @@ -44,7 +44,7 @@ | ||
44 | <div class="input-content vertify-input-content hidden"> | 44 | <div class="input-content vertify-input-content hidden"> |
45 | <input id="verification" type="text" placeholder="请输入验证码" maxlength="4"/> | 45 | <input id="verification" type="text" placeholder="请输入验证码" maxlength="4"/> |
46 | <i class="clear-input iconfont hidden clear-verify"></i> | 46 | <i class="clear-input iconfont hidden clear-verify"></i> |
47 | - <div>验证领红包</div> | 47 | + <div>注册领红包</div> |
48 | </div> | 48 | </div> |
49 | 49 | ||
50 | <div class="coupon-description"> | 50 | <div class="coupon-description"> |
@@ -13,8 +13,8 @@ module.exports = { | @@ -13,8 +13,8 @@ module.exports = { | ||
13 | port: 6001, | 13 | port: 6001, |
14 | siteUrl: '//m.yohobuy.com', | 14 | siteUrl: '//m.yohobuy.com', |
15 | domains: { | 15 | domains: { |
16 | - api: 'http://api.yoho.yohoops.org/', | ||
17 | - service: 'http://service.yoho.yohoops.org/' | 16 | + api: 'http://devapi.yoho.cn:58078/', |
17 | + service: 'http://testservice.yoho.cn:28078/' | ||
18 | }, | 18 | }, |
19 | useOneapm: false, | 19 | useOneapm: false, |
20 | useCache: false, | 20 | useCache: false, |
@@ -36,9 +36,9 @@ | @@ -36,9 +36,9 @@ | ||
36 | {{{body}}} | 36 | {{{body}}} |
37 | {{> footer}} | 37 | {{> footer}} |
38 | </div> | 38 | </div> |
39 | + <script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.1.0.js"></script> | ||
39 | 40 | ||
40 | {{#wechatShare}} | 41 | {{#wechatShare}} |
41 | - <script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.1.0.js"></script> | ||
42 | {{/wechatShare}} | 42 | {{/wechatShare}} |
43 | {{#if devEnv}} | 43 | {{#if devEnv}} |
44 | <script src="//localhost:5001/libs.js"></script> | 44 | <script src="//localhost:5001/libs.js"></script> |
@@ -7,7 +7,7 @@ var $ = require('yoho-jquery'), | @@ -7,7 +7,7 @@ var $ = require('yoho-jquery'), | ||
7 | newUserCouponPic = $('#newUserCouponPic').html(), | 7 | newUserCouponPic = $('#newUserCouponPic').html(), |
8 | tipMessage = $('#tipMessage').html(), | 8 | tipMessage = $('#tipMessage').html(), |
9 | activityID = $('#activityID').html(), | 9 | activityID = $('#activityID').html(), |
10 | - _weChatInterface = 'http://www.yohoshow.com/api/wechat/getSignPackage', | 10 | + _weChatInterface = '//m.yohobuy.com/life/getSignPackage', |
11 | shareTitle = $('#shareTitle').val(), | 11 | shareTitle = $('#shareTitle').val(), |
12 | shareImg = $('#shareImg').val(), | 12 | shareImg = $('#shareImg').val(), |
13 | shareDesc = $('#shareDesc').val(), | 13 | shareDesc = $('#shareDesc').val(), |
@@ -9,7 +9,7 @@ | @@ -9,7 +9,7 @@ | ||
9 | @import "product/index"; | 9 | @import "product/index"; |
10 | @import "common/index"; | 10 | @import "common/index"; |
11 | @import "outlet/index"; | 11 | @import "outlet/index"; |
12 | -@import "coupon/index"; | 12 | +@import "activity/index"; |
13 | @import "guang/index"; | 13 | @import "guang/index"; |
14 | 14 | ||
15 | @import "cart/chose-panel"; | 15 | @import "cart/chose-panel"; |
-
Please register or login to post a comment