smallqiang преди 5 години
родител
ревизия
fb1165c59b
променени са 1 файла, в които са добавени 6 реда и са изтрити 4 реда
  1. 6 4
      assets/scripts/net/WeChat.js

+ 6 - 4
assets/scripts/net/WeChat.js

@@ -227,10 +227,12 @@ class WeChat {
                 fail: () => {
                     console.log('分享失败或取消');
                     fail && fail();
-                    GameEvent.fire(GameNotificationKey.ShowShareAction, GameGlobal.gameShareType, false);
-                    GameGlobal.clickShare = false;
-                    GameGlobal.gameShareType = WechatShareType.None;
-                    GameGlobal.isIgnoreShareStatus = false;
+                    if (GameGlobal.clickShare) {
+                        GameEvent.fire(GameNotificationKey.ShowShareAction, GameGlobal.gameShareType, false);
+                        GameGlobal.clickShare = false;
+                        GameGlobal.gameShareType = WechatShareType.None;
+                        GameGlobal.isIgnoreShareStatus = false;
+                    }
                 }
             });
         } else if (CC_WECHATGAME) {