Authored by 梁志锋

merge master

@@ -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,18 @@ exports.index = (req, res) => { @@ -33,19 +33,18 @@ 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 + wechatShare: true,
38 title: couponData.title 39 title: couponData.title
39 }); 40 });
40 - }).catch((err) => {  
41 - log.error('频道页面渲染错误:' + JSON.stringify(err));  
42 - }); 41 + }).catch(next);
43 }; 42 };
44 43
45 -exports.getCoupon = (req, res) => { 44 +exports.getCoupon = (req, res, next) => {
46 var renderData = { 45 var renderData = {
47 - module: 'coupon',  
48 - page: 'index' 46 + module: 'activity',
  47 + page: 'coupon'
49 }; 48 };
50 49
51 var ordercode = req.query.ordercode, 50 var ordercode = req.query.ordercode,
@@ -68,15 +67,13 @@ exports.getCoupon = (req, res) => { @@ -68,15 +67,13 @@ exports.getCoupon = (req, res) => {
68 res.json({ 67 res.json({
69 result: couponData 68 result: couponData
70 }); 69 });
71 - }).catch((err) => {  
72 - log.error('频道页面渲染错误:' + JSON.stringify(err));  
73 - }); 70 + }).catch(next);
74 }; 71 };
75 72
76 -exports.verify = (req, res) => { 73 +exports.verify = (req, res, next) => {
77 var renderData = { 74 var renderData = {
78 - module: 'coupon',  
79 - page: 'index' 75 + module: 'activity',
  76 + page: 'coupon'
80 }; 77 };
81 78
82 79
@@ -103,7 +100,5 @@ exports.verify = (req, res) => { @@ -103,7 +100,5 @@ exports.verify = (req, res) => {
103 res.json({ 100 res.json({
104 result: couponData 101 result: couponData
105 }); 102 });
106 - }).catch((err) => {  
107 - log.error('频道页面渲染错误:' + JSON.stringify(err));  
108 - }); 103 + }).catch(next);
109 }; 104 };
@@ -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">&#xe626;</i> 46 <i class="clear-input iconfont hidden clear-verify">&#xe626;</i>
47 - <div>验证领红包</div> 47 + <div>注册领红包</div>
48 </div> 48 </div>
49 49
50 <div class="coupon-description"> 50 <div class="coupon-description">
@@ -9,8 +9,6 @@ const mRoot = '../models'; @@ -9,8 +9,6 @@ const mRoot = '../models';
9 const _ = require('lodash'); 9 const _ = require('lodash');
10 const starModel = require(`${mRoot}/star`); 10 const starModel = require(`${mRoot}/star`);
11 11
12 -// const headerModel = require('../../../doraemon/models/header');  
13 -  
14 const headTab = [ 12 const headTab = [
15 { 13 {
16 url: '/guang/star', 14 url: '/guang/star',
@@ -21,22 +19,17 @@ const headTab = [ @@ -21,22 +19,17 @@ const headTab = [
21 name: '星专题' 19 name: '星专题'
22 }, 20 },
23 { 21 {
24 - url: '/guang/star/collocation?uid=', 22 + url: '/guang/star/collocation',
25 name: '星搭配' 23 name: '星搭配'
26 } 24 }
27 ]; 25 ];
28 26
29 -const processPublicData = (req, title) => {  
30 - // let headerData = headerModel.setNav({  
31 - // navTitle: title,  
32 - // navBtn: navBtn  
33 - // }); 27 +let md5Str = '';
34 28
  29 +const processPublicData = (req, title) => {
35 let renderData = { 30 let renderData = {
36 module: 'guang', 31 module: 'guang',
37 title: title 32 title: title
38 -  
39 - // pageHeader: headerData  
40 }; 33 };
41 34
42 if (req.query.app_version || req.query.appVersion) { 35 if (req.query.app_version || req.query.appVersion) {
@@ -56,15 +49,9 @@ exports.index = (req, res, next) => { @@ -56,15 +49,9 @@ exports.index = (req, res, next) => {
56 const pageHeadTab = _.cloneDeep(headTab); 49 const pageHeadTab = _.cloneDeep(headTab);
57 50
58 pageHeadTab[0].cur = true; 51 pageHeadTab[0].cur = true;
59 - pageHeadTab[2].url += (req.query.uid || 0);  
60 -  
61 - // res.render('star/index', _.assign({  
62 - // page: 'star',  
63 - // isStarIndexPage: true,  
64 - // headTab: pageHeadTab  
65 - // }, processPublicData(req, '星潮教室')));  
66 52
67 - starModel.getIndexData((req.query.uid || 0)).then((result) => { 53 + starModel.getIndexData().then((result) => {
  54 + md5Str = result.md5;
68 res.render('star/index', _.assign({ 55 res.render('star/index', _.assign({
69 page: 'star', 56 page: 'star',
70 isStarIndexPage: true, 57 isStarIndexPage: true,
@@ -73,23 +60,31 @@ exports.index = (req, res, next) => { @@ -73,23 +60,31 @@ exports.index = (req, res, next) => {
73 focus: true, 60 focus: true,
74 data: result.ads 61 data: result.ads
75 }, 62 },
76 - starAvatar: result.starAvatar.concat(result.starAvatar).concat(result.starAvatar), // 需要优化,数组重复三次  
77 - articles: result.articles 63 + starAvatar: result.starAvatar ? result.starAvatar : '',
  64 + articles: result.articles,
  65 + md5: result.md5
78 }, processPublicData(req, '星潮教室'))); 66 }, processPublicData(req, '星潮教室')));
79 }).catch(next); 67 }).catch(next);
80 }; 68 };
81 69
82 exports.getIndexHtml = (req, res, next) => { 70 exports.getIndexHtml = (req, res, next) => {
83 - starModel.getIndexData((req.query.uid || 0)).then((result) => {  
84 - res.render('star/index-html', _.assign({  
85 - layout: false,  
86 - content: {  
87 - focus: true,  
88 - data: result.ads  
89 - },  
90 - starAvatar: result.starAvatar.concat(result.starAvatar).concat(result.starAvatar), // 需要优化,数组重复三次  
91 - articles: result.articles  
92 - })); 71 + starModel.getIndexData().then((result) => {
  72 + if (md5Str !== result.md5) {
  73 + md5Str = result.md5;
  74 +
  75 + res.render('star/index-html', _.assign({
  76 + layout: false,
  77 + content: {
  78 + focus: true,
  79 + data: result.ads
  80 + },
  81 + starAvatar: result.starAvatar ? result.starAvatar : '',
  82 + articles: result.articles
  83 + }));
  84 + } else {
  85 + res.json();
  86 + }
  87 +
93 }).catch(next); 88 }).catch(next);
94 }; 89 };
95 90
@@ -104,7 +99,6 @@ exports.special = (req, res, next) => { @@ -104,7 +99,6 @@ exports.special = (req, res, next) => {
104 const pageHeadTab = _.cloneDeep(headTab); 99 const pageHeadTab = _.cloneDeep(headTab);
105 100
106 pageHeadTab[1].cur = true; 101 pageHeadTab[1].cur = true;
107 - pageHeadTab[2].url += (req.query.uid || 0);  
108 res.render('star/special', _.assign({ 102 res.render('star/special', _.assign({
109 page: 'special' 103 page: 'special'
110 }, processPublicData(req, '星潮教室'), { 104 }, processPublicData(req, '星潮教室'), {
@@ -126,7 +120,6 @@ exports.collocation = (req, res) => { @@ -126,7 +120,6 @@ exports.collocation = (req, res) => {
126 const pageHeadTab = _.cloneDeep(headTab); 120 const pageHeadTab = _.cloneDeep(headTab);
127 121
128 pageHeadTab[2].cur = true; 122 pageHeadTab[2].cur = true;
129 - pageHeadTab[2].url += (req.query.uid || 0);  
130 res.render('star/collocation', _.assign({ 123 res.render('star/collocation', _.assign({
131 isStarDetailPage: true, 124 isStarDetailPage: true,
132 page: 'collocation' 125 page: 'collocation'
@@ -144,7 +137,7 @@ exports.collocation = (req, res) => { @@ -144,7 +137,7 @@ exports.collocation = (req, res) => {
144 */ 137 */
145 exports.collocationList = (req, res, next) => { 138 exports.collocationList = (req, res, next) => {
146 let params = req.query; 139 let params = req.query;
147 - let uid = req.query.uid || 0; // 客户端访问,不能使用 cookie 140 + let uid = req.cookies.guangStarUid || 0; // 客户端访问,不能使用 cookie
148 141
149 starModel.getCollocationListData(params, uid).then((result) => { 142 starModel.getCollocationListData(params, uid).then((result) => {
150 res.render('star/list', _.assign({ 143 res.render('star/list', _.assign({
@@ -163,25 +156,25 @@ exports.collocationList = (req, res, next) => { @@ -163,25 +156,25 @@ exports.collocationList = (req, res, next) => {
163 * @return {[type]} 156 * @return {[type]}
164 */ 157 */
165 exports.setFavorite = (req, res, next) => { 158 exports.setFavorite = (req, res, next) => {
166 - let uid = req.body.uid || 0; // 客户端访问,不能使用 cookie  
167 - let urlEncode = '';  
168 - let url = ''; 159 + let uid = req.cookies.guangStarUid || 0;
169 let params = { 160 let params = {
170 articleId: req.body.articleId, 161 articleId: req.body.articleId,
171 type: req.body.type 162 type: req.body.type
172 }; 163 };
173 164
174 - if (req.body.pageType === '1') {  
175 - url = `/guang/star/collocation?uid=${uid}`;  
176 - urlEncode = '\/guang\/star\/collocation';  
177 - } else {  
178 - url = `/guang/star/detail?tag=${req.body.tag}&uid=${uid}`;  
179 - urlEncode = '\/guang\/star\/detail';  
180 - }  
181 -  
182 starModel.setFavorite(params, uid).then((result) => { 165 starModel.setFavorite(params, uid).then((result) => {
183 if (result.code === 400) { 166 if (result.code === 400) {
184 - result.data = `${url}?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"http:\/\/m.yohobuy.com${urlEncode}","param":{"from":"app"}},"requesturl":{"url":"","param":{}},"priority":"N"}}`; // eslint-disable-line 167 + if (req.body.pageType === '1') {
  168 + let urlEncode = '\/guang\/star\/collocation';
  169 + let url = '/guang/star/collocation';
  170 +
  171 + result.data = `${url}?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"http:\/\/m.yohobuy.com${urlEncode}","param":{"from":"app"}},"requesturl":{"url":"","param":{}},"priority":"N"}}`; // eslint-disable-line
  172 + } else {
  173 + let urlEncode = '\/guang\/star\/detail';
  174 + let url = `/guang/star/detail?tag=${req.body.tag}`;
  175 +
  176 + result.data = `${url}&openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"http:\/\/m.yohobuy.com${urlEncode}","param":{"from":"app","tag":"${req.body.tag}"}},"requesturl":{"url":"","param":{}},"priority":"N"}}`; // eslint-disable-line
  177 + }
185 } 178 }
186 res.json(result); 179 res.json(result);
187 }).catch(next); 180 }).catch(next);
@@ -208,8 +201,9 @@ exports.detail = (req, res) => { @@ -208,8 +201,9 @@ exports.detail = (req, res) => {
208 */ 201 */
209 exports.detailList = (req, res, next) => { 202 exports.detailList = (req, res, next) => {
210 let params = req.query; 203 let params = req.query;
  204 + let uid = req.cookies.guangStarUid || 0;
211 205
212 - starModel.getDetailData(params).then((result) => { 206 + starModel.getDetailData(params, uid).then((result) => {
213 res.render('star/list', _.assign({ 207 res.render('star/list', _.assign({
214 layout: false, 208 layout: false,
215 params: params, 209 params: params,
@@ -41,21 +41,24 @@ const _getResources = (page) => { @@ -41,21 +41,24 @@ const _getResources = (page) => {
41 * @param {[array]} list 41 * @param {[array]} list
42 * @return {[array]} 42 * @return {[array]}
43 */ 43 */
44 -const _processIndexData = (list, uid) => { 44 +const _processIndexData = (dataList) => {
45 const formatData = { 45 const formatData = {
46 ads: [], 46 ads: [],
47 starAvatar: [], 47 starAvatar: [],
48 articles: [] 48 articles: []
49 }; 49 };
50 50
51 - list = list || {}; 51 + let list = dataList.data || {};
  52 +
52 list = camelCase(list); 53 list = camelCase(list);
53 54
  55 + formatData.md5 = dataList.md5;
  56 +
54 // 首页资源位数据处理 57 // 首页资源位数据处理
55 if (list.ads) { 58 if (list.ads) {
56 _.forEach(list.ads.data, (data) => { 59 _.forEach(list.ads.data, (data) => {
57 formatData.ads.push({ 60 formatData.ads.push({
58 - src: data.src, 61 + src: data.src + '/q/80',
59 url: data.url 62 url: data.url
60 }); 63 });
61 }); 64 });
@@ -74,8 +77,8 @@ const _processIndexData = (list, uid) => { @@ -74,8 +77,8 @@ const _processIndexData = (list, uid) => {
74 77
75 _.forEach(data.ext.tags, (tags) => { 78 _.forEach(data.ext.tags, (tags) => {
76 avatar.tags.push({ 79 avatar.tags.push({
77 - avatarUrl: `/guang/star/detail?tag=${tags.tagName}&uid=${uid}&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":"${tags.tagName}"}}}`, // eslint-disable-line  
78 - cover: tags.cover, 80 + avatarUrl: `/guang/star/detail?tag=${tags.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":"${tags.tagName}"}}}`, // eslint-disable-line
  81 + cover: tags.cover ? (tags.cover + '?imageView2/2/w/104/h/104/q/80') : tags.cover,
79 tagName: tags.tagName 82 tagName: tags.tagName
80 }); 83 });
81 }); 84 });
@@ -85,7 +88,7 @@ const _processIndexData = (list, uid) => { @@ -85,7 +88,7 @@ const _processIndexData = (list, uid) => {
85 url: data.url, 88 url: data.url,
86 title: data.title, 89 title: data.title,
87 articeTxt: data.intro, 90 articeTxt: data.intro,
88 - src: data.src, 91 + src: data.src + '/q/80',
89 publishTime: helpers.dateFormat('MM月DD日 hh:mm', data.publishTime), 92 publishTime: helpers.dateFormat('MM月DD日 hh:mm', data.publishTime),
90 viewsNum: data.viewsNum 93 viewsNum: data.viewsNum
91 }, avatar)); 94 }, avatar));
@@ -96,11 +99,11 @@ const _processIndexData = (list, uid) => { @@ -96,11 +99,11 @@ const _processIndexData = (list, uid) => {
96 // 首页明星头像数据处理 99 // 首页明星头像数据处理
97 if (list.tags) { 100 if (list.tags) {
98 _.forEach(list.tags, (data) => { 101 _.forEach(list.tags, (data) => {
99 - let url = `/guang/star/detail?tag=${data.tagName}&uid=${uid}&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 102 + 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
100 103
101 formatData.starAvatar.push({ 104 formatData.starAvatar.push({
102 url: url, 105 url: url,
103 - cover: data.cover 106 + cover: data.cover ? (data.cover + '?imageView2/2/w/180/h/180/q/80') : data.cover
104 }); 107 });
105 }); 108 });
106 } 109 }
@@ -108,66 +111,53 @@ const _processIndexData = (list, uid) => { @@ -108,66 +111,53 @@ const _processIndexData = (list, uid) => {
108 return formatData; 111 return formatData;
109 }; 112 };
110 113
  114 +
111 /** 115 /**
112 - * 明星专题列表数据处理 116 + * 明星专题列表及星搭配数据处理
113 * @param {[array]} list 117 * @param {[array]} list
  118 + * @param {[boolean]} flag 明星专题列表需要转换下日期格式
114 * @return {[array]} 119 * @return {[array]}
115 */ 120 */
116 -const _processDetailData = (list) => { 121 +const _processGuangData = (list, flag) => {
117 const formatData = []; 122 const formatData = [];
118 123
119 list = list || []; 124 list = list || [];
120 list = camelCase(list); 125 list = camelCase(list);
121 126
122 _.forEach(list, (data, key) => { 127 _.forEach(list, (data, key) => {
123 - data.publishTime = helpers.dateFormat('MM月DD日 hh:mm', data.publishTime);  
124 -  
125 - if (key < 4) {  
126 - data.islazy = true; 128 + if (flag) {
  129 + data.publishTime = helpers.dateFormat('MM月DD日 hh:mm', data.publishTime);
127 } 130 }
128 131
129 - formatData.push(data);  
130 - });  
131 -  
132 - return formatData;  
133 -};  
134 -  
135 -  
136 -/**  
137 - * 星搭配文章列表数据处理  
138 - */  
139 -const _processCollocationData = (list) => {  
140 - const formatData = [];  
141 -  
142 - list = list || [];  
143 - list = camelCase(list);  
144 -  
145 - _.forEach(list, (data, key) => {  
146 if (data.isFavor === 'N') { 132 if (data.isFavor === 'N') {
147 data.isCollected = false; 133 data.isCollected = false;
148 } else { 134 } else {
149 data.isCollected = true; 135 data.isCollected = true;
150 } 136 }
151 137
  138 + data.src += '/q/80';
  139 +
152 if (key < 4) { 140 if (key < 4) {
153 data.islazy = true; 141 data.islazy = true;
154 } 142 }
  143 +
155 formatData.push(data); 144 formatData.push(data);
156 }); 145 });
  146 +
157 return formatData; 147 return formatData;
158 }; 148 };
159 149
160 /** 150 /**
161 * 星潮首页 151 * 星潮首页
162 */ 152 */
163 -const getIndexData = (uid) => { 153 +const getIndexData = () => {
164 return api.get('', sign.apiSign({ 154 return api.get('', sign.apiSign({
165 method: 'app.starClass.index', 155 method: 'app.starClass.index',
166 code: '8adc27fcf5676f356602889afcfd2a8e', 156 code: '8adc27fcf5676f356602889afcfd2a8e',
167 client_type: 'iphone' 157 client_type: 'iphone'
168 })).then((result) => { 158 })).then((result) => {
169 if (result && result.code === 200) { 159 if (result && result.code === 200) {
170 - return _processIndexData(result.data, uid); 160 + return _processIndexData(result);
171 } else { 161 } else {
172 logger.error('星潮教室首页数据返回 code 不是 200'); 162 logger.error('星潮教室首页数据返回 code 不是 200');
173 return {}; 163 return {};
@@ -178,19 +168,20 @@ const getIndexData = (uid) => { @@ -178,19 +168,20 @@ const getIndexData = (uid) => {
178 /** 168 /**
179 * 明星专题 169 * 明星专题
180 */ 170 */
181 -const getDetailData = (params) => { 171 +const getDetailData = (params, uid) => {
182 return api.get('', sign.apiSign({ 172 return api.get('', sign.apiSign({
183 method: 'app.starClass.lastTagArticle', 173 method: 'app.starClass.lastTagArticle',
184 tag: params.tag, 174 tag: params.tag,
185 page: params.page || 1, 175 page: params.page || 1,
186 size: 10, 176 size: 10,
  177 + uid: uid,
187 client_type: 'iphone' 178 client_type: 'iphone'
188 })).then((result) => { 179 })).then((result) => {
189 if (result && result.code === 200) { 180 if (result && result.code === 200) {
190 if (params.page > result.data.totalPage) { 181 if (params.page > result.data.totalPage) {
191 return ''; 182 return '';
192 } else { 183 } else {
193 - return _processDetailData(result.data.list); 184 + return _processGuangData(result.data.list, true);
194 } 185 }
195 } else { 186 } else {
196 logger.error('明星专题文章数据返回 code 不是 200'); 187 logger.error('明星专题文章数据返回 code 不是 200');
@@ -213,6 +204,8 @@ const getSpecialData = () => { @@ -213,6 +204,8 @@ const getSpecialData = () => {
213 return; 204 return;
214 } 205 }
215 206
  207 + item.src += '/q/80';
  208 +
216 if (key < 4) { 209 if (key < 4) {
217 item.islazy = true; 210 item.islazy = true;
218 } 211 }
@@ -228,13 +221,12 @@ const getSpecialData = () => { @@ -228,13 +221,12 @@ const getSpecialData = () => {
228 * 星搭配 221 * 星搭配
229 */ 222 */
230 const getCollocationListData = (params, uid) => { 223 const getCollocationListData = (params, uid) => {
231 -  
232 return serviceAPI.get('guang/api/v5/article/getStarClassroomArticleList', sign.apiSign(Object.assign({ 224 return serviceAPI.get('guang/api/v5/article/getStarClassroomArticleList', sign.apiSign(Object.assign({
233 limit: '20', 225 limit: '20',
234 uid: uid 226 uid: uid
235 }, params))).then((result) => { 227 }, params))).then((result) => {
236 if (result && result.code === 200) { 228 if (result && result.code === 200) {
237 - return _processCollocationData(result.data.list.artList); 229 + return _processGuangData(result.data.list.artList);
238 } else { 230 } else {
239 logger.error('获取星搭配文章列表返回 code 不是 200'); 231 logger.error('获取星搭配文章列表返回 code 不是 200');
240 return []; 232 return [];
@@ -250,18 +242,18 @@ const setFavorite = (params, uid) => { @@ -250,18 +242,18 @@ const setFavorite = (params, uid) => {
250 }); 242 });
251 } 243 }
252 244
253 - return api.get('', sign.apiSign({  
254 - method: params.type === 'del' ? 'app.sns.cancelFavorBackCount' : 'app.sns.setFavorBackCount',  
255 - client_type: 'h5', 245 + let url = params.type === 'del' ? '/guang/api/*/favorite/cancelFavorite' : '/guang/api/*/favorite/setFavorite';
  246 +
  247 + return serviceAPI.get(url, sign.apiSign({
256 article_id: params.articleId, 248 article_id: params.articleId,
257 uid: uid 249 uid: uid
258 })); 250 }));
259 }; 251 };
260 252
261 module.exports = { 253 module.exports = {
262 - getIndexData: getIndexData,  
263 - getSpecialData: getSpecialData,  
264 - getCollocationListData: getCollocationListData,  
265 - setFavorite: setFavorite,  
266 - getDetailData: getDetailData 254 + getIndexData,
  255 + getSpecialData,
  256 + getCollocationListData,
  257 + setFavorite,
  258 + getDetailData
267 }; 259 };
1 <div class="star-page yoho-page"> 1 <div class="star-page yoho-page">
2 {{> star/head-tab}} 2 {{> star/head-tab}}
3 - <div class="swiper-num"></div> 3 + <div class="swiper-num swiper-num1"></div>
  4 + <div class="swiper-num swiper-num2"></div>
  5 + <div class="swiper-num swiper-num3"></div>
  6 + <div class="loading-tip">下拉刷新</div>
4 <div class="star-main"> 7 <div class="star-main">
5 - {{> star/index-html}} 8 + <div class="main-content">
  9 + {{> star/index-html}}
  10 + </div>
6 </div> 11 </div>
7 </div> 12 </div>
1 -<div class="loading-tip">下拉刷新</div>  
2 <div class="star-wrap"> 1 <div class="star-wrap">
3 <div class="star-content"> 2 <div class="star-content">
4 {{#content}} 3 {{#content}}
@@ -12,7 +11,7 @@ @@ -12,7 +11,7 @@
12 <ul class="clearfix swiper-wrapper"> 11 <ul class="clearfix swiper-wrapper">
13 {{# starAvatar}} 12 {{# starAvatar}}
14 <li class="swiper-slide"> 13 <li class="swiper-slide">
15 - <a href='{{url}}' data-avatar="{{image cover 180 180}}" class="rank-avatar"></a> 14 + <a href='{{url}}' style="background-image: url({{image cover 180 180}})" class="star"></a>
16 </li> 15 </li>
17 {{/ starAvatar}} 16 {{/ starAvatar}}
18 </ul> 17 </ul>
@@ -4,9 +4,9 @@ @@ -4,9 +4,9 @@
4 {{#if src}} 4 {{#if src}}
5 <a href="{{url}}"> 5 <a href="{{url}}">
6 {{#if islazy}} 6 {{#if islazy}}
7 - <img src ="{{image src 640 310}}"/> 7 + <img src ="{{image src 640 640}}"/>
8 {{else}} 8 {{else}}
9 - <img class="lazy" src ="" data-original="{{image src 640 310}}" /> 9 + <img class="lazy" src ="" data-original="{{image src 640 640}}" />
10 {{/if}} 10 {{/if}}
11 </a> 11 </a>
12 {{/if}} 12 {{/if}}
@@ -90,4 +90,4 @@ if (isProduction) { @@ -90,4 +90,4 @@ if (isProduction) {
90 useOneapm: true, 90 useOneapm: true,
91 useCache: true 91 useCache: true
92 }); 92 });
93 -} 93 +}
@@ -47,5 +47,6 @@ @@ -47,5 +47,6 @@
47 <script src="//cdn.yoho.cn/m-yohobuy-node/{{version}}/libs.js"></script> 47 <script src="//cdn.yoho.cn/m-yohobuy-node/{{version}}/libs.js"></script>
48 <script src="//cdn.yoho.cn/m-yohobuy-node/{{version}}/{{module}}.{{page}}.js"></script> 48 <script src="//cdn.yoho.cn/m-yohobuy-node/{{version}}/{{module}}.{{page}}.js"></script>
49 {{/if}} 49 {{/if}}
  50 + {{> analysis}}
50 </body> 51 </body>
51 </html> 52 </html>
  1 +<!-- Google Tag Manager -->
  2 +<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-W958MG" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
  3 +<script>
  4 +var _hmt = _hmt || [];
  5 +function async_load(){
  6 + (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
  7 + new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
  8 + j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
  9 + '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
  10 + })(window,document,'script','dataLayer','GTM-W958MG');
  11 +
  12 + (function() {
  13 + var hm = document.createElement("script");
  14 + hm.src = "//static.yohobuy.com/js/analytics/analysis.js";
  15 + hm.async = 1;
  16 + var s = document.getElementsByTagName("script")[0];
  17 + s.parentNode.insertBefore(hm, s);
  18 + })();
  19 +}
  20 +window.addEventListener('load', async_load, false);
  21 +</script>
  22 +<script>
  23 +window._py = window._py||[];
  24 +window._py.push(['a', 'MC..o8vMMWxEXDCiqYckD81lUX']);
  25 +window._py.push(['domain','stats.ipinyou.com']);
  26 +window._py.push(['e','']);
  27 +if(typeof _goodsData!='undefined'){
  28 + window._py.push(['pi',_goodsData]);
  29 +}
  30 +-function(d){
  31 + var f = 'https:' == d.location.protocol;var c = d.createElement('script');c.type='text/javascript';c.async=1;
  32 + c.src=(f ? 'https' : 'http') + '://'+(f?'fm.ipinyou.com':'fm.p0y.cn')+'/j/t/adv.js';
  33 + var h = d.getElementsByTagName("script")[0];h.parentNode.insertBefore(c, h);
  34 +}(document);
  35 +</script>
1 { 1 {
2 "name": "m-yohobuy-node", 2 "name": "m-yohobuy-node",
3 - "version": "0.1.0", 3 + "version": "0.1.9",
4 "private": true, 4 "private": true,
5 "description": "A New Yohobuy Project With Express", 5 "description": "A New Yohobuy Project With Express",
6 "repository": { 6 "repository": {
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
  1 +webpackJsonp([19],[function(e,n,o){var t,i,s=o(1),a=s("#orderCode").html(),d=s("#oldUserCouponPic").html(),r=s("#newUserCouponPic").html(),l=s("#tipMessage").html(),c=s("#activityID").html(),h="//m.yohobuy.com/life/getSignPackage",u=s("#shareTitle").val(),m=s("#shareImg").val(),p=s("#shareDesc").val(),g=s("#shareLink").val(),v=window.wx;o(3),s("#phone").bind("input propertychange",function(){11===s(this).val().length?s(".input-content div").eq("0").addClass("verification-code"):(s(".input-content div").eq("0").removeClass(),s(this).val().length>=1?s(".input-content i").eq("0").removeClass("hidden"):s(".input-content i").eq("0").addClass("hidden"))}),s("#verification").bind("input propertychange",function(){4===s(this).val().length?s(".input-content div").eq("1").addClass("get"):(s(".input-content div").eq("1").removeClass(),s(this).val().length>=1?s(".input-content i").eq("1").removeClass("hidden"):s(".input-content i").eq("1").addClass("hidden"))}),s("#activityEnded").html()&&(s(".tip-wrap").removeClass("hidden"),s(".tip-wrap .title").html(l)),s("#newUser").html()||s(".gain-coupon-centent .coupon img").attr("src",d),"undefined"!=typeof v&&(s.getJSON(h+"?pageurl="+encodeURIComponent(location.href.split("#")[0])+"&callback=?",function(e){var n,o,t,i;e&&(n=e.appId.toString(),o=e.timestamp,t=e.nonceStr.toString(),i=e.signature.toString(),v.config({debug:!1,appId:n,timestamp:o,nonceStr:t,signature:i,jsApiList:["checkJsApi","onMenuShareTimeline","onMenuShareAppMessage","onMenuShareQQ","onMenuShareWeibo","hideMenuItems","showMenuItems","hideAllNonBaseMenuItem","showAllNonBaseMenuItem","translateVoice","startRecord","stopRecord","onRecordEnd","playVoice","pauseVoice","stopVoice","uploadVoice","downloadVoice","chooseImage","previewImage","uploadImage","downloadImage","getNetworkType","openLocation","getLocation","hideOptionMenu","showOptionMenu","closeWindow","scanQRCode","chooseWXPay","openProductSpecificView","addCard","chooseCard","openCard"]}))}),v.ready(function(){var e={title:u,desc:p,imgUrl:m,link:g};v.onMenuShareAppMessage(e),v.onMenuShareTimeline(e),v.onMenuShareQQ(e),v.onMenuShareWeibo(e)})),s(".phone-input-content div").on("click",function(){return t=s(this).siblings("input").val(),i=/[0-9]{11}/,i.test(t)?void s.ajax({url:"/activity/coupon/phone",data:{mobile:s("#phone").val(),ordercode:a},success:function(e){if(200===e.result.code)if(window._yas&&window._yas.sendCustomInfo&&window._yas.sendCustomInfo({activityID:c,returnCode:e.result.returnCode},!0),e.result.newUser?s(".gain-coupon-centent .coupon img").attr("src",r):s(".gain-coupon-centent .coupon img").attr("src",d),e.result.ended)s(".tip-wrap").removeClass("hidden"),s(".tip-wrap .title").html(e.result.message);else if(e.result.geted)s(".page .gain-coupon-centent").removeClass("hidden"),s(".page .coupon-centent").addClass("hidden"),s("#mobile").html("优惠券已放至账户"+e.result.mobile);else if(e.result.newUser)s(".coupon-centent .phone-input-content").addClass("hidden"),s(".coupon-centent .vertify-input-content").removeClass("hidden");else{if(e.result.wrongNumb)return s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">手机号错误,请重新输入。<p>'),void setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")},1400);if(e.result.oldUserAskCouponOnceMore)return s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">您今天已经领过咯,速度去有货购潮流!<p>'),void setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" "),s(".page .gain-coupon-centent").removeClass("hidden"),s(".page .coupon-centent").addClass("hidden"),s("#mobile").html("优惠券已放至账户"+e.result.mobile)},2500)}else s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">网络错误<p>'),setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")},1400)},error:function(){s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">网络错误,稍后再试!<p>'),setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")},1400)}}):(s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">手机号错误,请重新输入。<p>'),void setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")},1400))}),s(".vertify-input-content").on("click",".get",function(){s(".input-content div").eq("1").removeClass("get"),4===s(this).siblings("input").val().length?s.ajax({url:"/activity/coupon/verify",data:{identifycode:s("#verification").val(),mobile:s("#phone").val(),ordercode:a},dataType:"json",success:function(e){if(200===e.result.code)if(window._yas&&window._yas.sendCustomInfo&&window._yas.sendCustomInfo({activityID:c,returnCode:e.result.returnCode},!0),e.result.newUser?s(".gain-coupon-centent .coupon img").attr("src",r):s(".gain-coupon-centent .coupon img").attr("src",d),e.result.ended)s(".tip-wrap").removeClass("hidden"),s(".tip-wrap .title").html(e.result.message);else if(e.result.geted)s(".page .gain-coupon-centent").removeClass("hidden"),s(".page .coupon-centent").addClass("hidden"),s("#mobile").html("优惠券已放至账户"+e.result.mobile);else if(e.result.newUser)s(".coupon-centent .phone-input-content").addClass("hidden"),s(".coupon-centent .vertify-input-content").removeClass("hidden");else{if(e.result.wrongNumb)return s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">手机号错误,请重新输入。<p>'),void setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")},1400);if(e.result.vertifyWrong)return s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">验证码错误,请重新输入。<p>'),void setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")},1400);if(e.result.oldUserAskCouponOnceMore)return s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">您今天已经领过咯,速度去有货购潮流!<p>'),void setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" "),s(".page .gain-coupon-centent").removeClass("hidden"),s(".page .coupon-centent").addClass("hidden"),s("#mobile").html("优惠券已放至账户"+e.result.mobile)},2500)}else s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">'+e.result.message+"<p>"),setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")},1400)},error:function(){s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">网络错误,稍后再试!<p>'),setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")},1400)}}):(s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">验证码错误,请重新输入。<p>'),setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")},1400))}),s(".close").on("click",function(){s(".dialog").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")}),s(".coupon-description span").on("click",function(){s("#message").removeClass("hidden"),s(".mask").removeClass("hidden")}),s(".description").on("click",function(){s("#message").removeClass("hidden"),s(".mask").removeClass("hidden")}),s(".use-coupon-btn").on("click",function(){window._yas&&window._yas.sendCustomInfo&&window._yas.sendCustomInfo({activityID:c},!1)}),s(".input-content .clear-mobile").on("click",function(){s(".input-content input").eq("0").val(""),s(this).addClass("hidden"),s(".input-content div").eq("0").removeClass()}),s(".input-content .clear-verify").on("click",function(){s(".input-content input").eq("1").val(""),s(this).addClass("hidden"),s(".input-content div").eq("1").removeClass()})},,,function(e,n,o){function t(e){var n,o,t=document.cookie;return document.cookie&&""!==document.cookie&&(o=t.indexOf(e+"="),o>-1&&(o+=e.length+1,n=decodeURIComponent(m.trim(t.substring(o,t.indexOf(";",o)))))),n}function i(e,n,o){var t,i,s,a,d="";"undefined"!=typeof n&&(o=o||{},null===n&&(n="",o.expires=-1),o.expires&&("number"==typeof o.expires||o.expires.toUTCString)&&("number"==typeof o.expires?(a=new Date,a.setTime(a.getTime()+24*o.expires*60*60*1e3)):a=o.expires,d="; expires="+a.toUTCString()),t=o.path?"; path="+o.path:"",i=o.domain?"; domain="+o.domain:"",s=o.secure?"; secure":"",document.cookie=[e,"=",encodeURIComponent(n),d,t,i,s].join(""))}function s(){var e=!!navigator.cookieEnabled;return"undefined"!=typeof navigator.cookieEnabled||e||(document.cookie="testcookie",e=-1!==document.cookie.indexOf("testcookie")),e}function a(){var e,n=t("_UID");return"undefined"==typeof n?0:(e=n.split("::"),"undefined"==typeof e||e.length<4?0:e)}function d(){var e=a();return 0===e?0:e[1]}function r(){var e=t("_g");return"undefined"==typeof e?"":JSON.parse(e).k}function l(){var e;0!==g.length&&(e=Math.min(m(window).height(),window.screen.availHeight),m("body").height()<=e-parseInt(g.css("height"),0)?g.addClass("bottom"):g.removeClass("bottom"))}function c(e){var n=m(e).outerHeight();e&&g.css("margin-bottom",n+"px")}function h(){var e,n,o=[],t=window.location.search.slice(1).split("&");for(n=0;n<t.length;n++)e=t[n].split("="),o.push(e[0]),o[e[0]]=e[1];return o}function u(e){return e.replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")}var m=o(1),p=o(4),g=m("#yoho-footer"),v=m(".yoho-page"),f=m(".yoho-header");!function(){var e,n=g.children(".op-row"),o=m(".back-to-top"),t=a();l(),0===t?n.prepend('<a href="http://m.yohobuy.com/signin.html?refer='+location.href+'">登录</a><span class="sep-line">|</span><a href="http://m.yohobuy.com/reg.html">注册</a>'):n.prepend('<span>Hi,</span><a class="user-name" href="http://m.yohobuy.com/home?tmp='+Math.random()+'">'+t[0]+'</a><a href="http://m.yohobuy.com/passport/signout/index">退出</a>'),o.length>0&&(e=new p(o[0]),e.on("tap",function(e){return m(window).scrollTop(0),e.srcEvent.preventDefault(),!1})),g.removeClass("hide")}(),function(e,n,o,t,i){var s=n.createElement(o),a=n.getElementsByTagName(o)[0];e.YohoAcquisitionObject=i,e[i]=function(){e[i].p=arguments},s.async=1,s.src=t,a.parentNode.insertBefore(s,a)}(window,document,"script",("https:"===document.location.protocol?"https":"http")+"://cdn.yoho.cn/yas-jssdk/1.0.17/yas.js","_yas"),function(){var e=d();e=0===e?"":e,window._ozuid=e,window._yas&&window._yas(1*new Date,"1.0.17","yohobuy_m",e,"","")}(),f.on("touchstart","a",function(){f.find("a").removeClass("highlight"),m(this).addClass("highlight")}).on("touchend touchcancel","a",function(){m(this).removeClass("highlight")}),v.on("touchstart",".tap-hightlight",function(){m(this).siblings(".tap-hightlight").removeClass("highlight"),m(this).addClass("highlight")}).on("touchend touchcancel",".tap-hightlight",function(){m(this).removeClass("highlight")}),m(".nav-home").on("touchstart",function(){m(".homebuttom").toggleClass("hide")}),function(){var e,n,o=0,t="webkit moz ms o".split(" "),i=window.requestAnimationFrame,s=window.cancelAnimationFrame;for(n=0;n<t.length&&(!i||!s);n++)e=t[n],i=i||window[e+"RequestAnimationFrame"],s=s||window[e+"CancelAnimationFrame"]||window[e+"CancelRequestAnimationFrame"];i&&s||(i=function(e){var n=(new Date).getTime(),t=Math.max(0,16-(n-o)),i=window.setTimeout(function(){e(n+t)},t);return o=n+t,i},s=function(e){window.clearTimeout(e)}),window.requestAnimationFrame=i,window.cancelAnimationFrame=s}(),m.extend({queryString:h}),11===g.find(".user-name").text().length&&g.find(".user-name").html(u(g.find(".user-name").text())),window.cookie=t,window.setCookie=i,window.isCookiesEnabled=s,window.getUser=a,window.getUid=d,window.getShoppingKey=r,window.rePosFooter=l,window.reMarginFooter=c,window.queryString=h()}]);
1 -webpackJsonp([30],[function(e,n,o){o(3)},,,function(e,n,o){function t(e){var n,o,t=document.cookie;return document.cookie&&""!==document.cookie&&(o=t.indexOf(e+"="),o>-1&&(o+=e.length+1,n=decodeURIComponent(p.trim(t.substring(o,t.indexOf(";",o)))))),n}function i(e,n,o){var t,i,a,r,s="";"undefined"!=typeof n&&(o=o||{},null===n&&(n="",o.expires=-1),o.expires&&("number"==typeof o.expires||o.expires.toUTCString)&&("number"==typeof o.expires?(r=new Date,r.setTime(r.getTime()+24*o.expires*60*60*1e3)):r=o.expires,s="; expires="+r.toUTCString()),t=o.path?"; path="+o.path:"",i=o.domain?"; domain="+o.domain:"",a=o.secure?"; secure":"",document.cookie=[e,"=",encodeURIComponent(n),s,t,i,a].join(""))}function a(){var e=!!navigator.cookieEnabled;return"undefined"!=typeof navigator.cookieEnabled||e||(document.cookie="testcookie",e=-1!==document.cookie.indexOf("testcookie")),e}function r(){var e,n=t("_UID");return"undefined"==typeof n?0:(e=n.split("::"),"undefined"==typeof e||e.length<4?0:e)}function s(){var e=r();return 0===e?0:e[1]}function c(){var e=t("_g");return"undefined"==typeof e?"":JSON.parse(e).k}function h(){var e;0!==w.length&&(e=Math.min(p(window).height(),window.screen.availHeight),p("body").height()<=e-parseInt(w.css("height"),0)?w.addClass("bottom"):w.removeClass("bottom"))}function d(e){var n=p(e).outerHeight();e&&w.css("margin-bottom",n+"px")}function u(){var e,n,o=[],t=window.location.search.slice(1).split("&");for(n=0;n<t.length;n++)e=t[n].split("="),o.push(e[0]),o[e[0]]=e[1];return o}function m(e){return e.replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")}var p=o(1),l=o(4),w=p("#yoho-footer"),f=p(".yoho-page"),g=p(".yoho-header");!function(){var e,n=w.children(".op-row"),o=p(".back-to-top"),t=r();h(),0===t?n.prepend('<a href="http://m.yohobuy.com/signin.html?refer='+location.href+'">登录</a><span class="sep-line">|</span><a href="http://m.yohobuy.com/reg.html">注册</a>'):n.prepend('<span>Hi,</span><a class="user-name" href="http://m.yohobuy.com/home?tmp='+Math.random()+'">'+t[0]+'</a><a href="http://m.yohobuy.com/passport/signout/index">退出</a>'),o.length>0&&(e=new l(o[0]),e.on("tap",function(e){return p(window).scrollTop(0),e.srcEvent.preventDefault(),!1})),w.removeClass("hide")}(),function(e,n,o,t,i){var a=n.createElement(o),r=n.getElementsByTagName(o)[0];e.YohoAcquisitionObject=i,e[i]=function(){e[i].p=arguments},a.async=1,a.src=t,r.parentNode.insertBefore(a,r)}(window,document,"script",("https:"===document.location.protocol?"https":"http")+"://cdn.yoho.cn/yas-jssdk/1.0.17/yas.js","_yas"),function(){var e=s();e=0===e?"":e,window._ozuid=e,window._yas&&window._yas(1*new Date,"1.0.17","yohobuy_m",e,"","")}(),g.on("touchstart","a",function(){g.find("a").removeClass("highlight"),p(this).addClass("highlight")}).on("touchend touchcancel","a",function(){p(this).removeClass("highlight")}),f.on("touchstart",".tap-hightlight",function(){p(this).siblings(".tap-hightlight").removeClass("highlight"),p(this).addClass("highlight")}).on("touchend touchcancel",".tap-hightlight",function(){p(this).removeClass("highlight")}),p(".nav-home").on("touchstart",function(){p(".homebuttom").toggleClass("hide")}),function(){var e,n,o=0,t="webkit moz ms o".split(" "),i=window.requestAnimationFrame,a=window.cancelAnimationFrame;for(n=0;n<t.length&&(!i||!a);n++)e=t[n],i=i||window[e+"RequestAnimationFrame"],a=a||window[e+"CancelAnimationFrame"]||window[e+"CancelRequestAnimationFrame"];i&&a||(i=function(e){var n=(new Date).getTime(),t=Math.max(0,16-(n-o)),i=window.setTimeout(function(){e(n+t)},t);return o=n+t,i},a=function(e){window.clearTimeout(e)}),window.requestAnimationFrame=i,window.cancelAnimationFrame=a}(),p.extend({queryString:u}),11===w.find(".user-name").text().length&&w.find(".user-name").html(m(w.find(".user-name").text())),window.cookie=t,window.setCookie=i,window.isCookiesEnabled=a,window.getUser=r,window.getUid=s,window.getShoppingKey=c,window.rePosFooter=h,window.reMarginFooter=d,window.queryString=u()}]);  
  1 +webpackJsonp([18],[function(e,n,o){o(3)},,,function(e,n,o){function t(e){var n,o,t=document.cookie;return document.cookie&&""!==document.cookie&&(o=t.indexOf(e+"="),o>-1&&(o+=e.length+1,n=decodeURIComponent(p.trim(t.substring(o,t.indexOf(";",o)))))),n}function i(e,n,o){var t,i,a,r,s="";"undefined"!=typeof n&&(o=o||{},null===n&&(n="",o.expires=-1),o.expires&&("number"==typeof o.expires||o.expires.toUTCString)&&("number"==typeof o.expires?(r=new Date,r.setTime(r.getTime()+24*o.expires*60*60*1e3)):r=o.expires,s="; expires="+r.toUTCString()),t=o.path?"; path="+o.path:"",i=o.domain?"; domain="+o.domain:"",a=o.secure?"; secure":"",document.cookie=[e,"=",encodeURIComponent(n),s,t,i,a].join(""))}function a(){var e=!!navigator.cookieEnabled;return"undefined"!=typeof navigator.cookieEnabled||e||(document.cookie="testcookie",e=-1!==document.cookie.indexOf("testcookie")),e}function r(){var e,n=t("_UID");return"undefined"==typeof n?0:(e=n.split("::"),"undefined"==typeof e||e.length<4?0:e)}function s(){var e=r();return 0===e?0:e[1]}function c(){var e=t("_g");return"undefined"==typeof e?"":JSON.parse(e).k}function h(){var e;0!==w.length&&(e=Math.min(p(window).height(),window.screen.availHeight),p("body").height()<=e-parseInt(w.css("height"),0)?w.addClass("bottom"):w.removeClass("bottom"))}function d(e){var n=p(e).outerHeight();e&&w.css("margin-bottom",n+"px")}function u(){var e,n,o=[],t=window.location.search.slice(1).split("&");for(n=0;n<t.length;n++)e=t[n].split("="),o.push(e[0]),o[e[0]]=e[1];return o}function m(e){return e.replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")}var p=o(1),l=o(4),w=p("#yoho-footer"),f=p(".yoho-page"),g=p(".yoho-header");!function(){var e,n=w.children(".op-row"),o=p(".back-to-top"),t=r();h(),0===t?n.prepend('<a href="http://m.yohobuy.com/signin.html?refer='+location.href+'">登录</a><span class="sep-line">|</span><a href="http://m.yohobuy.com/reg.html">注册</a>'):n.prepend('<span>Hi,</span><a class="user-name" href="http://m.yohobuy.com/home?tmp='+Math.random()+'">'+t[0]+'</a><a href="http://m.yohobuy.com/passport/signout/index">退出</a>'),o.length>0&&(e=new l(o[0]),e.on("tap",function(e){return p(window).scrollTop(0),e.srcEvent.preventDefault(),!1})),w.removeClass("hide")}(),function(e,n,o,t,i){var a=n.createElement(o),r=n.getElementsByTagName(o)[0];e.YohoAcquisitionObject=i,e[i]=function(){e[i].p=arguments},a.async=1,a.src=t,r.parentNode.insertBefore(a,r)}(window,document,"script",("https:"===document.location.protocol?"https":"http")+"://cdn.yoho.cn/yas-jssdk/1.0.17/yas.js","_yas"),function(){var e=s();e=0===e?"":e,window._ozuid=e,window._yas&&window._yas(1*new Date,"1.0.17","yohobuy_m",e,"","")}(),g.on("touchstart","a",function(){g.find("a").removeClass("highlight"),p(this).addClass("highlight")}).on("touchend touchcancel","a",function(){p(this).removeClass("highlight")}),f.on("touchstart",".tap-hightlight",function(){p(this).siblings(".tap-hightlight").removeClass("highlight"),p(this).addClass("highlight")}).on("touchend touchcancel",".tap-hightlight",function(){p(this).removeClass("highlight")}),p(".nav-home").on("touchstart",function(){p(".homebuttom").toggleClass("hide")}),function(){var e,n,o=0,t="webkit moz ms o".split(" "),i=window.requestAnimationFrame,a=window.cancelAnimationFrame;for(n=0;n<t.length&&(!i||!a);n++)e=t[n],i=i||window[e+"RequestAnimationFrame"],a=a||window[e+"CancelAnimationFrame"]||window[e+"CancelRequestAnimationFrame"];i&&a||(i=function(e){var n=(new Date).getTime(),t=Math.max(0,16-(n-o)),i=window.setTimeout(function(){e(n+t)},t);return o=n+t,i},a=function(e){window.clearTimeout(e)}),window.requestAnimationFrame=i,window.cancelAnimationFrame=a}(),p.extend({queryString:u}),11===w.find(".user-name").text().length&&w.find(".user-name").html(m(w.find(".user-name").text())),window.cookie=t,window.setCookie=i,window.isCookiesEnabled=a,window.getUser=r,window.getUid=s,window.getShoppingKey=c,window.rePosFooter=h,window.reMarginFooter=d,window.queryString=u()}]);
1 -webpackJsonp([29],[function(e,n,o){var t,i,s=o(1),a=s("#orderCode").html(),d=s("#oldUserCouponPic").html(),r=s("#newUserCouponPic").html(),l=s("#tipMessage").html(),c=s("#activityID").html(),h="http://www.yohoshow.com/api/wechat/getSignPackage",u=s("#shareTitle").val(),m=s("#shareImg").val(),p=s("#shareDesc").val(),g=s("#shareLink").val(),v=window.wx;o(3),s("#phone").bind("input propertychange",function(){11===s(this).val().length?s(".input-content div").eq("0").addClass("verification-code"):(s(".input-content div").eq("0").removeClass(),s(this).val().length>=1?s(".input-content i").eq("0").removeClass("hidden"):s(".input-content i").eq("0").addClass("hidden"))}),s("#verification").bind("input propertychange",function(){4===s(this).val().length?s(".input-content div").eq("1").addClass("get"):(s(".input-content div").eq("1").removeClass(),s(this).val().length>=1?s(".input-content i").eq("1").removeClass("hidden"):s(".input-content i").eq("1").addClass("hidden"))}),s("#activityEnded").html()&&(s(".tip-wrap").removeClass("hidden"),s(".tip-wrap .title").html(l)),s("#newUser").html()||s(".gain-coupon-centent .coupon img").attr("src",d),"undefined"!=typeof v&&(s.getJSON(h+"?pageurl="+encodeURIComponent(location.href.split("#")[0])+"&callback=?",function(e){var n,o,t,i;e&&(n=e.appId.toString(),o=e.timestamp,t=e.nonceStr.toString(),i=e.signature.toString(),v.config({debug:!1,appId:n,timestamp:o,nonceStr:t,signature:i,jsApiList:["checkJsApi","onMenuShareTimeline","onMenuShareAppMessage","onMenuShareQQ","onMenuShareWeibo","hideMenuItems","showMenuItems","hideAllNonBaseMenuItem","showAllNonBaseMenuItem","translateVoice","startRecord","stopRecord","onRecordEnd","playVoice","pauseVoice","stopVoice","uploadVoice","downloadVoice","chooseImage","previewImage","uploadImage","downloadImage","getNetworkType","openLocation","getLocation","hideOptionMenu","showOptionMenu","closeWindow","scanQRCode","chooseWXPay","openProductSpecificView","addCard","chooseCard","openCard"]}))}),v.ready(function(){var e={title:u,desc:p,imgUrl:m,link:g};v.onMenuShareAppMessage(e),v.onMenuShareTimeline(e),v.onMenuShareQQ(e),v.onMenuShareWeibo(e)})),s(".phone-input-content div").on("click",function(){return t=s(this).siblings("input").val(),i=/[0-9]{11}/,i.test(t)?void s.ajax({url:"/activity/coupon/phone",data:{mobile:s("#phone").val(),ordercode:a},success:function(e){if(200===e.result.code)if(window._yas&&window._yas.sendCustomInfo({activityID:c,returnCode:e.result.returnCode},!1),e.result.newUser?s(".gain-coupon-centent .coupon img").attr("src",r):s(".gain-coupon-centent .coupon img").attr("src",d),e.result.ended)s(".tip-wrap").removeClass("hidden"),s(".tip-wrap .title").html(e.result.message);else if(e.result.geted)s(".page .gain-coupon-centent").removeClass("hidden"),s(".page .coupon-centent").addClass("hidden"),s("#mobile").html("优惠券已放至账户"+e.result.mobile);else if(e.result.newUser)s(".coupon-centent .phone-input-content").addClass("hidden"),s(".coupon-centent .vertify-input-content").removeClass("hidden");else{if(e.result.wrongNumb)return s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">手机号错误,请重新输入。<p>'),void setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")},1400);if(e.result.oldUserAskCouponOnceMore)return s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">您今天已经领过咯,速度去有货购潮流!<p>'),void setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" "),s(".page .gain-coupon-centent").removeClass("hidden"),s(".page .coupon-centent").addClass("hidden"),s("#mobile").html("优惠券已放至账户"+e.result.mobile)},2500)}else s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">网络错误<p>'),setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")},1400)},error:function(){s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">网络错误,稍后再试!<p>'),setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")},1400)}}):(s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">手机号错误,请重新输入。<p>'),void setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")},1400))}),s(".vertify-input-content").on("click",".get",function(){s(".input-content div").eq("1").removeClass("get"),4===s(this).siblings("input").val().length?s.ajax({url:"/activity/coupon/verify",data:{identifycode:s("#verification").val(),mobile:s("#phone").val(),ordercode:a},dataType:"json",success:function(e){if(200===e.result.code)if(window._yas&&window._yas.sendCustomInfo({activityID:c,returnCode:e.result.returnCode},!1),e.result.newUser?s(".gain-coupon-centent .coupon img").attr("src",r):s(".gain-coupon-centent .coupon img").attr("src",d),e.result.ended)s(".tip-wrap").removeClass("hidden"),s(".tip-wrap .title").html(e.result.message);else if(e.result.geted)s(".page .gain-coupon-centent").removeClass("hidden"),s(".page .coupon-centent").addClass("hidden"),s("#mobile").html("优惠券已放至账户"+e.result.mobile);else if(e.result.newUser)s(".coupon-centent .phone-input-content").addClass("hidden"),s(".coupon-centent .vertify-input-content").removeClass("hidden");else{if(e.result.wrongNumb)return s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">手机号错误,请重新输入。<p>'),void setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")},1400);if(e.result.vertifyWrong)return s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">验证码错误,请重新输入。<p>'),void setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")},1400);if(e.result.oldUserAskCouponOnceMore)return s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">您今天已经领过咯,速度去有货购潮流!<p>'),void setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" "),s(".page .gain-coupon-centent").removeClass("hidden"),s(".page .coupon-centent").addClass("hidden"),s("#mobile").html("优惠券已放至账户"+e.result.mobile)},2500)}else s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">'+e.result.message+"<p>"),setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")},1400)},error:function(){s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">网络错误,稍后再试!<p>'),setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")},1400)}}):(s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">验证码错误,请重新输入。<p>'),setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")},1400))}),s(".close").on("click",function(){s(".dialog").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")}),s(".coupon-description span").on("click",function(){s("#message").removeClass("hidden"),s(".mask").removeClass("hidden")}),s(".description").on("click",function(){s("#message").removeClass("hidden"),s(".mask").removeClass("hidden")}),s(".use-coupon-btn").on("click",function(){window._yas&&window._yas.sendCustomInfo({activityID:c},!0)}),s(".input-content .clear-mobile").on("click",function(){s(".input-content input").eq("0").val(""),s(this).addClass("hidden"),s(".input-content div").eq("0").removeClass()}),s(".input-content .clear-verify").on("click",function(){s(".input-content input").eq("1").val(""),s(this).addClass("hidden"),s(".input-content div").eq("1").removeClass()})},,,function(e,n,o){function t(e){var n,o,t=document.cookie;return document.cookie&&""!==document.cookie&&(o=t.indexOf(e+"="),o>-1&&(o+=e.length+1,n=decodeURIComponent(m.trim(t.substring(o,t.indexOf(";",o)))))),n}function i(e,n,o){var t,i,s,a,d="";"undefined"!=typeof n&&(o=o||{},null===n&&(n="",o.expires=-1),o.expires&&("number"==typeof o.expires||o.expires.toUTCString)&&("number"==typeof o.expires?(a=new Date,a.setTime(a.getTime()+24*o.expires*60*60*1e3)):a=o.expires,d="; expires="+a.toUTCString()),t=o.path?"; path="+o.path:"",i=o.domain?"; domain="+o.domain:"",s=o.secure?"; secure":"",document.cookie=[e,"=",encodeURIComponent(n),d,t,i,s].join(""))}function s(){var e=!!navigator.cookieEnabled;return"undefined"!=typeof navigator.cookieEnabled||e||(document.cookie="testcookie",e=-1!==document.cookie.indexOf("testcookie")),e}function a(){var e,n=t("_UID");return"undefined"==typeof n?0:(e=n.split("::"),"undefined"==typeof e||e.length<4?0:e)}function d(){var e=a();return 0===e?0:e[1]}function r(){var e=t("_g");return"undefined"==typeof e?"":JSON.parse(e).k}function l(){var e;0!==g.length&&(e=Math.min(m(window).height(),window.screen.availHeight),m("body").height()<=e-parseInt(g.css("height"),0)?g.addClass("bottom"):g.removeClass("bottom"))}function c(e){var n=m(e).outerHeight();e&&g.css("margin-bottom",n+"px")}function h(){var e,n,o=[],t=window.location.search.slice(1).split("&");for(n=0;n<t.length;n++)e=t[n].split("="),o.push(e[0]),o[e[0]]=e[1];return o}function u(e){return e.replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")}var m=o(1),p=o(4),g=m("#yoho-footer"),v=m(".yoho-page"),f=m(".yoho-header");!function(){var e,n=g.children(".op-row"),o=m(".back-to-top"),t=a();l(),0===t?n.prepend('<a href="http://m.yohobuy.com/signin.html?refer='+location.href+'">登录</a><span class="sep-line">|</span><a href="http://m.yohobuy.com/reg.html">注册</a>'):n.prepend('<span>Hi,</span><a class="user-name" href="http://m.yohobuy.com/home?tmp='+Math.random()+'">'+t[0]+'</a><a href="http://m.yohobuy.com/passport/signout/index">退出</a>'),o.length>0&&(e=new p(o[0]),e.on("tap",function(e){return m(window).scrollTop(0),e.srcEvent.preventDefault(),!1})),g.removeClass("hide")}(),function(e,n,o,t,i){var s=n.createElement(o),a=n.getElementsByTagName(o)[0];e.YohoAcquisitionObject=i,e[i]=function(){e[i].p=arguments},s.async=1,s.src=t,a.parentNode.insertBefore(s,a)}(window,document,"script",("https:"===document.location.protocol?"https":"http")+"://cdn.yoho.cn/yas-jssdk/1.0.17/yas.js","_yas"),function(){var e=d();e=0===e?"":e,window._ozuid=e,window._yas&&window._yas(1*new Date,"1.0.17","yohobuy_m",e,"","")}(),f.on("touchstart","a",function(){f.find("a").removeClass("highlight"),m(this).addClass("highlight")}).on("touchend touchcancel","a",function(){m(this).removeClass("highlight")}),v.on("touchstart",".tap-hightlight",function(){m(this).siblings(".tap-hightlight").removeClass("highlight"),m(this).addClass("highlight")}).on("touchend touchcancel",".tap-hightlight",function(){m(this).removeClass("highlight")}),m(".nav-home").on("touchstart",function(){m(".homebuttom").toggleClass("hide")}),function(){var e,n,o=0,t="webkit moz ms o".split(" "),i=window.requestAnimationFrame,s=window.cancelAnimationFrame;for(n=0;n<t.length&&(!i||!s);n++)e=t[n],i=i||window[e+"RequestAnimationFrame"],s=s||window[e+"CancelAnimationFrame"]||window[e+"CancelRequestAnimationFrame"];i&&s||(i=function(e){var n=(new Date).getTime(),t=Math.max(0,16-(n-o)),i=window.setTimeout(function(){e(n+t)},t);return o=n+t,i},s=function(e){window.clearTimeout(e)}),window.requestAnimationFrame=i,window.cancelAnimationFrame=s}(),m.extend({queryString:h}),11===g.find(".user-name").text().length&&g.find(".user-name").html(u(g.find(".user-name").text())),window.cookie=t,window.setCookie=i,window.isCookiesEnabled=s,window.getUser=a,window.getUid=d,window.getShoppingKey=r,window.rePosFooter=l,window.reMarginFooter=c,window.queryString=h()}]);  
1 -webpackJsonp([17],{0:function(o,n,e){function t(o){var n,e,t;c.showLoadingMask(),a.ajax({type:"GET",url:"/guang/star/collocation/list",data:{page:o,appVersion:window.queryString.app_version},dataType:"html",success:function(o){l=!1,""===o&&(l=!0,s.show("没有更多内容了")),a(".collocation-list").append(o),a(".cont-area").each(function(){n=a(this),e=n.find(".title"),t=n.find(".cont-txt"),e[0].mlellipsis(2),t[0].mlellipsis(2)}),c.hideLoadingMask(),r(a("img.lazy"))},error:function(){s.show("网络断开连接了~")}})}function i(){!l&&a(window).scrollTop()+a(window).height()>a("body").height()-100&&(l=!0,h++,t(h))}var a=e(1),s=e(2),c=e(5),r=e(7),d=e(11),l=!1,h=1;e(20),d.init(),a(window).scroll(function(){i()}),0===a(".collocation-list").find("li").length&&t(1)},2:function(o,n,e){function t(o,n){var e,t;"undefined"!=typeof o&&(e=o.toString(),t=n&&n>0?n:2e3,i.text(e).show(),a=setTimeout(function(){"block"===i.css("display")&&i.hide()},t))}var i,a,s=e(1);!function(){var o='<div id="yoho-tip" class="yoho-tip"></div>';s(".yoho-page").append(o),i=s("#yoho-tip"),i.on("touchend",function(){i.hide(),clearTimeout(a)})}(),n.show=t},3:function(o,n,e){function t(o){var n,e,t=document.cookie;return document.cookie&&""!==document.cookie&&(e=t.indexOf(o+"="),e>-1&&(e+=o.length+1,n=decodeURIComponent(p.trim(t.substring(e,t.indexOf(";",e)))))),n}function i(o,n,e){var t,i,a,s,c="";"undefined"!=typeof n&&(e=e||{},null===n&&(n="",e.expires=-1),e.expires&&("number"==typeof e.expires||e.expires.toUTCString)&&("number"==typeof e.expires?(s=new Date,s.setTime(s.getTime()+24*e.expires*60*60*1e3)):s=e.expires,c="; expires="+s.toUTCString()),t=e.path?"; path="+e.path:"",i=e.domain?"; domain="+e.domain:"",a=e.secure?"; secure":"",document.cookie=[o,"=",encodeURIComponent(n),c,t,i,a].join(""))}function a(){var o=!!navigator.cookieEnabled;return"undefined"!=typeof navigator.cookieEnabled||o||(document.cookie="testcookie",o=-1!==document.cookie.indexOf("testcookie")),o}function s(){var o,n=t("_UID");return"undefined"==typeof n?0:(o=n.split("::"),"undefined"==typeof o||o.length<4?0:o)}function c(){var o=s();return 0===o?0:o[1]}function r(){var o=t("_g");return"undefined"==typeof o?"":JSON.parse(o).k}function d(){var o;0!==m.length&&(o=Math.min(p(window).height(),window.screen.availHeight),p("body").height()<=o-parseInt(m.css("height"),0)?m.addClass("bottom"):m.removeClass("bottom"))}function l(o){var n=p(o).outerHeight();o&&m.css("margin-bottom",n+"px")}function h(){var o,n,e=[],t=window.location.search.slice(1).split("&");for(n=0;n<t.length;n++)o=t[n].split("="),e.push(o[0]),e[o[0]]=o[1];return e}function u(o){return o.replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")}var p=e(1),f=e(4),m=p("#yoho-footer"),g=p(".yoho-page"),w=p(".yoho-header");!function(){var o,n=m.children(".op-row"),e=p(".back-to-top"),t=s();d(),0===t?n.prepend('<a href="http://m.yohobuy.com/signin.html?refer='+location.href+'">登录</a><span class="sep-line">|</span><a href="http://m.yohobuy.com/reg.html">注册</a>'):n.prepend('<span>Hi,</span><a class="user-name" href="http://m.yohobuy.com/home?tmp='+Math.random()+'">'+t[0]+'</a><a href="http://m.yohobuy.com/passport/signout/index">退出</a>'),e.length>0&&(o=new f(e[0]),o.on("tap",function(o){return p(window).scrollTop(0),o.srcEvent.preventDefault(),!1})),m.removeClass("hide")}(),function(o,n,e,t,i){var a=n.createElement(e),s=n.getElementsByTagName(e)[0];o.YohoAcquisitionObject=i,o[i]=function(){o[i].p=arguments},a.async=1,a.src=t,s.parentNode.insertBefore(a,s)}(window,document,"script",("https:"===document.location.protocol?"https":"http")+"://cdn.yoho.cn/yas-jssdk/1.0.17/yas.js","_yas"),function(){var o=c();o=0===o?"":o,window._ozuid=o,window._yas&&window._yas(1*new Date,"1.0.17","yohobuy_m",o,"","")}(),w.on("touchstart","a",function(){w.find("a").removeClass("highlight"),p(this).addClass("highlight")}).on("touchend touchcancel","a",function(){p(this).removeClass("highlight")}),g.on("touchstart",".tap-hightlight",function(){p(this).siblings(".tap-hightlight").removeClass("highlight"),p(this).addClass("highlight")}).on("touchend touchcancel",".tap-hightlight",function(){p(this).removeClass("highlight")}),p(".nav-home").on("touchstart",function(){p(".homebuttom").toggleClass("hide")}),function(){var o,n,e=0,t="webkit moz ms o".split(" "),i=window.requestAnimationFrame,a=window.cancelAnimationFrame;for(n=0;n<t.length&&(!i||!a);n++)o=t[n],i=i||window[o+"RequestAnimationFrame"],a=a||window[o+"CancelAnimationFrame"]||window[o+"CancelRequestAnimationFrame"];i&&a||(i=function(o){var n=(new Date).getTime(),t=Math.max(0,16-(n-e)),i=window.setTimeout(function(){o(n+t)},t);return e=n+t,i},a=function(o){window.clearTimeout(o)}),window.requestAnimationFrame=i,window.cancelAnimationFrame=a}(),p.extend({queryString:h}),11===m.find(".user-name").text().length&&m.find(".user-name").html(u(m.find(".user-name").text())),window.cookie=t,window.setCookie=i,window.isCookiesEnabled=a,window.getUser=s,window.getUid=c,window.getShoppingKey=r,window.rePosFooter=d,window.reMarginFooter=l,window.queryString=h()},5:function(o,n,e){function t(o){var n='<div class="loading-mask hide"><div class="loading"><div></div><div></div><div></div></div></div>';d=!0,o||(o=r),o.append(n),s=o.children(".loading-mask"),c("body").on("touchstart touchmove touchend",".loading-mask",function(){return!1})}function i(){d||(t(),d=!0),s.removeClass("hide")}function a(){s.addClass("hide")}var s,c=e(1),r=c(".yoho-page"),d=!1;n.init=t,n.showLoadingMask=i,n.hideLoadingMask=a,n.show=i,n.hide=a},20:function(o,n,e){var t=e(1),i=e(2);e(3),t(".collocation-list,.detail-list").on("click",".collection",function(){var o,n,e,a=t(this),s=a.find(".collected-ico");o=s.hasClass("collected")?"del":"fav",t(this).parents(".collocation-list").length>0?(n="1",e=""):(n="2",e=t(".detail-list").data("name")),t.ajax({type:"POST",url:"/guang/star/setFavorite",data:{articleId:a.parents("li").attr("articleId"),type:o,uid:window.queryString.uid,pageType:n,tag:e},success:function(o){var n=o.code;200===n&&(s.hasClass("collected")?s.removeClass("collected"):s.addClass("collected")),400===n&&(t("#collocation-link").length<=0&&t("body").append("<a href='"+o.data+'\' style="display:none;" id="collocation-link"><span class="collocation-link"></span></a>'),t(".collocation-link").click())},error:function(){i.show("网络断开连接了~")}})}),window.successShare=function(){t.ajax({type:"POST",url:"/guang/starclass/forward",success:function(o){var n=o.code;200===n&&o.data>0&&i.show("分享成功,亲密度+10")},error:function(){i.show("网络断开连接了~")}})}}});  
  1 +webpackJsonp([13],{0:function(o,n,e){function t(o){var n,e,t;c.showLoadingMask(),a.ajax({type:"GET",url:"/guang/star/collocation/list",data:{page:o,appVersion:window.queryString.app_version},dataType:"html",success:function(o){l=!1,""===o&&(l=!0,s.show("没有更多内容了")),a(".collocation-list").append(o),a(".cont-area").each(function(){n=a(this),e=n.find(".title"),t=n.find(".cont-txt"),e[0].mlellipsis(2),t[0].mlellipsis(2)}),c.hideLoadingMask(),r(a("img.lazy"))},error:function(){s.show("网络断开连接了~")}})}function i(){!l&&a(window).scrollTop()+a(window).height()>.75*a("body").height()&&(l=!0,h++,t(h))}var a=e(1),s=e(2),c=e(5),r=e(6),d=e(10),l=!1,h=1;e(17),d.init(),a(window).scroll(function(){window.requestAnimationFrame(i)}),0===a(".collocation-list").find("li").length&&t(1)},2:function(o,n,e){function t(o,n){var e,t;"undefined"!=typeof o&&(e=o.toString(),t=n&&n>0?n:2e3,i.text(e).show(),a=setTimeout(function(){"block"===i.css("display")&&i.hide()},t))}var i,a,s=e(1);!function(){var o='<div id="yoho-tip" class="yoho-tip"></div>';s(".yoho-page").append(o),i=s("#yoho-tip"),i.on("touchend",function(){i.hide(),clearTimeout(a)})}(),n.show=t},3:function(o,n,e){function t(o){var n,e,t=document.cookie;return document.cookie&&""!==document.cookie&&(e=t.indexOf(o+"="),e>-1&&(e+=o.length+1,n=decodeURIComponent(p.trim(t.substring(e,t.indexOf(";",e)))))),n}function i(o,n,e){var t,i,a,s,c="";"undefined"!=typeof n&&(e=e||{},null===n&&(n="",e.expires=-1),e.expires&&("number"==typeof e.expires||e.expires.toUTCString)&&("number"==typeof e.expires?(s=new Date,s.setTime(s.getTime()+24*e.expires*60*60*1e3)):s=e.expires,c="; expires="+s.toUTCString()),t=e.path?"; path="+e.path:"",i=e.domain?"; domain="+e.domain:"",a=e.secure?"; secure":"",document.cookie=[o,"=",encodeURIComponent(n),c,t,i,a].join(""))}function a(){var o=!!navigator.cookieEnabled;return"undefined"!=typeof navigator.cookieEnabled||o||(document.cookie="testcookie",o=-1!==document.cookie.indexOf("testcookie")),o}function s(){var o,n=t("_UID");return"undefined"==typeof n?0:(o=n.split("::"),"undefined"==typeof o||o.length<4?0:o)}function c(){var o=s();return 0===o?0:o[1]}function r(){var o=t("_g");return"undefined"==typeof o?"":JSON.parse(o).k}function d(){var o;0!==f.length&&(o=Math.min(p(window).height(),window.screen.availHeight),p("body").height()<=o-parseInt(f.css("height"),0)?f.addClass("bottom"):f.removeClass("bottom"))}function l(o){var n=p(o).outerHeight();o&&f.css("margin-bottom",n+"px")}function h(){var o,n,e=[],t=window.location.search.slice(1).split("&");for(n=0;n<t.length;n++)o=t[n].split("="),e.push(o[0]),e[o[0]]=o[1];return e}function u(o){return o.replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")}var p=e(1),m=e(4),f=p("#yoho-footer"),g=p(".yoho-page"),w=p(".yoho-header");!function(){var o,n=f.children(".op-row"),e=p(".back-to-top"),t=s();d(),0===t?n.prepend('<a href="http://m.yohobuy.com/signin.html?refer='+location.href+'">登录</a><span class="sep-line">|</span><a href="http://m.yohobuy.com/reg.html">注册</a>'):n.prepend('<span>Hi,</span><a class="user-name" href="http://m.yohobuy.com/home?tmp='+Math.random()+'">'+t[0]+'</a><a href="http://m.yohobuy.com/passport/signout/index">退出</a>'),e.length>0&&(o=new m(e[0]),o.on("tap",function(o){return p(window).scrollTop(0),o.srcEvent.preventDefault(),!1})),f.removeClass("hide")}(),function(o,n,e,t,i){var a=n.createElement(e),s=n.getElementsByTagName(e)[0];o.YohoAcquisitionObject=i,o[i]=function(){o[i].p=arguments},a.async=1,a.src=t,s.parentNode.insertBefore(a,s)}(window,document,"script",("https:"===document.location.protocol?"https":"http")+"://cdn.yoho.cn/yas-jssdk/1.0.17/yas.js","_yas"),function(){var o=c();o=0===o?"":o,window._ozuid=o,window._yas&&window._yas(1*new Date,"1.0.17","yohobuy_m",o,"","")}(),w.on("touchstart","a",function(){w.find("a").removeClass("highlight"),p(this).addClass("highlight")}).on("touchend touchcancel","a",function(){p(this).removeClass("highlight")}),g.on("touchstart",".tap-hightlight",function(){p(this).siblings(".tap-hightlight").removeClass("highlight"),p(this).addClass("highlight")}).on("touchend touchcancel",".tap-hightlight",function(){p(this).removeClass("highlight")}),p(".nav-home").on("touchstart",function(){p(".homebuttom").toggleClass("hide")}),function(){var o,n,e=0,t="webkit moz ms o".split(" "),i=window.requestAnimationFrame,a=window.cancelAnimationFrame;for(n=0;n<t.length&&(!i||!a);n++)o=t[n],i=i||window[o+"RequestAnimationFrame"],a=a||window[o+"CancelAnimationFrame"]||window[o+"CancelRequestAnimationFrame"];i&&a||(i=function(o){var n=(new Date).getTime(),t=Math.max(0,16-(n-e)),i=window.setTimeout(function(){o(n+t)},t);return e=n+t,i},a=function(o){window.clearTimeout(o)}),window.requestAnimationFrame=i,window.cancelAnimationFrame=a}(),p.extend({queryString:h}),11===f.find(".user-name").text().length&&f.find(".user-name").html(u(f.find(".user-name").text())),window.cookie=t,window.setCookie=i,window.isCookiesEnabled=a,window.getUser=s,window.getUid=c,window.getShoppingKey=r,window.rePosFooter=d,window.reMarginFooter=l,window.queryString=h()},5:function(o,n,e){function t(o){var n='<div class="loading-mask hide"><div class="loading"><div></div><div></div><div></div></div></div>';d=!0,o||(o=r),o.append(n),s=o.children(".loading-mask"),c("body").on("touchstart touchmove touchend",".loading-mask",function(){return!1})}function i(){d||(t(),d=!0),s.removeClass("hide")}function a(){s.addClass("hide")}var s,c=e(1),r=c(".yoho-page"),d=!1;n.init=t,n.showLoadingMask=i,n.hideLoadingMask=a,n.show=i,n.hide=a},17:function(o,n,e){var t=e(1),i=e(2);e(3),window.setCookie("guangStarUid",window.queryString.uid),t(".collocation-list,.detail-list").on("click",".collection",function(){var o,n,e,a=t(this),s=a.find(".collected-ico");o=s.hasClass("collected")?"del":"fav",t(this).parents(".collocation-list").length>0?(n="1",e=""):(n="2",e=t(".detail-list").data("name")),t.ajax({type:"POST",url:"/guang/star/setFavorite",data:{articleId:a.parents("li").attr("articleId"),type:o,pageType:n,tag:e},success:function(o){var n=o.code;200===n&&(s.hasClass("collected")?s.removeClass("collected"):s.addClass("collected")),400===n&&(t("#collocation-link").length<=0&&t("body").append("<a href='"+o.data+'\' style="display:none;" id="collocation-link"><span class="collocation-link"></span></a>'),t(".collocation-link").click())},error:function(){i.show("网络断开连接了~")}})})}});
1 -webpackJsonp([16],{0:function(n,o,e){function t(n){var o,e,t;c.showLoadingMask(),a.ajax({type:"GET",url:"/guang/star/detailList",data:{page:n,tag:a(".detail-list").data("name")},dataType:"html",success:function(n){h=!1,""===n&&(h=!0,s.show("没有更多内容了")),a(".detail-list").append(n),a(".cont-area").each(function(){o=a(this),e=o.find(".title"),t=o.find(".cont-txt"),e[0].mlellipsis(2),t[0].mlellipsis(2)}),d(a("img.lazy")),c.hideLoadingMask()},error:function(){s.show("网络断开连接了~")}})}function i(){!h&&a(window).scrollTop()+a(window).height()>a("body").height()-100&&(h=!0,u++,t(u))}var a=e(1),s=e(2),c=e(5),d=e(7),r=e(11),l=a(".detail-list"),h=!1,u=1;e(20),r.init(),a(window).scroll(function(){i()}),0===l.find("li").length&&t(1)},2:function(n,o,e){function t(n,o){var e,t;"undefined"!=typeof n&&(e=n.toString(),t=o&&o>0?o:2e3,i.text(e).show(),a=setTimeout(function(){"block"===i.css("display")&&i.hide()},t))}var i,a,s=e(1);!function(){var n='<div id="yoho-tip" class="yoho-tip"></div>';s(".yoho-page").append(n),i=s("#yoho-tip"),i.on("touchend",function(){i.hide(),clearTimeout(a)})}(),o.show=t},3:function(n,o,e){function t(n){var o,e,t=document.cookie;return document.cookie&&""!==document.cookie&&(e=t.indexOf(n+"="),e>-1&&(e+=n.length+1,o=decodeURIComponent(p.trim(t.substring(e,t.indexOf(";",e)))))),o}function i(n,o,e){var t,i,a,s,c="";"undefined"!=typeof o&&(e=e||{},null===o&&(o="",e.expires=-1),e.expires&&("number"==typeof e.expires||e.expires.toUTCString)&&("number"==typeof e.expires?(s=new Date,s.setTime(s.getTime()+24*e.expires*60*60*1e3)):s=e.expires,c="; expires="+s.toUTCString()),t=e.path?"; path="+e.path:"",i=e.domain?"; domain="+e.domain:"",a=e.secure?"; secure":"",document.cookie=[n,"=",encodeURIComponent(o),c,t,i,a].join(""))}function a(){var n=!!navigator.cookieEnabled;return"undefined"!=typeof navigator.cookieEnabled||n||(document.cookie="testcookie",n=-1!==document.cookie.indexOf("testcookie")),n}function s(){var n,o=t("_UID");return"undefined"==typeof o?0:(n=o.split("::"),"undefined"==typeof n||n.length<4?0:n)}function c(){var n=s();return 0===n?0:n[1]}function d(){var n=t("_g");return"undefined"==typeof n?"":JSON.parse(n).k}function r(){var n;0!==m.length&&(n=Math.min(p(window).height(),window.screen.availHeight),p("body").height()<=n-parseInt(m.css("height"),0)?m.addClass("bottom"):m.removeClass("bottom"))}function l(n){var o=p(n).outerHeight();n&&m.css("margin-bottom",o+"px")}function h(){var n,o,e=[],t=window.location.search.slice(1).split("&");for(o=0;o<t.length;o++)n=t[o].split("="),e.push(n[0]),e[n[0]]=n[1];return e}function u(n){return n.replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")}var p=e(1),f=e(4),m=p("#yoho-footer"),g=p(".yoho-page"),w=p(".yoho-header");!function(){var n,o=m.children(".op-row"),e=p(".back-to-top"),t=s();r(),0===t?o.prepend('<a href="http://m.yohobuy.com/signin.html?refer='+location.href+'">登录</a><span class="sep-line">|</span><a href="http://m.yohobuy.com/reg.html">注册</a>'):o.prepend('<span>Hi,</span><a class="user-name" href="http://m.yohobuy.com/home?tmp='+Math.random()+'">'+t[0]+'</a><a href="http://m.yohobuy.com/passport/signout/index">退出</a>'),e.length>0&&(n=new f(e[0]),n.on("tap",function(n){return p(window).scrollTop(0),n.srcEvent.preventDefault(),!1})),m.removeClass("hide")}(),function(n,o,e,t,i){var a=o.createElement(e),s=o.getElementsByTagName(e)[0];n.YohoAcquisitionObject=i,n[i]=function(){n[i].p=arguments},a.async=1,a.src=t,s.parentNode.insertBefore(a,s)}(window,document,"script",("https:"===document.location.protocol?"https":"http")+"://cdn.yoho.cn/yas-jssdk/1.0.17/yas.js","_yas"),function(){var n=c();n=0===n?"":n,window._ozuid=n,window._yas&&window._yas(1*new Date,"1.0.17","yohobuy_m",n,"","")}(),w.on("touchstart","a",function(){w.find("a").removeClass("highlight"),p(this).addClass("highlight")}).on("touchend touchcancel","a",function(){p(this).removeClass("highlight")}),g.on("touchstart",".tap-hightlight",function(){p(this).siblings(".tap-hightlight").removeClass("highlight"),p(this).addClass("highlight")}).on("touchend touchcancel",".tap-hightlight",function(){p(this).removeClass("highlight")}),p(".nav-home").on("touchstart",function(){p(".homebuttom").toggleClass("hide")}),function(){var n,o,e=0,t="webkit moz ms o".split(" "),i=window.requestAnimationFrame,a=window.cancelAnimationFrame;for(o=0;o<t.length&&(!i||!a);o++)n=t[o],i=i||window[n+"RequestAnimationFrame"],a=a||window[n+"CancelAnimationFrame"]||window[n+"CancelRequestAnimationFrame"];i&&a||(i=function(n){var o=(new Date).getTime(),t=Math.max(0,16-(o-e)),i=window.setTimeout(function(){n(o+t)},t);return e=o+t,i},a=function(n){window.clearTimeout(n)}),window.requestAnimationFrame=i,window.cancelAnimationFrame=a}(),p.extend({queryString:h}),11===m.find(".user-name").text().length&&m.find(".user-name").html(u(m.find(".user-name").text())),window.cookie=t,window.setCookie=i,window.isCookiesEnabled=a,window.getUser=s,window.getUid=c,window.getShoppingKey=d,window.rePosFooter=r,window.reMarginFooter=l,window.queryString=h()},5:function(n,o,e){function t(n){var o='<div class="loading-mask hide"><div class="loading"><div></div><div></div><div></div></div></div>';r=!0,n||(n=d),n.append(o),s=n.children(".loading-mask"),c("body").on("touchstart touchmove touchend",".loading-mask",function(){return!1})}function i(){r||(t(),r=!0),s.removeClass("hide")}function a(){s.addClass("hide")}var s,c=e(1),d=c(".yoho-page"),r=!1;o.init=t,o.showLoadingMask=i,o.hideLoadingMask=a,o.show=i,o.hide=a},20:function(n,o,e){var t=e(1),i=e(2);e(3),t(".collocation-list,.detail-list").on("click",".collection",function(){var n,o,e,a=t(this),s=a.find(".collected-ico");n=s.hasClass("collected")?"del":"fav",t(this).parents(".collocation-list").length>0?(o="1",e=""):(o="2",e=t(".detail-list").data("name")),t.ajax({type:"POST",url:"/guang/star/setFavorite",data:{articleId:a.parents("li").attr("articleId"),type:n,uid:window.queryString.uid,pageType:o,tag:e},success:function(n){var o=n.code;200===o&&(s.hasClass("collected")?s.removeClass("collected"):s.addClass("collected")),400===o&&(t("#collocation-link").length<=0&&t("body").append("<a href='"+n.data+'\' style="display:none;" id="collocation-link"><span class="collocation-link"></span></a>'),t(".collocation-link").click())},error:function(){i.show("网络断开连接了~")}})}),window.successShare=function(){t.ajax({type:"POST",url:"/guang/starclass/forward",success:function(n){var o=n.code;200===o&&n.data>0&&i.show("分享成功,亲密度+10")},error:function(){i.show("网络断开连接了~")}})}}});  
  1 +webpackJsonp([12],{0:function(n,e,o){function t(n){var e,o,t;c.showLoadingMask(),a.ajax({type:"GET",url:"/guang/star/detailList",data:{page:n,tag:a(".detail-list").data("name")},dataType:"html",success:function(n){h=!1,""===n&&(h=!0,s.show("没有更多内容了")),a(".detail-list").append(n),a(".cont-area").each(function(){e=a(this),o=e.find(".title"),t=e.find(".cont-txt"),o[0].mlellipsis(2),t[0].mlellipsis(2)}),d(a("img.lazy")),c.hideLoadingMask()},error:function(){s.show("网络断开连接了~")}})}function i(){!h&&a(window).scrollTop()+a(window).height()>a("body").height()-100&&(h=!0,u++,t(u))}var a=o(1),s=o(2),c=o(5),d=o(6),r=o(10),l=a(".detail-list"),h=!1,u=1;o(17),r.init(),a(window).scroll(function(){window.requestAnimationFrame(i)}),0===l.find("li").length&&t(1)},2:function(n,e,o){function t(n,e){var o,t;"undefined"!=typeof n&&(o=n.toString(),t=e&&e>0?e:2e3,i.text(o).show(),a=setTimeout(function(){"block"===i.css("display")&&i.hide()},t))}var i,a,s=o(1);!function(){var n='<div id="yoho-tip" class="yoho-tip"></div>';s(".yoho-page").append(n),i=s("#yoho-tip"),i.on("touchend",function(){i.hide(),clearTimeout(a)})}(),e.show=t},3:function(n,e,o){function t(n){var e,o,t=document.cookie;return document.cookie&&""!==document.cookie&&(o=t.indexOf(n+"="),o>-1&&(o+=n.length+1,e=decodeURIComponent(p.trim(t.substring(o,t.indexOf(";",o)))))),e}function i(n,e,o){var t,i,a,s,c="";"undefined"!=typeof e&&(o=o||{},null===e&&(e="",o.expires=-1),o.expires&&("number"==typeof o.expires||o.expires.toUTCString)&&("number"==typeof o.expires?(s=new Date,s.setTime(s.getTime()+24*o.expires*60*60*1e3)):s=o.expires,c="; expires="+s.toUTCString()),t=o.path?"; path="+o.path:"",i=o.domain?"; domain="+o.domain:"",a=o.secure?"; secure":"",document.cookie=[n,"=",encodeURIComponent(e),c,t,i,a].join(""))}function a(){var n=!!navigator.cookieEnabled;return"undefined"!=typeof navigator.cookieEnabled||n||(document.cookie="testcookie",n=-1!==document.cookie.indexOf("testcookie")),n}function s(){var n,e=t("_UID");return"undefined"==typeof e?0:(n=e.split("::"),"undefined"==typeof n||n.length<4?0:n)}function c(){var n=s();return 0===n?0:n[1]}function d(){var n=t("_g");return"undefined"==typeof n?"":JSON.parse(n).k}function r(){var n;0!==f.length&&(n=Math.min(p(window).height(),window.screen.availHeight),p("body").height()<=n-parseInt(f.css("height"),0)?f.addClass("bottom"):f.removeClass("bottom"))}function l(n){var e=p(n).outerHeight();n&&f.css("margin-bottom",e+"px")}function h(){var n,e,o=[],t=window.location.search.slice(1).split("&");for(e=0;e<t.length;e++)n=t[e].split("="),o.push(n[0]),o[n[0]]=n[1];return o}function u(n){return n.replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")}var p=o(1),m=o(4),f=p("#yoho-footer"),g=p(".yoho-page"),w=p(".yoho-header");!function(){var n,e=f.children(".op-row"),o=p(".back-to-top"),t=s();r(),0===t?e.prepend('<a href="http://m.yohobuy.com/signin.html?refer='+location.href+'">登录</a><span class="sep-line">|</span><a href="http://m.yohobuy.com/reg.html">注册</a>'):e.prepend('<span>Hi,</span><a class="user-name" href="http://m.yohobuy.com/home?tmp='+Math.random()+'">'+t[0]+'</a><a href="http://m.yohobuy.com/passport/signout/index">退出</a>'),o.length>0&&(n=new m(o[0]),n.on("tap",function(n){return p(window).scrollTop(0),n.srcEvent.preventDefault(),!1})),f.removeClass("hide")}(),function(n,e,o,t,i){var a=e.createElement(o),s=e.getElementsByTagName(o)[0];n.YohoAcquisitionObject=i,n[i]=function(){n[i].p=arguments},a.async=1,a.src=t,s.parentNode.insertBefore(a,s)}(window,document,"script",("https:"===document.location.protocol?"https":"http")+"://cdn.yoho.cn/yas-jssdk/1.0.17/yas.js","_yas"),function(){var n=c();n=0===n?"":n,window._ozuid=n,window._yas&&window._yas(1*new Date,"1.0.17","yohobuy_m",n,"","")}(),w.on("touchstart","a",function(){w.find("a").removeClass("highlight"),p(this).addClass("highlight")}).on("touchend touchcancel","a",function(){p(this).removeClass("highlight")}),g.on("touchstart",".tap-hightlight",function(){p(this).siblings(".tap-hightlight").removeClass("highlight"),p(this).addClass("highlight")}).on("touchend touchcancel",".tap-hightlight",function(){p(this).removeClass("highlight")}),p(".nav-home").on("touchstart",function(){p(".homebuttom").toggleClass("hide")}),function(){var n,e,o=0,t="webkit moz ms o".split(" "),i=window.requestAnimationFrame,a=window.cancelAnimationFrame;for(e=0;e<t.length&&(!i||!a);e++)n=t[e],i=i||window[n+"RequestAnimationFrame"],a=a||window[n+"CancelAnimationFrame"]||window[n+"CancelRequestAnimationFrame"];i&&a||(i=function(n){var e=(new Date).getTime(),t=Math.max(0,16-(e-o)),i=window.setTimeout(function(){n(e+t)},t);return o=e+t,i},a=function(n){window.clearTimeout(n)}),window.requestAnimationFrame=i,window.cancelAnimationFrame=a}(),p.extend({queryString:h}),11===f.find(".user-name").text().length&&f.find(".user-name").html(u(f.find(".user-name").text())),window.cookie=t,window.setCookie=i,window.isCookiesEnabled=a,window.getUser=s,window.getUid=c,window.getShoppingKey=d,window.rePosFooter=r,window.reMarginFooter=l,window.queryString=h()},5:function(n,e,o){function t(n){var e='<div class="loading-mask hide"><div class="loading"><div></div><div></div><div></div></div></div>';r=!0,n||(n=d),n.append(e),s=n.children(".loading-mask"),c("body").on("touchstart touchmove touchend",".loading-mask",function(){return!1})}function i(){r||(t(),r=!0),s.removeClass("hide")}function a(){s.addClass("hide")}var s,c=o(1),d=c(".yoho-page"),r=!1;e.init=t,e.showLoadingMask=i,e.hideLoadingMask=a,e.show=i,e.hide=a},17:function(n,e,o){var t=o(1),i=o(2);o(3),window.setCookie("guangStarUid",window.queryString.uid),t(".collocation-list,.detail-list").on("click",".collection",function(){var n,e,o,a=t(this),s=a.find(".collected-ico");n=s.hasClass("collected")?"del":"fav",t(this).parents(".collocation-list").length>0?(e="1",o=""):(e="2",o=t(".detail-list").data("name")),t.ajax({type:"POST",url:"/guang/star/setFavorite",data:{articleId:a.parents("li").attr("articleId"),type:n,pageType:e,tag:o},success:function(n){var e=n.code;200===e&&(s.hasClass("collected")?s.removeClass("collected"):s.addClass("collected")),400===e&&(t("#collocation-link").length<=0&&t("body").append("<a href='"+n.data+'\' style="display:none;" id="collocation-link"><span class="collocation-link"></span></a>'),t(".collocation-link").click())},error:function(){i.show("网络断开连接了~")}})})}});
1 -webpackJsonp([11],{0:function(t,i,e){function s(t,i,e){var s=t.find(i),o=t.find(e);s[0].mlellipsis(2),o[0].mlellipsis(3)}function o(t){var i=new Image,e="";e=t.data("avatar"),i.onload=function(){t.css("background-image","url("+e+")")},e?i.src=e:t.addClass("default-avater")}function n(t){return h=t.index(),t.hasClass("swiper-slide-active")?void 0:(h>=2*l+1?(d&&d.slideTo(l+1,200),p.slideTo(l+1,200)):l-1>=h?(d&&d.slideTo(2*l-1,200),p.slideTo(2*l-1,200)):(d&&d.slideTo(h,200),p.slideTo(h,200)),!1)}function r(){var t,i=v(".loading-tip"),e=v(".avatar-wrap:not(.avatar-clone)"),r=v(".avatar").height();t=new b(".star-wrap",{height:v(window).height()-r,pullDown:function(){P||(P=!0,d&&(d.destroy(!0,!0),d=""),u())}}),t.iScroll.on("scrollStart",function(){-1===this.directionY&&i.slideDown()}),t.iScroll.on("scroll",function(){e.offset().top<=0&&(f.show(),d||(d=new y(".avatar-0",{loop:!0,initialSlide:v(".avatar-1").find(".swiper-slide-active").index()%l,centeredSlides:!0,slidesPerView:"auto",loopedSlides:l,spaceBetween:10,slidesOffsetBefore:-v(".swiper-num").width(),watchSlidesProgress:!0,watchSlidesVisibility:!0,onInit:function(){v(".avatar-0 li").on("click",function(){return c=n(v(this))})}}),d.params.control=p,p.params.control=d)),e.offset().top>v(".avatar-1")[0].scrollHeight&&f.hide()}),t.iScroll.on("scrollEnd",function(){i.slideUp()}),v(".avatar").each(function(t,i){v(i).addClass("avatar-"+t)}),l>1&&(p=new y(".avatar-1",{loop:!0,centeredSlides:!0,slidesPerView:"auto",loopedSlides:l,spaceBetween:10,slidesOffsetBefore:-v(".swiper-num").width(),watchSlidesProgress:!0,watchSlidesVisibility:!0,onInit:function(){v(".avatar-1 li").on("click",function(){return c=n(v(this))})}})),v(".article-avatar-swiper").find("li").length>1&&new y(".article-avatar-swiper",{initialSlide:0,lazyLoading:!0,lazyLoadingInPrevNext:!0,loop:!0,autoplay:5e3}),v(".banner-swiper").find("li").length>1&&new y(".banner-swiper",{lazyLoading:!0,lazyLoadingInPrevNext:!0,loop:!0,autoplay:3e3,autoplayDisableOnInteraction:!1,paginationClickable:!0,slideElement:"li",pagination:".banner-top .pagination-inner"}),v(".star-info").find("li").length>0&&g.each(function(t,i){s(v(i),".article-title","p")}),v(".rank-avatar").each(function(t,i){o(v(i))}),v("#yoho-header, .head-tab").on("touchmove",function(){return!1}),v("img").on("load",function(){t.iScroll.refresh()})}function a(){m=v(".avatar"),g=v(".star-article"),l=m.find(".swiper-slide").length,f&&f.remove(),k.before(v(".avatar-swiper").clone().addClass("avatar-clone").hide()),f=v(".avatar-clone"),v(".cont-area").each(function(){s(v(this),".title",".cont-txt")}),x(v("img.lazy")),setTimeout(function(){r()},100)}var h,l,c,p,d,u,f,m,g,v=e(1),y=e(12),w=e(2),x=e(7),S=e(11),T=e(5),b=e(42),E=v(window),P=!1,k=v(".star-main");e(3),x(v("img.lazy")),S.init(),E.on("mousewheel",!1),u=function(){T.showLoadingMask(),v.ajax({url:"/guang/star/getIndexHtml",dataType:"html",success:function(t){P=!1,t||(P=!0,w.show("没有更多内容了")),k.html(t),a(),T.hideLoadingMask()},error:function(){w.show("网络断开连接了~")}})},a()},2:function(t,i,e){function s(t,i){var e,s;"undefined"!=typeof t&&(e=t.toString(),s=i&&i>0?i:2e3,o.text(e).show(),n=setTimeout(function(){"block"===o.css("display")&&o.hide()},s))}var o,n,r=e(1);!function(){var t='<div id="yoho-tip" class="yoho-tip"></div>';r(".yoho-page").append(t),o=r("#yoho-tip"),o.on("touchend",function(){o.hide(),clearTimeout(n)})}(),i.show=s},3:function(t,i,e){function s(t){var i,e,s=document.cookie;return document.cookie&&""!==document.cookie&&(e=s.indexOf(t+"="),e>-1&&(e+=t.length+1,i=decodeURIComponent(u.trim(s.substring(e,s.indexOf(";",e)))))),i}function o(t,i,e){var s,o,n,r,a="";"undefined"!=typeof i&&(e=e||{},null===i&&(i="",e.expires=-1),e.expires&&("number"==typeof e.expires||e.expires.toUTCString)&&("number"==typeof e.expires?(r=new Date,r.setTime(r.getTime()+24*e.expires*60*60*1e3)):r=e.expires,a="; expires="+r.toUTCString()),s=e.path?"; path="+e.path:"",o=e.domain?"; domain="+e.domain:"",n=e.secure?"; secure":"",document.cookie=[t,"=",encodeURIComponent(i),a,s,o,n].join(""))}function n(){var t=!!navigator.cookieEnabled;return"undefined"!=typeof navigator.cookieEnabled||t||(document.cookie="testcookie",t=-1!==document.cookie.indexOf("testcookie")),t}function r(){var t,i=s("_UID");return"undefined"==typeof i?0:(t=i.split("::"),"undefined"==typeof t||t.length<4?0:t)}function a(){var t=r();return 0===t?0:t[1]}function h(){var t=s("_g");return"undefined"==typeof t?"":JSON.parse(t).k}function l(){var t;0!==m.length&&(t=Math.min(u(window).height(),window.screen.availHeight),u("body").height()<=t-parseInt(m.css("height"),0)?m.addClass("bottom"):m.removeClass("bottom"))}function c(t){var i=u(t).outerHeight();t&&m.css("margin-bottom",i+"px")}function p(){var t,i,e=[],s=window.location.search.slice(1).split("&");for(i=0;i<s.length;i++)t=s[i].split("="),e.push(t[0]),e[t[0]]=t[1];return e}function d(t){return t.replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")}var u=e(1),f=e(4),m=u("#yoho-footer"),g=u(".yoho-page"),v=u(".yoho-header");!function(){var t,i=m.children(".op-row"),e=u(".back-to-top"),s=r();l(),0===s?i.prepend('<a href="http://m.yohobuy.com/signin.html?refer='+location.href+'">登录</a><span class="sep-line">|</span><a href="http://m.yohobuy.com/reg.html">注册</a>'):i.prepend('<span>Hi,</span><a class="user-name" href="http://m.yohobuy.com/home?tmp='+Math.random()+'">'+s[0]+'</a><a href="http://m.yohobuy.com/passport/signout/index">退出</a>'),e.length>0&&(t=new f(e[0]),t.on("tap",function(t){return u(window).scrollTop(0),t.srcEvent.preventDefault(),!1})),m.removeClass("hide")}(),function(t,i,e,s,o){var n=i.createElement(e),r=i.getElementsByTagName(e)[0];t.YohoAcquisitionObject=o,t[o]=function(){t[o].p=arguments},n.async=1,n.src=s,r.parentNode.insertBefore(n,r)}(window,document,"script",("https:"===document.location.protocol?"https":"http")+"://cdn.yoho.cn/yas-jssdk/1.0.17/yas.js","_yas"),function(){var t=a();t=0===t?"":t,window._ozuid=t,window._yas&&window._yas(1*new Date,"1.0.17","yohobuy_m",t,"","")}(),v.on("touchstart","a",function(){v.find("a").removeClass("highlight"),u(this).addClass("highlight")}).on("touchend touchcancel","a",function(){u(this).removeClass("highlight")}),g.on("touchstart",".tap-hightlight",function(){u(this).siblings(".tap-hightlight").removeClass("highlight"),u(this).addClass("highlight")}).on("touchend touchcancel",".tap-hightlight",function(){u(this).removeClass("highlight")}),u(".nav-home").on("touchstart",function(){u(".homebuttom").toggleClass("hide")}),function(){var t,i,e=0,s="webkit moz ms o".split(" "),o=window.requestAnimationFrame,n=window.cancelAnimationFrame;for(i=0;i<s.length&&(!o||!n);i++)t=s[i],o=o||window[t+"RequestAnimationFrame"],n=n||window[t+"CancelAnimationFrame"]||window[t+"CancelRequestAnimationFrame"];o&&n||(o=function(t){var i=(new Date).getTime(),s=Math.max(0,16-(i-e)),o=window.setTimeout(function(){t(i+s)},s);return e=i+s,o},n=function(t){window.clearTimeout(t)}),window.requestAnimationFrame=o,window.cancelAnimationFrame=n}(),u.extend({queryString:p}),11===m.find(".user-name").text().length&&m.find(".user-name").html(d(m.find(".user-name").text())),window.cookie=s,window.setCookie=o,window.isCookiesEnabled=n,window.getUser=r,window.getUid=a,window.getShoppingKey=h,window.rePosFooter=l,window.reMarginFooter=c,window.queryString=p()},5:function(t,i,e){function s(t){var i='<div class="loading-mask hide"><div class="loading"><div></div><div></div><div></div></div></div>';l=!0,t||(t=h),t.append(i),r=t.children(".loading-mask"),a("body").on("touchstart touchmove touchend",".loading-mask",function(){return!1})}function o(){l||(s(),l=!0),r.removeClass("hide")}function n(){r.addClass("hide")}var r,a=e(1),h=a(".yoho-page"),l=!1;i.init=s,i.showLoadingMask=o,i.hideLoadingMask=n,i.show=o,i.hide=n},23:function(t,i,e){var s;/*! iScroll v5.2.0 ~ (c) 2008-2016 Matteo Spinelli ~ http://cubiq.org/license */  
2 -!function(o,n,r){function a(t,i){this.wrapper="string"==typeof t?n.querySelector(t):t,this.scroller=this.wrapper.children[0],this.scrollerStyle=this.scroller.style,this.options={resizeScrollbars:!0,mouseWheelSpeed:20,snapThreshold:.334,disablePointer:!p.hasPointer,disableTouch:p.hasPointer||!p.hasTouch,disableMouse:p.hasPointer||p.hasTouch,startX:0,startY:0,scrollY:!0,directionLockThreshold:5,momentum:!0,bounce:!0,bounceTime:600,bounceEasing:"",preventDefault:!0,preventDefaultException:{tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT)$/},HWCompositing:!0,useTransition:!0,useTransform:!0,bindToWrapper:"undefined"==typeof o.onmousedown};for(var e in i)this.options[e]=i[e];this.translateZ=this.options.HWCompositing&&p.hasPerspective?" translateZ(0)":"",this.options.useTransition=p.hasTransition&&this.options.useTransition,this.options.useTransform=p.hasTransform&&this.options.useTransform,this.options.eventPassthrough=this.options.eventPassthrough===!0?"vertical":this.options.eventPassthrough,this.options.preventDefault=!this.options.eventPassthrough&&this.options.preventDefault,this.options.scrollY="vertical"==this.options.eventPassthrough?!1:this.options.scrollY,this.options.scrollX="horizontal"==this.options.eventPassthrough?!1:this.options.scrollX,this.options.freeScroll=this.options.freeScroll&&!this.options.eventPassthrough,this.options.directionLockThreshold=this.options.eventPassthrough?0:this.options.directionLockThreshold,this.options.bounceEasing="string"==typeof this.options.bounceEasing?p.ease[this.options.bounceEasing]||p.ease.circular:this.options.bounceEasing,this.options.resizePolling=void 0===this.options.resizePolling?60:this.options.resizePolling,this.options.tap===!0&&(this.options.tap="tap"),"scale"==this.options.shrinkScrollbars&&(this.options.useTransition=!1),this.options.invertWheelDirection=this.options.invertWheelDirection?-1:1,3==this.options.probeType&&(this.options.useTransition=!1),this.x=0,this.y=0,this.directionX=0,this.directionY=0,this._events={},this._init(),this.refresh(),this.scrollTo(this.options.startX,this.options.startY),this.enable()}function h(t,i,e){var s=n.createElement("div"),o=n.createElement("div");return e===!0&&(s.style.cssText="position:absolute;z-index:9999",o.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px"),o.className="iScrollIndicator","h"==t?(e===!0&&(s.style.cssText+=";height:7px;left:2px;right:2px;bottom:0",o.style.height="100%"),s.className="iScrollHorizontalScrollbar"):(e===!0&&(s.style.cssText+=";width:7px;bottom:2px;top:2px;right:1px",o.style.width="100%"),s.className="iScrollVerticalScrollbar"),s.style.cssText+=";overflow:hidden",i||(s.style.pointerEvents="none"),s.appendChild(o),s}function l(t,i){this.wrapper="string"==typeof i.el?n.querySelector(i.el):i.el,this.wrapperStyle=this.wrapper.style,this.indicator=this.wrapper.children[0],this.indicatorStyle=this.indicator.style,this.scroller=t,this.options={listenX:!0,listenY:!0,interactive:!1,resize:!0,defaultScrollbars:!1,shrink:!1,fade:!1,speedRatioX:0,speedRatioY:0};for(var e in i)this.options[e]=i[e];if(this.sizeRatioX=1,this.sizeRatioY=1,this.maxPosX=0,this.maxPosY=0,this.options.interactive&&(this.options.disableTouch||(p.addEvent(this.indicator,"touchstart",this),p.addEvent(o,"touchend",this)),this.options.disablePointer||(p.addEvent(this.indicator,p.prefixPointerEvent("pointerdown"),this),p.addEvent(o,p.prefixPointerEvent("pointerup"),this)),this.options.disableMouse||(p.addEvent(this.indicator,"mousedown",this),p.addEvent(o,"mouseup",this))),this.options.fade){this.wrapperStyle[p.style.transform]=this.scroller.translateZ;var s=p.style.transitionDuration;this.wrapperStyle[s]=p.isBadAndroid?"0.0001ms":"0ms";var r=this;p.isBadAndroid&&c(function(){"0.0001ms"===r.wrapperStyle[s]&&(r.wrapperStyle[s]="0s")}),this.wrapperStyle.opacity="0"}}var c=o.requestAnimationFrame||o.webkitRequestAnimationFrame||o.mozRequestAnimationFrame||o.oRequestAnimationFrame||o.msRequestAnimationFrame||function(t){o.setTimeout(t,1e3/60)},p=function(){function t(t){return s===!1?!1:""===s?t:s+t.charAt(0).toUpperCase()+t.substr(1)}var i={},e=n.createElement("div").style,s=function(){for(var t,i=["t","webkitT","MozT","msT","OT"],s=0,o=i.length;o>s;s++)if(t=i[s]+"ransform",t in e)return i[s].substr(0,i[s].length-1);return!1}();i.getTime=Date.now||function(){return(new Date).getTime()},i.extend=function(t,i){for(var e in i)t[e]=i[e]},i.addEvent=function(t,i,e,s){t.addEventListener(i,e,!!s)},i.removeEvent=function(t,i,e,s){t.removeEventListener(i,e,!!s)},i.prefixPointerEvent=function(t){return o.MSPointerEvent?"MSPointer"+t.charAt(7).toUpperCase()+t.substr(8):t},i.momentum=function(t,i,e,s,o,n){var a,h,l=t-i,c=r.abs(l)/e;return n=void 0===n?6e-4:n,a=t+c*c/(2*n)*(0>l?-1:1),h=c/n,s>a?(a=o?s-o/2.5*(c/8):s,l=r.abs(a-t),h=l/c):a>0&&(a=o?o/2.5*(c/8):0,l=r.abs(t)+a,h=l/c),{destination:r.round(a),duration:h}};var a=t("transform");return i.extend(i,{hasTransform:a!==!1,hasPerspective:t("perspective")in e,hasTouch:"ontouchstart"in o,hasPointer:!(!o.PointerEvent&&!o.MSPointerEvent),hasTransition:t("transition")in e}),i.isBadAndroid=function(){var t=o.navigator.appVersion;if(/Android/.test(t)&&!/Chrome\/\d/.test(t)){var i=t.match(/Safari\/(\d+.\d)/);return i&&"object"==typeof i&&i.length>=2?parseFloat(i[1])<535.19:!0}return!1}(),i.extend(i.style={},{transform:a,transitionTimingFunction:t("transitionTimingFunction"),transitionDuration:t("transitionDuration"),transitionDelay:t("transitionDelay"),transformOrigin:t("transformOrigin")}),i.hasClass=function(t,i){var e=new RegExp("(^|\\s)"+i+"(\\s|$)");return e.test(t.className)},i.addClass=function(t,e){if(!i.hasClass(t,e)){var s=t.className.split(" ");s.push(e),t.className=s.join(" ")}},i.removeClass=function(t,e){if(i.hasClass(t,e)){var s=new RegExp("(^|\\s)"+e+"(\\s|$)","g");t.className=t.className.replace(s," ")}},i.offset=function(t){for(var i=-t.offsetLeft,e=-t.offsetTop;t=t.offsetParent;)i-=t.offsetLeft,e-=t.offsetTop;return{left:i,top:e}},i.preventDefaultException=function(t,i){for(var e in i)if(i[e].test(t[e]))return!0;return!1},i.extend(i.eventType={},{touchstart:1,touchmove:1,touchend:1,mousedown:2,mousemove:2,mouseup:2,pointerdown:3,pointermove:3,pointerup:3,MSPointerDown:3,MSPointerMove:3,MSPointerUp:3}),i.extend(i.ease={},{quadratic:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(t){return t*(2-t)}},circular:{style:"cubic-bezier(0.1, 0.57, 0.1, 1)",fn:function(t){return r.sqrt(1- --t*t)}},back:{style:"cubic-bezier(0.175, 0.885, 0.32, 1.275)",fn:function(t){var i=4;return(t-=1)*t*((i+1)*t+i)+1}},bounce:{style:"",fn:function(t){return(t/=1)<1/2.75?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},elastic:{style:"",fn:function(t){var i=.22,e=.4;return 0===t?0:1==t?1:e*r.pow(2,-10*t)*r.sin((t-i/4)*(2*r.PI)/i)+1}}}),i.tap=function(t,i){var e=n.createEvent("Event");e.initEvent(i,!0,!0),e.pageX=t.pageX,e.pageY=t.pageY,t.target.dispatchEvent(e)},i.click=function(t){var i,e=t.target;/(SELECT|INPUT|TEXTAREA)/i.test(e.tagName)||(i=n.createEvent("MouseEvents"),i.initMouseEvent("click",!0,!0,t.view,1,e.screenX,e.screenY,e.clientX,e.clientY,t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,0,null),i._constructed=!0,e.dispatchEvent(i))},i}();a.prototype={version:"5.2.0",_init:function(){this._initEvents(),(this.options.scrollbars||this.options.indicators)&&this._initIndicators(),this.options.mouseWheel&&this._initWheel(),this.options.snap&&this._initSnap(),this.options.keyBindings&&this._initKeys()},destroy:function(){this._initEvents(!0),clearTimeout(this.resizeTimeout),this.resizeTimeout=null,this._execEvent("destroy")},_transitionEnd:function(t){t.target==this.scroller&&this.isInTransition&&(this._transitionTime(),this.resetPosition(this.options.bounceTime)||(this.isInTransition=!1,this._execEvent("scrollEnd")))},_start:function(t){if(1!=p.eventType[t.type]){var i;if(i=t.which?t.button:t.button<2?0:4==t.button?1:2,0!==i)return}if(this.enabled&&(!this.initiated||p.eventType[t.type]===this.initiated)){!this.options.preventDefault||p.isBadAndroid||p.preventDefaultException(t.target,this.options.preventDefaultException)||t.preventDefault();var e,s=t.touches?t.touches[0]:t;this.initiated=p.eventType[t.type],this.moved=!1,this.distX=0,this.distY=0,this.directionX=0,this.directionY=0,this.directionLocked=0,this.startTime=p.getTime(),this.options.useTransition&&this.isInTransition?(this._transitionTime(),this.isInTransition=!1,e=this.getComputedPosition(),this._translate(r.round(e.x),r.round(e.y)),this._execEvent("scrollEnd")):!this.options.useTransition&&this.isAnimating&&(this.isAnimating=!1,this._execEvent("scrollEnd")),this.startX=this.x,this.startY=this.y,this.absStartX=this.x,this.absStartY=this.y,this.pointX=s.pageX,this.pointY=s.pageY,this._execEvent("beforeScrollStart")}},_move:function(t){if(this.enabled&&p.eventType[t.type]===this.initiated){this.options.preventDefault&&t.preventDefault();var i,e,s,o,n=t.touches?t.touches[0]:t,a=n.pageX-this.pointX,h=n.pageY-this.pointY,l=p.getTime();if(this.pointX=n.pageX,this.pointY=n.pageY,this.distX+=a,this.distY+=h,s=r.abs(this.distX),o=r.abs(this.distY),!(l-this.endTime>300&&10>s&&10>o)){if(this.directionLocked||this.options.freeScroll||(s>o+this.options.directionLockThreshold?this.directionLocked="h":o>=s+this.options.directionLockThreshold?this.directionLocked="v":this.directionLocked="n"),"h"==this.directionLocked){if("vertical"==this.options.eventPassthrough)t.preventDefault();else if("horizontal"==this.options.eventPassthrough)return void(this.initiated=!1);h=0}else if("v"==this.directionLocked){if("horizontal"==this.options.eventPassthrough)t.preventDefault();else if("vertical"==this.options.eventPassthrough)return void(this.initiated=!1);a=0}a=this.hasHorizontalScroll?a:0,h=this.hasVerticalScroll?h:0,i=this.x+a,e=this.y+h,(i>0||i<this.maxScrollX)&&(i=this.options.bounce?this.x+a/3:i>0?0:this.maxScrollX),(e>0||e<this.maxScrollY)&&(e=this.options.bounce?this.y+h/3:e>0?0:this.maxScrollY),this.directionX=a>0?-1:0>a?1:0,this.directionY=h>0?-1:0>h?1:0,this.moved||this._execEvent("scrollStart"),this.moved=!0,this._translate(i,e),l-this.startTime>300&&(this.startTime=l,this.startX=this.x,this.startY=this.y,1==this.options.probeType&&this._execEvent("scroll")),this.options.probeType>1&&this._execEvent("scroll")}}},_end:function(t){if(this.enabled&&p.eventType[t.type]===this.initiated){this.options.preventDefault&&!p.preventDefaultException(t.target,this.options.preventDefaultException)&&t.preventDefault();var i,e,s=(t.changedTouches?t.changedTouches[0]:t,p.getTime()-this.startTime),o=r.round(this.x),n=r.round(this.y),a=r.abs(o-this.startX),h=r.abs(n-this.startY),l=0,c="";if(this.isInTransition=0,this.initiated=0,this.endTime=p.getTime(),!this.resetPosition(this.options.bounceTime)){if(this.scrollTo(o,n),!this.moved)return this.options.tap&&p.tap(t,this.options.tap),this.options.click&&p.click(t),void this._execEvent("scrollCancel");if(this._events.flick&&200>s&&100>a&&100>h)return void this._execEvent("flick");if(this.options.momentum&&300>s&&(i=this.hasHorizontalScroll?p.momentum(this.x,this.startX,s,this.maxScrollX,this.options.bounce?this.wrapperWidth:0,this.options.deceleration):{destination:o,duration:0},e=this.hasVerticalScroll?p.momentum(this.y,this.startY,s,this.maxScrollY,this.options.bounce?this.wrapperHeight:0,this.options.deceleration):{destination:n,duration:0},o=i.destination,n=e.destination,l=r.max(i.duration,e.duration),this.isInTransition=1),this.options.snap){var d=this._nearestSnap(o,n);this.currentPage=d,l=this.options.snapSpeed||r.max(r.max(r.min(r.abs(o-d.x),1e3),r.min(r.abs(n-d.y),1e3)),300),o=d.x,n=d.y,this.directionX=0,this.directionY=0,c=this.options.bounceEasing}return o!=this.x||n!=this.y?((o>0||o<this.maxScrollX||n>0||n<this.maxScrollY)&&(c=p.ease.quadratic),void this.scrollTo(o,n,l,c)):void this._execEvent("scrollEnd")}}},_resize:function(){var t=this;clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(function(){t.refresh()},this.options.resizePolling)},resetPosition:function(t){var i=this.x,e=this.y;return t=t||0,!this.hasHorizontalScroll||this.x>0?i=0:this.x<this.maxScrollX&&(i=this.maxScrollX),!this.hasVerticalScroll||this.y>0?e=0:this.y<this.maxScrollY&&(e=this.maxScrollY),i==this.x&&e==this.y?!1:(this.scrollTo(i,e,t,this.options.bounceEasing),!0)},disable:function(){this.enabled=!1},enable:function(){this.enabled=!0},refresh:function(){this.wrapper.offsetHeight;this.wrapperWidth=this.wrapper.clientWidth,this.wrapperHeight=this.wrapper.clientHeight,this.scrollerWidth=this.scroller.offsetWidth,this.scrollerHeight=this.scroller.offsetHeight,this.maxScrollX=this.wrapperWidth-this.scrollerWidth,this.maxScrollY=this.wrapperHeight-this.scrollerHeight,this.hasHorizontalScroll=this.options.scrollX&&this.maxScrollX<0,this.hasVerticalScroll=this.options.scrollY&&this.maxScrollY<0,this.hasHorizontalScroll||(this.maxScrollX=0,this.scrollerWidth=this.wrapperWidth),this.hasVerticalScroll||(this.maxScrollY=0,this.scrollerHeight=this.wrapperHeight),this.endTime=0,this.directionX=0,this.directionY=0,this.wrapperOffset=p.offset(this.wrapper),this._execEvent("refresh"),this.resetPosition()},on:function(t,i){this._events[t]||(this._events[t]=[]),this._events[t].push(i)},off:function(t,i){if(this._events[t]){var e=this._events[t].indexOf(i);e>-1&&this._events[t].splice(e,1)}},_execEvent:function(t){if(this._events[t]){var i=0,e=this._events[t].length;if(e)for(;e>i;i++)this._events[t][i].apply(this,[].slice.call(arguments,1))}},scrollBy:function(t,i,e,s){t=this.x+t,i=this.y+i,e=e||0,this.scrollTo(t,i,e,s)},scrollTo:function(t,i,e,s){s=s||p.ease.circular,this.isInTransition=this.options.useTransition&&e>0;var o=this.options.useTransition&&s.style;!e||o?(o&&(this._transitionTimingFunction(s.style),this._transitionTime(e)),this._translate(t,i)):this._animate(t,i,e,s.fn)},scrollToElement:function(t,i,e,s,o){if(t=t.nodeType?t:this.scroller.querySelector(t)){var n=p.offset(t);n.left-=this.wrapperOffset.left,n.top-=this.wrapperOffset.top,e===!0&&(e=r.round(t.offsetWidth/2-this.wrapper.offsetWidth/2)),s===!0&&(s=r.round(t.offsetHeight/2-this.wrapper.offsetHeight/2)),n.left-=e||0,n.top-=s||0,n.left=n.left>0?0:n.left<this.maxScrollX?this.maxScrollX:n.left,n.top=n.top>0?0:n.top<this.maxScrollY?this.maxScrollY:n.top,i=void 0===i||null===i||"auto"===i?r.max(r.abs(this.x-n.left),r.abs(this.y-n.top)):i,this.scrollTo(n.left,n.top,i,o)}},_transitionTime:function(t){t=t||0;var i=p.style.transitionDuration;if(this.scrollerStyle[i]=t+"ms",!t&&p.isBadAndroid){this.scrollerStyle[i]="0.0001ms";var e=this;c(function(){"0.0001ms"===e.scrollerStyle[i]&&(e.scrollerStyle[i]="0s")})}if(this.indicators)for(var s=this.indicators.length;s--;)this.indicators[s].transitionTime(t)},_transitionTimingFunction:function(t){if(this.scrollerStyle[p.style.transitionTimingFunction]=t,this.indicators)for(var i=this.indicators.length;i--;)this.indicators[i].transitionTimingFunction(t)},_translate:function(t,i){if(this.options.useTransform?this.scrollerStyle[p.style.transform]="translate("+t+"px,"+i+"px)"+this.translateZ:(t=r.round(t),i=r.round(i),this.scrollerStyle.left=t+"px",this.scrollerStyle.top=i+"px"),this.x=t,this.y=i,this.indicators)for(var e=this.indicators.length;e--;)this.indicators[e].updatePosition()},_initEvents:function(t){var i=t?p.removeEvent:p.addEvent,e=this.options.bindToWrapper?this.wrapper:o;i(o,"orientationchange",this),i(o,"resize",this),this.options.click&&i(this.wrapper,"click",this,!0),this.options.disableMouse||(i(this.wrapper,"mousedown",this),i(e,"mousemove",this),i(e,"mousecancel",this),i(e,"mouseup",this)),p.hasPointer&&!this.options.disablePointer&&(i(this.wrapper,p.prefixPointerEvent("pointerdown"),this),i(e,p.prefixPointerEvent("pointermove"),this),i(e,p.prefixPointerEvent("pointercancel"),this),i(e,p.prefixPointerEvent("pointerup"),this)),p.hasTouch&&!this.options.disableTouch&&(i(this.wrapper,"touchstart",this),i(e,"touchmove",this),i(e,"touchcancel",this),i(e,"touchend",this)),i(this.scroller,"transitionend",this),i(this.scroller,"webkitTransitionEnd",this),i(this.scroller,"oTransitionEnd",this),i(this.scroller,"MSTransitionEnd",this)},getComputedPosition:function(){var t,i,e=o.getComputedStyle(this.scroller,null);return this.options.useTransform?(e=e[p.style.transform].split(")")[0].split(", "),t=+(e[12]||e[4]),i=+(e[13]||e[5])):(t=+e.left.replace(/[^-\d.]/g,""),i=+e.top.replace(/[^-\d.]/g,"")),{x:t,y:i}},_initIndicators:function(){function t(t){if(n.indicators)for(var i=n.indicators.length;i--;)t.call(n.indicators[i])}var i,e=this.options.interactiveScrollbars,s="string"!=typeof this.options.scrollbars,o=[],n=this;this.indicators=[],this.options.scrollbars&&(this.options.scrollY&&(i={el:h("v",e,this.options.scrollbars),interactive:e,defaultScrollbars:!0,customStyle:s,resize:this.options.resizeScrollbars,shrink:this.options.shrinkScrollbars,fade:this.options.fadeScrollbars,listenX:!1},this.wrapper.appendChild(i.el),o.push(i)),this.options.scrollX&&(i={el:h("h",e,this.options.scrollbars),interactive:e,defaultScrollbars:!0,customStyle:s,resize:this.options.resizeScrollbars,shrink:this.options.shrinkScrollbars,fade:this.options.fadeScrollbars,listenY:!1},this.wrapper.appendChild(i.el),o.push(i))),this.options.indicators&&(o=o.concat(this.options.indicators));for(var r=o.length;r--;)this.indicators.push(new l(this,o[r]));this.options.fadeScrollbars&&(this.on("scrollEnd",function(){t(function(){this.fade()})}),this.on("scrollCancel",function(){t(function(){this.fade()})}),this.on("scrollStart",function(){t(function(){this.fade(1)})}),this.on("beforeScrollStart",function(){t(function(){this.fade(1,!0)})})),this.on("refresh",function(){t(function(){this.refresh()})}),this.on("destroy",function(){t(function(){this.destroy()}),delete this.indicators})},_initWheel:function(){p.addEvent(this.wrapper,"wheel",this),p.addEvent(this.wrapper,"mousewheel",this),p.addEvent(this.wrapper,"DOMMouseScroll",this),this.on("destroy",function(){clearTimeout(this.wheelTimeout),this.wheelTimeout=null,p.removeEvent(this.wrapper,"wheel",this),p.removeEvent(this.wrapper,"mousewheel",this),p.removeEvent(this.wrapper,"DOMMouseScroll",this)})},_wheel:function(t){if(this.enabled){t.preventDefault();var i,e,s,o,n=this;if(void 0===this.wheelTimeout&&n._execEvent("scrollStart"),clearTimeout(this.wheelTimeout),this.wheelTimeout=setTimeout(function(){n.options.snap||n._execEvent("scrollEnd"),n.wheelTimeout=void 0},400),"deltaX"in t)1===t.deltaMode?(i=-t.deltaX*this.options.mouseWheelSpeed,e=-t.deltaY*this.options.mouseWheelSpeed):(i=-t.deltaX,e=-t.deltaY);else if("wheelDeltaX"in t)i=t.wheelDeltaX/120*this.options.mouseWheelSpeed,e=t.wheelDeltaY/120*this.options.mouseWheelSpeed;else if("wheelDelta"in t)i=e=t.wheelDelta/120*this.options.mouseWheelSpeed;else{if(!("detail"in t))return;i=e=-t.detail/3*this.options.mouseWheelSpeed}if(i*=this.options.invertWheelDirection,e*=this.options.invertWheelDirection,this.hasVerticalScroll||(i=e,e=0),this.options.snap)return s=this.currentPage.pageX,o=this.currentPage.pageY,i>0?s--:0>i&&s++,e>0?o--:0>e&&o++,void this.goToPage(s,o);s=this.x+r.round(this.hasHorizontalScroll?i:0),o=this.y+r.round(this.hasVerticalScroll?e:0),this.directionX=i>0?-1:0>i?1:0,this.directionY=e>0?-1:0>e?1:0,s>0?s=0:s<this.maxScrollX&&(s=this.maxScrollX),o>0?o=0:o<this.maxScrollY&&(o=this.maxScrollY),this.scrollTo(s,o,0),this.options.probeType>1&&this._execEvent("scroll")}},_initSnap:function(){this.currentPage={},"string"==typeof this.options.snap&&(this.options.snap=this.scroller.querySelectorAll(this.options.snap)),this.on("refresh",function(){var t,i,e,s,o,n,a=0,h=0,l=0,c=this.options.snapStepX||this.wrapperWidth,p=this.options.snapStepY||this.wrapperHeight;if(this.pages=[],this.wrapperWidth&&this.wrapperHeight&&this.scrollerWidth&&this.scrollerHeight){if(this.options.snap===!0)for(e=r.round(c/2),s=r.round(p/2);l>-this.scrollerWidth;){for(this.pages[a]=[],t=0,o=0;o>-this.scrollerHeight;)this.pages[a][t]={x:r.max(l,this.maxScrollX),y:r.max(o,this.maxScrollY),width:c,height:p,cx:l-e,cy:o-s},o-=p,t++;l-=c,a++}else for(n=this.options.snap,t=n.length,i=-1;t>a;a++)(0===a||n[a].offsetLeft<=n[a-1].offsetLeft)&&(h=0,i++),this.pages[h]||(this.pages[h]=[]),l=r.max(-n[a].offsetLeft,this.maxScrollX),o=r.max(-n[a].offsetTop,this.maxScrollY),e=l-r.round(n[a].offsetWidth/2),s=o-r.round(n[a].offsetHeight/2),this.pages[h][i]={x:l,y:o,width:n[a].offsetWidth,height:n[a].offsetHeight,cx:e,cy:s},l>this.maxScrollX&&h++;this.goToPage(this.currentPage.pageX||0,this.currentPage.pageY||0,0),this.options.snapThreshold%1===0?(this.snapThresholdX=this.options.snapThreshold,this.snapThresholdY=this.options.snapThreshold):(this.snapThresholdX=r.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].width*this.options.snapThreshold),this.snapThresholdY=r.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].height*this.options.snapThreshold))}}),this.on("flick",function(){var t=this.options.snapSpeed||r.max(r.max(r.min(r.abs(this.x-this.startX),1e3),r.min(r.abs(this.y-this.startY),1e3)),300);this.goToPage(this.currentPage.pageX+this.directionX,this.currentPage.pageY+this.directionY,t)})},_nearestSnap:function(t,i){if(!this.pages.length)return{x:0,y:0,pageX:0,pageY:0};var e=0,s=this.pages.length,o=0;if(r.abs(t-this.absStartX)<this.snapThresholdX&&r.abs(i-this.absStartY)<this.snapThresholdY)return this.currentPage;for(t>0?t=0:t<this.maxScrollX&&(t=this.maxScrollX),i>0?i=0:i<this.maxScrollY&&(i=this.maxScrollY);s>e;e++)if(t>=this.pages[e][0].cx){t=this.pages[e][0].x;break}for(s=this.pages[e].length;s>o;o++)if(i>=this.pages[0][o].cy){i=this.pages[0][o].y;break}return e==this.currentPage.pageX&&(e+=this.directionX,0>e?e=0:e>=this.pages.length&&(e=this.pages.length-1),t=this.pages[e][0].x),o==this.currentPage.pageY&&(o+=this.directionY,0>o?o=0:o>=this.pages[0].length&&(o=this.pages[0].length-1),i=this.pages[0][o].y),{x:t,y:i,pageX:e,pageY:o}},goToPage:function(t,i,e,s){s=s||this.options.bounceEasing,t>=this.pages.length?t=this.pages.length-1:0>t&&(t=0),i>=this.pages[t].length?i=this.pages[t].length-1:0>i&&(i=0);var o=this.pages[t][i].x,n=this.pages[t][i].y;e=void 0===e?this.options.snapSpeed||r.max(r.max(r.min(r.abs(o-this.x),1e3),r.min(r.abs(n-this.y),1e3)),300):e,this.currentPage={x:o,y:n,pageX:t,pageY:i},this.scrollTo(o,n,e,s)},next:function(t,i){var e=this.currentPage.pageX,s=this.currentPage.pageY;e++,e>=this.pages.length&&this.hasVerticalScroll&&(e=0,s++),this.goToPage(e,s,t,i)},prev:function(t,i){var e=this.currentPage.pageX,s=this.currentPage.pageY;e--,0>e&&this.hasVerticalScroll&&(e=0,s--),this.goToPage(e,s,t,i)},_initKeys:function(t){var i,e={pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40};if("object"==typeof this.options.keyBindings)for(i in this.options.keyBindings)"string"==typeof this.options.keyBindings[i]&&(this.options.keyBindings[i]=this.options.keyBindings[i].toUpperCase().charCodeAt(0));else this.options.keyBindings={};for(i in e)this.options.keyBindings[i]=this.options.keyBindings[i]||e[i];p.addEvent(o,"keydown",this),this.on("destroy",function(){p.removeEvent(o,"keydown",this)})},_key:function(t){if(this.enabled){var i,e=this.options.snap,s=e?this.currentPage.pageX:this.x,o=e?this.currentPage.pageY:this.y,n=p.getTime(),a=this.keyTime||0,h=.25;switch(this.options.useTransition&&this.isInTransition&&(i=this.getComputedPosition(),this._translate(r.round(i.x),r.round(i.y)),this.isInTransition=!1),this.keyAcceleration=200>n-a?r.min(this.keyAcceleration+h,50):0,t.keyCode){case this.options.keyBindings.pageUp:this.hasHorizontalScroll&&!this.hasVerticalScroll?s+=e?1:this.wrapperWidth:o+=e?1:this.wrapperHeight;break;case this.options.keyBindings.pageDown:this.hasHorizontalScroll&&!this.hasVerticalScroll?s-=e?1:this.wrapperWidth:o-=e?1:this.wrapperHeight;break;case this.options.keyBindings.end:s=e?this.pages.length-1:this.maxScrollX,o=e?this.pages[0].length-1:this.maxScrollY;break;case this.options.keyBindings.home:s=0,o=0;break;case this.options.keyBindings.left:s+=e?-1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.up:o+=e?1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.right:s-=e?-1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.down:o-=e?1:5+this.keyAcceleration>>0;break;default:return}if(e)return void this.goToPage(s,o);s>0?(s=0,this.keyAcceleration=0):s<this.maxScrollX&&(s=this.maxScrollX,this.keyAcceleration=0),o>0?(o=0,this.keyAcceleration=0):o<this.maxScrollY&&(o=this.maxScrollY,this.keyAcceleration=0),this.scrollTo(s,o,0),this.keyTime=n}},_animate:function(t,i,e,s){function o(){var d,u,f,m=p.getTime();return m>=l?(n.isAnimating=!1,n._translate(t,i),void(n.resetPosition(n.options.bounceTime)||n._execEvent("scrollEnd"))):(m=(m-h)/e,f=s(m),d=(t-r)*f+r,u=(i-a)*f+a,n._translate(d,u),n.isAnimating&&c(o),void(3==n.options.probeType&&n._execEvent("scroll")))}var n=this,r=this.x,a=this.y,h=p.getTime(),l=h+e;this.isAnimating=!0,o()},handleEvent:function(t){switch(t.type){case"touchstart":case"pointerdown":case"MSPointerDown":case"mousedown":this._start(t);break;case"touchmove":case"pointermove":case"MSPointerMove":case"mousemove":this._move(t);break;case"touchend":case"pointerup":case"MSPointerUp":case"mouseup":case"touchcancel":case"pointercancel":case"MSPointerCancel":case"mousecancel":this._end(t);break;case"orientationchange":case"resize":this._resize();break;case"transitionend":case"webkitTransitionEnd":case"oTransitionEnd":case"MSTransitionEnd":this._transitionEnd(t);break;case"wheel":case"DOMMouseScroll":case"mousewheel":this._wheel(t);break;case"keydown":this._key(t);break;case"click":this.enabled&&!t._constructed&&(t.preventDefault(),t.stopPropagation())}}},l.prototype={handleEvent:function(t){switch(t.type){case"touchstart":case"pointerdown":case"MSPointerDown":case"mousedown":this._start(t);break;case"touchmove":case"pointermove":case"MSPointerMove":case"mousemove":this._move(t);break;case"touchend":case"pointerup":case"MSPointerUp":case"mouseup":case"touchcancel":case"pointercancel":case"MSPointerCancel":case"mousecancel":this._end(t)}},destroy:function(){this.options.fadeScrollbars&&(clearTimeout(this.fadeTimeout),this.fadeTimeout=null),this.options.interactive&&(p.removeEvent(this.indicator,"touchstart",this),p.removeEvent(this.indicator,p.prefixPointerEvent("pointerdown"),this),p.removeEvent(this.indicator,"mousedown",this),p.removeEvent(o,"touchmove",this),p.removeEvent(o,p.prefixPointerEvent("pointermove"),this),p.removeEvent(o,"mousemove",this),p.removeEvent(o,"touchend",this),p.removeEvent(o,p.prefixPointerEvent("pointerup"),this),p.removeEvent(o,"mouseup",this)),this.options.defaultScrollbars&&this.wrapper.parentNode.removeChild(this.wrapper)},_start:function(t){var i=t.touches?t.touches[0]:t;t.preventDefault(),t.stopPropagation(),this.transitionTime(),this.initiated=!0,this.moved=!1,this.lastPointX=i.pageX,this.lastPointY=i.pageY,this.startTime=p.getTime(),this.options.disableTouch||p.addEvent(o,"touchmove",this),this.options.disablePointer||p.addEvent(o,p.prefixPointerEvent("pointermove"),this),this.options.disableMouse||p.addEvent(o,"mousemove",this),this.scroller._execEvent("beforeScrollStart")},_move:function(t){var i,e,s,o,n=t.touches?t.touches[0]:t,r=p.getTime();this.moved||this.scroller._execEvent("scrollStart"),this.moved=!0,i=n.pageX-this.lastPointX,this.lastPointX=n.pageX,e=n.pageY-this.lastPointY,this.lastPointY=n.pageY,s=this.x+i,o=this.y+e,this._pos(s,o),1==this.scroller.options.probeType&&r-this.startTime>300?(this.startTime=r,this.scroller._execEvent("scroll")):this.scroller.options.probeType>1&&this.scroller._execEvent("scroll"),t.preventDefault(),t.stopPropagation()},_end:function(t){if(this.initiated){if(this.initiated=!1,t.preventDefault(),t.stopPropagation(),p.removeEvent(o,"touchmove",this),p.removeEvent(o,p.prefixPointerEvent("pointermove"),this),p.removeEvent(o,"mousemove",this),this.scroller.options.snap){var i=this.scroller._nearestSnap(this.scroller.x,this.scroller.y),e=this.options.snapSpeed||r.max(r.max(r.min(r.abs(this.scroller.x-i.x),1e3),r.min(r.abs(this.scroller.y-i.y),1e3)),300);this.scroller.x==i.x&&this.scroller.y==i.y||(this.scroller.directionX=0,this.scroller.directionY=0,this.scroller.currentPage=i,this.scroller.scrollTo(i.x,i.y,e,this.scroller.options.bounceEasing))}this.moved&&this.scroller._execEvent("scrollEnd")}},transitionTime:function(t){t=t||0;var i=p.style.transitionDuration;if(this.indicatorStyle[i]=t+"ms",!t&&p.isBadAndroid){this.indicatorStyle[i]="0.0001ms";var e=this;c(function(){"0.0001ms"===e.indicatorStyle[i]&&(e.indicatorStyle[i]="0s")})}},transitionTimingFunction:function(t){this.indicatorStyle[p.style.transitionTimingFunction]=t},refresh:function(){this.transitionTime(),this.options.listenX&&!this.options.listenY?this.indicatorStyle.display=this.scroller.hasHorizontalScroll?"block":"none":this.options.listenY&&!this.options.listenX?this.indicatorStyle.display=this.scroller.hasVerticalScroll?"block":"none":this.indicatorStyle.display=this.scroller.hasHorizontalScroll||this.scroller.hasVerticalScroll?"block":"none",this.scroller.hasHorizontalScroll&&this.scroller.hasVerticalScroll?(p.addClass(this.wrapper,"iScrollBothScrollbars"),p.removeClass(this.wrapper,"iScrollLoneScrollbar"),this.options.defaultScrollbars&&this.options.customStyle&&(this.options.listenX?this.wrapper.style.right="8px":this.wrapper.style.bottom="8px")):(p.removeClass(this.wrapper,"iScrollBothScrollbars"),p.addClass(this.wrapper,"iScrollLoneScrollbar"),this.options.defaultScrollbars&&this.options.customStyle&&(this.options.listenX?this.wrapper.style.right="2px":this.wrapper.style.bottom="2px"));this.wrapper.offsetHeight;this.options.listenX&&(this.wrapperWidth=this.wrapper.clientWidth,this.options.resize?(this.indicatorWidth=r.max(r.round(this.wrapperWidth*this.wrapperWidth/(this.scroller.scrollerWidth||this.wrapperWidth||1)),8),this.indicatorStyle.width=this.indicatorWidth+"px"):this.indicatorWidth=this.indicator.clientWidth,this.maxPosX=this.wrapperWidth-this.indicatorWidth,"clip"==this.options.shrink?(this.minBoundaryX=-this.indicatorWidth+8,this.maxBoundaryX=this.wrapperWidth-8):(this.minBoundaryX=0,this.maxBoundaryX=this.maxPosX),this.sizeRatioX=this.options.speedRatioX||this.scroller.maxScrollX&&this.maxPosX/this.scroller.maxScrollX),this.options.listenY&&(this.wrapperHeight=this.wrapper.clientHeight,this.options.resize?(this.indicatorHeight=r.max(r.round(this.wrapperHeight*this.wrapperHeight/(this.scroller.scrollerHeight||this.wrapperHeight||1)),8),this.indicatorStyle.height=this.indicatorHeight+"px"):this.indicatorHeight=this.indicator.clientHeight,this.maxPosY=this.wrapperHeight-this.indicatorHeight,"clip"==this.options.shrink?(this.minBoundaryY=-this.indicatorHeight+8,this.maxBoundaryY=this.wrapperHeight-8):(this.minBoundaryY=0,this.maxBoundaryY=this.maxPosY),this.maxPosY=this.wrapperHeight-this.indicatorHeight,this.sizeRatioY=this.options.speedRatioY||this.scroller.maxScrollY&&this.maxPosY/this.scroller.maxScrollY),this.updatePosition()},updatePosition:function(){var t=this.options.listenX&&r.round(this.sizeRatioX*this.scroller.x)||0,i=this.options.listenY&&r.round(this.sizeRatioY*this.scroller.y)||0;this.options.ignoreBoundaries||(t<this.minBoundaryX?("scale"==this.options.shrink&&(this.width=r.max(this.indicatorWidth+t,8),this.indicatorStyle.width=this.width+"px"),t=this.minBoundaryX):t>this.maxBoundaryX?"scale"==this.options.shrink?(this.width=r.max(this.indicatorWidth-(t-this.maxPosX),8),this.indicatorStyle.width=this.width+"px",t=this.maxPosX+this.indicatorWidth-this.width):t=this.maxBoundaryX:"scale"==this.options.shrink&&this.width!=this.indicatorWidth&&(this.width=this.indicatorWidth,this.indicatorStyle.width=this.width+"px"),i<this.minBoundaryY?("scale"==this.options.shrink&&(this.height=r.max(this.indicatorHeight+3*i,8),  
3 -this.indicatorStyle.height=this.height+"px"),i=this.minBoundaryY):i>this.maxBoundaryY?"scale"==this.options.shrink?(this.height=r.max(this.indicatorHeight-3*(i-this.maxPosY),8),this.indicatorStyle.height=this.height+"px",i=this.maxPosY+this.indicatorHeight-this.height):i=this.maxBoundaryY:"scale"==this.options.shrink&&this.height!=this.indicatorHeight&&(this.height=this.indicatorHeight,this.indicatorStyle.height=this.height+"px")),this.x=t,this.y=i,this.scroller.options.useTransform?this.indicatorStyle[p.style.transform]="translate("+t+"px,"+i+"px)"+this.scroller.translateZ:(this.indicatorStyle.left=t+"px",this.indicatorStyle.top=i+"px")},_pos:function(t,i){0>t?t=0:t>this.maxPosX&&(t=this.maxPosX),0>i?i=0:i>this.maxPosY&&(i=this.maxPosY),t=this.options.listenX?r.round(t/this.sizeRatioX):this.scroller.x,i=this.options.listenY?r.round(i/this.sizeRatioY):this.scroller.y,this.scroller.scrollTo(t,i)},fade:function(t,i){if(!i||this.visible){clearTimeout(this.fadeTimeout),this.fadeTimeout=null;var e=t?250:500,s=t?0:300;t=t?"1":"0",this.wrapperStyle[p.style.transitionDuration]=e+"ms",this.fadeTimeout=setTimeout(function(t){this.wrapperStyle.opacity=t,this.visible=+t}.bind(this,t),s)}}},a.utils=p,"undefined"!=typeof t&&t.exports?t.exports=a:(s=function(){return a}.call(i,e,i,t),!(void 0!==s&&(t.exports=s)))}(window,document,Math)},42:function(t,i,e){function s(t,i){var e,s,r=o(window),a=!1;e=o(t),e.length&&(i.height&&e.height(i.height),this.iScroll=new n(e.get(0),{click:!0,probeType:3}),this.iScroll.on("scrollStart",function(){0===this.y&&(a=!0),s=this.y,r.trigger("scroll")}),this.iScroll.on("scrollEnd",function(){a&&-1===this.directionY&&i.pullDown&&i.pullDown(),a=!1,s===this.y&&1===this.directionY&&i.pullUp&&i.pullUp(),r.trigger("scroll")}))}var o=e(1),n=e(23);t.exports=s}});  
  1 +webpackJsonp([10],{0:function(t,i,e){function s(t,i,e){var s=t.find(i),o=t.find(e);s[0].mlellipsis(2),o[0].mlellipsis(3)}function o(t){var i=new Image,e="";e=t.data("avatar"),i.onload=function(){t.css("background-image","url("+e+")")},e?i.src=e:t.addClass("default-avater")}function n(t){return a=t.index(),t.hasClass("swiper-slide-active")?void 0:(a>=2*l+1?(d&&d.slideTo(l+1,0),p.slideTo(l+1,0)):l-1>=a?(d&&d.slideTo(2*l-1,0),p.slideTo(2*l-(l-a),0)):(d&&d.slideTo(a,200),p.slideTo(a,200)),!1)}function r(){y(".avatar").each(function(t,i){y(i).addClass("avatar-"+t)}),l>1&&(p=new w(".avatar-1",{initialSlide:2,centeredSlides:!0,slidesPerView:"auto",loopedSlides:l,spaceBetween:10,slidesOffsetBefore:-D,watchSlidesProgress:!0,watchSlidesVisibility:!0,onInit:function(){y(".avatar-1 li").on("click",function(){return c=n(y(this))})}})),console.log(p),console.log(parseInt(y(".avatar-swiper .swiper-slide-active").width())),console.log(parseInt(y(".avatar-swiper .swiper-slide-prev").width())),console.log(parseInt(y(".avatar-swiper .swiper-slide-duplicate").width())),y(".article-avatar-swiper").find("li").length>1&&new w(".article-avatar-swiper",{initialSlide:0,lazyLoading:!0,lazyLoadingInPrevNext:!0,loop:!0,autoplay:5e3}),y(".banner-swiper").find("li").length>1&&new w(".banner-swiper",{lazyLoading:!0,lazyLoadingInPrevNext:!0,loop:!0,autoplay:3e3,autoplayDisableOnInteraction:!1,paginationClickable:!0,slideElement:"li",pagination:".banner-top .pagination-inner"}),y(".star-info").find("li").length>0&&m.each(function(t,i){s(y(i),".article-title","p")}),y(".rank-avatar").each(function(t,i){o(y(i))}),y(".star").each(function(t,i){""===y(i).attr("src")&&y(i).addClass("default-avater")}),y("#yoho-header, .head-tab").on("touchmove",function(){return!1}),y("img").on("load",function(){v.iScroll.refresh()})}function h(){m=y(".star-article"),g=y(".avatar-wrap"),l=g.find(".swiper-slide").length,f&&f.remove(),H.before(y(".avatar-swiper").clone().addClass("avatar-clone").hide()),f=y(".avatar-clone"),y(".cont-area").each(function(){s(y(this),".title",".cont-txt")}),S(y("img.lazy")),r()}var a,l,c,p,d,u,f,m,g,v,y=e(1),w=e(11),x=e(2),S=e(6),T=e(10),b=e(5),E=e(29),k=y(window),P=!1,X=y(".main-content"),Y=y(".head-tab"),_=Y.height(),z=y(window).height()-_,H=y(".loading-tip"),D=y(".swiper-num2").width()-y(".swiper-num1").width()+(y(".swiper-num3").width()-y(".swiper-num1").width())/2;k.width()-(2*y(".swiper-num2").width()+y(".swiper-num3").width()+2*y(".swiper-num1").width());console.log(Math.ceil(y(".swiper-num2").width())),console.log(Math.ceil(y(".swiper-num3").width())),console.log(Math.ceil(y(".swiper-num1").width())),e(3),S(y("img.lazy")),T.init(),k.on("mousewheel",!1),u=function(){b.showLoadingMask(),y.ajax({url:"/guang/star/getIndexHtml",dataType:"html",success:function(t){P=!1,t&&(d&&(d.destroy(!0,!0),d=""),X.html(t),h()),b.hideLoadingMask()},error:function(){x.show("网络断开连接了~")}})},h(),v=new E(".star-main",{height:z,pullDown:function(){P||(P=!0,u())}}),v.iScroll.on("scrollStart",function(){-1===this.directionY&&H.slideDown()}),v.iScroll.on("scroll",function(){g.offset().top<=_&&(f.show(),d||(d.params.control=p,p.params.control=d)),g.offset().top>y(".avatar-1")[0].scrollHeight&&f.hide()}),v.iScroll.on("scrollEnd",function(){H.slideUp()}),window.setCookie("guangStarUid",window.queryString.uid)},2:function(t,i,e){function s(t,i){var e,s;"undefined"!=typeof t&&(e=t.toString(),s=i&&i>0?i:2e3,o.text(e).show(),n=setTimeout(function(){"block"===o.css("display")&&o.hide()},s))}var o,n,r=e(1);!function(){var t='<div id="yoho-tip" class="yoho-tip"></div>';r(".yoho-page").append(t),o=r("#yoho-tip"),o.on("touchend",function(){o.hide(),clearTimeout(n)})}(),i.show=s},3:function(t,i,e){function s(t){var i,e,s=document.cookie;return document.cookie&&""!==document.cookie&&(e=s.indexOf(t+"="),e>-1&&(e+=t.length+1,i=decodeURIComponent(u.trim(s.substring(e,s.indexOf(";",e)))))),i}function o(t,i,e){var s,o,n,r,h="";"undefined"!=typeof i&&(e=e||{},null===i&&(i="",e.expires=-1),e.expires&&("number"==typeof e.expires||e.expires.toUTCString)&&("number"==typeof e.expires?(r=new Date,r.setTime(r.getTime()+24*e.expires*60*60*1e3)):r=e.expires,h="; expires="+r.toUTCString()),s=e.path?"; path="+e.path:"",o=e.domain?"; domain="+e.domain:"",n=e.secure?"; secure":"",document.cookie=[t,"=",encodeURIComponent(i),h,s,o,n].join(""))}function n(){var t=!!navigator.cookieEnabled;return"undefined"!=typeof navigator.cookieEnabled||t||(document.cookie="testcookie",t=-1!==document.cookie.indexOf("testcookie")),t}function r(){var t,i=s("_UID");return"undefined"==typeof i?0:(t=i.split("::"),"undefined"==typeof t||t.length<4?0:t)}function h(){var t=r();return 0===t?0:t[1]}function a(){var t=s("_g");return"undefined"==typeof t?"":JSON.parse(t).k}function l(){var t;0!==m.length&&(t=Math.min(u(window).height(),window.screen.availHeight),u("body").height()<=t-parseInt(m.css("height"),0)?m.addClass("bottom"):m.removeClass("bottom"))}function c(t){var i=u(t).outerHeight();t&&m.css("margin-bottom",i+"px")}function p(){var t,i,e=[],s=window.location.search.slice(1).split("&");for(i=0;i<s.length;i++)t=s[i].split("="),e.push(t[0]),e[t[0]]=t[1];return e}function d(t){return t.replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")}var u=e(1),f=e(4),m=u("#yoho-footer"),g=u(".yoho-page"),v=u(".yoho-header");!function(){var t,i=m.children(".op-row"),e=u(".back-to-top"),s=r();l(),0===s?i.prepend('<a href="http://m.yohobuy.com/signin.html?refer='+location.href+'">登录</a><span class="sep-line">|</span><a href="http://m.yohobuy.com/reg.html">注册</a>'):i.prepend('<span>Hi,</span><a class="user-name" href="http://m.yohobuy.com/home?tmp='+Math.random()+'">'+s[0]+'</a><a href="http://m.yohobuy.com/passport/signout/index">退出</a>'),e.length>0&&(t=new f(e[0]),t.on("tap",function(t){return u(window).scrollTop(0),t.srcEvent.preventDefault(),!1})),m.removeClass("hide")}(),function(t,i,e,s,o){var n=i.createElement(e),r=i.getElementsByTagName(e)[0];t.YohoAcquisitionObject=o,t[o]=function(){t[o].p=arguments},n.async=1,n.src=s,r.parentNode.insertBefore(n,r)}(window,document,"script",("https:"===document.location.protocol?"https":"http")+"://cdn.yoho.cn/yas-jssdk/1.0.17/yas.js","_yas"),function(){var t=h();t=0===t?"":t,window._ozuid=t,window._yas&&window._yas(1*new Date,"1.0.17","yohobuy_m",t,"","")}(),v.on("touchstart","a",function(){v.find("a").removeClass("highlight"),u(this).addClass("highlight")}).on("touchend touchcancel","a",function(){u(this).removeClass("highlight")}),g.on("touchstart",".tap-hightlight",function(){u(this).siblings(".tap-hightlight").removeClass("highlight"),u(this).addClass("highlight")}).on("touchend touchcancel",".tap-hightlight",function(){u(this).removeClass("highlight")}),u(".nav-home").on("touchstart",function(){u(".homebuttom").toggleClass("hide")}),function(){var t,i,e=0,s="webkit moz ms o".split(" "),o=window.requestAnimationFrame,n=window.cancelAnimationFrame;for(i=0;i<s.length&&(!o||!n);i++)t=s[i],o=o||window[t+"RequestAnimationFrame"],n=n||window[t+"CancelAnimationFrame"]||window[t+"CancelRequestAnimationFrame"];o&&n||(o=function(t){var i=(new Date).getTime(),s=Math.max(0,16-(i-e)),o=window.setTimeout(function(){t(i+s)},s);return e=i+s,o},n=function(t){window.clearTimeout(t)}),window.requestAnimationFrame=o,window.cancelAnimationFrame=n}(),u.extend({queryString:p}),11===m.find(".user-name").text().length&&m.find(".user-name").html(d(m.find(".user-name").text())),window.cookie=s,window.setCookie=o,window.isCookiesEnabled=n,window.getUser=r,window.getUid=h,window.getShoppingKey=a,window.rePosFooter=l,window.reMarginFooter=c,window.queryString=p()},5:function(t,i,e){function s(t){var i='<div class="loading-mask hide"><div class="loading"><div></div><div></div><div></div></div></div>';l=!0,t||(t=a),t.append(i),r=t.children(".loading-mask"),h("body").on("touchstart touchmove touchend",".loading-mask",function(){return!1})}function o(){l||(s(),l=!0),r.removeClass("hide")}function n(){r.addClass("hide")}var r,h=e(1),a=h(".yoho-page"),l=!1;i.init=s,i.showLoadingMask=o,i.hideLoadingMask=n,i.show=o,i.hide=n},20:function(t,i,e){var s;/*! iScroll v5.2.0 ~ (c) 2008-2016 Matteo Spinelli ~ http://cubiq.org/license */
  2 +!function(o,n,r){function h(t,i){this.wrapper="string"==typeof t?n.querySelector(t):t,this.scroller=this.wrapper.children[0],this.scrollerStyle=this.scroller.style,this.options={resizeScrollbars:!0,mouseWheelSpeed:20,snapThreshold:.334,disablePointer:!p.hasPointer,disableTouch:p.hasPointer||!p.hasTouch,disableMouse:p.hasPointer||p.hasTouch,startX:0,startY:0,scrollY:!0,directionLockThreshold:5,momentum:!0,bounce:!0,bounceTime:600,bounceEasing:"",preventDefault:!0,preventDefaultException:{tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT)$/},HWCompositing:!0,useTransition:!0,useTransform:!0,bindToWrapper:"undefined"==typeof o.onmousedown};for(var e in i)this.options[e]=i[e];this.translateZ=this.options.HWCompositing&&p.hasPerspective?" translateZ(0)":"",this.options.useTransition=p.hasTransition&&this.options.useTransition,this.options.useTransform=p.hasTransform&&this.options.useTransform,this.options.eventPassthrough=this.options.eventPassthrough===!0?"vertical":this.options.eventPassthrough,this.options.preventDefault=!this.options.eventPassthrough&&this.options.preventDefault,this.options.scrollY="vertical"==this.options.eventPassthrough?!1:this.options.scrollY,this.options.scrollX="horizontal"==this.options.eventPassthrough?!1:this.options.scrollX,this.options.freeScroll=this.options.freeScroll&&!this.options.eventPassthrough,this.options.directionLockThreshold=this.options.eventPassthrough?0:this.options.directionLockThreshold,this.options.bounceEasing="string"==typeof this.options.bounceEasing?p.ease[this.options.bounceEasing]||p.ease.circular:this.options.bounceEasing,this.options.resizePolling=void 0===this.options.resizePolling?60:this.options.resizePolling,this.options.tap===!0&&(this.options.tap="tap"),"scale"==this.options.shrinkScrollbars&&(this.options.useTransition=!1),this.options.invertWheelDirection=this.options.invertWheelDirection?-1:1,3==this.options.probeType&&(this.options.useTransition=!1),this.x=0,this.y=0,this.directionX=0,this.directionY=0,this._events={},this._init(),this.refresh(),this.scrollTo(this.options.startX,this.options.startY),this.enable()}function a(t,i,e){var s=n.createElement("div"),o=n.createElement("div");return e===!0&&(s.style.cssText="position:absolute;z-index:9999",o.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px"),o.className="iScrollIndicator","h"==t?(e===!0&&(s.style.cssText+=";height:7px;left:2px;right:2px;bottom:0",o.style.height="100%"),s.className="iScrollHorizontalScrollbar"):(e===!0&&(s.style.cssText+=";width:7px;bottom:2px;top:2px;right:1px",o.style.width="100%"),s.className="iScrollVerticalScrollbar"),s.style.cssText+=";overflow:hidden",i||(s.style.pointerEvents="none"),s.appendChild(o),s}function l(t,i){this.wrapper="string"==typeof i.el?n.querySelector(i.el):i.el,this.wrapperStyle=this.wrapper.style,this.indicator=this.wrapper.children[0],this.indicatorStyle=this.indicator.style,this.scroller=t,this.options={listenX:!0,listenY:!0,interactive:!1,resize:!0,defaultScrollbars:!1,shrink:!1,fade:!1,speedRatioX:0,speedRatioY:0};for(var e in i)this.options[e]=i[e];if(this.sizeRatioX=1,this.sizeRatioY=1,this.maxPosX=0,this.maxPosY=0,this.options.interactive&&(this.options.disableTouch||(p.addEvent(this.indicator,"touchstart",this),p.addEvent(o,"touchend",this)),this.options.disablePointer||(p.addEvent(this.indicator,p.prefixPointerEvent("pointerdown"),this),p.addEvent(o,p.prefixPointerEvent("pointerup"),this)),this.options.disableMouse||(p.addEvent(this.indicator,"mousedown",this),p.addEvent(o,"mouseup",this))),this.options.fade){this.wrapperStyle[p.style.transform]=this.scroller.translateZ;var s=p.style.transitionDuration;this.wrapperStyle[s]=p.isBadAndroid?"0.0001ms":"0ms";var r=this;p.isBadAndroid&&c(function(){"0.0001ms"===r.wrapperStyle[s]&&(r.wrapperStyle[s]="0s")}),this.wrapperStyle.opacity="0"}}var c=o.requestAnimationFrame||o.webkitRequestAnimationFrame||o.mozRequestAnimationFrame||o.oRequestAnimationFrame||o.msRequestAnimationFrame||function(t){o.setTimeout(t,1e3/60)},p=function(){function t(t){return s===!1?!1:""===s?t:s+t.charAt(0).toUpperCase()+t.substr(1)}var i={},e=n.createElement("div").style,s=function(){for(var t,i=["t","webkitT","MozT","msT","OT"],s=0,o=i.length;o>s;s++)if(t=i[s]+"ransform",t in e)return i[s].substr(0,i[s].length-1);return!1}();i.getTime=Date.now||function(){return(new Date).getTime()},i.extend=function(t,i){for(var e in i)t[e]=i[e]},i.addEvent=function(t,i,e,s){t.addEventListener(i,e,!!s)},i.removeEvent=function(t,i,e,s){t.removeEventListener(i,e,!!s)},i.prefixPointerEvent=function(t){return o.MSPointerEvent?"MSPointer"+t.charAt(7).toUpperCase()+t.substr(8):t},i.momentum=function(t,i,e,s,o,n){var h,a,l=t-i,c=r.abs(l)/e;return n=void 0===n?6e-4:n,h=t+c*c/(2*n)*(0>l?-1:1),a=c/n,s>h?(h=o?s-o/2.5*(c/8):s,l=r.abs(h-t),a=l/c):h>0&&(h=o?o/2.5*(c/8):0,l=r.abs(t)+h,a=l/c),{destination:r.round(h),duration:a}};var h=t("transform");return i.extend(i,{hasTransform:h!==!1,hasPerspective:t("perspective")in e,hasTouch:"ontouchstart"in o,hasPointer:!(!o.PointerEvent&&!o.MSPointerEvent),hasTransition:t("transition")in e}),i.isBadAndroid=function(){var t=o.navigator.appVersion;if(/Android/.test(t)&&!/Chrome\/\d/.test(t)){var i=t.match(/Safari\/(\d+.\d)/);return i&&"object"==typeof i&&i.length>=2?parseFloat(i[1])<535.19:!0}return!1}(),i.extend(i.style={},{transform:h,transitionTimingFunction:t("transitionTimingFunction"),transitionDuration:t("transitionDuration"),transitionDelay:t("transitionDelay"),transformOrigin:t("transformOrigin")}),i.hasClass=function(t,i){var e=new RegExp("(^|\\s)"+i+"(\\s|$)");return e.test(t.className)},i.addClass=function(t,e){if(!i.hasClass(t,e)){var s=t.className.split(" ");s.push(e),t.className=s.join(" ")}},i.removeClass=function(t,e){if(i.hasClass(t,e)){var s=new RegExp("(^|\\s)"+e+"(\\s|$)","g");t.className=t.className.replace(s," ")}},i.offset=function(t){for(var i=-t.offsetLeft,e=-t.offsetTop;t=t.offsetParent;)i-=t.offsetLeft,e-=t.offsetTop;return{left:i,top:e}},i.preventDefaultException=function(t,i){for(var e in i)if(i[e].test(t[e]))return!0;return!1},i.extend(i.eventType={},{touchstart:1,touchmove:1,touchend:1,mousedown:2,mousemove:2,mouseup:2,pointerdown:3,pointermove:3,pointerup:3,MSPointerDown:3,MSPointerMove:3,MSPointerUp:3}),i.extend(i.ease={},{quadratic:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(t){return t*(2-t)}},circular:{style:"cubic-bezier(0.1, 0.57, 0.1, 1)",fn:function(t){return r.sqrt(1- --t*t)}},back:{style:"cubic-bezier(0.175, 0.885, 0.32, 1.275)",fn:function(t){var i=4;return(t-=1)*t*((i+1)*t+i)+1}},bounce:{style:"",fn:function(t){return(t/=1)<1/2.75?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},elastic:{style:"",fn:function(t){var i=.22,e=.4;return 0===t?0:1==t?1:e*r.pow(2,-10*t)*r.sin((t-i/4)*(2*r.PI)/i)+1}}}),i.tap=function(t,i){var e=n.createEvent("Event");e.initEvent(i,!0,!0),e.pageX=t.pageX,e.pageY=t.pageY,t.target.dispatchEvent(e)},i.click=function(t){var i,e=t.target;/(SELECT|INPUT|TEXTAREA)/i.test(e.tagName)||(i=n.createEvent("MouseEvents"),i.initMouseEvent("click",!0,!0,t.view,1,e.screenX,e.screenY,e.clientX,e.clientY,t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,0,null),i._constructed=!0,e.dispatchEvent(i))},i}();h.prototype={version:"5.2.0",_init:function(){this._initEvents(),(this.options.scrollbars||this.options.indicators)&&this._initIndicators(),this.options.mouseWheel&&this._initWheel(),this.options.snap&&this._initSnap(),this.options.keyBindings&&this._initKeys()},destroy:function(){this._initEvents(!0),clearTimeout(this.resizeTimeout),this.resizeTimeout=null,this._execEvent("destroy")},_transitionEnd:function(t){t.target==this.scroller&&this.isInTransition&&(this._transitionTime(),this.resetPosition(this.options.bounceTime)||(this.isInTransition=!1,this._execEvent("scrollEnd")))},_start:function(t){if(1!=p.eventType[t.type]){var i;if(i=t.which?t.button:t.button<2?0:4==t.button?1:2,0!==i)return}if(this.enabled&&(!this.initiated||p.eventType[t.type]===this.initiated)){!this.options.preventDefault||p.isBadAndroid||p.preventDefaultException(t.target,this.options.preventDefaultException)||t.preventDefault();var e,s=t.touches?t.touches[0]:t;this.initiated=p.eventType[t.type],this.moved=!1,this.distX=0,this.distY=0,this.directionX=0,this.directionY=0,this.directionLocked=0,this.startTime=p.getTime(),this.options.useTransition&&this.isInTransition?(this._transitionTime(),this.isInTransition=!1,e=this.getComputedPosition(),this._translate(r.round(e.x),r.round(e.y)),this._execEvent("scrollEnd")):!this.options.useTransition&&this.isAnimating&&(this.isAnimating=!1,this._execEvent("scrollEnd")),this.startX=this.x,this.startY=this.y,this.absStartX=this.x,this.absStartY=this.y,this.pointX=s.pageX,this.pointY=s.pageY,this._execEvent("beforeScrollStart")}},_move:function(t){if(this.enabled&&p.eventType[t.type]===this.initiated){this.options.preventDefault&&t.preventDefault();var i,e,s,o,n=t.touches?t.touches[0]:t,h=n.pageX-this.pointX,a=n.pageY-this.pointY,l=p.getTime();if(this.pointX=n.pageX,this.pointY=n.pageY,this.distX+=h,this.distY+=a,s=r.abs(this.distX),o=r.abs(this.distY),!(l-this.endTime>300&&10>s&&10>o)){if(this.directionLocked||this.options.freeScroll||(s>o+this.options.directionLockThreshold?this.directionLocked="h":o>=s+this.options.directionLockThreshold?this.directionLocked="v":this.directionLocked="n"),"h"==this.directionLocked){if("vertical"==this.options.eventPassthrough)t.preventDefault();else if("horizontal"==this.options.eventPassthrough)return void(this.initiated=!1);a=0}else if("v"==this.directionLocked){if("horizontal"==this.options.eventPassthrough)t.preventDefault();else if("vertical"==this.options.eventPassthrough)return void(this.initiated=!1);h=0}h=this.hasHorizontalScroll?h:0,a=this.hasVerticalScroll?a:0,i=this.x+h,e=this.y+a,(i>0||i<this.maxScrollX)&&(i=this.options.bounce?this.x+h/3:i>0?0:this.maxScrollX),(e>0||e<this.maxScrollY)&&(e=this.options.bounce?this.y+a/3:e>0?0:this.maxScrollY),this.directionX=h>0?-1:0>h?1:0,this.directionY=a>0?-1:0>a?1:0,this.moved||this._execEvent("scrollStart"),this.moved=!0,this._translate(i,e),l-this.startTime>300&&(this.startTime=l,this.startX=this.x,this.startY=this.y,1==this.options.probeType&&this._execEvent("scroll")),this.options.probeType>1&&this._execEvent("scroll")}}},_end:function(t){if(this.enabled&&p.eventType[t.type]===this.initiated){this.options.preventDefault&&!p.preventDefaultException(t.target,this.options.preventDefaultException)&&t.preventDefault();var i,e,s=(t.changedTouches?t.changedTouches[0]:t,p.getTime()-this.startTime),o=r.round(this.x),n=r.round(this.y),h=r.abs(o-this.startX),a=r.abs(n-this.startY),l=0,c="";if(this.isInTransition=0,this.initiated=0,this.endTime=p.getTime(),!this.resetPosition(this.options.bounceTime)){if(this.scrollTo(o,n),!this.moved)return this.options.tap&&p.tap(t,this.options.tap),this.options.click&&p.click(t),void this._execEvent("scrollCancel");if(this._events.flick&&200>s&&100>h&&100>a)return void this._execEvent("flick");if(this.options.momentum&&300>s&&(i=this.hasHorizontalScroll?p.momentum(this.x,this.startX,s,this.maxScrollX,this.options.bounce?this.wrapperWidth:0,this.options.deceleration):{destination:o,duration:0},e=this.hasVerticalScroll?p.momentum(this.y,this.startY,s,this.maxScrollY,this.options.bounce?this.wrapperHeight:0,this.options.deceleration):{destination:n,duration:0},o=i.destination,n=e.destination,l=r.max(i.duration,e.duration),this.isInTransition=1),this.options.snap){var d=this._nearestSnap(o,n);this.currentPage=d,l=this.options.snapSpeed||r.max(r.max(r.min(r.abs(o-d.x),1e3),r.min(r.abs(n-d.y),1e3)),300),o=d.x,n=d.y,this.directionX=0,this.directionY=0,c=this.options.bounceEasing}return o!=this.x||n!=this.y?((o>0||o<this.maxScrollX||n>0||n<this.maxScrollY)&&(c=p.ease.quadratic),void this.scrollTo(o,n,l,c)):void this._execEvent("scrollEnd")}}},_resize:function(){var t=this;clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(function(){t.refresh()},this.options.resizePolling)},resetPosition:function(t){var i=this.x,e=this.y;return t=t||0,!this.hasHorizontalScroll||this.x>0?i=0:this.x<this.maxScrollX&&(i=this.maxScrollX),!this.hasVerticalScroll||this.y>0?e=0:this.y<this.maxScrollY&&(e=this.maxScrollY),i==this.x&&e==this.y?!1:(this.scrollTo(i,e,t,this.options.bounceEasing),!0)},disable:function(){this.enabled=!1},enable:function(){this.enabled=!0},refresh:function(){this.wrapper.offsetHeight;this.wrapperWidth=this.wrapper.clientWidth,this.wrapperHeight=this.wrapper.clientHeight,this.scrollerWidth=this.scroller.offsetWidth,this.scrollerHeight=this.scroller.offsetHeight,this.maxScrollX=this.wrapperWidth-this.scrollerWidth,this.maxScrollY=this.wrapperHeight-this.scrollerHeight,this.hasHorizontalScroll=this.options.scrollX&&this.maxScrollX<0,this.hasVerticalScroll=this.options.scrollY&&this.maxScrollY<0,this.hasHorizontalScroll||(this.maxScrollX=0,this.scrollerWidth=this.wrapperWidth),this.hasVerticalScroll||(this.maxScrollY=0,this.scrollerHeight=this.wrapperHeight),this.endTime=0,this.directionX=0,this.directionY=0,this.wrapperOffset=p.offset(this.wrapper),this._execEvent("refresh"),this.resetPosition()},on:function(t,i){this._events[t]||(this._events[t]=[]),this._events[t].push(i)},off:function(t,i){if(this._events[t]){var e=this._events[t].indexOf(i);e>-1&&this._events[t].splice(e,1)}},_execEvent:function(t){if(this._events[t]){var i=0,e=this._events[t].length;if(e)for(;e>i;i++)this._events[t][i].apply(this,[].slice.call(arguments,1))}},scrollBy:function(t,i,e,s){t=this.x+t,i=this.y+i,e=e||0,this.scrollTo(t,i,e,s)},scrollTo:function(t,i,e,s){s=s||p.ease.circular,this.isInTransition=this.options.useTransition&&e>0;var o=this.options.useTransition&&s.style;!e||o?(o&&(this._transitionTimingFunction(s.style),this._transitionTime(e)),this._translate(t,i)):this._animate(t,i,e,s.fn)},scrollToElement:function(t,i,e,s,o){if(t=t.nodeType?t:this.scroller.querySelector(t)){var n=p.offset(t);n.left-=this.wrapperOffset.left,n.top-=this.wrapperOffset.top,e===!0&&(e=r.round(t.offsetWidth/2-this.wrapper.offsetWidth/2)),s===!0&&(s=r.round(t.offsetHeight/2-this.wrapper.offsetHeight/2)),n.left-=e||0,n.top-=s||0,n.left=n.left>0?0:n.left<this.maxScrollX?this.maxScrollX:n.left,n.top=n.top>0?0:n.top<this.maxScrollY?this.maxScrollY:n.top,i=void 0===i||null===i||"auto"===i?r.max(r.abs(this.x-n.left),r.abs(this.y-n.top)):i,this.scrollTo(n.left,n.top,i,o)}},_transitionTime:function(t){t=t||0;var i=p.style.transitionDuration;if(this.scrollerStyle[i]=t+"ms",!t&&p.isBadAndroid){this.scrollerStyle[i]="0.0001ms";var e=this;c(function(){"0.0001ms"===e.scrollerStyle[i]&&(e.scrollerStyle[i]="0s")})}if(this.indicators)for(var s=this.indicators.length;s--;)this.indicators[s].transitionTime(t)},_transitionTimingFunction:function(t){if(this.scrollerStyle[p.style.transitionTimingFunction]=t,this.indicators)for(var i=this.indicators.length;i--;)this.indicators[i].transitionTimingFunction(t)},_translate:function(t,i){if(this.options.useTransform?this.scrollerStyle[p.style.transform]="translate("+t+"px,"+i+"px)"+this.translateZ:(t=r.round(t),i=r.round(i),this.scrollerStyle.left=t+"px",this.scrollerStyle.top=i+"px"),this.x=t,this.y=i,this.indicators)for(var e=this.indicators.length;e--;)this.indicators[e].updatePosition()},_initEvents:function(t){var i=t?p.removeEvent:p.addEvent,e=this.options.bindToWrapper?this.wrapper:o;i(o,"orientationchange",this),i(o,"resize",this),this.options.click&&i(this.wrapper,"click",this,!0),this.options.disableMouse||(i(this.wrapper,"mousedown",this),i(e,"mousemove",this),i(e,"mousecancel",this),i(e,"mouseup",this)),p.hasPointer&&!this.options.disablePointer&&(i(this.wrapper,p.prefixPointerEvent("pointerdown"),this),i(e,p.prefixPointerEvent("pointermove"),this),i(e,p.prefixPointerEvent("pointercancel"),this),i(e,p.prefixPointerEvent("pointerup"),this)),p.hasTouch&&!this.options.disableTouch&&(i(this.wrapper,"touchstart",this),i(e,"touchmove",this),i(e,"touchcancel",this),i(e,"touchend",this)),i(this.scroller,"transitionend",this),i(this.scroller,"webkitTransitionEnd",this),i(this.scroller,"oTransitionEnd",this),i(this.scroller,"MSTransitionEnd",this)},getComputedPosition:function(){var t,i,e=o.getComputedStyle(this.scroller,null);return this.options.useTransform?(e=e[p.style.transform].split(")")[0].split(", "),t=+(e[12]||e[4]),i=+(e[13]||e[5])):(t=+e.left.replace(/[^-\d.]/g,""),i=+e.top.replace(/[^-\d.]/g,"")),{x:t,y:i}},_initIndicators:function(){function t(t){if(n.indicators)for(var i=n.indicators.length;i--;)t.call(n.indicators[i])}var i,e=this.options.interactiveScrollbars,s="string"!=typeof this.options.scrollbars,o=[],n=this;this.indicators=[],this.options.scrollbars&&(this.options.scrollY&&(i={el:a("v",e,this.options.scrollbars),interactive:e,defaultScrollbars:!0,customStyle:s,resize:this.options.resizeScrollbars,shrink:this.options.shrinkScrollbars,fade:this.options.fadeScrollbars,listenX:!1},this.wrapper.appendChild(i.el),o.push(i)),this.options.scrollX&&(i={el:a("h",e,this.options.scrollbars),interactive:e,defaultScrollbars:!0,customStyle:s,resize:this.options.resizeScrollbars,shrink:this.options.shrinkScrollbars,fade:this.options.fadeScrollbars,listenY:!1},this.wrapper.appendChild(i.el),o.push(i))),this.options.indicators&&(o=o.concat(this.options.indicators));for(var r=o.length;r--;)this.indicators.push(new l(this,o[r]));this.options.fadeScrollbars&&(this.on("scrollEnd",function(){t(function(){this.fade()})}),this.on("scrollCancel",function(){t(function(){this.fade()})}),this.on("scrollStart",function(){t(function(){this.fade(1)})}),this.on("beforeScrollStart",function(){t(function(){this.fade(1,!0)})})),this.on("refresh",function(){t(function(){this.refresh()})}),this.on("destroy",function(){t(function(){this.destroy()}),delete this.indicators})},_initWheel:function(){p.addEvent(this.wrapper,"wheel",this),p.addEvent(this.wrapper,"mousewheel",this),p.addEvent(this.wrapper,"DOMMouseScroll",this),this.on("destroy",function(){clearTimeout(this.wheelTimeout),this.wheelTimeout=null,p.removeEvent(this.wrapper,"wheel",this),p.removeEvent(this.wrapper,"mousewheel",this),p.removeEvent(this.wrapper,"DOMMouseScroll",this)})},_wheel:function(t){if(this.enabled){t.preventDefault();var i,e,s,o,n=this;if(void 0===this.wheelTimeout&&n._execEvent("scrollStart"),clearTimeout(this.wheelTimeout),this.wheelTimeout=setTimeout(function(){n.options.snap||n._execEvent("scrollEnd"),n.wheelTimeout=void 0},400),"deltaX"in t)1===t.deltaMode?(i=-t.deltaX*this.options.mouseWheelSpeed,e=-t.deltaY*this.options.mouseWheelSpeed):(i=-t.deltaX,e=-t.deltaY);else if("wheelDeltaX"in t)i=t.wheelDeltaX/120*this.options.mouseWheelSpeed,e=t.wheelDeltaY/120*this.options.mouseWheelSpeed;else if("wheelDelta"in t)i=e=t.wheelDelta/120*this.options.mouseWheelSpeed;else{if(!("detail"in t))return;i=e=-t.detail/3*this.options.mouseWheelSpeed}if(i*=this.options.invertWheelDirection,e*=this.options.invertWheelDirection,this.hasVerticalScroll||(i=e,e=0),this.options.snap)return s=this.currentPage.pageX,o=this.currentPage.pageY,i>0?s--:0>i&&s++,e>0?o--:0>e&&o++,void this.goToPage(s,o);s=this.x+r.round(this.hasHorizontalScroll?i:0),o=this.y+r.round(this.hasVerticalScroll?e:0),this.directionX=i>0?-1:0>i?1:0,this.directionY=e>0?-1:0>e?1:0,s>0?s=0:s<this.maxScrollX&&(s=this.maxScrollX),o>0?o=0:o<this.maxScrollY&&(o=this.maxScrollY),this.scrollTo(s,o,0),this.options.probeType>1&&this._execEvent("scroll")}},_initSnap:function(){this.currentPage={},"string"==typeof this.options.snap&&(this.options.snap=this.scroller.querySelectorAll(this.options.snap)),this.on("refresh",function(){var t,i,e,s,o,n,h=0,a=0,l=0,c=this.options.snapStepX||this.wrapperWidth,p=this.options.snapStepY||this.wrapperHeight;if(this.pages=[],this.wrapperWidth&&this.wrapperHeight&&this.scrollerWidth&&this.scrollerHeight){if(this.options.snap===!0)for(e=r.round(c/2),s=r.round(p/2);l>-this.scrollerWidth;){for(this.pages[h]=[],t=0,o=0;o>-this.scrollerHeight;)this.pages[h][t]={x:r.max(l,this.maxScrollX),y:r.max(o,this.maxScrollY),width:c,height:p,cx:l-e,cy:o-s},o-=p,t++;l-=c,h++}else for(n=this.options.snap,t=n.length,i=-1;t>h;h++)(0===h||n[h].offsetLeft<=n[h-1].offsetLeft)&&(a=0,i++),this.pages[a]||(this.pages[a]=[]),l=r.max(-n[h].offsetLeft,this.maxScrollX),o=r.max(-n[h].offsetTop,this.maxScrollY),e=l-r.round(n[h].offsetWidth/2),s=o-r.round(n[h].offsetHeight/2),this.pages[a][i]={x:l,y:o,width:n[h].offsetWidth,height:n[h].offsetHeight,cx:e,cy:s},l>this.maxScrollX&&a++;this.goToPage(this.currentPage.pageX||0,this.currentPage.pageY||0,0),this.options.snapThreshold%1===0?(this.snapThresholdX=this.options.snapThreshold,this.snapThresholdY=this.options.snapThreshold):(this.snapThresholdX=r.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].width*this.options.snapThreshold),this.snapThresholdY=r.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].height*this.options.snapThreshold))}}),this.on("flick",function(){var t=this.options.snapSpeed||r.max(r.max(r.min(r.abs(this.x-this.startX),1e3),r.min(r.abs(this.y-this.startY),1e3)),300);this.goToPage(this.currentPage.pageX+this.directionX,this.currentPage.pageY+this.directionY,t)})},_nearestSnap:function(t,i){if(!this.pages.length)return{x:0,y:0,pageX:0,pageY:0};var e=0,s=this.pages.length,o=0;if(r.abs(t-this.absStartX)<this.snapThresholdX&&r.abs(i-this.absStartY)<this.snapThresholdY)return this.currentPage;for(t>0?t=0:t<this.maxScrollX&&(t=this.maxScrollX),i>0?i=0:i<this.maxScrollY&&(i=this.maxScrollY);s>e;e++)if(t>=this.pages[e][0].cx){t=this.pages[e][0].x;break}for(s=this.pages[e].length;s>o;o++)if(i>=this.pages[0][o].cy){i=this.pages[0][o].y;break}return e==this.currentPage.pageX&&(e+=this.directionX,0>e?e=0:e>=this.pages.length&&(e=this.pages.length-1),t=this.pages[e][0].x),o==this.currentPage.pageY&&(o+=this.directionY,0>o?o=0:o>=this.pages[0].length&&(o=this.pages[0].length-1),i=this.pages[0][o].y),{x:t,y:i,pageX:e,pageY:o}},goToPage:function(t,i,e,s){s=s||this.options.bounceEasing,t>=this.pages.length?t=this.pages.length-1:0>t&&(t=0),i>=this.pages[t].length?i=this.pages[t].length-1:0>i&&(i=0);var o=this.pages[t][i].x,n=this.pages[t][i].y;e=void 0===e?this.options.snapSpeed||r.max(r.max(r.min(r.abs(o-this.x),1e3),r.min(r.abs(n-this.y),1e3)),300):e,this.currentPage={x:o,y:n,pageX:t,pageY:i},this.scrollTo(o,n,e,s)},next:function(t,i){var e=this.currentPage.pageX,s=this.currentPage.pageY;e++,e>=this.pages.length&&this.hasVerticalScroll&&(e=0,s++),this.goToPage(e,s,t,i)},prev:function(t,i){var e=this.currentPage.pageX,s=this.currentPage.pageY;e--,0>e&&this.hasVerticalScroll&&(e=0,s--),this.goToPage(e,s,t,i)},_initKeys:function(t){var i,e={pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40};if("object"==typeof this.options.keyBindings)for(i in this.options.keyBindings)"string"==typeof this.options.keyBindings[i]&&(this.options.keyBindings[i]=this.options.keyBindings[i].toUpperCase().charCodeAt(0));else this.options.keyBindings={};for(i in e)this.options.keyBindings[i]=this.options.keyBindings[i]||e[i];p.addEvent(o,"keydown",this),this.on("destroy",function(){p.removeEvent(o,"keydown",this)})},_key:function(t){if(this.enabled){var i,e=this.options.snap,s=e?this.currentPage.pageX:this.x,o=e?this.currentPage.pageY:this.y,n=p.getTime(),h=this.keyTime||0,a=.25;switch(this.options.useTransition&&this.isInTransition&&(i=this.getComputedPosition(),this._translate(r.round(i.x),r.round(i.y)),this.isInTransition=!1),this.keyAcceleration=200>n-h?r.min(this.keyAcceleration+a,50):0,t.keyCode){case this.options.keyBindings.pageUp:this.hasHorizontalScroll&&!this.hasVerticalScroll?s+=e?1:this.wrapperWidth:o+=e?1:this.wrapperHeight;break;case this.options.keyBindings.pageDown:this.hasHorizontalScroll&&!this.hasVerticalScroll?s-=e?1:this.wrapperWidth:o-=e?1:this.wrapperHeight;break;case this.options.keyBindings.end:s=e?this.pages.length-1:this.maxScrollX,o=e?this.pages[0].length-1:this.maxScrollY;break;case this.options.keyBindings.home:s=0,o=0;break;case this.options.keyBindings.left:s+=e?-1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.up:o+=e?1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.right:s-=e?-1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.down:o-=e?1:5+this.keyAcceleration>>0;break;default:return}if(e)return void this.goToPage(s,o);s>0?(s=0,this.keyAcceleration=0):s<this.maxScrollX&&(s=this.maxScrollX,this.keyAcceleration=0),o>0?(o=0,this.keyAcceleration=0):o<this.maxScrollY&&(o=this.maxScrollY,this.keyAcceleration=0),this.scrollTo(s,o,0),this.keyTime=n}},_animate:function(t,i,e,s){function o(){var d,u,f,m=p.getTime();return m>=l?(n.isAnimating=!1,n._translate(t,i),void(n.resetPosition(n.options.bounceTime)||n._execEvent("scrollEnd"))):(m=(m-a)/e,f=s(m),d=(t-r)*f+r,u=(i-h)*f+h,n._translate(d,u),n.isAnimating&&c(o),void(3==n.options.probeType&&n._execEvent("scroll")))}var n=this,r=this.x,h=this.y,a=p.getTime(),l=a+e;this.isAnimating=!0,o()},handleEvent:function(t){switch(t.type){case"touchstart":case"pointerdown":case"MSPointerDown":case"mousedown":this._start(t);break;case"touchmove":case"pointermove":case"MSPointerMove":case"mousemove":this._move(t);break;case"touchend":case"pointerup":case"MSPointerUp":case"mouseup":case"touchcancel":case"pointercancel":case"MSPointerCancel":case"mousecancel":this._end(t);break;case"orientationchange":case"resize":this._resize();break;case"transitionend":case"webkitTransitionEnd":case"oTransitionEnd":case"MSTransitionEnd":this._transitionEnd(t);break;case"wheel":case"DOMMouseScroll":case"mousewheel":this._wheel(t);break;case"keydown":this._key(t);break;case"click":this.enabled&&!t._constructed&&(t.preventDefault(),t.stopPropagation())}}},l.prototype={handleEvent:function(t){switch(t.type){case"touchstart":case"pointerdown":case"MSPointerDown":case"mousedown":this._start(t);break;case"touchmove":case"pointermove":case"MSPointerMove":case"mousemove":this._move(t);break;case"touchend":case"pointerup":case"MSPointerUp":case"mouseup":case"touchcancel":case"pointercancel":case"MSPointerCancel":case"mousecancel":this._end(t)}},destroy:function(){this.options.fadeScrollbars&&(clearTimeout(this.fadeTimeout),this.fadeTimeout=null),this.options.interactive&&(p.removeEvent(this.indicator,"touchstart",this),p.removeEvent(this.indicator,p.prefixPointerEvent("pointerdown"),this),p.removeEvent(this.indicator,"mousedown",this),p.removeEvent(o,"touchmove",this),p.removeEvent(o,p.prefixPointerEvent("pointermove"),this),p.removeEvent(o,"mousemove",this),p.removeEvent(o,"touchend",this),p.removeEvent(o,p.prefixPointerEvent("pointerup"),this),p.removeEvent(o,"mouseup",this)),this.options.defaultScrollbars&&this.wrapper.parentNode.removeChild(this.wrapper)},_start:function(t){var i=t.touches?t.touches[0]:t;t.preventDefault(),t.stopPropagation(),this.transitionTime(),this.initiated=!0,this.moved=!1,this.lastPointX=i.pageX,this.lastPointY=i.pageY,this.startTime=p.getTime(),this.options.disableTouch||p.addEvent(o,"touchmove",this),this.options.disablePointer||p.addEvent(o,p.prefixPointerEvent("pointermove"),this),this.options.disableMouse||p.addEvent(o,"mousemove",this),this.scroller._execEvent("beforeScrollStart")},_move:function(t){var i,e,s,o,n=t.touches?t.touches[0]:t,r=p.getTime();this.moved||this.scroller._execEvent("scrollStart"),this.moved=!0,i=n.pageX-this.lastPointX,this.lastPointX=n.pageX,e=n.pageY-this.lastPointY,this.lastPointY=n.pageY,s=this.x+i,o=this.y+e,this._pos(s,o),1==this.scroller.options.probeType&&r-this.startTime>300?(this.startTime=r,this.scroller._execEvent("scroll")):this.scroller.options.probeType>1&&this.scroller._execEvent("scroll"),t.preventDefault(),t.stopPropagation()},_end:function(t){if(this.initiated){if(this.initiated=!1,t.preventDefault(),t.stopPropagation(),p.removeEvent(o,"touchmove",this),p.removeEvent(o,p.prefixPointerEvent("pointermove"),this),p.removeEvent(o,"mousemove",this),this.scroller.options.snap){var i=this.scroller._nearestSnap(this.scroller.x,this.scroller.y),e=this.options.snapSpeed||r.max(r.max(r.min(r.abs(this.scroller.x-i.x),1e3),r.min(r.abs(this.scroller.y-i.y),1e3)),300);this.scroller.x==i.x&&this.scroller.y==i.y||(this.scroller.directionX=0,this.scroller.directionY=0,this.scroller.currentPage=i,this.scroller.scrollTo(i.x,i.y,e,this.scroller.options.bounceEasing))}this.moved&&this.scroller._execEvent("scrollEnd")}},transitionTime:function(t){t=t||0;var i=p.style.transitionDuration;if(this.indicatorStyle[i]=t+"ms",!t&&p.isBadAndroid){this.indicatorStyle[i]="0.0001ms";var e=this;c(function(){"0.0001ms"===e.indicatorStyle[i]&&(e.indicatorStyle[i]="0s")})}},transitionTimingFunction:function(t){this.indicatorStyle[p.style.transitionTimingFunction]=t},refresh:function(){this.transitionTime(),this.options.listenX&&!this.options.listenY?this.indicatorStyle.display=this.scroller.hasHorizontalScroll?"block":"none":this.options.listenY&&!this.options.listenX?this.indicatorStyle.display=this.scroller.hasVerticalScroll?"block":"none":this.indicatorStyle.display=this.scroller.hasHorizontalScroll||this.scroller.hasVerticalScroll?"block":"none",this.scroller.hasHorizontalScroll&&this.scroller.hasVerticalScroll?(p.addClass(this.wrapper,"iScrollBothScrollbars"),p.removeClass(this.wrapper,"iScrollLoneScrollbar"),this.options.defaultScrollbars&&this.options.customStyle&&(this.options.listenX?this.wrapper.style.right="8px":this.wrapper.style.bottom="8px")):(p.removeClass(this.wrapper,"iScrollBothScrollbars"),p.addClass(this.wrapper,"iScrollLoneScrollbar"),this.options.defaultScrollbars&&this.options.customStyle&&(this.options.listenX?this.wrapper.style.right="2px":this.wrapper.style.bottom="2px"));this.wrapper.offsetHeight;this.options.listenX&&(this.wrapperWidth=this.wrapper.clientWidth,this.options.resize?(this.indicatorWidth=r.max(r.round(this.wrapperWidth*this.wrapperWidth/(this.scroller.scrollerWidth||this.wrapperWidth||1)),8),this.indicatorStyle.width=this.indicatorWidth+"px"):this.indicatorWidth=this.indicator.clientWidth,this.maxPosX=this.wrapperWidth-this.indicatorWidth,"clip"==this.options.shrink?(this.minBoundaryX=-this.indicatorWidth+8,this.maxBoundaryX=this.wrapperWidth-8):(this.minBoundaryX=0,this.maxBoundaryX=this.maxPosX),this.sizeRatioX=this.options.speedRatioX||this.scroller.maxScrollX&&this.maxPosX/this.scroller.maxScrollX),this.options.listenY&&(this.wrapperHeight=this.wrapper.clientHeight,this.options.resize?(this.indicatorHeight=r.max(r.round(this.wrapperHeight*this.wrapperHeight/(this.scroller.scrollerHeight||this.wrapperHeight||1)),8),this.indicatorStyle.height=this.indicatorHeight+"px"):this.indicatorHeight=this.indicator.clientHeight,this.maxPosY=this.wrapperHeight-this.indicatorHeight,"clip"==this.options.shrink?(this.minBoundaryY=-this.indicatorHeight+8,this.maxBoundaryY=this.wrapperHeight-8):(this.minBoundaryY=0,this.maxBoundaryY=this.maxPosY),this.maxPosY=this.wrapperHeight-this.indicatorHeight,this.sizeRatioY=this.options.speedRatioY||this.scroller.maxScrollY&&this.maxPosY/this.scroller.maxScrollY),this.updatePosition()},updatePosition:function(){var t=this.options.listenX&&r.round(this.sizeRatioX*this.scroller.x)||0,i=this.options.listenY&&r.round(this.sizeRatioY*this.scroller.y)||0;this.options.ignoreBoundaries||(t<this.minBoundaryX?("scale"==this.options.shrink&&(this.width=r.max(this.indicatorWidth+t,8),this.indicatorStyle.width=this.width+"px"),t=this.minBoundaryX):t>this.maxBoundaryX?"scale"==this.options.shrink?(this.width=r.max(this.indicatorWidth-(t-this.maxPosX),8),this.indicatorStyle.width=this.width+"px",t=this.maxPosX+this.indicatorWidth-this.width):t=this.maxBoundaryX:"scale"==this.options.shrink&&this.width!=this.indicatorWidth&&(this.width=this.indicatorWidth,this.indicatorStyle.width=this.width+"px"),i<this.minBoundaryY?("scale"==this.options.shrink&&(this.height=r.max(this.indicatorHeight+3*i,8),
  3 +this.indicatorStyle.height=this.height+"px"),i=this.minBoundaryY):i>this.maxBoundaryY?"scale"==this.options.shrink?(this.height=r.max(this.indicatorHeight-3*(i-this.maxPosY),8),this.indicatorStyle.height=this.height+"px",i=this.maxPosY+this.indicatorHeight-this.height):i=this.maxBoundaryY:"scale"==this.options.shrink&&this.height!=this.indicatorHeight&&(this.height=this.indicatorHeight,this.indicatorStyle.height=this.height+"px")),this.x=t,this.y=i,this.scroller.options.useTransform?this.indicatorStyle[p.style.transform]="translate("+t+"px,"+i+"px)"+this.scroller.translateZ:(this.indicatorStyle.left=t+"px",this.indicatorStyle.top=i+"px")},_pos:function(t,i){0>t?t=0:t>this.maxPosX&&(t=this.maxPosX),0>i?i=0:i>this.maxPosY&&(i=this.maxPosY),t=this.options.listenX?r.round(t/this.sizeRatioX):this.scroller.x,i=this.options.listenY?r.round(i/this.sizeRatioY):this.scroller.y,this.scroller.scrollTo(t,i)},fade:function(t,i){if(!i||this.visible){clearTimeout(this.fadeTimeout),this.fadeTimeout=null;var e=t?250:500,s=t?0:300;t=t?"1":"0",this.wrapperStyle[p.style.transitionDuration]=e+"ms",this.fadeTimeout=setTimeout(function(t){this.wrapperStyle.opacity=t,this.visible=+t}.bind(this,t),s)}}},h.utils=p,"undefined"!=typeof t&&t.exports?t.exports=h:(s=function(){return h}.call(i,e,i,t),!(void 0!==s&&(t.exports=s)))}(window,document,Math)},29:function(t,i,e){function s(t,i){var e,s,r=o(window),h=!1;e=o(t),e.length&&(i.height&&e.height(i.height),this.iScroll=new n(e.get(0),{click:!0,probeType:3}),this.iScroll.on("scrollStart",function(){0===this.y&&(h=!0),s=this.y,r.trigger("scroll")}),this.iScroll.on("scrollEnd",function(){h&&-1===this.directionY&&i.pullDown&&i.pullDown(),h=!1,s===this.y&&1===this.directionY&&i.pullUp&&i.pullUp(),r.trigger("scroll")}))}var o=e(1),n=e(20);t.exports=s}});
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
@@ -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(),
@@ -155,11 +155,11 @@ $('.phone-input-content div').on('click', function() { @@ -155,11 +155,11 @@ $('.phone-input-content div').on('click', function() {
155 }, 155 },
156 success: function(data) { 156 success: function(data) {
157 if (data.result.code === 200) { 157 if (data.result.code === 200) {
158 - if (window._yas) { 158 + if (window._yas && window._yas.sendCustomInfo) {
159 window._yas.sendCustomInfo({ 159 window._yas.sendCustomInfo({
160 activityID: activityID, 160 activityID: activityID,
161 returnCode: data.result.returnCode 161 returnCode: data.result.returnCode
162 - }, false); 162 + }, true);
163 } 163 }
164 if (!data.result.newUser) { 164 if (!data.result.newUser) {
165 $('.gain-coupon-centent .coupon img').attr('src', oldUserCouponPic); 165 $('.gain-coupon-centent .coupon img').attr('src', oldUserCouponPic);
@@ -236,11 +236,11 @@ $('.vertify-input-content').on('click', '.get', function() { @@ -236,11 +236,11 @@ $('.vertify-input-content').on('click', '.get', function() {
236 dataType: 'json', 236 dataType: 'json',
237 success: function(data) { 237 success: function(data) {
238 if (data.result.code === 200) { 238 if (data.result.code === 200) {
239 - if (window._yas) { 239 + if (window._yas && window._yas.sendCustomInfo) {
240 window._yas.sendCustomInfo({ 240 window._yas.sendCustomInfo({
241 activityID: activityID, 241 activityID: activityID,
242 returnCode: data.result.returnCode 242 returnCode: data.result.returnCode
243 - }, false); 243 + }, true);
244 } 244 }
245 if (!data.result.newUser) { 245 if (!data.result.newUser) {
246 $('.gain-coupon-centent .coupon img').attr('src', oldUserCouponPic); 246 $('.gain-coupon-centent .coupon img').attr('src', oldUserCouponPic);
@@ -341,10 +341,10 @@ $('.description').on('click', function() { @@ -341,10 +341,10 @@ $('.description').on('click', function() {
341 }); 341 });
342 342
343 $('.use-coupon-btn').on('click', function() { 343 $('.use-coupon-btn').on('click', function() {
344 - if (window._yas) { 344 + if (window._yas && window._yas.sendCustomInfo) {
345 window._yas.sendCustomInfo({ 345 window._yas.sendCustomInfo({
346 activityID: activityID 346 activityID: activityID
347 - }, true); 347 + }, false);
348 } 348 }
349 }); 349 });
350 350
@@ -59,7 +59,7 @@ function massageAJAX(pageData) { @@ -59,7 +59,7 @@ function massageAJAX(pageData) {
59 } 59 }
60 60
61 function scrollHandler() { 61 function scrollHandler() {
62 - if (!stopLoading && ($(window).scrollTop() + $(window).height() > $('body').height() - 100)) { 62 + if (!stopLoading && ($(window).scrollTop() + $(window).height() > $('body').height() * 0.75)) {
63 stopLoading = true; 63 stopLoading = true;
64 page++; 64 page++;
65 massageAJAX(page); 65 massageAJAX(page);
@@ -67,7 +67,7 @@ function scrollHandler() { @@ -67,7 +67,7 @@ function scrollHandler() {
67 } 67 }
68 68
69 $(window).scroll(function() { 69 $(window).scroll(function() {
70 - scrollHandler(); 70 + window.requestAnimationFrame(scrollHandler);
71 }); 71 });
72 72
73 if ($('.collocation-list').find('li').length === 0) { 73 if ($('.collocation-list').find('li').length === 0) {
@@ -68,7 +68,7 @@ function scrollHandler() { @@ -68,7 +68,7 @@ function scrollHandler() {
68 } 68 }
69 69
70 $(window).scroll(function() { 70 $(window).scroll(function() {
71 - scrollHandler(); 71 + window.requestAnimationFrame(scrollHandler);
72 }); 72 });
73 73
74 if ($detailList.find('li').length === 0) { 74 if ($detailList.find('li').length === 0) {
@@ -9,6 +9,8 @@ var $ = require('yoho-jquery'), @@ -9,6 +9,8 @@ var $ = require('yoho-jquery'),
9 9
10 require('../common'); 10 require('../common');
11 11
  12 +window.setCookie('guangStarUid', window.queryString.uid);
  13 +
12 // 星搭配收藏请求 14 // 星搭配收藏请求
13 $('.collocation-list,.detail-list').on('click', '.collection', function() { 15 $('.collocation-list,.detail-list').on('click', '.collection', function() {
14 var $that = $(this), 16 var $that = $(this),
@@ -36,7 +38,6 @@ $('.collocation-list,.detail-list').on('click', '.collection', function() { @@ -36,7 +38,6 @@ $('.collocation-list,.detail-list').on('click', '.collection', function() {
36 data: { 38 data: {
37 articleId: $that.parents('li').attr('articleId'), 39 articleId: $that.parents('li').attr('articleId'),
38 type: type, 40 type: type,
39 - uid: window.queryString.uid,  
40 pageType: pageType, 41 pageType: pageType,
41 tag: tag 42 tag: tag
42 }, 43 },
@@ -66,21 +67,3 @@ $('.collocation-list,.detail-list').on('click', '.collection', function() { @@ -66,21 +67,3 @@ $('.collocation-list,.detail-list').on('click', '.collection', function() {
66 } 67 }
67 }); 68 });
68 }); 69 });
69 -  
70 -// 分享成功  
71 -window.successShare = function() {  
72 - $.ajax({  
73 - type: 'POST',  
74 - url: '/guang/starclass/forward',  
75 - success: function(data) {  
76 - var code = data.code;  
77 -  
78 - if (code === 200 && data.data > 0) {  
79 - tip.show('分享成功,亲密度+10');  
80 - }  
81 - },  
82 - error: function() {  
83 - tip.show('网络断开连接了~');  
84 - }  
85 - });  
86 -};  
@@ -14,10 +14,13 @@ var $ = require('yoho-jquery'), @@ -14,10 +14,13 @@ var $ = require('yoho-jquery'),
14 14
15 var $window = $(window), 15 var $window = $(window),
16 stopLoading = false, 16 stopLoading = false,
17 - $starMain = $('.star-main'); 17 + $mainContent = $('.main-content'),
  18 + $headTab = $('.head-tab'),
  19 + headTabH = $headTab.height(),
  20 + scrollH = $(window).height() - headTabH,
  21 + $loadingTip = $('.loading-tip');
18 22
19 /* 23 /*
20 - $headTab = $('.head-tab'),  
21 $swiperView = $('.swiper-view'), 24 $swiperView = $('.swiper-view'),
22 $viewImg = $('.view-img'), 25 $viewImg = $('.view-img'),
23 $body = $('body'), 26 $body = $('body'),
@@ -27,7 +30,11 @@ var $window = $(window), @@ -27,7 +30,11 @@ var $window = $(window),
27 var mySwiper; 30 var mySwiper;
28 */ 31 */
29 32
30 -var avatarKey, bannerLen, res, avatarSwiper, avatarSwiperClone, getIndexHtml, $avatarClone, $avatar, $starArticle; 33 +var avatarKey, bannerLen, res, avatarSwiper, avatarSwiperClone, getIndexHtml,
  34 + $avatarClone, $starArticle, $avatarWrap, starIScroll;
  35 +
  36 +var swiperNum = ($('.swiper-num2').width() - $('.swiper-num1').width()) +
  37 + ($('.swiper-num3').width() - $('.swiper-num1').width()) / 2;
31 38
32 require('../common'); 39 require('../common');
33 40
@@ -71,11 +78,11 @@ function bindAvatar(dom) { @@ -71,11 +78,11 @@ function bindAvatar(dom) {
71 78
72 if (!dom.hasClass('swiper-slide-active')) { 79 if (!dom.hasClass('swiper-slide-active')) {
73 if (avatarKey >= (2 * bannerLen + 1)) { 80 if (avatarKey >= (2 * bannerLen + 1)) {
74 - avatarSwiperClone && avatarSwiperClone.slideTo(bannerLen + 1, 200);  
75 - avatarSwiper.slideTo(bannerLen + 1, 200); 81 + avatarSwiperClone && avatarSwiperClone.slideTo(bannerLen + 1, 0);
  82 + avatarSwiper.slideTo(bannerLen + 1, 0);
76 } else if (avatarKey <= (bannerLen - 1)) { 83 } else if (avatarKey <= (bannerLen - 1)) {
77 - avatarSwiperClone && avatarSwiperClone.slideTo(2 * bannerLen - 1, 200);  
78 - avatarSwiper.slideTo(2 * bannerLen - 1, 200); 84 + avatarSwiperClone && avatarSwiperClone.slideTo(2 * bannerLen - 1, 0);
  85 + avatarSwiper.slideTo(2 * bannerLen - (bannerLen - avatarKey), 0);
79 } else { 86 } else {
80 avatarSwiperClone && avatarSwiperClone.slideTo(avatarKey, 200); 87 avatarSwiperClone && avatarSwiperClone.slideTo(avatarKey, 200);
81 avatarSwiper.slideTo(avatarKey, 200); 88 avatarSwiper.slideTo(avatarKey, 200);
@@ -86,79 +93,6 @@ function bindAvatar(dom) { @@ -86,79 +93,6 @@ function bindAvatar(dom) {
86 } 93 }
87 94
88 function setIndexAction() { 95 function setIndexAction() {
89 - var starIScroll;  
90 -  
91 - var $loadingTip = $('.loading-tip'),  
92 - $avatarWrap = $('.avatar-wrap:not(.avatar-clone)'),  
93 - avatarHeight = $('.avatar').height();  
94 -  
95 - // 下拉刷新,上拉加载  
96 - starIScroll = new PullRefresh('.star-wrap', {  
97 - height: $(window).height() - avatarHeight,  
98 - pullDown: function() {  
99 - if (!stopLoading) {  
100 - stopLoading = true;  
101 -  
102 - if (avatarSwiperClone) {  
103 - avatarSwiperClone.destroy(true, true);  
104 - avatarSwiperClone = '';  
105 - }  
106 - getIndexHtml();  
107 - }  
108 - }  
109 - });  
110 -  
111 - starIScroll.iScroll.on('scrollStart', function() {  
112 - // 下拉  
113 - if (this.directionY === -1) {  
114 -  
115 - // $headTab.slideDown();  
116 - $loadingTip.slideDown();  
117 - }  
118 - });  
119 -  
120 - starIScroll.iScroll.on('scroll', function() {  
121 - if ($avatarWrap.offset().top <= 0) {  
122 - $avatarClone.show();  
123 -  
124 - if (!avatarSwiperClone) {  
125 - avatarSwiperClone = new Swiper('.avatar-0', {  
126 - loop: true,  
127 - initialSlide: $('.avatar-1').find('.swiper-slide-active').index() % bannerLen,  
128 - centeredSlides: true,  
129 - slidesPerView: 'auto',  
130 - loopedSlides: bannerLen,  
131 - spaceBetween: 10,  
132 - slidesOffsetBefore: -($('.swiper-num').width()),  
133 - watchSlidesProgress: true,  
134 - watchSlidesVisibility: true,  
135 - onInit: function() {  
136 - $('.avatar-0 li').on('click', function() {  
137 - res = bindAvatar($(this));  
138 - return res;  
139 - });  
140 - }  
141 - });  
142 -  
143 - avatarSwiperClone.params.control = avatarSwiper;  
144 - avatarSwiper.params.control = avatarSwiperClone;  
145 - }  
146 - }  
147 -  
148 - if ($avatarWrap.offset().top > $('.avatar-1')[0].scrollHeight) {  
149 - $avatarClone.hide();  
150 - }  
151 - });  
152 -  
153 - starIScroll.iScroll.on('scrollEnd', function() {  
154 - // 上滑  
155 - // if (this.directionY === 1) {  
156 - // $headTab.slideUp(600);  
157 - // }  
158 -  
159 - $loadingTip.slideUp();  
160 - });  
161 -  
162 $('.avatar').each(function(key, item) { 96 $('.avatar').each(function(key, item) {
163 $(item).addClass('avatar-' + key); 97 $(item).addClass('avatar-' + key);
164 }); 98 });
@@ -171,7 +105,7 @@ function setIndexAction() { @@ -171,7 +105,7 @@ function setIndexAction() {
171 slidesPerView: 'auto', 105 slidesPerView: 'auto',
172 loopedSlides: bannerLen, 106 loopedSlides: bannerLen,
173 spaceBetween: 10, 107 spaceBetween: 10,
174 - slidesOffsetBefore: -($('.swiper-num').width()), 108 + slidesOffsetBefore: -swiperNum,
175 watchSlidesProgress: true, 109 watchSlidesProgress: true,
176 watchSlidesVisibility: true, 110 watchSlidesVisibility: true,
177 onInit: function() { 111 onInit: function() {
@@ -220,6 +154,12 @@ function setIndexAction() { @@ -220,6 +154,12 @@ function setIndexAction() {
220 setAvatar($(item)); 154 setAvatar($(item));
221 }); 155 });
222 156
  157 + $('.star').each(function(key, item) {
  158 + if ($(item).attr('src') === '') {
  159 + $(item).addClass('default-avater');
  160 + }
  161 + });
  162 +
223 $('#yoho-header, .head-tab').on('touchmove', function() { 163 $('#yoho-header, .head-tab').on('touchmove', function() {
224 return false; 164 return false;
225 }); 165 });
@@ -230,15 +170,15 @@ function setIndexAction() { @@ -230,15 +170,15 @@ function setIndexAction() {
230 } 170 }
231 171
232 function initAction() { 172 function initAction() {
233 - $avatar = $('.avatar');  
234 $starArticle = $('.star-article'); 173 $starArticle = $('.star-article');
235 - bannerLen = $avatar.find('.swiper-slide').length; 174 + $avatarWrap = $('.avatar-wrap');
  175 + bannerLen = $('.avatar-wrap').find('.swiper-slide').length;
236 176
237 if ($avatarClone) { 177 if ($avatarClone) {
238 $avatarClone.remove(); 178 $avatarClone.remove();
239 } 179 }
240 180
241 - $starMain.before($('.avatar-swiper').clone().addClass('avatar-clone').hide()); 181 + $loadingTip.before($('.avatar-swiper').clone().addClass('avatar-clone').hide());
242 182
243 $avatarClone = $('.avatar-clone'); 183 $avatarClone = $('.avatar-clone');
244 184
@@ -249,9 +189,7 @@ function initAction() { @@ -249,9 +189,7 @@ function initAction() {
249 189
250 lazyLoad($('img.lazy')); 190 lazyLoad($('img.lazy'));
251 191
252 - setTimeout(function() {  
253 - setIndexAction();  
254 - }, 100); 192 + setIndexAction();
255 } 193 }
256 194
257 195
@@ -264,14 +202,17 @@ getIndexHtml = function() { @@ -264,14 +202,17 @@ getIndexHtml = function() {
264 success: function(data) { 202 success: function(data) {
265 stopLoading = false; 203 stopLoading = false;
266 204
267 - if (!data) {  
268 - stopLoading = true;  
269 - tip.show('没有更多内容了');  
270 - } 205 + if (data) {
  206 + if (avatarSwiperClone) {
  207 + avatarSwiperClone.destroy(true, true);
  208 + avatarSwiperClone = '';
  209 + }
271 210
272 - $starMain.html(data); 211 + $mainContent.html(data);
  212 +
  213 + initAction();
  214 + }
273 215
274 - initAction();  
275 loading.hideLoadingMask(); 216 loading.hideLoadingMask();
276 }, 217 },
277 error: function() { 218 error: function() {
@@ -279,9 +220,65 @@ getIndexHtml = function() { @@ -279,9 +220,65 @@ getIndexHtml = function() {
279 } 220 }
280 }); 221 });
281 }; 222 };
  223 +
282 initAction(); 224 initAction();
283 225
284 -// getIndexHtml(); 226 +// 下拉刷新,上拉加载
  227 +starIScroll = new PullRefresh('.star-main', {
  228 + height: scrollH,
  229 + pullDown: function() {
  230 + if (!stopLoading) {
  231 + stopLoading = true;
  232 + getIndexHtml();
  233 + }
  234 + }
  235 +});
  236 +
  237 +starIScroll.iScroll.on('scrollStart', function() {
  238 + // 下拉
  239 + if (this.directionY === -1) {
  240 + $loadingTip.slideDown();
  241 + }
  242 +});
  243 +
  244 +starIScroll.iScroll.on('scroll', function() {
  245 + if ($avatarWrap.offset().top <= headTabH) {
  246 + $avatarClone.show();
  247 +
  248 + if (!avatarSwiperClone) {
  249 + avatarSwiperClone = new Swiper('.avatar-0', {
  250 + loop: true,
  251 + initialSlide: $('.avatar-1').find('.swiper-slide-active').index() % bannerLen,
  252 + centeredSlides: true,
  253 + slidesPerView: 'auto',
  254 + loopedSlides: bannerLen,
  255 + spaceBetween: 10,
  256 + slidesOffsetBefore: -swiperNum,
  257 + watchSlidesProgress: true,
  258 + watchSlidesVisibility: true,
  259 + onInit: function() {
  260 + $('.avatar-0 li').on('click', function() {
  261 + res = bindAvatar($(this));
  262 + return res;
  263 + });
  264 + }
  265 + });
  266 +
  267 + avatarSwiperClone.params.control = avatarSwiper;
  268 + avatarSwiper.params.control = avatarSwiperClone;
  269 + }
  270 + }
  271 +
  272 + if ($avatarWrap.offset().top > $('.avatar-1')[0].scrollHeight) {
  273 + $avatarClone.hide();
  274 + }
  275 +});
  276 +
  277 +starIScroll.iScroll.on('scrollEnd', function() {
  278 + $loadingTip.slideUp();
  279 +});
  280 +
  281 +window.setCookie('guangStarUid', window.queryString.uid);
285 282
286 // 明星动态文章图片相关操作 283 // 明星动态文章图片相关操作
287 /* 284 /*
@@ -29,6 +29,7 @@ @@ -29,6 +29,7 @@
29 29
30 img { 30 img {
31 width: 100%; 31 width: 100%;
  32 + min-height: 310px;
32 } 33 }
33 34
34 .title { 35 .title {
@@ -12,6 +12,7 @@ @@ -12,6 +12,7 @@
12 12
13 img { 13 img {
14 width: 100%; 14 width: 100%;
  15 + height: 310px;
15 } 16 }
16 17
17 p { 18 p {
1 .star-page { 1 .star-page {
2 background: #333; 2 background: #333;
  3 + position: relative;
3 4
4 a { 5 a {
5 text-decoration: none; 6 text-decoration: none;
@@ -121,7 +122,6 @@ @@ -121,7 +122,6 @@
121 } 122 }
122 123
123 .star-main { 124 .star-main {
124 - position: relative;  
125 margin-top: 88px; 125 margin-top: 88px;
126 } 126 }
127 127
@@ -144,7 +144,7 @@ @@ -144,7 +144,7 @@
144 width: auto; 144 width: auto;
145 width: 110px; 145 width: 110px;
146 height: 110px; 146 height: 110px;
147 - margin-top: 34px; 147 + margin-top: 36px;
148 background: #000; 148 background: #000;
149 149
150 span { 150 span {
@@ -386,6 +386,15 @@ @@ -386,6 +386,15 @@
386 background-size: contain; 386 background-size: contain;
387 } 387 }
388 388
  389 + .star {
  390 + display: block;
  391 + width: 100%;
  392 + height: 100%;
  393 + background-color: #000;
  394 + background-repeat: no-repeat;
  395 + background-size: contain;
  396 + }
  397 +
389 .default-avater { 398 .default-avater {
390 background-image: resolve('guang/star/user-avatar.png'); 399 background-image: resolve('guang/star/user-avatar.png');
391 } 400 }
@@ -403,11 +412,22 @@ @@ -403,11 +412,22 @@
403 } 412 }
404 413
405 .swiper-num { 414 .swiper-num {
406 - width: 55px;  
407 position: fixed; 415 position: fixed;
408 top: 0; 416 top: 0;
409 z-index: -1; 417 z-index: -1;
410 } 418 }
  419 +
  420 + .swiper-num1 {
  421 + width: 110px;
  422 + }
  423 +
  424 + .swiper-num2 {
  425 + width: 130px;
  426 + }
  427 +
  428 + .swiper-num3 {
  429 + width: 180px;
  430 + }
411 } 431 }
412 432
413 .star-index-bg { 433 .star-index-bg {
@@ -12,4 +12,5 @@ @@ -12,4 +12,5 @@
12 @import "coupon/index"; 12 @import "coupon/index";
13 @import "passport/index"; 13 @import "passport/index";
14 @import "guang/index"; 14 @import "guang/index";
  15 +
15 @import "cart/chose-panel"; 16 @import "cart/chose-panel";