From 1cc903a0b16ec9b362fa1e9057500e030121319f Mon Sep 17 00:00:00 2001 From: liyuhua <15626451870@163.com> Date: Thu, 28 Sep 2023 14:41:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../YMRoom/View/LittleGame/Presenter/SudCommon.m | 1 + .../LittleGame/View/XPRoomLittleGameContainerView.m | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/YuMi/Modules/YMRoom/View/LittleGame/Presenter/SudCommon.m b/YuMi/Modules/YMRoom/View/LittleGame/Presenter/SudCommon.m index dcf14aa6..bd8fbe7d 100644 --- a/YuMi/Modules/YMRoom/View/LittleGame/Presenter/SudCommon.m +++ b/YuMi/Modules/YMRoom/View/LittleGame/Presenter/SudCommon.m @@ -98,6 +98,7 @@ } + (NSString *)getSDKVersion { + return [NSString stringWithFormat:@"v%@",[SudMGP getVersion]]; } diff --git a/YuMi/Modules/YMRoom/View/LittleGame/View/XPRoomLittleGameContainerView.m b/YuMi/Modules/YMRoom/View/LittleGame/View/XPRoomLittleGameContainerView.m index 197610f1..2013e6db 100644 --- a/YuMi/Modules/YMRoom/View/LittleGame/View/XPRoomLittleGameContainerView.m +++ b/YuMi/Modules/YMRoom/View/LittleGame/View/XPRoomLittleGameContainerView.m @@ -8,7 +8,7 @@ #import "XPRoomLittleGameContainerView.h" ///Third #import -#import + #import ///Tool #import "Api+LittleGame.h" @@ -27,10 +27,9 @@ #import "XPKickUserModel.h" #import "GuildSuperAdminInfoModel.h" ///P -#import -#import -#import -#import + +#import + @interface XPRoomLittleGameContainerView () ///当前小游戏ID @property (nonatomic, assign) int64_t currentmgId; @@ -103,6 +102,7 @@ #else isTestEnv = NO; #endif + [[SudMGP getCfg]setBackgroundMode:NO]; [SudMGP initSDK:KeyWithType(KeyType_SudGameAppID) appKey:KeyWithType(KeyType_SudGameAppKey) isTestEnv:isTestEnv listener:^(int retCode, const NSString *retMsg) { if (retCode == 0) { if (!self.currentmgId) { @@ -124,6 +124,7 @@ language = @"zh-Hant"; // 繁體中文 } self.fsmAPP2MG = [SudMGP loadMG:userId roomId:roomId code:self.code mgId:self.currentmgId language:[language isEqualToString:@"zh-Hant"]? @"zh-TW" : @"zh-CN" fsmMG:self rootView:self]; + } else { /// 初始化失败, 可根据业务重试 NSLog(@"ISudFSMMG:initGameSDKWithAppID:初始化sdk失败 :%@",retMsg);