Merge remote-tracking branch 'remotes/origin/hotfix/coupon'
Showing
1 changed file
with
23 additions
and
23 deletions
@@ -8,31 +8,31 @@ var api = global.yoho.API; | @@ -8,31 +8,31 @@ var api = global.yoho.API; | ||
8 | const getPageInfo = (pageInfo) => { | 8 | const getPageInfo = (pageInfo) => { |
9 | var dest = {}; | 9 | var dest = {}; |
10 | 10 | ||
11 | - dest.shareTitle = pageInfo.data.shareTitle; | ||
12 | - dest.shareDesc = pageInfo.data.shareContent; | ||
13 | - dest.shareImg = pageInfo.data.shareImgUrl; | ||
14 | - dest.shareLink = pageInfo.data.shareUrl; | ||
15 | - dest.code = pageInfo.code; | ||
16 | - dest.activityID = pageInfo.id; | ||
17 | - dest.title = pageInfo.data.h5Title; | ||
18 | - dest.activityDesc = pageInfo.data.activityDesc; | ||
19 | - dest.couponPic = pageInfo.data.couponPic; | ||
20 | - dest.oldUserCouponPic = pageInfo.data.oldUserCouponPic; | ||
21 | - dest.mobile = pageInfo.data.mobile; | ||
22 | - dest.wechatShare = true; | ||
23 | - | ||
24 | - // 强制活动开始,活动上线产品要求这样设置 | ||
25 | - pageInfo.data.flag = 1; | ||
26 | - if (pageInfo.data.flag === 1) { | ||
27 | - dest.bgImg = pageInfo.data.activityNormalPic; | ||
28 | - } else { | ||
29 | - dest.bgImg = pageInfo.data.activityEndPic; | ||
30 | - dest.ended = true; | 11 | + if (pageInfo && pageInfo.data) { |
12 | + dest.shareTitle = pageInfo.data.shareTitle; | ||
13 | + dest.shareDesc = pageInfo.data.shareContent; | ||
14 | + dest.shareImg = pageInfo.data.shareImgUrl; | ||
15 | + dest.shareLink = pageInfo.data.shareUrl; | ||
16 | + dest.code = pageInfo.code; | ||
17 | + dest.activityID = pageInfo.id; | ||
18 | + dest.title = pageInfo.data.h5Title; | ||
19 | + dest.activityDesc = pageInfo.data.activityDesc; | ||
20 | + dest.couponPic = pageInfo.data.couponPic; | ||
21 | + dest.oldUserCouponPic = pageInfo.data.oldUserCouponPic; | ||
22 | + dest.mobile = pageInfo.data.mobile; | ||
23 | + dest.wechatShare = true; | ||
24 | + | ||
25 | + // 强制活动开始,活动上线产品要求这样设置 | ||
26 | + pageInfo.data.flag = 1; | ||
27 | + if (pageInfo.data.flag === 1) { | ||
28 | + dest.bgImg = pageInfo.data.activityNormalPic; | ||
29 | + } else { | ||
30 | + dest.bgImg = pageInfo.data.activityEndPic; | ||
31 | + dest.ended = true; | ||
32 | + } | ||
33 | + dest.message = pageInfo.data.returnMsg; | ||
31 | } | 34 | } |
32 | - dest.message = pageInfo.data.returnMsg; | ||
33 | 35 | ||
34 | - // 清空变量,释放内存 | ||
35 | - pageInfo = {}; | ||
36 | return dest; | 36 | return dest; |
37 | }; | 37 | }; |
38 | 38 |
-
Please register or login to post a comment