Authored by zhangxiaoru

首页分享数据不写死

@@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
27 </div> 27 </div>
28 <span class="coupon-code">{{couponCode}}</span> 28 <span class="coupon-code">{{couponCode}}</span>
29 {{#if isApp}} 29 {{#if isApp}}
30 - <a href='//m.yohobuy.com/?openby:yohobuy={"action":"go.copy","params":{"text":"{{couponCode}}"}}' class="copy">复制</a> 30 + <a href='//m.yohobuy.com/?openby:yohobuy={"action":"go.copy","params":{"text":"{{couponCode}}","message":"复制成功"}}' class="copy">复制</a>
31 {{/if}} 31 {{/if}}
32 <p class="share-way"> 32 <p class="share-way">
33 {{#if finish}} 33 {{#if finish}}
1 'use strict'; 1 'use strict';
2 require('activity/share-buy.page.css'); 2 require('activity/share-buy.page.css');
3 3
4 -let $ = require('yoho-jquery'),  
5 - yoho = require('yoho-app'); 4 +let $ = require('yoho-jquery');
6 5
7 let $news = $('.news'), 6 let $news = $('.news'),
8 newsLiL = $news.find('li').length, 7 newsLiL = $news.find('li').length,
9 newsHeight = 0; 8 newsHeight = 0;
10 9
11 -let shareData = {  
12 - title: '【有货】童鞋们一起来有货玩潮流,超级专享优惠福利速来领~',  
13 - link: location.href,  
14 - desc: '有货发福利啦!甄选好货等你来BUY~',  
15 - imgUrl: 'http://img11.static.yhbimg.com/yhb-img01/2017/05/10/16/011568a808f9b10e098b6542d3a8cb3d6b.png'  
16 -};  
17 -  
18 if ($('.share-buy-page').height() < $(window).height()) { 10 if ($('.share-buy-page').height() < $(window).height()) {
19 $('.share-buy-page').height($(window).height()); 11 $('.share-buy-page').height($(window).height());
20 } 12 }
21 13
22 -if (yoho.isApp) {  
23 - yoho.ready(function() {  
24 - yoho.invokeMethod('set.shareInfo', shareData);  
25 - });  
26 -}  
27 - 14 +// 返利资讯的滚动
28 function Marquee() { 15 function Marquee() {
29 let diff; 16 let diff;
30 17