Authored by 张孝茹

js

@@ -128,7 +128,7 @@ @@ -128,7 +128,7 @@
128 <script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.3.2.js"></script> 128 <script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
129 {{/wechatShare}} 129 {{/wechatShare}}
130 {{#if devEnv}} 130 {{#if devEnv}}
131 - <script> 131 + <!-- <script>
132 var STATIC_RESOURCE_HASH = '{{startTime}}'; 132 var STATIC_RESOURCE_HASH = '{{startTime}}';
133 var STATIC_RESOURCE_PATH = '//{{devHost}}:{{port}}'; 133 var STATIC_RESOURCE_PATH = '//{{devHost}}:{{port}}';
134 window.jsFiles = [ 134 window.jsFiles = [
@@ -141,9 +141,11 @@ @@ -141,9 +141,11 @@
141 ,'{{src}}' 141 ,'{{src}}'
142 {{/loadJs}} 142 {{/loadJs}}
143 ]; 143 ];
144 - </script> 144 + </script> -->
  145 + <script src="//{{devHost}}:{{port}}/libs.js?t={{startTime}}"></script>
  146 + <script src="//{{devHost}}:{{port}}/{{module}}.{{page}}.js?t={{startTime}}"></script>
145 {{^}} 147 {{^}}
146 - <script> 148 + <!-- <script>
147 var STATIC_RESOURCE_HASH = '{{startTime}}'; 149 var STATIC_RESOURCE_HASH = '{{startTime}}';
148 var STATIC_RESOURCE_PATH = '//cdn.yoho.cn/yohobuywap-node/{{version}}'; 150 var STATIC_RESOURCE_PATH = '//cdn.yoho.cn/yohobuywap-node/{{version}}';
149 window.jsFiles = [ 151 window.jsFiles = [
@@ -156,9 +158,12 @@ @@ -156,9 +158,12 @@
156 ,'{{src}}' 158 ,'{{src}}'
157 {{/loadJs}} 159 {{/loadJs}}
158 ]; 160 ];
159 - </script> 161 + </script> -->
  162 +
  163 + <script src="//cdn.yoho.cn/yohobuywap-node/{{version}}/libs.js?t={{startTime}}"></script>
  164 + <script src="//cdn.yoho.cn/yohobuywap-node/{{version}}/{{module}}.{{page}}.js?t={{startTime}}"></script>
160 {{/if}} 165 {{/if}}
161 - <script> 166 + <!-- <script>
162 (function() { 167 (function() {
163 function addOnload(node, callback) { 168 function addOnload(node, callback) {
164 var supportOnload = 'onload' in node; 169 var supportOnload = 'onload' in node;
@@ -213,7 +218,7 @@ @@ -213,7 +218,7 @@
213 218
214 loadJS(); 219 loadJS();
215 }()); 220 }());
216 - </script> 221 + </script> -->
217 {{#unless devEnv}} 222 {{#unless devEnv}}
218 {{> analysis}} 223 {{> analysis}}
219 {{/unless}} 224 {{/unless}}
@@ -38,11 +38,21 @@ let shareData = { @@ -38,11 +38,21 @@ let shareData = {
38 imgUrl: productPic 38 imgUrl: productPic
39 }; 39 };
40 40
41 -if (yoho.isMarsApp || yoho.isNowApp) {  
42 - yoho.ready(function() { 41 +let nowShareData = {
  42 + title: `推荐这本城市指南给你:${productName}`,
  43 + link: location.href.split('?')[0],
  44 + desc: '最近很多 KOL 在推!据说是探索城市必备神器',
  45 + desCircle: `最近被刷屏的这本城市指南终于可以买到了!${productName}`,
  46 + imgUrl: productPic
  47 +};
  48 +
  49 +yoho.ready(function() {
  50 + if (yoho.isMarsApp) {
43 yoho.invokeMethod('set.shareInfo', shareData); 51 yoho.invokeMethod('set.shareInfo', shareData);
44 - });  
45 -} 52 + } else if (yoho.isNowApp) {
  53 + yoho.invokeMethod('set.shareInfo', nowShareData);
  54 + }
  55 +});
46 56
47 window.rePosFooter && window.rePosFooter(); 57 window.rePosFooter && window.rePosFooter();
48 58