Showing
5 changed files
with
45 additions
and
12 deletions
@@ -350,6 +350,20 @@ class familyModel extends global.yoho.BaseModel { | @@ -350,6 +350,20 @@ class familyModel extends global.yoho.BaseModel { | ||
350 | }); | 350 | }); |
351 | } | 351 | } |
352 | } | 352 | } |
353 | + | ||
354 | + if (val.appName === 'yohobuy') { | ||
355 | + singleData = _.assign(singleData, { | ||
356 | + loadSrc: 'https://union.yoho.cn/union/app-downloads.html?union_type=100000000000349&client_id=531951919' | ||
357 | + }); | ||
358 | + } else if (val.appName === 'mars') { | ||
359 | + singleData = _.assign(singleData, { | ||
360 | + loadSrc: 'http://www.yohomars.com/download/index?action=gp.index¶ms:yohomars://yohomars.com/goapp?openby:mars=""' | ||
361 | + }); | ||
362 | + } else if (val.appName === 'now') { | ||
363 | + singleData = _.assign(singleData, { | ||
364 | + loadSrc: 'http://www.yohogirls.com/download/default/index?act=go.news¶ms=yohoefashion4In1://' | ||
365 | + }); | ||
366 | + } | ||
353 | }); | 367 | }); |
354 | 368 | ||
355 | return singleData; | 369 | return singleData; |
@@ -11,6 +11,10 @@ | @@ -11,6 +11,10 @@ | ||
11 | {{#if winXinCode}} | 11 | {{#if winXinCode}} |
12 | <span class="code-copy" data-text="{{winXinCode}}">复制</span> | 12 | <span class="code-copy" data-text="{{winXinCode}}">复制</span> |
13 | {{/if}} | 13 | {{/if}} |
14 | + | ||
15 | + {{#if loadSrc}} | ||
16 | + <a class="load-src" href="{{loadSrc}}"></a> | ||
17 | + {{/if}} | ||
14 | </div> | 18 | </div> |
15 | {{/ downLoadData}} | 19 | {{/ downLoadData}} |
16 | </div> | 20 | </div> |
@@ -96,13 +96,13 @@ class IconMall extends Page { | @@ -96,13 +96,13 @@ class IconMall extends Page { | ||
96 | 96 | ||
97 | scroll() { | 97 | scroll() { |
98 | $(window).scroll(() => { | 98 | $(window).scroll(() => { |
99 | - let $scrollTop = $(window).scrollTop(); | 99 | + // let $scrollTop = $(window).scrollTop(); |
100 | 100 | ||
101 | - if ($scrollTop >= this.fixTop) { | ||
102 | - this.selector.$tabFixed.find('.tab').addClass('fixed'); | ||
103 | - } else { | ||
104 | - this.selector.$tabFixed.find('.tab').removeClass('fixed'); | ||
105 | - } | 101 | + // if ($scrollTop >= this.fixTop) { |
102 | + // this.selector.$tabFixed.find('.tab').addClass('fixed'); | ||
103 | + // } else { | ||
104 | + // this.selector.$tabFixed.find('.tab').removeClass('fixed'); | ||
105 | + // } | ||
106 | 106 | ||
107 | $(window).scroll(() => { | 107 | $(window).scroll(() => { |
108 | window.requestAnimationFrame(this.scrollHandler.bind(this)); | 108 | window.requestAnimationFrame(this.scrollHandler.bind(this)); |
@@ -114,6 +114,17 @@ class IconMall extends Page { | @@ -114,6 +114,17 @@ class IconMall extends Page { | ||
114 | this.selector.$tabItem.on('click', this.tabItem.bind(this)); | 114 | this.selector.$tabItem.on('click', this.tabItem.bind(this)); |
115 | this.selector.$acquiringHelp.on('click', this.openHelp.bind(this)); | 115 | this.selector.$acquiringHelp.on('click', this.openHelp.bind(this)); |
116 | this.selector.$detail.on('click', this.openDetail.bind(this)); | 116 | this.selector.$detail.on('click', this.openDetail.bind(this)); |
117 | + $(window).on('scroll touchmove touchstart touchend', this.move.bind(this)); | ||
118 | + } | ||
119 | + | ||
120 | + move() { | ||
121 | + let $scrollTop = $(window).scrollTop(); | ||
122 | + | ||
123 | + if ($scrollTop >= this.fixTop) { | ||
124 | + this.selector.$tabFixed.find('.tab').addClass('fixed'); | ||
125 | + } else { | ||
126 | + this.selector.$tabFixed.find('.tab').removeClass('fixed'); | ||
127 | + } | ||
117 | } | 128 | } |
118 | 129 | ||
119 | defaultChosen() { | 130 | defaultChosen() { |
@@ -158,7 +158,7 @@ class FamilyIndex extends Page { | @@ -158,7 +158,7 @@ class FamilyIndex extends Page { | ||
158 | ] | 158 | ] |
159 | }); | 159 | }); |
160 | } | 160 | } |
161 | - }) | 161 | + }); |
162 | } | 162 | } |
163 | 163 | ||
164 | // 资源位初始化 | 164 | // 资源位初始化 |
@@ -272,7 +272,7 @@ class FamilyIndex extends Page { | @@ -272,7 +272,7 @@ class FamilyIndex extends Page { | ||
272 | 272 | ||
273 | let $linkJump = $('#link-jump'); | 273 | let $linkJump = $('#link-jump'); |
274 | 274 | ||
275 | - if (yoho.isMarsApp || yoho.isNowApp) { | 275 | + if (yoho.isMarsApp) { |
276 | if (!$linkJump.length) { | 276 | if (!$linkJump.length) { |
277 | $('body').append('<a id="link-jump" href="javascript:;" style="display:none !important;"></a>'); | 277 | $('body').append('<a id="link-jump" href="javascript:;" style="display:none !important;"></a>'); |
278 | $linkJump = $('#link-jump'); | 278 | $linkJump = $('#link-jump'); |
@@ -283,9 +283,6 @@ class FamilyIndex extends Page { | @@ -283,9 +283,6 @@ class FamilyIndex extends Page { | ||
283 | href = href + '&openby:yohobuy=' + (JSON.stringify({ | 283 | href = href + '&openby:yohobuy=' + (JSON.stringify({ |
284 | action: 'go.h5', | 284 | action: 'go.h5', |
285 | params: { | 285 | params: { |
286 | - islogin: 'N', | ||
287 | - type: 0, | ||
288 | - updateflag: Date.now() + '', | ||
289 | url: href | 286 | url: href |
290 | } | 287 | } |
291 | })); | 288 | })); |
@@ -295,7 +292,6 @@ class FamilyIndex extends Page { | @@ -295,7 +292,6 @@ class FamilyIndex extends Page { | ||
295 | $linkJump[0].click(); | 292 | $linkJump[0].click(); |
296 | 293 | ||
297 | return false; | 294 | return false; |
298 | - | ||
299 | } else { | 295 | } else { |
300 | yoho.goH5(href); | 296 | yoho.goH5(href); |
301 | } | 297 | } |
@@ -38,6 +38,14 @@ | @@ -38,6 +38,14 @@ | ||
38 | border-radius: 10px; | 38 | border-radius: 10px; |
39 | } | 39 | } |
40 | 40 | ||
41 | + .load-src { | ||
42 | + display: inline-block; | ||
43 | + width: 100%; | ||
44 | + height: 300px; | ||
45 | + position: relative; | ||
46 | + bottom: 300px; | ||
47 | + } | ||
48 | + | ||
41 | .yohobuy, | 49 | .yohobuy, |
42 | .now, | 50 | .now, |
43 | .mars { | 51 | .mars { |
-
Please register or login to post a comment