Browse Source

Merge branch 'master' of http://192.168.2.10:3000/GFG/Client

zhangyuqian 1 year ago
parent
commit
293a786f8e

+ 6 - 1
GameClient/Assets/Game/HotUpdate/Platform/ShareSDK/QDShareManager.cs

@@ -95,7 +95,12 @@ namespace GFGGame
 
         public void OnShareResult(int reqID, ResponseState state, PlatformType type, Hashtable result)
         {
-            Debug.Log($"OnShareResult");
+            if (state == ResponseState.Success)
+            {
+                ShareRecordSProxy.ReqShareRecord().Coroutine();
+            }
+
+            Debug.Log($"OnShareResult state:" + state);
         }
 
         public void OnGetFriendsResult(int reqID, ResponseState state, PlatformType type,

+ 32 - 0
GameClient/Assets/Game/HotUpdate/ServerProxy/ShareRecordSProxy.cs

@@ -0,0 +1,32 @@
+using ET;
+
+namespace GFGGame
+{
+    public class ShareRecordSProxy
+    {
+        /// <summary>
+        /// 分享成功请求服务端进行分享次数记录
+        /// </summary>
+        /// <returns></returns>
+        public static async ETTask<bool> ReqShareRecord()
+        {
+            M2C_ShareRecordTimes response;
+            response = (M2C_ShareRecordTimes)await MessageHelper.SendToServer(new C2M_ShareRecordTimes());
+            if (response != null)
+            {
+                if (response.Error == ErrorCode.ERR_Success)
+                {
+                    if (response.RewardList.Count > 0)
+                    {
+                        // 奖励弹窗
+                        BonusController.TryShowBonusList(ItemUtil.CreateItemDataList(response.RewardList));
+                    }
+
+                    return true;
+                }
+            }
+
+            return false;
+        }
+    }
+}

+ 3 - 0
GameClient/Assets/Game/HotUpdate/ServerProxy/ShareRecordSProxy.cs.meta

@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: 1528643098e44dbdb608418961271e07
+timeCreated: 1718375771