rabin 7 anni fa
parent
commit
81d21b2858

File diff suppressed because it is too large
+ 0 - 0
kissy/public/share/jweixin.js


+ 25 - 1
kissy/public/share/mshare.js

@@ -141,7 +141,10 @@ MShare.prototype = {
         }
         //var url = VG.conf.root_domain + '?c=WeixinJsSDK&a=AjaxConfigData&site=' + wxCfgs.site + '&thisPageUrl=' + encodeURIComponent(location.href) + '&callback=?';
         var url = VG.conf.root_domain + '?c=WeixinJsSDK&a=AjaxConfigData';
-
+        var state = false;
+        if (location.href.indexOf('test') > -1) {
+            var state = true;
+        }
         //alert(url)
         $.ajax({
             type:'post',
@@ -167,20 +170,32 @@ MShare.prototype = {
                 //alert(wxCfgs.link);
                 wx.ready(function() {
                     //alert(wxCfgs.img_url)
+                    if (state) {
+                        alert(wxCfgs.img_url);
+                    }
                     wx.onMenuShareAppMessage({
                         title: wxCfgs.title,
                         desc: wxCfgs.desc,
                         link: wxCfgs.link,
                         imgUrl: wxCfgs.img_url,
                         success: function(res) {
+                            if (state) {
+                        alert(1);
+                    }
                             wxCfgs.sendMessageCallback('success', res)
                             self._shareLog(0, 1);
                         },
                         cancel: function(res) {
+                            if (state) {
+                        alert(2);
+                    }
                             wxCfgs.sendMessageCallback('cancel', res)
                             self._shareLog(0, 2);
                         },
                         fail: function(res) {
+                            if (state) {
+                                alert(3);
+                            }
                             wxCfgs.sendMessageCallback('fail', res)
                             self._shareLog(0, 0);
                         }
@@ -190,14 +205,23 @@ MShare.prototype = {
                         link: wxCfgs.link,
                         imgUrl: wxCfgs.img_url,
                         success: function(res) {
+                            if (state) {
+                                alert(1);
+                            }
                             wxCfgs.timelineCallback('success', res)
                             self._shareLog(1, 1);
                         },
                         cancel: function(res) {
+                            if (state) {
+                                alert(2);
+                            }
                             wxCfgs.timelineCallback('cancel', res)
                             self._shareLog(1, 2);
                         },
                         fail: function(res) {
+                            if (state) {
+                                alert(3);
+                            }
                             wxCfgs.timelineCallback('fail', res)
                             self._shareLog(1, 0);
                         }

+ 1 - 1
tm/template_dir/header.html

@@ -36,5 +36,5 @@
 </script>
 <script src="<{$web_cfg.cdn}>/public/share/zepto.min.js"></script>
 <script src="<{$web_cfg.cdn}>/public/share/jweixin.js?1"></script>
-<script src="<{$web_cfg.cdn}>/public/share/mshare.js?10"></script>
+<script src="<{$web_cfg.cdn}>/public/share/mshare.js?11"></script>
 <body id="body">

Some files were not shown because too many files changed in this diff