Authored by 邱骏

增加一步直接判断是否在小程序中打开

@@ -990,7 +990,10 @@ $(function() { @@ -990,7 +990,10 @@ $(function() {
990 getShopProductLinks(); 990 getShopProductLinks();
991 991
992 // 小程序相关处理 992 // 小程序相关处理
993 - if (!window.WeixinJSBridge || !window.WeixinJSBridge.invoke) { 993 + if (navigator.userAgent.match(/MicroMessenger/i) && navigator.userAgent.match(/miniProgram/i)) {
  994 + console.log('miniprogram');
  995 + miniProgramHandleInit();
  996 + } else if (!window.WeixinJSBridge || !window.WeixinJSBridge.invoke) {
994 document.addEventListener('WeixinJSBridgeReady', miniProgramHandleInit, false); 997 document.addEventListener('WeixinJSBridgeReady', miniProgramHandleInit, false);
995 } else { 998 } else {
996 miniProgramHandleInit(); 999 miniProgramHandleInit();