Commit 3e817dfc by ludi

修复一个储值点的问题

parent 4d0bcdcd
...@@ -229,6 +229,7 @@ NSString * const kEVENT_RECHARGE_FIRST_RECHARGE_WINDOW_RECEIVE_OFFICIAL_RECAHARG ...@@ -229,6 +229,7 @@ NSString * const kEVENT_RECHARGE_FIRST_RECHARGE_WINDOW_RECEIVE_OFFICIAL_RECAHARG
NSDictionary *dataDict = dict[@"data"]; NSDictionary *dataDict = dict[@"data"];
BOOL shouldShare = [dataDict[@"share"] boolValue]; BOOL shouldShare = [dataDict[@"share"] boolValue];
FUSLogInfo(@"FUSFuSiWebViewEventHelper --- didRecieveScriptMessage webCid:%@\ndataDict:%@",webCid, dict);
if (self.webCidEventHandler) { if (self.webCidEventHandler) {
self.webCidEventHandler(dataDict, webCid.integerValue); self.webCidEventHandler(dataDict, webCid.integerValue);
...@@ -572,8 +573,9 @@ NSString * const kEVENT_RECHARGE_FIRST_RECHARGE_WINDOW_RECEIVE_OFFICIAL_RECAHARG ...@@ -572,8 +573,9 @@ NSString * const kEVENT_RECHARGE_FIRST_RECHARGE_WINDOW_RECEIVE_OFFICIAL_RECAHARG
NSString *pid = dataDict[@"pid"]; NSString *pid = dataDict[@"pid"];
NSString *packageid = dataDict[@"packageid"]; NSString *packageid = dataDict[@"packageid"];
NSDictionary *chargeInfoDict = dataDict[@"chargeInfo"];
NSMutableDictionary *trackEventDict = [@{@"roomid":FUSConfig.sharedInstanced.liveConfigs.currentRoomId ?: @"",@"userid":[FUSCacheDataShare shareStore].userDetailInfo.uid,@"pkg":FUSConfig.sharedInstanced.appConfigs.appPKG,@"pid":pid,@"packageid":packageid} mutableCopy]; NSMutableDictionary *trackEventDict = [@{@"roomid":FUSConfig.sharedInstanced.liveConfigs.currentRoomId ?: @"",@"userid":[FUSCacheDataShare shareStore].userDetailInfo.uid,@"pkg":FUSConfig.sharedInstanced.appConfigs.appPKG,@"pid":pid,@"packageid":packageid} mutableCopy];
if ([NSString isNull:pid]) { if ([NSString isNull:pid] || chargeInfoDict == nil) {
[FUSDialogView fus_showDialog:[NSString fus_localString:@"储值失败"]]; [FUSDialogView fus_showDialog:[NSString fus_localString:@"储值失败"]];
[trackEventDict setObject:@"rechargefail" forKey:@"result"]; [trackEventDict setObject:@"rechargefail" forKey:@"result"];
[FUSTalkingData fus_trackEvent:kEVENT_RECHARGE_FIRST_RECHARGE_WINDOW_RECEIVE_OFFICIAL_RECAHARGE label:@"" parameters:trackEventDict]; [FUSTalkingData fus_trackEvent:kEVENT_RECHARGE_FIRST_RECHARGE_WINDOW_RECEIVE_OFFICIAL_RECAHARGE label:@"" parameters:trackEventDict];
...@@ -584,7 +586,9 @@ NSString * const kEVENT_RECHARGE_FIRST_RECHARGE_WINDOW_RECEIVE_OFFICIAL_RECAHARG ...@@ -584,7 +586,9 @@ NSString * const kEVENT_RECHARGE_FIRST_RECHARGE_WINDOW_RECEIVE_OFFICIAL_RECAHARG
[FUSTalkingData fus_trackEvent:kEVENT_RECHARGE_FIRST_RECHARGE_WINDOW_RECEIVE label:@"" parameters:trackEventDict]; [FUSTalkingData fus_trackEvent:kEVENT_RECHARGE_FIRST_RECHARGE_WINDOW_RECEIVE label:@"" parameters:trackEventDict];
} }
[FUSPaymentManager fus_doAppStoreRechargeWithPid:pid success:^{ FUSPaymentRechargeModel *rechargeModel = [FUSPaymentRechargeModel fus_modelWithDict:chargeInfoDict];
// ludy:原来是fus_doAppStoreRechargeWithPid,需要遍历寻找是否有下发的充值点校验再充值,现在不需要了,直接丢给服务器
[FUSPaymentManager fus_doAppStoreRechargeWithRechargeModel:rechargeModel success:^{
if ([[UIViewController fus_topViewController] isKindOfClass:NSClassFromString(@"FUSLiveMainViewController")]) { if ([[UIViewController fus_topViewController] isKindOfClass:NSClassFromString(@"FUSLiveMainViewController")]) {
[trackEventDict setObject:@"rechargesuccess" forKey:@"result"]; [trackEventDict setObject:@"rechargesuccess" forKey:@"result"];
[FUSTalkingData fus_trackEvent:kEVENT_RECHARGE_FIRST_RECHARGE_WINDOW_RECEIVE_OFFICIAL_RECAHARGE label:@"" parameters:trackEventDict]; [FUSTalkingData fus_trackEvent:kEVENT_RECHARGE_FIRST_RECHARGE_WINDOW_RECEIVE_OFFICIAL_RECAHARGE label:@"" parameters:trackEventDict];
......
...@@ -71,4 +71,6 @@ orderid = 11111; ...@@ -71,4 +71,6 @@ orderid = 11111;
@property (nonatomic,strong) FUSPaymentPriceModel *priceModel; @property (nonatomic,strong) FUSPaymentPriceModel *priceModel;
-(void)fus_reloadPriceModel;
@end @end
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
// //
#import "FUSPaymentRechargeModel.h" #import "FUSPaymentRechargeModel.h"
#import "FUSCommon/FUSCacheDataShare.h"
@implementation FUSPaymentRechargeModel @implementation FUSPaymentRechargeModel
...@@ -17,4 +18,19 @@ ...@@ -17,4 +18,19 @@
return @{@"price": [FUSPaymentPriceModel class]}; return @{@"price": [FUSPaymentPriceModel class]};
} }
-(void)fus_reloadPriceModel{
for (FUSPaymentPriceModel *priceDict in self.price) {
// 判断当前用户处于哪个国家
if ([[priceDict.country description] isEqualToString:[FUSCacheDataShare shareStore].userVerifyInfo.countryCode]) {
self.priceModel = priceDict;
break;
}else{
// 找不到对应国家默认显示美国的储值点
if ([[priceDict.country description] isEqualToString:@"1"]){
self.priceModel = priceDict;
}
}
}
}
@end @end
...@@ -119,6 +119,22 @@ ...@@ -119,6 +119,22 @@
return; return;
} }
if (rechargeModel.priceModel == nil) {
[rechargeModel fus_reloadPriceModel];
}
if (rechargeModel.priceModel.country == nil) {
FUSLogInfo(@"--->创建支付订单失败, country未空");
if (failure) failure(@"创建支付订单失败", ERROR_CODE);
return;
}
if (rechargeModel.priceModel.price == nil) {
FUSLogInfo(@"--->创建支付订单失败, price未空");
if (failure) failure(@"创建支付订单失败", ERROR_CODE);
return;
}
NSDictionary *dataDict = @{@"product":@"宝石充值", NSDictionary *dataDict = @{@"product":@"宝石充值",
@"country":rechargeModel.priceModel.country, @"country":rechargeModel.priceModel.country,
@"payType":@"APPLEPAY", @"payType":@"APPLEPAY",
......
...@@ -672,7 +672,7 @@ ...@@ -672,7 +672,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = FuSiLive/FuSiLive.entitlements; CODE_SIGN_ENTITLEMENTS = FuSiLive/FuSiLive.entitlements;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 202506260024; CURRENT_PROJECT_VERSION = 202506260026;
DEFINES_MODULE = YES; DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 6GG26BHUMC; DEVELOPMENT_TEAM = 6GG26BHUMC;
ENABLE_ON_DEMAND_RESOURCES = NO; ENABLE_ON_DEMAND_RESOURCES = NO;
...@@ -940,7 +940,7 @@ ...@@ -940,7 +940,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = FuSiLive/FuSiLive.entitlements; CODE_SIGN_ENTITLEMENTS = FuSiLive/FuSiLive.entitlements;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 202506260024; CURRENT_PROJECT_VERSION = 202506260026;
DEFINES_MODULE = YES; DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 6GG26BHUMC; DEVELOPMENT_TEAM = 6GG26BHUMC;
ENABLE_ON_DEMAND_RESOURCES = NO; ENABLE_ON_DEMAND_RESOURCES = NO;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<key>NotificationService.xcscheme_^#shared#^_</key> <key>NotificationService.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>89</integer> <integer>86</integer>
</dict> </dict>
</dict> </dict>
</dict> </dict>
......
...@@ -7,12 +7,12 @@ ...@@ -7,12 +7,12 @@
<key>FUSChatCenterBundle.xcscheme_^#shared#^_</key> <key>FUSChatCenterBundle.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>82</integer> <integer>84</integer>
</dict> </dict>
<key>FUSChatCenterModule.xcscheme_^#shared#^_</key> <key>FUSChatCenterModule.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>81</integer> <integer>83</integer>
</dict> </dict>
</dict> </dict>
</dict> </dict>
......
...@@ -7,12 +7,12 @@ ...@@ -7,12 +7,12 @@
<key>FUSShowRoomBundle.xcscheme_^#shared#^_</key> <key>FUSShowRoomBundle.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>87</integer> <integer>88</integer>
</dict> </dict>
<key>FUSShowRoomModule.xcscheme_^#shared#^_</key> <key>FUSShowRoomModule.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>83</integer> <integer>85</integer>
</dict> </dict>
</dict> </dict>
</dict> </dict>
......
...@@ -7,12 +7,12 @@ ...@@ -7,12 +7,12 @@
<key>FUSUserCenterModule.xcscheme_^#shared#^_</key> <key>FUSUserCenterModule.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>85</integer> <integer>82</integer>
</dict> </dict>
<key>FUSUserCenterModuleBundle.xcscheme_^#shared#^_</key> <key>FUSUserCenterModuleBundle.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>88</integer> <integer>89</integer>
</dict> </dict>
</dict> </dict>
</dict> </dict>
......
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
<key>FUSBDAlphaPlayer-BDAlphaPlayer.xcscheme_^#shared#^_</key> <key>FUSBDAlphaPlayer-BDAlphaPlayer.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>86</integer> <integer>87</integer>
</dict> </dict>
<key>FUSBDAlphaPlayer.xcscheme</key> <key>FUSBDAlphaPlayer.xcscheme</key>
<dict> <dict>
...@@ -131,7 +131,7 @@ ...@@ -131,7 +131,7 @@
<key>FUSBDAlphaPlayer.xcscheme_^#shared#^_</key> <key>FUSBDAlphaPlayer.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>84</integer> <integer>81</integer>
</dict> </dict>
<key>FUSCommon-FUSCommonBundle.xcscheme</key> <key>FUSCommon-FUSCommonBundle.xcscheme</key>
<dict> <dict>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment