Ver Fonte

fix 微信SDK异步加载 造成Crash

jiaomengxiao há 8 anos atrás
pai
commit
d0e490e91e

+ 3 - 4
www/webapp/common/js/config.js

@@ -26,10 +26,9 @@ define(function (require) {
   }
 
   var ua = navigator.userAgent.toLowerCase();
-
   if (ua.match(/MicroMessenger/i) == 'micromessenger') {
     isWX = true;
-    // require(['../../common/js/jweixin-1.0.0'], function(wx) {
+    require(['http://res.wx.qq.com/open/js/jweixin-1.0.0.js'], function(wx) {
       var wxSignObject = document.getElementById('wxMain');
       if (wxSignObject) {
         var wxConfig = JSON.parse(wxSignObject.getAttribute('data-sign'));
@@ -92,7 +91,7 @@ define(function (require) {
               }
           });
           wx.onMenuShareTimeline({
-            title: '宠物上门服务,首选壹管家APP',
+            title: '家政服务,首选壹管家APP',
             link: 'http://common.yiguanjia.me/o2o/web/index',
             imgUrl: 'http://wozhua-others.qiniudn.com/icon-o2o-home.jpg'
           });
@@ -104,7 +103,7 @@ define(function (require) {
           });
         });
       }
-    // });
+    });
   }
   // 判断触宝客户端UA
   if (ua.match(/cootekservice/i) == 'cootekservice') {

+ 1 - 1
www/webapp/common/js/spa.js

@@ -2121,7 +2121,7 @@ define(['zepto'], function ($) {
 			hash = url + '#' + hash
 
 			// 如果在页面视图中,并且路由请求和当前路由重复,则不继续执行
-			if (!$curPage.hasClass('spa-panel') && hashhistory.length && '#' + hashhistory[hashhistory.length - 1] === hash) {
+			if ($curPage && !$curPage.hasClass('spa-panel') && hashhistory.length && '#' + hashhistory[hashhistory.length - 1] === hash) {
 				return
 			}
 

Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
www/webapp/o2o/dist/js/config.js


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
www/webapp/o2o/dist/js/main.js


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
www/webapp/o2o/dist/js/spa.js


Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff