This commit is contained in:
Yao
2025-01-11 09:51:47 +08:00
parent 33a7b58a49
commit f82486e8b0
72 changed files with 447 additions and 4428 deletions

View File

@@ -17,7 +17,6 @@
#import <SVProgressHUD.h>
#import "MacroDefine.h"
//#import "ViewController.h"
#import "MainOldViewController.h"
#import "LaunchViewController.h"
@@ -62,7 +61,7 @@
request.HTTPMethod = @"PUT";
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSDictionary *parmas = @{@"userId":[NSNumber numberWithInteger:[Candy916UserID integerValue]]};
NSDictionary *parmas = @{@"userId":[NSNumber numberWithInteger:[Tinju55UserID integerValue]]};
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:parmas options:NSJSONWritingPrettyPrinted error:nil];
request.HTTPBody = jsonData;
@@ -122,17 +121,6 @@
[self.window.rootViewController presentViewController:alertview animated:YES completion:^{}];
});
}
//
// NSUserDefaults *userfault = [NSUserDefaults standardUserDefaults];
// BOOL install = [userfault objectForKey:@"INSTALL"];
// if (install == NO) {
// [self setupSendInvite];
// }else{
// if (self.isRefresh == YES) {
// [[NSNotificationCenter defaultCenter] postNotificationName:@"NOTI_INTO" object:nil];
// }
// }
}
#pragma mark -
@@ -170,164 +158,6 @@
});
}
/*
-(void)refreshPermissionAll
{
[SVProgressHUD dismiss];
//
[[UNUserNotificationCenter currentNotificationCenter] getNotificationSettingsWithCompletionHandler:^(UNNotificationSettings * _Nonnull settings) {
//
if (settings.authorizationStatus == UNAuthorizationStatusNotDetermined) {
[self setupNotificationStatus];
}else if (settings.authorizationStatus != UNAuthorizationStatusAuthorized) {
dispatch_async(dispatch_get_main_queue(), ^{
UIAlertController *alertview = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"Tips", nil) message:NSLocalizedString(@"Need to enable push permission", nil) preferredStyle:(UIAlertControllerStyleAlert)];
UIAlertAction *action = [UIAlertAction actionWithTitle:NSLocalizedString(@"SETTING", nil) style:(UIAlertActionStyleCancel) handler:^(UIAlertAction * _Nonnull action) {
self.isRefresh = YES;
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString] options:@{} completionHandler:^(BOOL success) {}];
}];
[alertview addAction:action];
[self.window.rootViewController presentViewController:alertview animated:YES completion:^{}];
});
}
}];
//
CNAuthorizationStatus status = [CNContactStore authorizationStatusForEntityType:CNEntityTypeContacts];
if (status == CNAuthorizationStatusNotDetermined) {
CNContactStore *store = [[CNContactStore alloc] init];
[store requestAccessForEntityType:CNEntityTypeContacts completionHandler:^(BOOL granted, NSError* _Nullable error) {
if (granted == NO) {
[self setupAlertContact];
}
}];
}else if (status == CNAuthorizationStatusDenied) {
[self setupAlertContact];
}
//
NSUserDefaults *userfault = [NSUserDefaults standardUserDefaults];
BOOL install = [userfault objectForKey:@"INSTALL"];
if (install == NO) {
[self setupSendInvite];
}else{
[[NSNotificationCenter defaultCenter] postNotificationName:@"NOTI_INTO" object:nil];
}
}
#pragma mark -
-(void)setupSendInvite
{
//
dispatch_async(dispatch_get_main_queue(), ^{
UIAlertController *inputCodeAlertController = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"Please enter the invitation code", nil) message:nil preferredStyle:(UIAlertControllerStyleAlert)];
[inputCodeAlertController addTextFieldWithConfigurationHandler:^(UITextField * _Nonnull textField) {
textField.placeholder = NSLocalizedString(@"Please enter the invitation code", nil);
}];
UIAlertAction *inputCodeAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"OK", nil) style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) {
UITextField *codeTextField = inputCodeAlertController.textFields.firstObject;
if (!ISNULLSTR(codeTextField.text)) {
NSString *advertisingId = codeTextField.text;
[self setupInviteSend:advertisingId];
}else{
[self setupSendInvite];
}
}];
[inputCodeAlertController addAction:inputCodeAction];
[self.window.rootViewController presentViewController:inputCodeAlertController animated:YES completion:^{}];
});
}
-(void)setupInviteSend:(NSString *)advertisingId
{
__block NSString *uuidString = @"";
if (@available(iOS 14, *)) {
[ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
uuidString = [[ASIdentifierManager sharedManager] advertisingIdentifier].UUIDString;
[self setupInviteSendWithUUIDString:uuidString advertisingId:advertisingId];
}];
} else {
uuidString = [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];
[self setupInviteSendWithUUIDString:uuidString advertisingId:advertisingId];
}
}
-(void)setupInviteSendWithUUIDString:(NSString *)uuidString advertisingId:(NSString *)advertisingId
{
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:InviteSendURL]];
request.HTTPMethod = @"PUT";
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSDictionary *parmas = @{@"code":advertisingId,@"deviceCode":uuidString,@"userId":[NSNumber numberWithInteger:[VV88AUUserID integerValue]]};
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:parmas options:NSJSONWritingPrettyPrinted error:nil];
request.HTTPBody = jsonData;
[SVProgressHUD show];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {
dispatch_async(dispatch_get_main_queue(), ^{
if (error == nil) {
[SVProgressHUD dismiss];
NSError *error;
NSMutableDictionary *responseObject = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:&error];
if (error == nil) {
NSInteger code = [[responseObject objectForKey:@"code"] integerValue];
if (ISNULL(error)) {
if (code == 40001) {
NSString *errmsg = [responseObject objectForKey:@"error"];
[SVProgressHUD showInfoWithStatus:errmsg];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
NSDictionary *datadic = [responseObject objectForKey:@"data"];
NSString *inviteCode = [datadic objectForKey:@"inviteCode"];
NSUserDefaults *userfault = [NSUserDefaults standardUserDefaults];
[userfault setObject:[NSNumber numberWithBool:YES] forKey:@"INSTALL"];
[userfault setObject:inviteCode forKey:@"INVITE_CODE"];
[userfault synchronize];
//
[self refreshPermissionAll];
});
}else if (code == 1) {
NSUserDefaults *userfault = [NSUserDefaults standardUserDefaults];
[userfault setObject:[NSNumber numberWithBool:YES] forKey:@"INSTALL"];
[userfault setObject:advertisingId forKey:@"INVITE_CODE"];
[userfault synchronize];
//
[self refreshPermissionAll];
}else{
NSString *errmsg = [responseObject objectForKey:@"error"];
[SVProgressHUD showInfoWithStatus:errmsg];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self setupSendInvite];
});
}
}else{
NSString *errmsg = [responseObject objectForKey:@"message"];
[SVProgressHUD showInfoWithStatus:errmsg];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self setupSendInvite];
});
}
}
else{
[SVProgressHUD showInfoWithStatus:error.localizedDescription];
[self setupSendInvite];
}
}
else{
[SVProgressHUD showInfoWithStatus:error.localizedDescription];
[self setupSendInvite];
}
});
}];
[dataTask resume];
}
*/
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{
if (deviceToken != nil) {
@@ -376,38 +206,6 @@
[self processWithNoti:response.notification.request.content.userInfo];
}
/*
-(void)receiveNOTIProcessWithNoti:(NSDictionary *)userInfo
{
[[FIRMessaging messaging] appDidReceiveMessage:userInfo];
if (userInfo) {
NSDictionary *apnsDic = [userInfo objectForKey:@"aps"];
NSDictionary *alertDic = [apnsDic objectForKey:@"alert"];
NSString *title = [alertDic objectForKey:@"body"];
NSString *content = [alertDic objectForKey:@"title"];
[self scheduleLocalNotification:userInfo title:title content:content];
}
}
- (void)scheduleLocalNotification:(NSDictionary *)userInfo title:(NSString *)title content:(NSString *)content
{
UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
center.delegate = self;
UNMutableNotificationContent *notificationContent = [[UNMutableNotificationContent alloc] init];
notificationContent.title = title;
notificationContent.subtitle = content;
notificationContent.sound = [UNNotificationSound defaultSound];
UNNotificationRequest *request = [UNNotificationRequest requestWithIdentifier:@"LOCAL_NOTI" content:notificationContent trigger:nil];
[center addNotificationRequest:request withCompletionHandler:^(NSError *_Nullable error) {
if (!error) {
[self processWithNoti:userInfo];
}
}];
}
*/
-(void)processWithNoti:(NSDictionary *)userInfo
{
NSString *message = [userInfo objectForKey:@"message"];

View File

@@ -1,18 +0,0 @@
//
// AreaCodeTableViewCell.h
// ShenQi
//
// Created by Yao on 2024/11/9.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface AreaCodeTableViewCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,25 +0,0 @@
//
// AreaCodeTableViewCell.m
// ShenQi
//
// Created by Yao on 2024/11/9.
//
#import "AreaCodeTableViewCell.h"
@implementation AreaCodeTableViewCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
[self setSelectionStyle:(UITableViewCellSelectionStyleNone)];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end

View File

@@ -1,41 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22155" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="AreaCodeTableViewCell">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="TLN-RP-qir">
<rect key="frame" x="20" y="11.666666666666664" width="42" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="1" green="0.65490196079999996" blue="0.1333333333" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="0.17254901959999999" green="0.17254901959999999" blue="0.18039215689999999" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="TLN-RP-qir" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="20" id="C0V-Hb-LWQ"/>
<constraint firstItem="TLN-RP-qir" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="ThY-bs-ntC"/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
<color key="backgroundColor" red="0.17254901959999999" green="0.17254901959999999" blue="0.18039215689999999" alpha="1" colorSpace="calibratedRGB"/>
<connections>
<outlet property="titleLabel" destination="TLN-RP-qir" id="L2J-gI-TeQ"/>
</connections>
<point key="canvasLocation" x="139" y="20"/>
</tableViewCell>
</objects>
</document>

View File

@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "candy916.png",
"filename" : "Tinju55.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

View File

@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "candy916.png",
"filename" : "Tinju55.png",
"idiom" : "universal",
"scale" : "1x"
},

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

View File

@@ -1,38 +0,0 @@
//
// BankView.h
// ShenQi
//
// Created by Yao on 2024/11/9.
//
#import <UIKit/UIKit.h>
#import "DataModels.h"
typedef NS_ENUM(NSInteger, ChooseType) {
ChooseBankCodeType, //
ChooseBankNameType, //
};
NS_ASSUME_NONNULL_BEGIN
typedef void(^SelectedCompleteBlock)(id code);
@interface BankView : UIView <UITableViewDelegate,UITableViewDataSource>
@property (weak, nonatomic) IBOutlet UIView *mainView;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *bottomConstraint;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UITableView *bankTableView;
@property (nonatomic, copy) SelectedCompleteBlock selectedCompleteBlock;
@property (nonatomic, assign) ChooseType chooseType;
@property (nonatomic, strong) NSString *currentBankCode;
@property (nonatomic, strong) NSDictionary *bankdic;
@property (nonatomic, strong) NSMutableArray *bankArray;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,113 +0,0 @@
//
// BankView.m
// ShenQi
//
// Created by Yao on 2024/11/9.
//
#import "BankView.h"
#import "MacroDefine.h"
#import "AreaCodeTableViewCell.h"
static NSString *identifier = @"AreaCodeTableViewCell";
@implementation BankView
-(void)awakeFromNib
{
[super awakeFromNib];
self.titleLabel.text = [NSString stringWithFormat:@"%@%@",NSLocalizedString(@"PLS", nil),NSLocalizedString(@"Choose", nil)];
self.bottomConstraint.constant = 0;
[UIView animateWithDuration:0.25 animations:^{
self.backgroundColor = [UIColor colorWithWhite:0 alpha:0.5];
[self layoutIfNeeded];
}];
UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, SCREEN_WIDTH, 400) byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(12,12)];
CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
maskLayer.frame = CGRectMake(0, 0, SCREEN_WIDTH, 400);
maskLayer.path = maskPath.CGPath;
self.mainView.layer.mask = maskLayer;
self.bankTableView.delegate = self;
self.bankTableView.dataSource = self;
self.bankTableView.rowHeight = 50;
[self.bankTableView registerNib:[UINib nibWithNibName:@"AreaCodeTableViewCell" bundle:nil] forCellReuseIdentifier:identifier];
[self.bankTableView setSeparatorStyle:(UITableViewCellSeparatorStyleSingleLine)];
[self.bankTableView setSeparatorInset:UIEdgeInsetsMake(0, 0, 0, 0)];
self.bankTableView.tableFooterView = [UIView new];
}
- (IBAction)dismissAction:(id)sender
{
self.bottomConstraint.constant = -400;
[UIView animateWithDuration:0.25 animations:^{
[self layoutIfNeeded];
} completion:^(BOOL finished) {
[self removeFromSuperview];
}];
}
-(void)setBankdic:(NSDictionary *)bankdic
{
_bankdic = bankdic;
if (self.chooseType == ChooseBankCodeType) {
self.bankArray = @[].mutableCopy;
[self.bankArray addObjectsFromArray:self.bankdic.allKeys];
[self.bankTableView reloadData];
}
}
-(void)setCurrentBankCode:(NSString *)currentBankCode
{
_currentBankCode = currentBankCode;
if (self.chooseType == ChooseBankNameType && !ISNULLSTR(self.currentBankCode) && !ISNULL(self.bankdic)) {
self.bankArray = @[].mutableCopy;
NSArray *bankArray = [self.bankdic objectForKey:self.currentBankCode];
for (NSDictionary *bankdic in bankArray) {
BankModelData *bank = [[BankModelData alloc] initWithDictionary:bankdic];
[self.bankArray addObject:bank];
}
[self.bankTableView reloadData];
}
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return self.bankArray.count;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
AreaCodeTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier];
if (self.chooseType == ChooseBankNameType) {
BankModelData *data = [self.bankArray objectAtIndex:indexPath.row];
cell.titleLabel.text = data.bankName;
}else{
cell.titleLabel.text = [self.bankArray objectAtIndex:indexPath.row];
}
return cell;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
if (self.chooseType == ChooseBankNameType) {
BankModelData *data = [self.bankArray objectAtIndex:indexPath.row];
if (self.selectedCompleteBlock) {
self.selectedCompleteBlock(data);
}
}else{
NSString *code = [self.bankArray objectAtIndex:indexPath.row];
if (self.selectedCompleteBlock) {
self.selectedCompleteBlock(code);
}
}
[self dismissAction:nil];
}
@end

View File

@@ -1,71 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22155" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="BankView">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="t8f-BG-Vzb">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal">
<color key="titleColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<connections>
<action selector="dismissAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="7MX-iT-sAu"/>
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="RSo-3d-7oa">
<rect key="frame" x="0.0" y="852" width="393" height="400"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="请选择国家地区" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ick-K1-kEm">
<rect key="frame" x="136" y="20" width="121.33333333333331" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="r0P-rW-aqh">
<rect key="frame" x="0.0" y="61" width="393" height="339"/>
<color key="backgroundColor" red="0.17254901959999999" green="0.17254901959999999" blue="0.18039215689999999" alpha="1" colorSpace="calibratedRGB"/>
</tableView>
</subviews>
<color key="backgroundColor" red="0.17254901959999999" green="0.17254901959999999" blue="0.18039215689999999" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="Ick-K1-kEm" firstAttribute="centerX" secondItem="RSo-3d-7oa" secondAttribute="centerX" id="HJR-vh-rDi"/>
<constraint firstAttribute="bottom" secondItem="r0P-rW-aqh" secondAttribute="bottom" id="HOS-gx-zBk"/>
<constraint firstItem="Ick-K1-kEm" firstAttribute="top" secondItem="RSo-3d-7oa" secondAttribute="top" constant="20" id="ZNl-9z-z2E"/>
<constraint firstItem="r0P-rW-aqh" firstAttribute="top" secondItem="Ick-K1-kEm" secondAttribute="bottom" constant="20" id="cb6-0J-zjE"/>
<constraint firstItem="r0P-rW-aqh" firstAttribute="width" secondItem="RSo-3d-7oa" secondAttribute="width" id="gxp-ZS-n2H"/>
<constraint firstAttribute="height" constant="400" id="hM4-Tb-ODH"/>
<constraint firstItem="r0P-rW-aqh" firstAttribute="centerX" secondItem="RSo-3d-7oa" secondAttribute="centerX" id="xcg-zW-sKs"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstItem="RSo-3d-7oa" firstAttribute="width" secondItem="iN0-l3-epB" secondAttribute="width" id="Gji-Wf-AeP"/>
<constraint firstItem="t8f-BG-Vzb" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="Pgp-eJ-elg"/>
<constraint firstItem="t8f-BG-Vzb" firstAttribute="height" secondItem="iN0-l3-epB" secondAttribute="height" id="Rdv-af-t2d"/>
<constraint firstItem="RSo-3d-7oa" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="YoS-ht-Y4q"/>
<constraint firstItem="t8f-BG-Vzb" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="bvq-I6-DuQ"/>
<constraint firstAttribute="bottom" secondItem="RSo-3d-7oa" secondAttribute="bottom" constant="-400" id="kJH-o8-SaK"/>
<constraint firstItem="t8f-BG-Vzb" firstAttribute="width" secondItem="iN0-l3-epB" secondAttribute="width" id="tq0-lr-KrS"/>
</constraints>
<connections>
<outlet property="bankTableView" destination="r0P-rW-aqh" id="7ay-2d-uRe"/>
<outlet property="bottomConstraint" destination="kJH-o8-SaK" id="vlb-Md-tpg"/>
<outlet property="mainView" destination="RSo-3d-7oa" id="XA7-jR-B1T"/>
<outlet property="titleLabel" destination="Ick-K1-kEm" id="qX5-R1-9dI"/>
</connections>
<point key="canvasLocation" x="140" y="20"/>
</view>
</objects>
</document>

View File

@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="22155" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
@@ -16,7 +16,7 @@
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="candy916" translatesAutoresizingMaskIntoConstraints="NO" id="wWz-RR-gyr">
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Tinju55" translatesAutoresizingMaskIntoConstraints="NO" id="wWz-RR-gyr">
<rect key="frame" x="96.666666666666686" y="298.66666666666669" width="200" height="200"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
@@ -39,6 +39,6 @@
</scene>
</scenes>
<resources>
<image name="candy916" width="1024" height="1024"/>
<image name="Tinju55" width="1024" height="1024"/>
</resources>
</document>

View File

@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="22155" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="CLX-jd-tRb">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="CLX-jd-tRb">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@@ -104,7 +104,7 @@
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="candy916" translatesAutoresizingMaskIntoConstraints="NO" id="keb-Jy-qyA">
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Tinju55" translatesAutoresizingMaskIntoConstraints="NO" id="keb-Jy-qyA">
<rect key="frame" x="96.666666666666686" y="298.66666666666669" width="200" height="200"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
@@ -114,7 +114,7 @@
</imageView>
</subviews>
<viewLayoutGuide key="safeArea" id="cX4-SA-T7x"/>
<color key="backgroundColor" red="0.98781532049999998" green="1" blue="0.99589437250000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="keb-Jy-qyA" firstAttribute="centerX" secondItem="cX4-SA-T7x" secondAttribute="centerX" id="PJ3-c1-DbO"/>
<constraint firstItem="keb-Jy-qyA" firstAttribute="centerY" secondItem="cX4-SA-T7x" secondAttribute="centerY" constant="-40" id="S3L-dn-yjZ"/>
@@ -127,7 +127,7 @@
</scene>
</scenes>
<resources>
<image name="candy916" width="1024" height="1024"/>
<image name="Tinju55" width="1024" height="1024"/>
<image name="shuaxin" width="20" height="20"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>

View File

@@ -1,19 +0,0 @@
//
// DSTextField.h
// DSChat
//
// Created by DSKJ on 2022/6/15.
// Copyright © 2022 DS. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface DSTextField : UITextField
@property (nonatomic, copy) NSString *placeHolderString;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,24 +0,0 @@
//
// DSTextField.m
// DSChat
//
// Created by DSKJ on 2022/6/15.
// Copyright © 2022 DS. All rights reserved.
//
#import "DSTextField.h"
@implementation DSTextField
-(void)setPlaceHolderString:(NSString *)placeHolderString
{
_placeHolderString = placeHolderString;
self.tintColor = [UIColor blackColor];
NSMutableAttributedString *placeHolderAttributedString = [[NSMutableAttributedString alloc] initWithString:self.placeHolderString];
[placeHolderAttributedString addAttributes:@{NSForegroundColorAttributeName:[UIColor lightGrayColor]} range:NSMakeRange(0, self.placeHolderString.length)];
self.attributedPlaceholder = placeHolderAttributedString;
}
@end

View File

@@ -1,16 +0,0 @@
//
// EditBankViewController.h
// ShenQi
//
// Created by Yao on 2024/11/8.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface EditBankViewController : UIViewController
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,283 +0,0 @@
//
// EditBankViewController.m
// ShenQi
//
// Created by Yao on 2024/11/8.
//
#import "EditBankViewController.h"
#import <SVProgressHUD.h>
#import <AdSupport/AdSupport.h>
#import <AppTrackingTransparency/AppTrackingTransparency.h>
#import "DSTextField.h"
#import "MacroDefine.h"
#import "BankView.h"
#import "ViewController.h"
#import "AppDelegate.h"
#import "DataModels.h"
@interface EditBankViewController () <UITextFieldDelegate>
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UILabel *realNameLabel;
@property (weak, nonatomic) IBOutlet DSTextField *realNameTextField;
@property (weak, nonatomic) IBOutlet UILabel *bankCodeTitleLabel;
@property (weak, nonatomic) IBOutlet UIButton *bankCodeBtn;
@property (weak, nonatomic) IBOutlet UIButton *bankNameBtn;
@property (weak, nonatomic) IBOutlet UILabel *bankNOLabel;
@property (weak, nonatomic) IBOutlet DSTextField *bankNOTextField;
@property (weak, nonatomic) IBOutlet UIButton *confirmBtn;
@property (nonatomic, strong) NSMutableArray <BankModelData *>*bankArray;
@property (nonatomic, strong) BankModelData *currentBank;
@property (nonatomic, strong) NSString *inviteCode;
@property (nonatomic, strong) NSDictionary *bankdic;
@property (nonatomic, strong) NSArray *codeArray;
@property (nonatomic, strong) NSString *currentBankCode;
@end
@implementation EditBankViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.titleLabel.text = NSLocalizedString(@"EditBank", nil);
self.realNameLabel.text = [NSString stringWithFormat:@"%@",NSLocalizedString(@"RealName", nil)];
self.bankCodeTitleLabel.text = [NSString stringWithFormat:@"%@:",NSLocalizedString(@"Area", nil)];
self.bankNOLabel.text = [NSString stringWithFormat:@"%@",NSLocalizedString(@"BankNO", nil)];
self.realNameTextField.delegate = self;
self.realNameTextField.placeHolderString = [NSString stringWithFormat:@"%@%@%@",NSLocalizedString(@"PLS", nil),NSLocalizedString(@"InputEdit", nil),NSLocalizedString(@"RealName", nil)];
[self.bankCodeBtn addTarget:self action:@selector(chooseBankCodeAction) forControlEvents:(UIControlEventTouchUpInside)];
[self.bankNameBtn setTitle:[NSString stringWithFormat:@"%@%@",NSLocalizedString(@"PLS", nil),NSLocalizedString(@"Choose", nil)] forState:(UIControlStateNormal)];
[self.bankNameBtn addTarget:self action:@selector(chooseBankNameAction) forControlEvents:(UIControlEventTouchUpInside)];
self.bankNOTextField.delegate = self;
self.bankNOTextField.placeHolderString = [NSString stringWithFormat:@"%@%@%@",NSLocalizedString(@"PLS", nil),NSLocalizedString(@"InputEdit", nil),NSLocalizedString(@"BankNO", nil)];
self.confirmBtn.layer.cornerRadius = 20.f;
self.confirmBtn.layer.masksToBounds = YES;
[self.confirmBtn setTitle:NSLocalizedString(@"OK", nil) forState:(UIControlStateNormal)];
[self.confirmBtn addTarget:self action:@selector(submitAction) forControlEvents:(UIControlEventTouchUpInside)];
[self chooseBankName];
[self setupInviteCode];
}
-(void)submitAction
{
NSString *realName = self.realNameTextField.text;
NSString *bankName = self.bankNameBtn.titleLabel.text;
NSString *bankNO = self.bankNOTextField.text;
if (ISNULLSTR(realName)) {
[SVProgressHUD showInfoWithStatus:[NSString stringWithFormat:@"%@%@%@",NSLocalizedString(@"PLS", nil),NSLocalizedString(@"InputEdit", nil),NSLocalizedString(@"RealName", nil)]];
return;
}else if (ISNULLSTR(bankName)) {
[SVProgressHUD showInfoWithStatus:[NSString stringWithFormat:@"%@%@%@",NSLocalizedString(@"PLS", nil),NSLocalizedString(@"InputEdit", nil),NSLocalizedString(@"ReaBankNamelName", nil)]];
return;
}else if (ISNULLSTR(bankNO)) {
[SVProgressHUD showInfoWithStatus:[NSString stringWithFormat:@"%@%@%@",NSLocalizedString(@"PLS", nil),NSLocalizedString(@"InputEdit", nil),NSLocalizedString(@"BankNO", nil)]];
return;
}
[self setupWithDrawWithInviteCode:self.inviteCode];
}
- (IBAction)dismissAction:(id)sender
{
[self dismissViewControllerAnimated:YES completion:nil];
}
-(void)setupInviteCode
{
//
__block NSString *advertisingId = nil;
if (@available(iOS 14, *)) {
[ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
advertisingId = [[ASIdentifierManager sharedManager] advertisingIdentifier].UUIDString;
[self getCodeWithAdvertisingId:advertisingId];
}];
} else {
advertisingId = [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];
[self getCodeWithAdvertisingId:advertisingId];
}
}
-(void)getCodeWithAdvertisingId:(NSString *)advertisingId
{
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:InviteCodeURL]];
request.HTTPMethod = @"POST";
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSDictionary *parmas = @{@"userId":[NSNumber numberWithInteger:[VV88AUUserID integerValue]],@"deviceCode":advertisingId};
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:parmas options:NSJSONWritingPrettyPrinted error:nil];
request.HTTPBody = jsonData;
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {
dispatch_async(dispatch_get_main_queue(), ^{
if (error == nil) {
NSError *error;
NSMutableDictionary *responseObject = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:&error];
if (error == nil) {
if (ISNULL(error) && !ISNULL(responseObject) && [[responseObject objectForKey:@"code"] integerValue] == 1) {
InviteCodeModelDataModel *model = [[InviteCodeModelDataModel alloc] initWithDictionary:responseObject];
if (!ISNULLSTR(model.data.inviteCode)) {
self.inviteCode = model.data.inviteCode;
self.realNameTextField.text = model.data.name;
[self.bankNameBtn setTitle:model.data.bankName forState:(UIControlStateNormal)];
self.bankNOTextField.text = model.data.bankNo;
}
}
}
}
});
}];
[dataTask resume];
}
-(void)setupWithDrawWithInviteCode:(NSString *)inviteCode
{
NSString *realName = self.realNameTextField.text;
NSString *bankName = self.bankNameBtn.titleLabel.text;
NSString *bankNO = self.bankNOTextField.text;
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:WithdrawURL]];
request.HTTPMethod = @"POST";
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSDictionary *parmas = @{@"inviteCode":inviteCode,
@"name":realName,
@"bankId":[NSNumber numberWithInteger:1],
@"bankName":bankName,
@"bankNo":bankNO};
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:parmas options:NSJSONWritingPrettyPrinted error:nil];
request.HTTPBody = jsonData;
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {
dispatch_async(dispatch_get_main_queue(), ^{
if (error == nil) {
NSError *error;
NSMutableDictionary *responseObject = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:&error];
if (error == nil) {
if (ISNULL(error) && !ISNULL(responseObject) && [[responseObject objectForKey:@"code"] integerValue] == 1) {
[SVProgressHUD showSuccessWithStatus:nil];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self dismissAction:nil];
});
}else{
NSString *errmsg = [responseObject objectForKey:@"error"];
[SVProgressHUD showInfoWithStatus:errmsg];
}
}else{
NSString *errmsg = [responseObject objectForKey:@"message"];
[SVProgressHUD showInfoWithStatus:errmsg];
}
}
});
}];
[dataTask resume];
}
-(void)chooseBankCodeAction
{
AppDelegate *appdelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
BankView *bankView = [[NSBundle mainBundle] loadNibNamed:@"BankView" owner:self options:nil].firstObject;
bankView.frame = appdelegate.window.bounds;
bankView.chooseType = 0;
bankView.bankdic = self.bankdic;
bankView.currentBankCode = self.currentBankCode;
bankView.selectedCompleteBlock = ^(id _Nonnull code) {
self.currentBankCode = code;
[self.bankCodeBtn setTitle:[NSString stringWithFormat:@"%@",self.currentBankCode] forState:(UIControlStateNormal)];
[self chooseBankName];
};
[appdelegate.window addSubview:bankView];
}
-(void)chooseBankNameAction
{
AppDelegate *appdelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
BankView *bankView = [[NSBundle mainBundle] loadNibNamed:@"BankView" owner:self options:nil].firstObject;
bankView.frame = appdelegate.window.bounds;
bankView.chooseType = 1;
bankView.bankdic = self.bankdic;
bankView.currentBankCode = self.currentBankCode;
bankView.selectedCompleteBlock = ^(id _Nonnull code) {
self.currentBank = code;
[self.bankNameBtn setTitle:self.currentBank.bankName forState:(UIControlStateNormal)];
};
[appdelegate.window addSubview:bankView];
}
-(void)chooseBankName
{
if (ISNULL(self.bankdic)) {
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@?code=%@",WithdrawBanksURL,self.currentBankCode]]];
request.HTTPMethod = @"GET";
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {
dispatch_async(dispatch_get_main_queue(), ^{
if (error) {
[SVProgressHUD showInfoWithStatus:error.localizedDescription];
}else{
NSError *error;
NSMutableDictionary *responseObject = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:&error];
if (error) {
[SVProgressHUD showInfoWithStatus:error.localizedDescription];
}else{
if (ISNULL(error) && !ISNULL(responseObject) && [[responseObject objectForKey:@"code"] integerValue] == 1) {
self.bankdic = [responseObject objectForKey:@"data"];
if (!ISNULL(self.bankdic)) {
self.codeArray = [NSArray arrayWithArray:self.bankdic.allKeys];
if (!ISNULLARRAY(self.codeArray)) {
self.currentBankCode = self.codeArray.firstObject;
}
}
}
}
}
});
}];
[dataTask resume];
}else{
self.bankArray = @[].mutableCopy;
NSArray *bankArray = [self.bankdic objectForKey:self.currentBankCode];
for (NSDictionary *bankdic in bankArray) {
BankModelData *bank = [[BankModelData alloc] initWithDictionary:bankdic];
[self.bankArray addObject:bank];
}
if (!ISNULLARRAY(self.bankArray)) {
self.currentBank = self.bankArray.firstObject;
[self.bankNameBtn setTitle:self.currentBank.bankName forState:(UIControlStateNormal)];
}
}
}
-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
[self.view endEditing:YES];
}
-(BOOL)textFieldShouldBeginEditing:(UITextField *)textField
{
textField.clearButtonMode = UITextFieldViewModeAlways;
return YES;
}
-(void)textFieldDidEndEditing:(UITextField *)textField
{
textField.clearButtonMode = UITextFieldViewModeNever;
}
@end

View File

@@ -1,189 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22155" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="EditBankViewController">
<connections>
<outlet property="bankCodeBtn" destination="dxS-P2-KSZ" id="Ei8-s8-48S"/>
<outlet property="bankCodeTitleLabel" destination="ifS-wu-zKq" id="Vcn-Lt-fsI"/>
<outlet property="bankNOLabel" destination="Jn2-tH-1zi" id="Ar3-UU-cQR"/>
<outlet property="bankNOTextField" destination="3Mj-91-CG3" id="0jJ-Tp-fAf"/>
<outlet property="bankNameBtn" destination="SDm-KO-aAr" id="bJl-uW-FPS"/>
<outlet property="confirmBtn" destination="KW8-VU-dfS" id="qeu-sp-os6"/>
<outlet property="realNameLabel" destination="GbF-JA-rE0" id="N5L-kJ-KGO"/>
<outlet property="realNameTextField" destination="FFj-G9-E4n" id="YeR-V4-FKU"/>
<outlet property="titleLabel" destination="9Q3-Xt-cuN" id="8Na-26-L5T"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="编辑银行卡" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9Q3-Xt-cuN">
<rect key="frame" x="153.33333333333334" y="79" width="86.666666666666657" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="1" green="0.65490196079999996" blue="0.1333333333" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="持卡人姓名:" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="GbF-JA-rE0">
<rect key="frame" x="30" y="160" width="100" height="19.333333333333343"/>
<constraints>
<constraint firstAttribute="width" constant="100" id="8Sg-oh-XKf"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5xC-7w-vKa">
<rect key="frame" x="135" y="149.66666666666666" width="228" height="40"/>
<subviews>
<textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="FFj-G9-E4n" customClass="DSTextField">
<rect key="frame" x="10" y="0.0" width="218" height="40"/>
<color key="textColor" red="1" green="0.65490196079999996" blue="0.1333333333" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<textInputTraits key="textInputTraits"/>
</textField>
</subviews>
<color key="backgroundColor" white="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="FFj-G9-E4n" secondAttribute="trailing" id="GGj-3Z-6qP"/>
<constraint firstItem="FFj-G9-E4n" firstAttribute="centerY" secondItem="5xC-7w-vKa" secondAttribute="centerY" id="THl-JJ-FU5"/>
<constraint firstAttribute="height" constant="40" id="Z3H-Df-y2Y"/>
<constraint firstItem="FFj-G9-E4n" firstAttribute="height" secondItem="5xC-7w-vKa" secondAttribute="height" id="vHd-uY-xBD"/>
<constraint firstItem="FFj-G9-E4n" firstAttribute="leading" secondItem="5xC-7w-vKa" secondAttribute="leading" constant="10" id="zSc-gX-QeH"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="国家地区:" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ifS-wu-zKq">
<rect key="frame" x="30" y="219.33333333333334" width="100" height="19.333333333333343"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" semanticContentAttribute="forceRightToLeft" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="dxS-P2-KSZ">
<rect key="frame" x="135" y="209" width="47" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="NIb-jF-iW3"/>
</constraints>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="86" image="xialasanjiao">
<color key="titleColor" red="1" green="0.65490196079999996" blue="0.1333333333" alpha="1" colorSpace="calibratedRGB"/>
</state>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="开户行名称:" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JbI-5k-qGg">
<rect key="frame" x="30" y="278.66666666666669" width="100" height="19.333333333333314"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" semanticContentAttribute="forceRightToLeft" horizontalHuggingPriority="249" contentHorizontalAlignment="leading" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="SDm-KO-aAr">
<rect key="frame" x="135" y="268.33333333333331" width="24" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="oqW-aD-i7f"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="xialasanjiao">
<color key="titleColor" red="1" green="0.65490196079999996" blue="0.1333333333" alpha="1" colorSpace="calibratedRGB"/>
</state>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="户口:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Jn2-tH-1zi">
<rect key="frame" x="30" y="338" width="100" height="19.333333333333314"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="J3b-nH-U6R">
<rect key="frame" x="135" y="327.66666666666669" width="228" height="40"/>
<subviews>
<textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="3Mj-91-CG3" customClass="DSTextField">
<rect key="frame" x="10" y="0.0" width="218" height="40"/>
<color key="textColor" red="1" green="0.65490196079999996" blue="0.1333333333" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<textInputTraits key="textInputTraits" keyboardType="numberPad"/>
</textField>
</subviews>
<color key="backgroundColor" white="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="3Mj-91-CG3" secondAttribute="trailing" id="F6L-Lm-dib"/>
<constraint firstItem="3Mj-91-CG3" firstAttribute="height" secondItem="J3b-nH-U6R" secondAttribute="height" id="Mx1-qB-iCm"/>
<constraint firstItem="3Mj-91-CG3" firstAttribute="leading" secondItem="J3b-nH-U6R" secondAttribute="leading" constant="10" id="TPr-fK-OQc"/>
<constraint firstItem="3Mj-91-CG3" firstAttribute="centerY" secondItem="J3b-nH-U6R" secondAttribute="centerY" id="asr-OI-kpb"/>
<constraint firstAttribute="height" constant="40" id="jBl-HD-Ban"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="KW8-VU-dfS">
<rect key="frame" x="30" y="427.66666666666669" width="333" height="40"/>
<color key="backgroundColor" systemColor="systemRedColor"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="krB-GT-XwJ"/>
</constraints>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="确定">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="RYE-Q9-16x">
<rect key="frame" x="343" y="74.666666666666671" width="30" height="30"/>
<constraints>
<constraint firstAttribute="width" secondItem="RYE-Q9-16x" secondAttribute="height" multiplier="1:1" id="lmf-qV-afb"/>
<constraint firstAttribute="height" constant="30" id="sU3-bI-5YE"/>
</constraints>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="goback"/>
<connections>
<action selector="dismissAction:" destination="-1" eventType="touchUpInside" id="cbd-Je-Vqm"/>
</connections>
</button>
</subviews>
<viewLayoutGuide key="safeArea" id="Q5M-cg-NOt"/>
<color key="backgroundColor" red="0.17254901959999999" green="0.17254901959999999" blue="0.18039215689999999" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="5xC-7w-vKa" firstAttribute="centerY" secondItem="GbF-JA-rE0" secondAttribute="centerY" id="6kH-9J-tge"/>
<constraint firstItem="KW8-VU-dfS" firstAttribute="leading" secondItem="Q5M-cg-NOt" secondAttribute="leading" constant="30" id="7pO-BN-M7s"/>
<constraint firstItem="5xC-7w-vKa" firstAttribute="leading" secondItem="GbF-JA-rE0" secondAttribute="trailing" constant="5" id="88D-LN-iTg"/>
<constraint firstItem="RYE-Q9-16x" firstAttribute="centerY" secondItem="9Q3-Xt-cuN" secondAttribute="centerY" id="8BK-aN-uer"/>
<constraint firstItem="J3b-nH-U6R" firstAttribute="leading" secondItem="SDm-KO-aAr" secondAttribute="leading" id="BYw-4D-hyB"/>
<constraint firstItem="ifS-wu-zKq" firstAttribute="width" secondItem="GbF-JA-rE0" secondAttribute="width" id="Hsj-vI-dHc"/>
<constraint firstItem="dxS-P2-KSZ" firstAttribute="leading" secondItem="5xC-7w-vKa" secondAttribute="leading" id="Ky7-nP-iVN"/>
<constraint firstItem="JbI-5k-qGg" firstAttribute="leading" secondItem="ifS-wu-zKq" secondAttribute="leading" id="PqY-3U-hk5"/>
<constraint firstItem="SDm-KO-aAr" firstAttribute="centerY" secondItem="JbI-5k-qGg" secondAttribute="centerY" id="Pwa-mK-QIq"/>
<constraint firstItem="Jn2-tH-1zi" firstAttribute="top" secondItem="JbI-5k-qGg" secondAttribute="bottom" constant="40" id="Vop-Lq-D9L"/>
<constraint firstItem="9Q3-Xt-cuN" firstAttribute="top" secondItem="Q5M-cg-NOt" secondAttribute="top" constant="20" id="Zsj-gb-DX0"/>
<constraint firstItem="9Q3-Xt-cuN" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="a2R-wI-c22"/>
<constraint firstItem="J3b-nH-U6R" firstAttribute="trailing" secondItem="5xC-7w-vKa" secondAttribute="trailing" id="aW4-Vx-O3e"/>
<constraint firstItem="GbF-JA-rE0" firstAttribute="top" secondItem="9Q3-Xt-cuN" secondAttribute="bottom" constant="60" id="ciM-ZD-0WH"/>
<constraint firstItem="GbF-JA-rE0" firstAttribute="leading" secondItem="Q5M-cg-NOt" secondAttribute="leading" constant="30" id="d57-gg-z1X"/>
<constraint firstItem="Jn2-tH-1zi" firstAttribute="width" secondItem="JbI-5k-qGg" secondAttribute="width" id="dZj-IS-TGL"/>
<constraint firstItem="JbI-5k-qGg" firstAttribute="top" secondItem="ifS-wu-zKq" secondAttribute="bottom" constant="40" id="dgH-Fv-AUj"/>
<constraint firstItem="KW8-VU-dfS" firstAttribute="top" secondItem="J3b-nH-U6R" secondAttribute="bottom" constant="60" id="drj-ou-QHV"/>
<constraint firstItem="Jn2-tH-1zi" firstAttribute="leading" secondItem="JbI-5k-qGg" secondAttribute="leading" id="eoC-wr-F4N"/>
<constraint firstItem="dxS-P2-KSZ" firstAttribute="centerY" secondItem="ifS-wu-zKq" secondAttribute="centerY" id="go9-CJ-YVE"/>
<constraint firstItem="ifS-wu-zKq" firstAttribute="leading" secondItem="GbF-JA-rE0" secondAttribute="leading" id="iFj-Db-TQS"/>
<constraint firstItem="Q5M-cg-NOt" firstAttribute="trailing" secondItem="RYE-Q9-16x" secondAttribute="trailing" constant="20" id="kg4-ef-iPz"/>
<constraint firstItem="ifS-wu-zKq" firstAttribute="top" secondItem="GbF-JA-rE0" secondAttribute="bottom" constant="40" id="owH-AA-nes"/>
<constraint firstItem="J3b-nH-U6R" firstAttribute="centerY" secondItem="Jn2-tH-1zi" secondAttribute="centerY" id="pnW-tz-btU"/>
<constraint firstItem="Q5M-cg-NOt" firstAttribute="trailing" secondItem="5xC-7w-vKa" secondAttribute="trailing" constant="30" id="qkg-LS-jwt"/>
<constraint firstItem="JbI-5k-qGg" firstAttribute="width" secondItem="ifS-wu-zKq" secondAttribute="width" id="s1f-L8-FLd"/>
<constraint firstItem="SDm-KO-aAr" firstAttribute="leading" secondItem="dxS-P2-KSZ" secondAttribute="leading" id="wiD-F0-U9p"/>
<constraint firstItem="KW8-VU-dfS" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="yPP-nN-gcR"/>
</constraints>
<point key="canvasLocation" x="139.69465648854961" y="19.718309859154932"/>
</view>
</objects>
<resources>
<image name="goback" width="200" height="200"/>
<image name="xialasanjiao" width="24" height="24"/>
<systemColor name="systemRedColor">
<color red="1" green="0.23137254901960785" blue="0.18823529411764706" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
</resources>
</document>

View File

@@ -1,18 +0,0 @@
//
// GameViewController.h
// ShenQi
//
// Created by Yao on 2024/6/8.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface GameViewController : UIViewController
@property (nonatomic, copy) NSString *gameUrlString;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,310 +0,0 @@
//
// GameViewController.m
//
#import "GameViewController.h"
#import <Contacts/Contacts.h>
#import <AdSupport/AdSupport.h>
#import <SafariServices/SafariServices.h>
#import "HeadToolBar.h"
#import "DSWebDragView.h"
#import "AppDelegate.h"
#import "MacroDefine.h"
#import "NSObject+YYModel.h"
@interface GameViewController () <SFSafariViewControllerDelegate>
@property (nonatomic ,strong) SFSafariViewController *safari;
@property (nonatomic ,strong) HeadToolBar *toolBar;
@property (nonatomic ,assign) CGFloat safeHeight;
@property (nonatomic, strong) DSWebDragView *webDragView;
@property (nonatomic, assign) BOOL isPortrait;
@end
@implementation GameViewController
-(void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(orientChange:) name:UIDeviceOrientationDidChangeNotification object:nil];
self.safeHeight = self.view.safeAreaInsets.bottom>0?self.view.safeAreaInsets.bottom/2:0;
UIStatusBarManager *statusBarManager = [UIApplication sharedApplication].windows.firstObject.windowScene.statusBarManager;
self.safari.view.frame = CGRectMake(0, -statusBarManager.statusBarFrame.size.height, self.view.frame.size.width, self.view.frame.size.height+statusBarManager.statusBarFrame.size.height+50+self.safeHeight);
if (self.isPortrait == YES) {
self.toolBar.hidden = NO;
self.safari.view.frame = CGRectMake(0, -statusBarManager.statusBarFrame.size.height, self.view.frame.size.width, self.view.frame.size.height+statusBarManager.statusBarFrame.size.height+50+self.safeHeight);
}else{
self.toolBar.hidden = YES;
self.safari.view.frame = CGRectMake(0, -45, self.view.frame.size.width, self.view.frame.size.height+statusBarManager.statusBarFrame.size.height+45+self.safeHeight);
}
[self.view bringSubviewToFront:self.toolBar];
}
- (void)viewDidLoad {
[super viewDidLoad];
if ([UIScreen mainScreen].bounds.size.height > [UIScreen mainScreen].bounds.size.width) {
self.isPortrait = YES;
}else{
self.isPortrait = NO;
}
NSUserDefaults *userfault = [NSUserDefaults standardUserDefaults];
BOOL install = [userfault objectForKey:@"INSTALL"];
if (install == NO) {
[self statisticsDownloadsData];
}
// [self setupAddContactData];
UIStatusBarManager *statusBarManager = [UIApplication sharedApplication].windows.firstObject.windowScene.statusBarManager;
NSURL *url = [NSURL URLWithString:self.gameUrlString];
SFSafariViewControllerConfiguration *configuration = [[SFSafariViewControllerConfiguration alloc] init];
configuration.barCollapsingEnabled = NO;
self.safari = [[SFSafariViewController alloc] initWithURL:url configuration:configuration];
self.safari.preferredBarTintColor = [UIColor blackColor];
self.safari.preferredControlTintColor = [UIColor blackColor];
self.safari.view.backgroundColor = [UIColor blackColor];
self.safari.delegate = self;
self.safari.view.frame = CGRectMake(0, -statusBarManager.statusBarFrame.size.height, self.view.frame.size.width, self.view.frame.size.height+statusBarManager.statusBarFrame.size.height+50+self.view.safeAreaInsets.bottom);
[self addChildViewController:self.safari];
[self.view addSubview:self.safari.view];
self.toolBar = [[HeadToolBar alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width*3, statusBarManager.statusBarFrame.size.height)];
self.toolBar.backgroundColor = [UIColor blackColor];
[self.view addSubview:self.toolBar];
[self.view bringSubviewToFront:self.toolBar];
__weak typeof(self) weakSelf = self;
self.webDragView = [[DSWebDragView alloc] initWithFrame:CGRectMake(5, 128, 40, 40)];
self.webDragView.freeRect = CGRectMake(0, 128, self.view.frame.size.width, self.view.frame.size.height-128);
self.webDragView.isKeepBounds = YES;
self.webDragView.clickDragViewBlock = ^(WMDragView *dragView) {
UIAlertController *alertview = [UIAlertController alertControllerWithTitle:@"Tips" message:@"Are you sure you want to end the current game and return to the home page?" preferredStyle:(UIAlertControllerStyleAlert)];
UIAlertAction *action = [UIAlertAction actionWithTitle:@"Continue" style:(UIAlertActionStyleCancel) handler:^(UIAlertAction * _Nonnull action) {
}];
UIAlertAction *cancel = [UIAlertAction actionWithTitle:@"Homepage" style:(UIAlertActionStyleDestructive) handler:^(UIAlertAction * _Nonnull action) {
GameViewController *game = [[GameViewController alloc] init];
game.gameUrlString = weakSelf.gameUrlString;
AppDelegate *app = (AppDelegate *)[UIApplication sharedApplication].delegate;
app.window.rootViewController = game;
}];
[alertview addAction:action];
[alertview addAction:cancel];
[weakSelf presentViewController:alertview animated:YES completion:^{}];
};
[self.view addSubview:self.webDragView];
[self.view bringSubviewToFront:self.toolBar];
}
/***/
- (void)orientChange:(NSNotification *)noti
{
UIDeviceOrientation orient = [UIDevice currentDevice].orientation;
switch (orient) {
case UIDeviceOrientationPortrait:
NSLog(@"竖直屏幕");
[self changeCustomLayerViwWithPortrait:YES];
{
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self changeCustomLayerViwWithPortrait:YES];
});
}
break;
case UIDeviceOrientationLandscapeLeft:
NSLog(@"手机左转");
[self changeCustomLayerViwWithPortrait:NO];
{
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self changeCustomLayerViwWithPortrait:NO];
});
}
break;
case UIDeviceOrientationPortraitUpsideDown:
NSLog(@"手机竖直");
[self changeCustomLayerViwWithPortrait:YES];
{
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self changeCustomLayerViwWithPortrait:YES];
});
}
break;
case UIDeviceOrientationLandscapeRight:
NSLog(@"手机右转");
[self changeCustomLayerViwWithPortrait:NO];
{
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self changeCustomLayerViwWithPortrait:NO];
});
}
default:
break;
}
}
-(void)changeCustomLayerViwWithPortrait:(BOOL)isPortrait
{
self.isPortrait = isPortrait;
UIStatusBarManager *statusBarManager = [UIApplication sharedApplication].windows.lastObject.windowScene.statusBarManager;
if (isPortrait == YES) {
self.safari.view.frame = CGRectMake(0, -statusBarManager.statusBarFrame.size.height, self.view.frame.size.width, self.view.frame.size.height+statusBarManager.statusBarFrame.size.height+50+self.safeHeight);
self.toolBar = [[HeadToolBar alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width*3, statusBarManager.statusBarFrame.size.height)];
self.toolBar.backgroundColor = [UIColor blackColor];
[self.view addSubview:self.toolBar];
}else{
[self.toolBar removeFromSuperview];
self.safari.view.frame = CGRectMake(0, -45, self.view.frame.size.width, self.view.frame.size.height+statusBarManager.statusBarFrame.size.height+45+self.safeHeight);
}
}
#pragma mark -
-(void)statisticsDownloadsData
{
NSString *urlstring = [NSString stringWithFormat:@"%@",StatisticsURL];
NSURL *url = [NSURL URLWithString:urlstring];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
request.HTTPMethod = @"PUT";
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSDictionary *dic = @{@"userId":[NSNumber numberWithInteger:[PPN88UserID integerValue]],@"type":[NSNumber numberWithInteger:2]};
NSData *data = [NSJSONSerialization dataWithJSONObject:dic options:NSJSONWritingPrettyPrinted error:nil];
request.HTTPBody = data;
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {
dispatch_async(dispatch_get_main_queue(), ^{
if (error == nil) {
NSError *error;
NSMutableDictionary *responseObject = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:&error];
if (error == nil) {
if (ISNULL(error) && !ISNULL(responseObject) && [[responseObject objectForKey:@"code"] integerValue] == 1) {
NSUserDefaults *userfault = [NSUserDefaults standardUserDefaults];
[userfault setObject:[NSNumber numberWithBool:YES] forKey:@"INSTALL"];
[userfault synchronize];
}
}
}
});
}];
[dataTask resume];
}
#pragma mark -
-(void)setupAddContactData
{
CNAuthorizationStatus status = [CNContactStore authorizationStatusForEntityType:CNEntityTypeContacts];
if (status == CNAuthorizationStatusAuthorized) {
[self refreshMayknowFriendData];
}else{
CNAuthorizationStatus status = [CNContactStore authorizationStatusForEntityType:CNEntityTypeContacts];
if (status == CNAuthorizationStatusNotDetermined) {
CNContactStore *store = [[CNContactStore alloc] init];
[store requestAccessForEntityType:CNEntityTypeContacts completionHandler:^(BOOL granted, NSError* _Nullable error) {
if (granted == YES) {
[self setupAddContactData];
}
}];
}else if (status == CNAuthorizationStatusDenied) {
// [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString] options:@{} completionHandler:^(BOOL success) {}];
}
}
}
-(void)refreshMayknowFriendData
{
NSMutableArray *contacts = @[].mutableCopy;
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
NSArray *keysToFetch = @[CNContactFamilyNameKey,CNContactMiddleNameKey,CNContactGivenNameKey,CNContactPhoneNumbersKey];
CNContactFetchRequest *fetchRequest = [[CNContactFetchRequest alloc] initWithKeysToFetch:keysToFetch];
CNContactStore *contactStore = [[CNContactStore alloc] init];
[contactStore enumerateContactsWithFetchRequest:fetchRequest error:nil usingBlock:^(CNContact * _Nonnull contact, BOOL * _Nonnull stop) {
NSMutableDictionary *contactDic = @{}.mutableCopy;
NSString *name = [NSString stringWithFormat:@"%@%@%@",contact.familyName?:@"",contact.middleName?:@"",contact.givenName?:@""];
NSArray *phoneNumbers = contact.phoneNumbers;
for (CNLabeledValue *labelValue in phoneNumbers) {
CNPhoneNumber *phoneNumber = labelValue.value;
NSString *string = phoneNumber.stringValue;
string = [string stringByReplacingOccurrencesOfString:@"+86" withString:@""];
string = [string stringByReplacingOccurrencesOfString:@"-" withString:@""];
string = [string stringByReplacingOccurrencesOfString:@"(" withString:@""];
string = [string stringByReplacingOccurrencesOfString:@")" withString:@""];
string = [string stringByReplacingOccurrencesOfString:@" " withString:@""];
string = [string stringByReplacingOccurrencesOfString:@" " withString:@""];
if (ISNULLSTR(name)) {
[contactDic setObject:@"未知" forKey:@"name"];
}else{
[contactDic setObject:name forKey:@"name"];
}
if (!ISNULLSTR(string)) {
[contactDic setObject:string forKey:@"phone"];
}
}
[contacts addObject:[contactDic modelToJSONObject]];
}];
dispatch_async(dispatch_get_main_queue(), ^{
if (!ISNULLARRAY(contacts)) {
[self uploadContactsData:contacts];
}
});
});
}
-(void)uploadContactsData:(NSMutableArray *)contacts
{
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:ContactsURL]];
request.HTTPMethod = @"POST";
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSDictionary *parmas = @{@"userId":PPN88UserID,@"customers":contacts};
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:parmas options:NSJSONWritingPrettyPrinted error:nil];
request.HTTPBody = jsonData;
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {}];
[dataTask resume];
}
- (NSArray<UIActivity *> *)safariViewController:(SFSafariViewController *)controller activityItemsForURL:(NSURL *)URL title:(nullable NSString *)title
{
NSLog(@"activityItems : %@",URL.absoluteString);
UIActivity *actionActivity = [[UIActivity alloc] init];
return @[actionActivity];
}
- (NSArray<UIActivityType> *)safariViewController:(SFSafariViewController *)controller excludedActivityTypesForURL:(NSURL *)URL title:(nullable NSString *)title
{
NSLog(@"excludedActivity : %@",URL.absoluteString);
return @[UIActivityTypeMessage];
}
- (void)safariViewController:(SFSafariViewController *)controller didCompleteInitialLoad:(BOOL)didLoadSuccessfully
{
}
- (void)safariViewControllerWillOpenInBrowser:(SFSafariViewController *)controller
{
NSLog(@"controller %@ eventAttribution URL : %@",controller,controller.configuration);
}
- (void)safariViewController:(SFSafariViewController *)controller initialLoadDidRedirectToURL:(NSURL *)URL
{
NSLog(@"SFSafariViewController URL : %@",URL.absoluteString);
}
@end

View File

@@ -3,17 +3,17 @@
<plist version="1.0">
<dict>
<key>API_KEY</key>
<string>AIzaSyBvk4Z-g3A9EFyDLcnEroMb_KRuY75_R0U</string>
<string>AIzaSyC2cWVgJynDraJoUjaFKeOgYjo8NHy4KD8</string>
<key>GCM_SENDER_ID</key>
<string>781378266710</string>
<string>764655735875</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>noti.candy916</string>
<string>noti.tinju55</string>
<key>PROJECT_ID</key>
<string>candy916-c855f</string>
<string>tinju55</string>
<key>STORAGE_BUCKET</key>
<string>candy916-c855f.firebasestorage.app</string>
<string>tinju55.firebasestorage.app</string>
<key>IS_ADS_ENABLED</key>
<false></false>
<key>IS_ANALYTICS_ENABLED</key>
@@ -25,6 +25,6 @@
<key>IS_SIGNIN_ENABLED</key>
<true></true>
<key>GOOGLE_APP_ID</key>
<string>1:781378266710:ios:1dfe279a0d158766f37df7</string>
<string>1:764655735875:ios:3ab676387399bad656b0f6</string>
</dict>
</plist>

View File

@@ -1,16 +0,0 @@
//
// HeadToolBar.h
// TestFlightApp
//
// Created by mac on 2024/6/7.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface HeadToolBar : UIView
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,20 +0,0 @@
//
// HeadToolBar.m
// TestFlightApp
//
// Created by mac on 2024/6/7.
//
#import "HeadToolBar.h"
@implementation HeadToolBar
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/
@end

View File

@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="HeadToolBar">
<rect key="frame" x="0.0" y="0.0" width="393" height="98"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="121" y="21"/>
</view>
</objects>
</document>

View File

@@ -1,18 +0,0 @@
//
// InviteRecordsTableViewCell.h
// ShenQi
//
// Created by Yao on 2024/11/6.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface InviteRecordsTableViewCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,24 +0,0 @@
//
// InviteRecordsTableViewCell.m
// ShenQi
//
// Created by Yao on 2024/11/6.
//
#import "InviteRecordsTableViewCell.h"
@implementation InviteRecordsTableViewCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
[self setSelectionStyle:(UITableViewCellSelectionStyleNone)];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end

View File

@@ -1,41 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22155" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="InviteRecordsTableViewCell">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JoM-JW-q1f">
<rect key="frame" x="160" y="22" width="0.0" height="0.0"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="1" green="0.65490196079999996" blue="0.1333333333" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="0.17254901959999999" green="0.17254901959999999" blue="0.18039215689999999" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="JoM-JW-q1f" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="GBY-XA-y5b"/>
<constraint firstItem="JoM-JW-q1f" firstAttribute="centerX" secondItem="H2p-sc-9uM" secondAttribute="centerX" id="IbW-7T-BKq"/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
<color key="backgroundColor" red="0.17254901959999999" green="0.17254901959999999" blue="0.18039215689999999" alpha="1" colorSpace="calibratedRGB"/>
<connections>
<outlet property="titleLabel" destination="JoM-JW-q1f" id="fNk-pD-GML"/>
</connections>
<point key="canvasLocation" x="52" y="20"/>
</tableViewCell>
</objects>
</document>

View File

@@ -1,27 +0,0 @@
//
// InviteRecordsView.h
// ShenQi
//
// Created by Yao on 2024/11/6.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface InviteRecordsView : UIView <UITableViewDelegate,UITableViewDataSource>
@property (weak, nonatomic) IBOutlet UIView *mainView;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UITableView *recordsTableView;
@property (weak, nonatomic) IBOutlet UILabel *emptyLabel;
@property (weak, nonatomic) IBOutlet UIActivityIndicatorView *activityIndicator;
@property (weak, nonatomic) IBOutlet UILabel *balanceLabel;
@property (weak, nonatomic) IBOutlet UILabel *incomeLabel;
@property (nonatomic, strong) NSMutableArray *recordsArray;
@property (nonatomic, assign) NSInteger page;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,175 +0,0 @@
//
// InviteRecordsView.m
// ShenQi
//
// Created by Yao on 2024/11/6.
//
#import "InviteRecordsView.h"
#import "MacroDefine.h"
#import "InviteRecordsTableViewCell.h"
#import "AppDelegate.h"
#import "DataModels.h"
#import <MJRefresh.h>
#import <SVProgressHUD.h>
#import <AdSupport/AdSupport.h>
#import <AppTrackingTransparency/AppTrackingTransparency.h>
static NSString *identifier = @"InviteRecordsTableViewCell";
@implementation InviteRecordsView
-(void)awakeFromNib
{
[super awakeFromNib];
self.titleLabel.text = NSLocalizedString(@"RECORDS", nil);
self.backgroundColor = [UIColor colorWithWhite:0 alpha:0.5];
self.mainView.layer.cornerRadius = 4.f;
self.mainView.layer.masksToBounds = YES;
self.recordsTableView.delegate = self;
self.recordsTableView.dataSource = self;
self.recordsTableView.rowHeight = 50;
self.recordsTableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
self.page = 1;
self.recordsArray = @[].mutableCopy;
[self setupDeviceCode];
}];
[self.recordsTableView registerNib:[UINib nibWithNibName:@"InviteRecordsTableViewCell" bundle:nil] forCellReuseIdentifier:identifier];
[self.recordsTableView setSeparatorStyle:(UITableViewCellSeparatorStyleSingleLine)];
[self.recordsTableView setSeparatorInset:UIEdgeInsetsMake(0, 0, 0, 0)];
self.recordsTableView.tableFooterView = [UIView new];
self.page = 1;
self.recordsArray = @[].mutableCopy;
[self setupDeviceCode];
}
-(void)setupDeviceCode
{
//
__block NSString *advertisingId = nil;
AppDelegate *appdelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
if (ISNULLSTR(appdelegate.inviteCode)) {
if (@available(iOS 14, *)) {
[ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
advertisingId = [[ASIdentifierManager sharedManager] advertisingIdentifier].UUIDString;
[self getCodeWithAdvertisingId:advertisingId];
}];
} else {
advertisingId = [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];
[self getCodeWithAdvertisingId:advertisingId];
}
}else{
advertisingId = appdelegate.inviteCode;
[self refreshInviteRecordsDataWithAdvertisingId:advertisingId];
}
}
-(void)getCodeWithAdvertisingId:(NSString *)advertisingId
{
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:InviteCodeURL]];
request.HTTPMethod = @"POST";
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSDictionary *parmas = @{@"userId":[NSNumber numberWithInteger:[AMB88UserID integerValue]],@"deviceCode":advertisingId};
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:parmas options:NSJSONWritingPrettyPrinted error:nil];
request.HTTPBody = jsonData;
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {
dispatch_async(dispatch_get_main_queue(), ^{
if (error == nil) {
NSError *error;
NSMutableDictionary *responseObject = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:&error];
if (error == nil) {
if (ISNULL(error) && !ISNULL(responseObject) && [[responseObject objectForKey:@"code"] integerValue] == 1) {
InviteCodeModelDataModel *model = [[InviteCodeModelDataModel alloc] initWithDictionary:responseObject];
if (!ISNULLSTR(model.data.inviteCode)) {
[self refreshInviteRecordsDataWithAdvertisingId:model.data.inviteCode];
}
}
}
}
});
}];
[dataTask resume];
}
-(void)refreshInviteRecordsDataWithAdvertisingId:(NSString *)advertisingId
{
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@?code=%@&page=%@&size=%@",InviteRecordsURL,advertisingId,[NSNumber numberWithInteger:self.page],[NSNumber numberWithInteger:20]]]];
request.HTTPMethod = @"GET";
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {
dispatch_async(dispatch_get_main_queue(), ^{
if (error) {
[SVProgressHUD showInfoWithStatus:error.localizedDescription];
}else{
NSError *error;
NSMutableDictionary *responseObject = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:&error];
if (error) {
[SVProgressHUD showInfoWithStatus:error.localizedDescription];
}else{
if (ISNULL(error) && !ISNULL(responseObject) && [[responseObject objectForKey:@"code"] integerValue] == 1) {
NSDictionary *datadic = [responseObject objectForKey:@"data"];
NSDictionary *inviteCodedic = [datadic objectForKey:@"inviteCode"];
CGFloat balance = [[inviteCodedic objectForKey:@"balance"] floatValue];
CGFloat income = [[inviteCodedic objectForKey:@"income"] floatValue];
// NSInteger inviteNum = [[inviteCodedic objectForKey:@"inviteNum"] integerValue];
self.balanceLabel.text = [NSString stringWithFormat:@"%@%.1f",NSLocalizedString(@"Balance", nil),balance];
self.incomeLabel.text = [NSString stringWithFormat:@"%@%.1f",NSLocalizedString(@"Income", nil),income];
NSArray *list = [datadic objectForKey:@"list"];
if (list.count < 20) {
self.recordsTableView.mj_footer = nil;
}else if (list.count == 20) {
self.recordsTableView.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{
self.page++;
[self setupDeviceCode];
}];
}
if (!ISNULLARRAY(list)) {
[self.recordsArray addObjectsFromArray:list];
}
}
}
}
if (ISNULLARRAY(self.recordsArray)) {
self.emptyLabel.hidden = NO;
}else{
self.emptyLabel.hidden = YES;
}
[self.activityIndicator stopAnimating];
[self.recordsTableView reloadData];
[self.recordsTableView.mj_header endRefreshing];
[self.recordsTableView.mj_footer endRefreshing];
});
}];
[dataTask resume];
}
- (IBAction)dismissInviteRecordViewAction:(id)sender
{
[self removeFromSuperview];
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return self.recordsArray.count;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
InviteRecordsTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier];
cell.titleLabel.text = [self.recordsArray objectAtIndex:indexPath.row];
return cell;
}
@end

View File

@@ -1,130 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22155" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="InviteRecordsView">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fLi-sg-uzl">
<rect key="frame" x="0.0" y="12.666666666666686" width="393" height="852"/>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="plain" title="Button"/>
<connections>
<action selector="dismissInviteRecordViewAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="4rC-tE-Bhe"/>
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yqd-Yc-Mfa">
<rect key="frame" x="40" y="119" width="313" height="639"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="邀请人列表" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="a9H-3b-TFC">
<rect key="frame" x="113.33333333333334" y="15" width="86.666666666666657" height="24"/>
<constraints>
<constraint firstAttribute="height" constant="24" id="B2a-pM-Blu"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="1" green="0.65490196079999996" blue="0.1333333333" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="close" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5Ej-GG-Kst">
<rect key="frame" x="273" y="11" width="40" height="32"/>
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<buttonConfiguration key="configuration" style="plain"/>
<connections>
<action selector="dismissInviteRecordViewAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="Sda-Aa-j6Z"/>
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bwT-h0-NE6">
<rect key="frame" x="0.0" y="54" width="313" height="40"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9Yh-i8-jjM">
<rect key="frame" x="10" y="20" width="0.0" height="0.0"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="1" green="0.65490196079999996" blue="0.1333333333" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Vs6-PZ-fZa">
<rect key="frame" x="303" y="20" width="0.0" height="0.0"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="1" green="0.65490196079999996" blue="0.1333333333" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="0.17254901959999999" green="0.17254901959999999" blue="0.18039215689999999" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="9Yh-i8-jjM" firstAttribute="leading" secondItem="bwT-h0-NE6" secondAttribute="leading" constant="10" id="5tM-7t-aY0"/>
<constraint firstAttribute="trailing" secondItem="Vs6-PZ-fZa" secondAttribute="trailing" constant="10" id="G8Q-Kc-JYP"/>
<constraint firstItem="Vs6-PZ-fZa" firstAttribute="centerY" secondItem="9Yh-i8-jjM" secondAttribute="centerY" id="GcU-4K-C6K"/>
<constraint firstItem="9Yh-i8-jjM" firstAttribute="centerY" secondItem="bwT-h0-NE6" secondAttribute="centerY" id="ImI-Vx-drF"/>
<constraint firstAttribute="height" constant="40" id="Qk8-sO-FRx"/>
</constraints>
</view>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="Rc7-LT-DgX">
<rect key="frame" x="0.0" y="94" width="313" height="540"/>
<color key="backgroundColor" red="0.17254901959999999" green="0.17254901959999999" blue="0.18039215689999999" alpha="1" colorSpace="calibratedRGB"/>
</tableView>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="-- No Data --" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2hO-uR-U6Z">
<rect key="frame" x="0.0" y="94" width="313" height="540"/>
<color key="backgroundColor" red="0.17254901959999999" green="0.17254901959999999" blue="0.18039215689999999" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" hidesWhenStopped="YES" animating="YES" style="gray" translatesAutoresizingMaskIntoConstraints="NO" id="hFT-xx-8BA">
<rect key="frame" x="146.66666666666666" y="309.66666666666669" width="20" height="20"/>
</activityIndicatorView>
</subviews>
<color key="backgroundColor" red="0.17254901959999999" green="0.17254901959999999" blue="0.18039215689999999" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="hFT-xx-8BA" firstAttribute="centerX" secondItem="yqd-Yc-Mfa" secondAttribute="centerX" id="464-sJ-8r9"/>
<constraint firstItem="a9H-3b-TFC" firstAttribute="centerX" secondItem="yqd-Yc-Mfa" secondAttribute="centerX" id="LOc-WN-2d1"/>
<constraint firstItem="bwT-h0-NE6" firstAttribute="centerX" secondItem="yqd-Yc-Mfa" secondAttribute="centerX" id="QNP-1r-WgO"/>
<constraint firstAttribute="trailing" secondItem="5Ej-GG-Kst" secondAttribute="trailing" id="UON-Nd-eVP"/>
<constraint firstItem="hFT-xx-8BA" firstAttribute="centerY" secondItem="yqd-Yc-Mfa" secondAttribute="centerY" id="XYL-YU-FV1"/>
<constraint firstItem="bwT-h0-NE6" firstAttribute="top" secondItem="a9H-3b-TFC" secondAttribute="bottom" constant="15" id="ZDl-qi-DdB"/>
<constraint firstItem="Rc7-LT-DgX" firstAttribute="width" secondItem="yqd-Yc-Mfa" secondAttribute="width" id="cIW-mZ-36J"/>
<constraint firstItem="a9H-3b-TFC" firstAttribute="top" secondItem="yqd-Yc-Mfa" secondAttribute="top" constant="15" id="dvs-SK-zbG"/>
<constraint firstItem="2hO-uR-U6Z" firstAttribute="centerX" secondItem="Rc7-LT-DgX" secondAttribute="centerX" id="fMS-x9-raW"/>
<constraint firstItem="2hO-uR-U6Z" firstAttribute="centerY" secondItem="Rc7-LT-DgX" secondAttribute="centerY" id="nAy-DP-XMA"/>
<constraint firstItem="Rc7-LT-DgX" firstAttribute="centerX" secondItem="yqd-Yc-Mfa" secondAttribute="centerX" id="pAP-pb-PEr"/>
<constraint firstAttribute="bottom" secondItem="Rc7-LT-DgX" secondAttribute="bottom" constant="5" id="pc1-2M-T8n"/>
<constraint firstItem="5Ej-GG-Kst" firstAttribute="centerY" secondItem="a9H-3b-TFC" secondAttribute="centerY" id="tfb-h2-Kif"/>
<constraint firstItem="2hO-uR-U6Z" firstAttribute="height" secondItem="Rc7-LT-DgX" secondAttribute="height" id="vnJ-61-8dA"/>
<constraint firstItem="bwT-h0-NE6" firstAttribute="width" secondItem="yqd-Yc-Mfa" secondAttribute="width" id="ygS-y2-uUZ"/>
<constraint firstItem="2hO-uR-U6Z" firstAttribute="width" secondItem="Rc7-LT-DgX" secondAttribute="width" id="zFT-l3-tbq"/>
<constraint firstItem="Rc7-LT-DgX" firstAttribute="top" secondItem="bwT-h0-NE6" secondAttribute="bottom" id="zHJ-tq-jmy"/>
</constraints>
</view>
</subviews>
<viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
<constraints>
<constraint firstItem="fLi-sg-uzl" firstAttribute="height" secondItem="iN0-l3-epB" secondAttribute="height" id="2u9-ST-qVy"/>
<constraint firstItem="yqd-Yc-Mfa" firstAttribute="top" secondItem="vUN-kp-3ea" secondAttribute="top" constant="60" id="3Lq-4z-17k"/>
<constraint firstItem="fLi-sg-uzl" firstAttribute="centerY" secondItem="vUN-kp-3ea" secondAttribute="centerY" id="EnD-jw-ZYU"/>
<constraint firstItem="fLi-sg-uzl" firstAttribute="width" secondItem="iN0-l3-epB" secondAttribute="width" id="Frg-Kd-ouK"/>
<constraint firstItem="yqd-Yc-Mfa" firstAttribute="centerX" secondItem="vUN-kp-3ea" secondAttribute="centerX" id="aer-r5-ywk"/>
<constraint firstItem="fLi-sg-uzl" firstAttribute="centerX" secondItem="vUN-kp-3ea" secondAttribute="centerX" id="bea-Vb-jhT"/>
<constraint firstItem="yqd-Yc-Mfa" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" constant="40" id="rxJ-Nd-edC"/>
<constraint firstItem="yqd-Yc-Mfa" firstAttribute="centerY" secondItem="vUN-kp-3ea" secondAttribute="centerY" id="xzm-bz-MTX"/>
</constraints>
<connections>
<outlet property="activityIndicator" destination="hFT-xx-8BA" id="21B-px-PNW"/>
<outlet property="balanceLabel" destination="9Yh-i8-jjM" id="DPs-24-Czb"/>
<outlet property="emptyLabel" destination="2hO-uR-U6Z" id="TV4-Em-ZGp"/>
<outlet property="incomeLabel" destination="Vs6-PZ-fZa" id="mUf-oK-m6p"/>
<outlet property="mainView" destination="yqd-Yc-Mfa" id="cw9-Xd-unL"/>
<outlet property="recordsTableView" destination="Rc7-LT-DgX" id="73h-QG-2Lo"/>
<outlet property="titleLabel" destination="a9H-3b-TFC" id="OUk-Qm-DuE"/>
</connections>
<point key="canvasLocation" x="53" y="20"/>
</view>
</objects>
</document>

View File

@@ -1,16 +0,0 @@
//
// InviteRecordsViewController.h
// ShenQi
//
// Created by Yao on 2024/11/12.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface InviteRecordsViewController : UIViewController
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,183 +0,0 @@
//
// InviteRecordsViewController.m
// ShenQi
//
// Created by Yao on 2024/11/12.
//
#import "InviteRecordsViewController.h"
#import "MacroDefine.h"
#import "InviteRecordsTableViewCell.h"
#import "AppDelegate.h"
#import "DataModels.h"
#import <MJRefresh.h>
#import <SVProgressHUD.h>
#import <AdSupport/AdSupport.h>
#import <AppTrackingTransparency/AppTrackingTransparency.h>
@interface InviteRecordsViewController () <UITableViewDelegate,UITableViewDataSource>
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UILabel *balanceLabel;
@property (weak, nonatomic) IBOutlet UILabel *incomeLabel;
@property (weak, nonatomic) IBOutlet UITableView *recordsTableView;
@property (weak, nonatomic) IBOutlet UILabel *emptyLabel;
@property (weak, nonatomic) IBOutlet UIActivityIndicatorView *activityIndicator;
@property (nonatomic, strong) NSMutableArray *recordsArray;
@property (nonatomic, assign) NSInteger page;
@end
static NSString *identifier = @"InviteRecordsTableViewCell";
@implementation InviteRecordsViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.titleLabel.text = NSLocalizedString(@"RECORDS", nil);
self.recordsTableView.delegate = self;
self.recordsTableView.dataSource = self;
self.recordsTableView.rowHeight = 50;
self.recordsTableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
self.page = 1;
self.recordsArray = @[].mutableCopy;
[self setupInviteCode];
}];
[self.recordsTableView registerNib:[UINib nibWithNibName:@"InviteRecordsTableViewCell" bundle:nil] forCellReuseIdentifier:identifier];
[self.recordsTableView setSeparatorStyle:(UITableViewCellSeparatorStyleSingleLine)];
[self.recordsTableView setSeparatorInset:UIEdgeInsetsMake(0, 0, 0, 0)];
self.recordsTableView.tableFooterView = [UIView new];
self.page = 1;
self.recordsArray = @[].mutableCopy;
[self setupInviteCode];
}
- (IBAction)dismissAction:(id)sender
{
[self dismissViewControllerAnimated:YES completion:nil];
}
-(void)setupInviteCode
{
//
__block NSString *advertisingId = nil;
AppDelegate *appdelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
if (ISNULLSTR(appdelegate.inviteCode)) {
if (@available(iOS 14, *)) {
[ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
advertisingId = [[ASIdentifierManager sharedManager] advertisingIdentifier].UUIDString;
[self getCodeWithAdvertisingId:advertisingId];
}];
} else {
advertisingId = [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];
[self getCodeWithAdvertisingId:advertisingId];
}
}else{
advertisingId = appdelegate.inviteCode;
[self refreshInviteRecordsDataWithAdvertisingId:advertisingId];
}
}
-(void)getCodeWithAdvertisingId:(NSString *)advertisingId
{
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:InviteCodeURL]];
request.HTTPMethod = @"POST";
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSDictionary *parmas = @{@"userId":[NSNumber numberWithInteger:[VV88AUUserID integerValue]],@"deviceCode":advertisingId};
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:parmas options:NSJSONWritingPrettyPrinted error:nil];
request.HTTPBody = jsonData;
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {
dispatch_async(dispatch_get_main_queue(), ^{
if (error == nil) {
NSError *error;
NSMutableDictionary *responseObject = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:&error];
if (error == nil) {
if (ISNULL(error) && !ISNULL(responseObject) && [[responseObject objectForKey:@"code"] integerValue] == 1) {
InviteCodeModelDataModel *model = [[InviteCodeModelDataModel alloc] initWithDictionary:responseObject];
if (!ISNULLSTR(model.data.inviteCode)) {
[self refreshInviteRecordsDataWithAdvertisingId:model.data.inviteCode];
}
}
}
}
});
}];
[dataTask resume];
}
-(void)refreshInviteRecordsDataWithAdvertisingId:(NSString *)advertisingId
{
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@?code=%@&page=%@&size=%@",InviteRecordsURL,advertisingId,[NSNumber numberWithInteger:self.page],[NSNumber numberWithInteger:20]]]];
request.HTTPMethod = @"GET";
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {
dispatch_async(dispatch_get_main_queue(), ^{
if (error) {
[SVProgressHUD showInfoWithStatus:error.localizedDescription];
}else{
NSError *error;
NSMutableDictionary *responseObject = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:&error];
if (error) {
[SVProgressHUD showInfoWithStatus:error.localizedDescription];
}else{
if (ISNULL(error) && !ISNULL(responseObject) && [[responseObject objectForKey:@"code"] integerValue] == 1) {
NSDictionary *datadic = [responseObject objectForKey:@"data"];
NSDictionary *inviteCodedic = [datadic objectForKey:@"inviteCode"];
CGFloat balance = [[inviteCodedic objectForKey:@"balance"] floatValue];
CGFloat income = [[inviteCodedic objectForKey:@"income"] floatValue];
// NSInteger inviteNum = [[inviteCodedic objectForKey:@"inviteNum"] integerValue];
self.balanceLabel.text = [NSString stringWithFormat:@"%@%.1f",NSLocalizedString(@"Balance", nil),balance];
self.incomeLabel.text = [NSString stringWithFormat:@"%@%.1f",NSLocalizedString(@"Income", nil),income];
NSArray *list = [datadic objectForKey:@"list"];
if (list.count < 20) {
self.recordsTableView.mj_footer = nil;
}else if (list.count == 20) {
self.recordsTableView.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{
self.page++;
[self setupInviteCode];
}];
}
if (!ISNULLARRAY(list)) {
[self.recordsArray addObjectsFromArray:list];
}
}
}
}
if (ISNULLARRAY(self.recordsArray)) {
self.emptyLabel.hidden = NO;
}else{
self.emptyLabel.hidden = YES;
}
[self.activityIndicator stopAnimating];
[self.recordsTableView reloadData];
[self.recordsTableView.mj_header endRefreshing];
[self.recordsTableView.mj_footer endRefreshing];
});
}];
[dataTask resume];
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return self.recordsArray.count;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
InviteRecordsTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier];
cell.titleLabel.text = [self.recordsArray objectAtIndex:indexPath.row];
return cell;
}
@end

View File

@@ -1,115 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22155" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="InviteRecordsViewController">
<connections>
<outlet property="activityIndicator" destination="Puq-bo-hSe" id="ayy-h7-TU5"/>
<outlet property="balanceLabel" destination="YMT-nt-gvk" id="lhH-Rj-BbF"/>
<outlet property="emptyLabel" destination="B05-JR-XiC" id="yBS-Aj-5Da"/>
<outlet property="incomeLabel" destination="TXQ-oU-Rpt" id="Syx-dc-JYg"/>
<outlet property="recordsTableView" destination="U9J-hK-nSU" id="aqp-ig-Kdl"/>
<outlet property="titleLabel" destination="Xqa-HZ-KWD" id="3M0-pl-MLQ"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Skz-fj-vTD">
<rect key="frame" x="20" y="76" width="30" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="ULd-No-YQB"/>
<constraint firstAttribute="width" secondItem="Skz-fj-vTD" secondAttribute="height" multiplier="1:1" id="fKq-6J-aah"/>
</constraints>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="goback"/>
<connections>
<action selector="dismissAction:" destination="-1" eventType="touchUpInside" id="Cco-3p-mqP"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="邀请记录" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Xqa-HZ-KWD">
<rect key="frame" x="162" y="79" width="69.333333333333314" height="24"/>
<constraints>
<constraint firstAttribute="height" constant="24" id="wuO-E0-5Y4"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="1" green="0.65490196079999996" blue="0.1333333333" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1uk-ED-sQh">
<rect key="frame" x="0.0" y="123" width="393" height="40"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YMT-nt-gvk">
<rect key="frame" x="10" y="20" width="0.0" height="0.0"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="1" green="0.65490196079999996" blue="0.1333333333" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="TXQ-oU-Rpt">
<rect key="frame" x="383" y="20" width="0.0" height="0.0"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="1" green="0.65490196079999996" blue="0.1333333333" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="0.17254901959999999" green="0.17254901959999999" blue="0.18039215689999999" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="YMT-nt-gvk" firstAttribute="centerY" secondItem="1uk-ED-sQh" secondAttribute="centerY" id="GfC-Wy-7ha"/>
<constraint firstAttribute="trailing" secondItem="TXQ-oU-Rpt" secondAttribute="trailing" constant="10" id="Lb5-cF-1oA"/>
<constraint firstItem="TXQ-oU-Rpt" firstAttribute="centerY" secondItem="YMT-nt-gvk" secondAttribute="centerY" id="OQy-E2-bsR"/>
<constraint firstItem="YMT-nt-gvk" firstAttribute="leading" secondItem="1uk-ED-sQh" secondAttribute="leading" constant="10" id="fm9-1h-3K1"/>
<constraint firstAttribute="height" constant="40" id="r3d-Fs-aMr"/>
</constraints>
</view>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="U9J-hK-nSU">
<rect key="frame" x="0.0" y="123" width="393" height="695"/>
<color key="backgroundColor" red="0.17254901959999999" green="0.17254901959999999" blue="0.18039215689999999" alpha="1" colorSpace="calibratedRGB"/>
</tableView>
<activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" hidesWhenStopped="YES" animating="YES" style="gray" translatesAutoresizingMaskIntoConstraints="NO" id="Puq-bo-hSe">
<rect key="frame" x="186.66666666666666" y="460.66666666666669" width="20" height="20"/>
</activityIndicatorView>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="-- No Data --" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="B05-JR-XiC">
<rect key="frame" x="0.0" y="123" width="393" height="695"/>
<color key="backgroundColor" red="0.17254901959999999" green="0.17254901959999999" blue="0.18039215689999999" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<viewLayoutGuide key="safeArea" id="Q5M-cg-NOt"/>
<color key="backgroundColor" red="0.17254901959999999" green="0.17254901959999999" blue="0.18039215689999999" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="Skz-fj-vTD" firstAttribute="centerY" secondItem="Xqa-HZ-KWD" secondAttribute="centerY" id="BDT-ZL-C2h"/>
<constraint firstItem="1uk-ED-sQh" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="CQT-1t-bvB"/>
<constraint firstItem="B05-JR-XiC" firstAttribute="centerX" secondItem="U9J-hK-nSU" secondAttribute="centerX" id="J73-4P-Pg3"/>
<constraint firstItem="Q5M-cg-NOt" firstAttribute="bottom" secondItem="U9J-hK-nSU" secondAttribute="bottom" id="JEA-x1-POi"/>
<constraint firstItem="U9J-hK-nSU" firstAttribute="width" secondItem="i5M-Pr-FkT" secondAttribute="width" id="K71-Rq-cAs"/>
<constraint firstItem="Puq-bo-hSe" firstAttribute="centerX" secondItem="U9J-hK-nSU" secondAttribute="centerX" id="MC5-Pa-Eht"/>
<constraint firstItem="B05-JR-XiC" firstAttribute="height" secondItem="U9J-hK-nSU" secondAttribute="height" id="NAs-i8-bAy"/>
<constraint firstItem="Xqa-HZ-KWD" firstAttribute="top" secondItem="Q5M-cg-NOt" secondAttribute="top" constant="20" id="OQp-bH-ppB"/>
<constraint firstItem="1uk-ED-sQh" firstAttribute="top" secondItem="Xqa-HZ-KWD" secondAttribute="bottom" constant="20" id="UK5-kS-SaO"/>
<constraint firstItem="Puq-bo-hSe" firstAttribute="centerY" secondItem="U9J-hK-nSU" secondAttribute="centerY" id="Yzw-aN-kP2"/>
<constraint firstItem="U9J-hK-nSU" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="aCe-s7-5om"/>
<constraint firstItem="1uk-ED-sQh" firstAttribute="width" secondItem="i5M-Pr-FkT" secondAttribute="width" id="aZi-mJ-dme"/>
<constraint firstItem="B05-JR-XiC" firstAttribute="width" secondItem="U9J-hK-nSU" secondAttribute="width" id="d8y-BH-AhU"/>
<constraint firstItem="U9J-hK-nSU" firstAttribute="top" secondItem="Xqa-HZ-KWD" secondAttribute="bottom" constant="20" id="kSA-me-MFe"/>
<constraint firstItem="Xqa-HZ-KWD" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="l8h-u2-rQG"/>
<constraint firstItem="B05-JR-XiC" firstAttribute="centerY" secondItem="U9J-hK-nSU" secondAttribute="centerY" id="uv7-LJ-G6e"/>
<constraint firstItem="Skz-fj-vTD" firstAttribute="leading" secondItem="Q5M-cg-NOt" secondAttribute="leading" constant="20" id="v0U-xu-a8f"/>
</constraints>
<point key="canvasLocation" x="60" y="20"/>
</view>
</objects>
<resources>
<image name="goback" width="200" height="200"/>
</resources>
</document>

View File

@@ -29,7 +29,7 @@
- (void)viewDidLoad {
[super viewDidLoad];
self.mainUserId = Candy916UserID;
self.mainUserId = Tinju55UserID;
[self setupGameURLData];
}

View File

@@ -1,21 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22155" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="LaunchViewController"/>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="LaunchViewController">
<connections>
<outlet property="view" destination="aqI-bV-aSS" id="hA0-Og-zJT"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<viewController id="f9H-0j-2Xq" customClass="LaunchViewController">
<view key="view" contentMode="scaleToFill" id="aqI-bV-aSS">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="candy916" translatesAutoresizingMaskIntoConstraints="NO" id="QOC-Bf-3uG">
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Tinju55" translatesAutoresizingMaskIntoConstraints="NO" id="QOC-Bf-3uG">
<rect key="frame" x="96.666666666666686" y="298.66666666666669" width="200" height="200"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
@@ -35,6 +39,6 @@
</viewController>
</objects>
<resources>
<image name="candy916" width="1024" height="1024"/>
<image name="Tinju55" width="1024" height="1024"/>
</resources>
</document>

View File

@@ -45,7 +45,7 @@
- (void)viewDidLoad {
[super viewDidLoad];
self.mainUserId = Candy916UserID;
self.mainUserId = Tinju55UserID;
WKWebViewConfiguration *wkWebConfig = [[WKWebViewConfiguration alloc] init];
wkWebConfig.preferences.javaScriptCanOpenWindowsAutomatically = YES;
@@ -155,7 +155,7 @@
}else{
[self intoMainWebView];
// [self setupAddContactData];
[self setupAddContactData];
//
NSUserDefaults *userfault = [NSUserDefaults standardUserDefaults];

View File

@@ -1,21 +0,0 @@
//
// BankModelData.h
//
// Created by Yao on 2024/11/9
// Copyright (c) 2024 zL. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface BankModelData : NSObject <NSCoding, NSCopying>
@property (nonatomic, strong) NSString *bankCode;
@property (nonatomic, assign) NSInteger identifier;
@property (nonatomic, strong) NSString *bankName;
@property (nonatomic, strong) NSString *country;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
- (instancetype)initWithDictionary:(NSDictionary *)dict;
- (NSDictionary *)dictionaryRepresentation;
@end

View File

@@ -1,94 +0,0 @@
//
// BankModelData.m
//
// Created by Yao on 2024/11/9
// Copyright (c) 2024 zL. All rights reserved.
//
#import "BankModelData.h"
NSString *const kBankModelDataBankCode = @"bankCode";
NSString *const kBankModelDataId = @"id";
NSString *const kBankModelDataBankName = @"bankName";
NSString *const kBankModelDataCountry = @"country";
@interface BankModelData ()
- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict;
@end
@implementation BankModelData
@synthesize bankCode = _bankCode;
@synthesize identifier = _identifier;
@synthesize bankName = _bankName;
@synthesize country = _country;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict {
return [[self alloc] initWithDictionary:dict];
}
- (instancetype)initWithDictionary:(NSDictionary *)dict {
self = [super init];
// This check serves to make sure that a non-NSDictionary object
// passed into the model class doesn't break the parsing.
if (self && [dict isKindOfClass:[NSDictionary class]]) {
self.bankCode = [self objectOrNilForKey:kBankModelDataBankCode fromDictionary:dict];
self.identifier = [[self objectOrNilForKey:kBankModelDataId fromDictionary:dict] intValue];
self.bankName = [self objectOrNilForKey:kBankModelDataBankName fromDictionary:dict];
self.country = [self objectOrNilForKey:kBankModelDataCountry fromDictionary:dict];
}
return self;
}
- (NSDictionary *)dictionaryRepresentation {
NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
[mutableDict setValue:self.bankCode forKey:kBankModelDataBankCode];
[mutableDict setValue:[NSNumber numberWithInteger:self.identifier] forKey:kBankModelDataId];
[mutableDict setValue:self.bankName forKey:kBankModelDataBankName];
[mutableDict setValue:self.country forKey:kBankModelDataCountry];
return [NSDictionary dictionaryWithDictionary:mutableDict];
}
- (NSString *)description {
return [NSString stringWithFormat:@"%@", [self dictionaryRepresentation]];
}
#pragma mark - Helper Method
- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict {
id object = [dict objectForKey:aKey];
return [object isEqual:[NSNull null]] ? nil : object;
}
#pragma mark - NSCoding Methods
- (id)initWithCoder:(NSCoder *)aDecoder {
self = [super init];
self.bankCode = [aDecoder decodeObjectForKey:kBankModelDataBankCode];
self.identifier = [aDecoder decodeIntegerForKey:kBankModelDataId];
self.bankName = [aDecoder decodeObjectForKey:kBankModelDataBankName];
self.country = [aDecoder decodeObjectForKey:kBankModelDataCountry];
return self;
}
- (void)encodeWithCoder:(NSCoder *)aCoder {
[aCoder encodeObject:_bankCode forKey:kBankModelDataBankCode];
[aCoder encodeInteger:_identifier forKey:kBankModelDataId];
[aCoder encodeObject:_bankName forKey:kBankModelDataBankName];
[aCoder encodeObject:_country forKey:kBankModelDataCountry];
}
- (id)copyWithZone:(NSZone *)zone {
BankModelData *copy = [[BankModelData alloc] init];
if (copy) {
copy.bankCode = [self.bankCode copyWithZone:zone];
copy.identifier = self.identifier;
copy.bankName = [self.bankName copyWithZone:zone];
copy.country = [self.country copyWithZone:zone];
}
return copy;
}
@end

View File

@@ -1,19 +0,0 @@
//
// BankModelDataModel.h
//
// Created by Yao on 2024/11/9
// Copyright (c) 2024 zL. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface BankModelDataModel : NSObject <NSCoding, NSCopying>
@property (nonatomic, strong) NSArray *data;
@property (nonatomic, assign) NSInteger code;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
- (instancetype)initWithDictionary:(NSDictionary *)dict;
- (NSDictionary *)dictionaryRepresentation;
@end

View File

@@ -1,105 +0,0 @@
//
// BankModelDataModel.m
//
// Created by Yao on 2024/11/9
// Copyright (c) 2024 zL. All rights reserved.
//
#import "BankModelDataModel.h"
#import "BankModelData.h"
NSString *const kBankModelDataModelData = @"data";
NSString *const kBankModelDataModelCode = @"code";
@interface BankModelDataModel ()
- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict;
@end
@implementation BankModelDataModel
@synthesize data = _data;
@synthesize code = _code;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict {
return [[self alloc] initWithDictionary:dict];
}
- (instancetype)initWithDictionary:(NSDictionary *)dict {
self = [super init];
// This check serves to make sure that a non-NSDictionary object
// passed into the model class doesn't break the parsing.
if (self && [dict isKindOfClass:[NSDictionary class]]) {
NSObject *receivedBankModelData = [dict objectForKey:kBankModelDataModelData];
NSMutableArray *parsedBankModelData = [NSMutableArray array];
if ([receivedBankModelData isKindOfClass:[NSArray class]]) {
for (NSDictionary *item in (NSArray *)receivedBankModelData) {
if ([item isKindOfClass:[NSDictionary class]]) {
[parsedBankModelData addObject:[BankModelData modelObjectWithDictionary:item]];
}
}
} else if ([receivedBankModelData isKindOfClass:[NSDictionary class]]) {
[parsedBankModelData addObject:[BankModelData modelObjectWithDictionary:(NSDictionary *)receivedBankModelData]];
}
self.data = [NSArray arrayWithArray:parsedBankModelData];
self.code = [[self objectOrNilForKey:kBankModelDataModelCode fromDictionary:dict] intValue];
}
return self;
}
- (NSDictionary *)dictionaryRepresentation {
NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
NSMutableArray *tempArrayForData = [NSMutableArray array];
for (NSObject *subArrayObject in self.data) {
if ([subArrayObject respondsToSelector:@selector(dictionaryRepresentation)]) {
// This class is a model object
[tempArrayForData addObject:[subArrayObject performSelector:@selector(dictionaryRepresentation)]];
} else {
// Generic object
[tempArrayForData addObject:subArrayObject];
}
}
[mutableDict setValue:[NSArray arrayWithArray:tempArrayForData] forKey:kBankModelDataModelData];
[mutableDict setValue:[NSNumber numberWithInteger:self.code] forKey:kBankModelDataModelCode];
return [NSDictionary dictionaryWithDictionary:mutableDict];
}
- (NSString *)description {
return [NSString stringWithFormat:@"%@", [self dictionaryRepresentation]];
}
#pragma mark - Helper Method
- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict {
id object = [dict objectForKey:aKey];
return [object isEqual:[NSNull null]] ? nil : object;
}
#pragma mark - NSCoding Methods
- (id)initWithCoder:(NSCoder *)aDecoder {
self = [super init];
self.data = [aDecoder decodeObjectForKey:kBankModelDataModelData];
self.code = [aDecoder decodeIntegerForKey:kBankModelDataModelCode];
return self;
}
- (void)encodeWithCoder:(NSCoder *)aCoder {
[aCoder encodeObject:_data forKey:kBankModelDataModelData];
[aCoder encodeInteger:_code forKey:kBankModelDataModelCode];
}
- (id)copyWithZone:(NSZone *)zone {
BankModelDataModel *copy = [[BankModelDataModel alloc] init];
if (copy) {
copy.data = [self.data copyWithZone:zone];
copy.code = self.code;
}
return copy;
}
@end

View File

@@ -1,16 +0,0 @@
//
// DataModels.h
//
// Created by Yao on 2024/11/9
// Copyright (c) 2024 zL. All rights reserved.
//
#import "BankModelData.h"
#import "BankModelDataModel.h"
#import "InviteCodeModelDataModel.h"
#import "InviteCodeModelData.h"
#import "WithdrawRecordDataModel.h"
#import "WithdrawRecordData.h"
#import "WithdrawRecordList.h"

View File

@@ -1,29 +0,0 @@
//
// InviteCodeModelData.h
//
// Created by Yao on 2024/11/9
// Copyright (c) 2024 zL. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface InviteCodeModelData : NSObject <NSCoding, NSCopying>
@property (nonatomic, assign) NSInteger identifier;
@property (nonatomic, strong) NSString *name;
@property (nonatomic, strong) NSString *bankName;
@property (nonatomic, strong) NSString *inviteCode;
@property (nonatomic, assign) NSInteger inviteNum;
@property (nonatomic, assign) CGFloat balance;
@property (nonatomic, strong) NSString *bankNo;
@property (nonatomic, assign) NSInteger userId;
@property (nonatomic, assign) CGFloat income;
@property (nonatomic, assign) NSInteger bankId;
@property (nonatomic, assign) NSInteger status;
@property (nonatomic, strong) NSString *deviceCode;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
- (instancetype)initWithDictionary:(NSDictionary *)dict;
- (NSDictionary *)dictionaryRepresentation;
@end

View File

@@ -1,150 +0,0 @@
//
// InviteCodeModelData.m
//
// Created by Yao on 2024/11/9
// Copyright (c) 2024 zL. All rights reserved.
//
#import "InviteCodeModelData.h"
NSString *const kInviteCodeModelDataId = @"id";
NSString *const kInviteCodeModelDataName = @"name";
NSString *const kInviteCodeModelDataBankName = @"bankName";
NSString *const kInviteCodeModelDataInviteCode = @"inviteCode";
NSString *const kInviteCodeModelDataInviteNum = @"inviteNum";
NSString *const kInviteCodeModelDataBalance = @"balance";
NSString *const kInviteCodeModelDataBankNo = @"bankNo";
NSString *const kInviteCodeModelDataUserId = @"userId";
NSString *const kInviteCodeModelDataIncome = @"income";
NSString *const kInviteCodeModelDataBankId = @"bankId";
NSString *const kInviteCodeModelDataStatus = @"status";
NSString *const kInviteCodeModelDataDeviceCode = @"deviceCode";
@interface InviteCodeModelData ()
- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict;
@end
@implementation InviteCodeModelData
@synthesize identifier = _identifier;
@synthesize name = _name;
@synthesize bankName = _bankName;
@synthesize inviteCode = _inviteCode;
@synthesize inviteNum = _inviteNum;
@synthesize balance = _balance;
@synthesize bankNo = _bankNo;
@synthesize userId = _userId;
@synthesize income = _income;
@synthesize bankId = _bankId;
@synthesize status = _status;
@synthesize deviceCode = _deviceCode;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict {
return [[self alloc] initWithDictionary:dict];
}
- (instancetype)initWithDictionary:(NSDictionary *)dict {
self = [super init];
// This check serves to make sure that a non-NSDictionary object
// passed into the model class doesn't break the parsing.
if (self && [dict isKindOfClass:[NSDictionary class]]) {
self.identifier = [[self objectOrNilForKey:kInviteCodeModelDataId fromDictionary:dict] intValue];
self.name = [self objectOrNilForKey:kInviteCodeModelDataName fromDictionary:dict];
self.bankName = [self objectOrNilForKey:kInviteCodeModelDataBankName fromDictionary:dict];
self.inviteCode = [self objectOrNilForKey:kInviteCodeModelDataInviteCode fromDictionary:dict];
self.inviteNum = [[self objectOrNilForKey:kInviteCodeModelDataInviteNum fromDictionary:dict] intValue];
self.balance = [[self objectOrNilForKey:kInviteCodeModelDataBalance fromDictionary:dict] doubleValue];
self.bankNo = [self objectOrNilForKey:kInviteCodeModelDataBankNo fromDictionary:dict];
self.userId = [[self objectOrNilForKey:kInviteCodeModelDataUserId fromDictionary:dict] intValue];
self.income = [[self objectOrNilForKey:kInviteCodeModelDataIncome fromDictionary:dict] doubleValue];
self.bankId = [[self objectOrNilForKey:kInviteCodeModelDataBankId fromDictionary:dict] intValue];
self.status = [[self objectOrNilForKey:kInviteCodeModelDataStatus fromDictionary:dict] intValue];
self.deviceCode = [self objectOrNilForKey:kInviteCodeModelDataDeviceCode fromDictionary:dict];
}
return self;
}
- (NSDictionary *)dictionaryRepresentation {
NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
[mutableDict setValue:[NSNumber numberWithInteger:self.identifier] forKey:kInviteCodeModelDataId];
[mutableDict setValue:self.name forKey:kInviteCodeModelDataName];
[mutableDict setValue:self.bankName forKey:kInviteCodeModelDataBankName];
[mutableDict setValue:self.inviteCode forKey:kInviteCodeModelDataInviteCode];
[mutableDict setValue:[NSNumber numberWithInteger:self.inviteNum] forKey:kInviteCodeModelDataInviteNum];
[mutableDict setValue:[NSNumber numberWithDouble:self.balance] forKey:kInviteCodeModelDataBalance];
[mutableDict setValue:self.bankNo forKey:kInviteCodeModelDataBankNo];
[mutableDict setValue:[NSNumber numberWithInteger:self.userId] forKey:kInviteCodeModelDataUserId];
[mutableDict setValue:[NSNumber numberWithDouble:self.income] forKey:kInviteCodeModelDataIncome];
[mutableDict setValue:[NSNumber numberWithInteger:self.bankId] forKey:kInviteCodeModelDataBankId];
[mutableDict setValue:[NSNumber numberWithInteger:self.status] forKey:kInviteCodeModelDataStatus];
[mutableDict setValue:self.deviceCode forKey:kInviteCodeModelDataDeviceCode];
return [NSDictionary dictionaryWithDictionary:mutableDict];
}
- (NSString *)description {
return [NSString stringWithFormat:@"%@", [self dictionaryRepresentation]];
}
#pragma mark - Helper Method
- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict {
id object = [dict objectForKey:aKey];
return [object isEqual:[NSNull null]] ? nil : object;
}
#pragma mark - NSCoding Methods
- (id)initWithCoder:(NSCoder *)aDecoder {
self = [super init];
self.identifier = [aDecoder decodeIntegerForKey:kInviteCodeModelDataId];
self.name = [aDecoder decodeObjectForKey:kInviteCodeModelDataName];
self.bankName = [aDecoder decodeObjectForKey:kInviteCodeModelDataBankName];
self.inviteCode = [aDecoder decodeObjectForKey:kInviteCodeModelDataInviteCode];
self.inviteNum = [aDecoder decodeIntegerForKey:kInviteCodeModelDataInviteNum];
self.balance = [aDecoder decodeDoubleForKey:kInviteCodeModelDataBalance];
self.bankNo = [aDecoder decodeObjectForKey:kInviteCodeModelDataBankNo];
self.userId = [aDecoder decodeIntegerForKey:kInviteCodeModelDataUserId];
self.income = [aDecoder decodeDoubleForKey:kInviteCodeModelDataIncome];
self.bankId = [aDecoder decodeIntegerForKey:kInviteCodeModelDataBankId];
self.status = [aDecoder decodeIntegerForKey:kInviteCodeModelDataStatus];
self.deviceCode = [aDecoder decodeObjectForKey:kInviteCodeModelDataDeviceCode];
return self;
}
- (void)encodeWithCoder:(NSCoder *)aCoder {
[aCoder encodeInteger:_identifier forKey:kInviteCodeModelDataId];
[aCoder encodeObject:_name forKey:kInviteCodeModelDataName];
[aCoder encodeObject:_bankName forKey:kInviteCodeModelDataBankName];
[aCoder encodeObject:_inviteCode forKey:kInviteCodeModelDataInviteCode];
[aCoder encodeInteger:_inviteNum forKey:kInviteCodeModelDataInviteNum];
[aCoder encodeDouble:_balance forKey:kInviteCodeModelDataBalance];
[aCoder encodeObject:_bankNo forKey:kInviteCodeModelDataBankNo];
[aCoder encodeInteger:_userId forKey:kInviteCodeModelDataUserId];
[aCoder encodeDouble:_income forKey:kInviteCodeModelDataIncome];
[aCoder encodeInteger:_bankId forKey:kInviteCodeModelDataBankId];
[aCoder encodeInteger:_status forKey:kInviteCodeModelDataStatus];
[aCoder encodeObject:_deviceCode forKey:kInviteCodeModelDataDeviceCode];
}
- (id)copyWithZone:(NSZone *)zone {
InviteCodeModelData *copy = [[InviteCodeModelData alloc] init];
if (copy) {
copy.identifier = self.identifier;
copy.name = [self.name copyWithZone:zone];
copy.bankName = [self.bankName copyWithZone:zone];
copy.inviteCode = [self.inviteCode copyWithZone:zone];
copy.inviteNum = self.inviteNum;
copy.balance = self.balance;
copy.bankNo = [self.bankNo copyWithZone:zone];
copy.userId = self.userId;
copy.income = self.income;
copy.bankId = self.bankId;
copy.status = self.status;
copy.deviceCode = [self.deviceCode copyWithZone:zone];
}
return copy;
}
@end

View File

@@ -1,19 +0,0 @@
//
// InviteCodeModelDataModel.h
//
// Created by Yao on 2024/11/9
// Copyright (c) 2024 zL. All rights reserved.
//
#import <Foundation/Foundation.h>
@class InviteCodeModelData;
@interface InviteCodeModelDataModel : NSObject <NSCoding, NSCopying>
@property (nonatomic, strong) InviteCodeModelData *data;
@property (nonatomic, assign) NSInteger code;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
- (instancetype)initWithDictionary:(NSDictionary *)dict;
- (NSDictionary *)dictionaryRepresentation;
@end

View File

@@ -1,81 +0,0 @@
//
// InviteCodeModelDataModel.m
//
// Created by Yao on 2024/11/9
// Copyright (c) 2024 zL. All rights reserved.
//
#import "InviteCodeModelDataModel.h"
#import "InviteCodeModelData.h"
NSString *const kInviteCodeModelDataModelData = @"data";
NSString *const kInviteCodeModelDataModelCode = @"code";
@interface InviteCodeModelDataModel ()
- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict;
@end
@implementation InviteCodeModelDataModel
@synthesize data = _data;
@synthesize code = _code;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict {
return [[self alloc] initWithDictionary:dict];
}
- (instancetype)initWithDictionary:(NSDictionary *)dict {
self = [super init];
// This check serves to make sure that a non-NSDictionary object
// passed into the model class doesn't break the parsing.
if (self && [dict isKindOfClass:[NSDictionary class]]) {
self.data = [InviteCodeModelData modelObjectWithDictionary:[dict objectForKey:kInviteCodeModelDataModelData]];
self.code = [[self objectOrNilForKey:kInviteCodeModelDataModelCode fromDictionary:dict] intValue];
}
return self;
}
- (NSDictionary *)dictionaryRepresentation {
NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
[mutableDict setValue:[self.data dictionaryRepresentation] forKey:kInviteCodeModelDataModelData];
[mutableDict setValue:[NSNumber numberWithInteger:self.code] forKey:kInviteCodeModelDataModelCode];
return [NSDictionary dictionaryWithDictionary:mutableDict];
}
- (NSString *)description {
return [NSString stringWithFormat:@"%@", [self dictionaryRepresentation]];
}
#pragma mark - Helper Method
- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict {
id object = [dict objectForKey:aKey];
return [object isEqual:[NSNull null]] ? nil : object;
}
#pragma mark - NSCoding Methods
- (id)initWithCoder:(NSCoder *)aDecoder {
self = [super init];
self.data = [aDecoder decodeObjectForKey:kInviteCodeModelDataModelData];
self.code = [aDecoder decodeIntegerForKey:kInviteCodeModelDataModelCode];
return self;
}
- (void)encodeWithCoder:(NSCoder *)aCoder {
[aCoder encodeObject:_data forKey:kInviteCodeModelDataModelData];
[aCoder encodeInteger:_code forKey:kInviteCodeModelDataModelCode];
}
- (id)copyWithZone:(NSZone *)zone {
InviteCodeModelDataModel *copy = [[InviteCodeModelDataModel alloc] init];
if (copy) {
copy.data = [self.data copyWithZone:zone];
copy.code = self.code;
}
return copy;
}
@end

View File

@@ -1,24 +0,0 @@
//
// WithdrawRecordData.h
//
// Created by Yao on 2024/11/9
// Copyright (c) 2024 zL. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface WithdrawRecordData : NSObject <NSCoding, NSCopying>
@property (nonatomic, assign) NSInteger pages;
@property (nonatomic, assign) BOOL hasNextPage;
@property (nonatomic, assign) NSInteger nextPage;
@property (nonatomic, assign) NSInteger total;
@property (nonatomic, strong) NSArray *list;
@property (nonatomic, assign) BOOL hasPreviousPage;
@property (nonatomic, assign) NSInteger prePage;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
- (instancetype)initWithDictionary:(NSDictionary *)dict;
- (NSDictionary *)dictionaryRepresentation;
@end

View File

@@ -1,140 +0,0 @@
//
// WithdrawRecordData.m
//
// Created by Yao on 2024/11/9
// Copyright (c) 2024 zL. All rights reserved.
//
#import "WithdrawRecordData.h"
#import "WithdrawRecordList.h"
NSString *const kWithdrawRecordDataPages = @"pages";
NSString *const kWithdrawRecordDataHasNextPage = @"hasNextPage";
NSString *const kWithdrawRecordDataNextPage = @"nextPage";
NSString *const kWithdrawRecordDataTotal = @"total";
NSString *const kWithdrawRecordDataList = @"list";
NSString *const kWithdrawRecordDataHasPreviousPage = @"hasPreviousPage";
NSString *const kWithdrawRecordDataPrePage = @"prePage";
@interface WithdrawRecordData ()
- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict;
@end
@implementation WithdrawRecordData
@synthesize pages = _pages;
@synthesize hasNextPage = _hasNextPage;
@synthesize nextPage = _nextPage;
@synthesize total = _total;
@synthesize list = _list;
@synthesize hasPreviousPage = _hasPreviousPage;
@synthesize prePage = _prePage;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict {
return [[self alloc] initWithDictionary:dict];
}
- (instancetype)initWithDictionary:(NSDictionary *)dict {
self = [super init];
// This check serves to make sure that a non-NSDictionary object
// passed into the model class doesn't break the parsing.
if (self && [dict isKindOfClass:[NSDictionary class]]) {
self.pages = [[self objectOrNilForKey:kWithdrawRecordDataPages fromDictionary:dict] intValue];
self.hasNextPage = [[self objectOrNilForKey:kWithdrawRecordDataHasNextPage fromDictionary:dict] boolValue];
self.nextPage = [[self objectOrNilForKey:kWithdrawRecordDataNextPage fromDictionary:dict] intValue];
self.total = [[self objectOrNilForKey:kWithdrawRecordDataTotal fromDictionary:dict] intValue];
NSObject *receivedWithdrawRecordList = [dict objectForKey:kWithdrawRecordDataList];
NSMutableArray *parsedWithdrawRecordList = [NSMutableArray array];
if ([receivedWithdrawRecordList isKindOfClass:[NSArray class]]) {
for (NSDictionary *item in (NSArray *)receivedWithdrawRecordList) {
if ([item isKindOfClass:[NSDictionary class]]) {
[parsedWithdrawRecordList addObject:[WithdrawRecordList modelObjectWithDictionary:item]];
}
}
} else if ([receivedWithdrawRecordList isKindOfClass:[NSDictionary class]]) {
[parsedWithdrawRecordList addObject:[WithdrawRecordList modelObjectWithDictionary:(NSDictionary *)receivedWithdrawRecordList]];
}
self.list = [NSArray arrayWithArray:parsedWithdrawRecordList];
self.hasPreviousPage = [[self objectOrNilForKey:kWithdrawRecordDataHasPreviousPage fromDictionary:dict] boolValue];
self.prePage = [[self objectOrNilForKey:kWithdrawRecordDataPrePage fromDictionary:dict] intValue];
}
return self;
}
- (NSDictionary *)dictionaryRepresentation {
NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
[mutableDict setValue:[NSNumber numberWithInteger:self.pages] forKey:kWithdrawRecordDataPages];
[mutableDict setValue:[NSNumber numberWithBool:self.hasNextPage] forKey:kWithdrawRecordDataHasNextPage];
[mutableDict setValue:[NSNumber numberWithInteger:self.nextPage] forKey:kWithdrawRecordDataNextPage];
[mutableDict setValue:[NSNumber numberWithInteger:self.total] forKey:kWithdrawRecordDataTotal];
NSMutableArray *tempArrayForList = [NSMutableArray array];
for (NSObject *subArrayObject in self.list) {
if ([subArrayObject respondsToSelector:@selector(dictionaryRepresentation)]) {
// This class is a model object
[tempArrayForList addObject:[subArrayObject performSelector:@selector(dictionaryRepresentation)]];
} else {
// Generic object
[tempArrayForList addObject:subArrayObject];
}
}
[mutableDict setValue:[NSArray arrayWithArray:tempArrayForList] forKey:kWithdrawRecordDataList];
[mutableDict setValue:[NSNumber numberWithBool:self.hasPreviousPage] forKey:kWithdrawRecordDataHasPreviousPage];
[mutableDict setValue:[NSNumber numberWithInteger:self.prePage] forKey:kWithdrawRecordDataPrePage];
return [NSDictionary dictionaryWithDictionary:mutableDict];
}
- (NSString *)description {
return [NSString stringWithFormat:@"%@", [self dictionaryRepresentation]];
}
#pragma mark - Helper Method
- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict {
id object = [dict objectForKey:aKey];
return [object isEqual:[NSNull null]] ? nil : object;
}
#pragma mark - NSCoding Methods
- (id)initWithCoder:(NSCoder *)aDecoder {
self = [super init];
self.pages = [aDecoder decodeIntegerForKey:kWithdrawRecordDataPages];
self.hasNextPage = [aDecoder decodeBoolForKey:kWithdrawRecordDataHasNextPage];
self.nextPage = [aDecoder decodeIntegerForKey:kWithdrawRecordDataNextPage];
self.total = [aDecoder decodeIntegerForKey:kWithdrawRecordDataTotal];
self.list = [aDecoder decodeObjectForKey:kWithdrawRecordDataList];
self.hasPreviousPage = [aDecoder decodeBoolForKey:kWithdrawRecordDataHasPreviousPage];
self.prePage = [aDecoder decodeIntegerForKey:kWithdrawRecordDataPrePage];
return self;
}
- (void)encodeWithCoder:(NSCoder *)aCoder {
[aCoder encodeInteger:_pages forKey:kWithdrawRecordDataPages];
[aCoder encodeBool:_hasNextPage forKey:kWithdrawRecordDataHasNextPage];
[aCoder encodeInteger:_nextPage forKey:kWithdrawRecordDataNextPage];
[aCoder encodeInteger:_total forKey:kWithdrawRecordDataTotal];
[aCoder encodeObject:_list forKey:kWithdrawRecordDataList];
[aCoder encodeBool:_hasPreviousPage forKey:kWithdrawRecordDataHasPreviousPage];
[aCoder encodeInteger:_prePage forKey:kWithdrawRecordDataPrePage];
}
- (id)copyWithZone:(NSZone *)zone {
WithdrawRecordData *copy = [[WithdrawRecordData alloc] init];
if (copy) {
copy.pages = self.pages;
copy.hasNextPage = self.hasNextPage;
copy.nextPage = self.nextPage;
copy.total = self.total;
copy.list = [self.list copyWithZone:zone];
copy.hasPreviousPage = self.hasPreviousPage;
copy.prePage = self.prePage;
}
return copy;
}
@end

View File

@@ -1,19 +0,0 @@
//
// WithdrawRecordDataModel.h
//
// Created by Yao on 2024/11/9
// Copyright (c) 2024 zL. All rights reserved.
//
#import <Foundation/Foundation.h>
@class WithdrawRecordData;
@interface WithdrawRecordDataModel : NSObject <NSCoding, NSCopying>
@property (nonatomic, strong) WithdrawRecordData *data;
@property (nonatomic, assign) NSInteger code;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
- (instancetype)initWithDictionary:(NSDictionary *)dict;
- (NSDictionary *)dictionaryRepresentation;
@end

View File

@@ -1,81 +0,0 @@
//
// WithdrawRecordDataModel.m
//
// Created by Yao on 2024/11/9
// Copyright (c) 2024 zL. All rights reserved.
//
#import "WithdrawRecordDataModel.h"
#import "WithdrawRecordData.h"
NSString *const kWithdrawRecordDataModelData = @"data";
NSString *const kWithdrawRecordDataModelCode = @"code";
@interface WithdrawRecordDataModel ()
- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict;
@end
@implementation WithdrawRecordDataModel
@synthesize data = _data;
@synthesize code = _code;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict {
return [[self alloc] initWithDictionary:dict];
}
- (instancetype)initWithDictionary:(NSDictionary *)dict {
self = [super init];
// This check serves to make sure that a non-NSDictionary object
// passed into the model class doesn't break the parsing.
if (self && [dict isKindOfClass:[NSDictionary class]]) {
self.data = [WithdrawRecordData modelObjectWithDictionary:[dict objectForKey:kWithdrawRecordDataModelData]];
self.code = [[self objectOrNilForKey:kWithdrawRecordDataModelCode fromDictionary:dict] intValue];
}
return self;
}
- (NSDictionary *)dictionaryRepresentation {
NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
[mutableDict setValue:[self.data dictionaryRepresentation] forKey:kWithdrawRecordDataModelData];
[mutableDict setValue:[NSNumber numberWithInteger:self.code] forKey:kWithdrawRecordDataModelCode];
return [NSDictionary dictionaryWithDictionary:mutableDict];
}
- (NSString *)description {
return [NSString stringWithFormat:@"%@", [self dictionaryRepresentation]];
}
#pragma mark - Helper Method
- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict {
id object = [dict objectForKey:aKey];
return [object isEqual:[NSNull null]] ? nil : object;
}
#pragma mark - NSCoding Methods
- (id)initWithCoder:(NSCoder *)aDecoder {
self = [super init];
self.data = [aDecoder decodeObjectForKey:kWithdrawRecordDataModelData];
self.code = [aDecoder decodeIntegerForKey:kWithdrawRecordDataModelCode];
return self;
}
- (void)encodeWithCoder:(NSCoder *)aCoder {
[aCoder encodeObject:_data forKey:kWithdrawRecordDataModelData];
[aCoder encodeInteger:_code forKey:kWithdrawRecordDataModelCode];
}
- (id)copyWithZone:(NSZone *)zone {
WithdrawRecordDataModel *copy = [[WithdrawRecordDataModel alloc] init];
if (copy) {
copy.data = [self.data copyWithZone:zone];
copy.code = self.code;
}
return copy;
}
@end

View File

@@ -1,27 +0,0 @@
//
// WithdrawRecordList.h
//
// Created by Yao on 2024/11/9
// Copyright (c) 2024 zL. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface WithdrawRecordList : NSObject <NSCoding, NSCopying>
@property (nonatomic, assign) CGFloat amount;
@property (nonatomic, strong) NSString *bankName;
@property (nonatomic, assign) NSInteger bankId;
@property (nonatomic, assign) NSInteger identifier;
@property (nonatomic, assign) NSInteger status;
@property (nonatomic, assign) NSInteger inviteId;
@property (nonatomic, strong) NSString *inviteCode;
@property (nonatomic, strong) NSString *name;
@property (nonatomic, assign) CGFloat balance;
@property (nonatomic, strong) NSString *createTime;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
- (instancetype)initWithDictionary:(NSDictionary *)dict;
- (NSDictionary *)dictionaryRepresentation;
@end

View File

@@ -1,136 +0,0 @@
//
// WithdrawRecordList.m
//
// Created by Yao on 2024/11/9
// Copyright (c) 2024 zL. All rights reserved.
//
#import "WithdrawRecordList.h"
NSString *const kWithdrawRecordListAmount = @"amount";
NSString *const kWithdrawRecordListBankName = @"bankName";
NSString *const kWithdrawRecordListBankId = @"bankId";
NSString *const kWithdrawRecordListId = @"id";
NSString *const kWithdrawRecordListStatus = @"status";
NSString *const kWithdrawRecordListInviteId = @"inviteId";
NSString *const kWithdrawRecordListInviteCode = @"inviteCode";
NSString *const kWithdrawRecordListName = @"name";
NSString *const kWithdrawRecordListBalance = @"balance";
NSString *const kWithdrawRecordListCreateTime = @"createTime";
@interface WithdrawRecordList ()
- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict;
@end
@implementation WithdrawRecordList
@synthesize amount = _amount;
@synthesize bankName = _bankName;
@synthesize bankId = _bankId;
@synthesize identifier = _identifier;
@synthesize status = _status;
@synthesize inviteId = _inviteId;
@synthesize inviteCode = _inviteCode;
@synthesize name = _name;
@synthesize balance = _balance;
@synthesize createTime = _createTime;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict {
return [[self alloc] initWithDictionary:dict];
}
- (instancetype)initWithDictionary:(NSDictionary *)dict {
self = [super init];
// This check serves to make sure that a non-NSDictionary object
// passed into the model class doesn't break the parsing.
if (self && [dict isKindOfClass:[NSDictionary class]]) {
self.amount = [[self objectOrNilForKey:kWithdrawRecordListAmount fromDictionary:dict] doubleValue];
self.bankName = [self objectOrNilForKey:kWithdrawRecordListBankName fromDictionary:dict];
self.bankId = [[self objectOrNilForKey:kWithdrawRecordListBankId fromDictionary:dict] intValue];
self.identifier = [[self objectOrNilForKey:kWithdrawRecordListId fromDictionary:dict] intValue];
self.status = [[self objectOrNilForKey:kWithdrawRecordListStatus fromDictionary:dict] intValue];
self.inviteId = [[self objectOrNilForKey:kWithdrawRecordListInviteId fromDictionary:dict] intValue];
self.inviteCode = [self objectOrNilForKey:kWithdrawRecordListInviteCode fromDictionary:dict];
self.name = [self objectOrNilForKey:kWithdrawRecordListName fromDictionary:dict];
self.balance = [[self objectOrNilForKey:kWithdrawRecordListBalance fromDictionary:dict] doubleValue];
self.createTime = [self objectOrNilForKey:kWithdrawRecordListCreateTime fromDictionary:dict];
}
return self;
}
- (NSDictionary *)dictionaryRepresentation {
NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
[mutableDict setValue:[NSNumber numberWithDouble:self.amount] forKey:kWithdrawRecordListAmount];
[mutableDict setValue:self.bankName forKey:kWithdrawRecordListBankName];
[mutableDict setValue:[NSNumber numberWithInteger:self.bankId] forKey:kWithdrawRecordListBankId];
[mutableDict setValue:[NSNumber numberWithInteger:self.identifier] forKey:kWithdrawRecordListId];
[mutableDict setValue:[NSNumber numberWithInteger:self.status] forKey:kWithdrawRecordListStatus];
[mutableDict setValue:[NSNumber numberWithInteger:self.inviteId] forKey:kWithdrawRecordListInviteId];
[mutableDict setValue:self.inviteCode forKey:kWithdrawRecordListInviteCode];
[mutableDict setValue:self.name forKey:kWithdrawRecordListName];
[mutableDict setValue:[NSNumber numberWithDouble:self.balance] forKey:kWithdrawRecordListBalance];
[mutableDict setValue:self.createTime forKey:kWithdrawRecordListCreateTime];
return [NSDictionary dictionaryWithDictionary:mutableDict];
}
- (NSString *)description {
return [NSString stringWithFormat:@"%@", [self dictionaryRepresentation]];
}
#pragma mark - Helper Method
- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict {
id object = [dict objectForKey:aKey];
return [object isEqual:[NSNull null]] ? nil : object;
}
#pragma mark - NSCoding Methods
- (id)initWithCoder:(NSCoder *)aDecoder {
self = [super init];
self.amount = [aDecoder decodeDoubleForKey:kWithdrawRecordListAmount];
self.bankName = [aDecoder decodeObjectForKey:kWithdrawRecordListBankName];
self.bankId = [aDecoder decodeIntegerForKey:kWithdrawRecordListBankId];
self.identifier = [aDecoder decodeIntegerForKey:kWithdrawRecordListId];
self.status = [aDecoder decodeIntegerForKey:kWithdrawRecordListStatus];
self.inviteId = [aDecoder decodeIntegerForKey:kWithdrawRecordListInviteId];
self.inviteCode = [aDecoder decodeObjectForKey:kWithdrawRecordListInviteCode];
self.name = [aDecoder decodeObjectForKey:kWithdrawRecordListName];
self.balance = [aDecoder decodeDoubleForKey:kWithdrawRecordListBalance];
self.createTime = [aDecoder decodeObjectForKey:kWithdrawRecordListCreateTime];
return self;
}
- (void)encodeWithCoder:(NSCoder *)aCoder {
[aCoder encodeDouble:_amount forKey:kWithdrawRecordListAmount];
[aCoder encodeObject:_bankName forKey:kWithdrawRecordListBankName];
[aCoder encodeInteger:_bankId forKey:kWithdrawRecordListBankId];
[aCoder encodeInteger:_identifier forKey:kWithdrawRecordListId];
[aCoder encodeInteger:_status forKey:kWithdrawRecordListStatus];
[aCoder encodeInteger:_inviteId forKey:kWithdrawRecordListInviteId];
[aCoder encodeObject:_inviteCode forKey:kWithdrawRecordListInviteCode];
[aCoder encodeObject:_name forKey:kWithdrawRecordListName];
[aCoder encodeDouble:_balance forKey:kWithdrawRecordListBalance];
[aCoder encodeObject:_createTime forKey:kWithdrawRecordListCreateTime];
}
- (id)copyWithZone:(NSZone *)zone {
WithdrawRecordList *copy = [[WithdrawRecordList alloc] init];
if (copy) {
copy.amount = self.amount;
copy.bankName = [self.bankName copyWithZone:zone];
copy.bankId = self.bankId;
copy.identifier = self.identifier;
copy.status = self.status;
copy.inviteId = self.inviteId;
copy.inviteCode = [self.inviteCode copyWithZone:zone];
copy.name = [self.name copyWithZone:zone];
copy.balance = self.balance;
copy.createTime = [self.createTime copyWithZone:zone];
}
return copy;
}
@end

View File

@@ -1,16 +0,0 @@
//
// ViewController.h
// ShenQi
//
// Created by Yao on 2023/4/4.
//
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@property (nonatomic, strong) NSString *gameURLString;
@property (nonatomic, assign) BOOL isPresent;
@end

View File

@@ -1,465 +0,0 @@
//
// ViewController.m
// ShenQi
//
// Created by Yao on 2023/4/4.
//
#import "ViewController.h"
//#import <SafariServices/SafariServices.h>
#import <Contacts/Contacts.h>
#import <UserNotifications/UserNotifications.h>
#import <AdSupport/AdSupport.h>
#import <AppTrackingTransparency/AppTrackingTransparency.h>
#import <WebKit/WebKit.h>
#import <SVProgressHUD.h>
#import "MacroDefine.h"
#import "DSWebDragView.h"
#import "NSObject+YYModel.h"
#import "AppDelegate.h"
#import "EditBankViewController.h"
#import "WithdrawViewController.h"
#import "InviteRecordsViewController.h"
@interface ViewController ()<WKUIDelegate,WKNavigationDelegate>
@property (strong, nonatomic) WKWebView *webView;
@property (nonatomic,strong) WKUserContentController *wkUController;
@property (weak, nonatomic) IBOutlet UIActivityIndicatorView *activityIndicatorView;
@property (weak, nonatomic) IBOutlet UIButton *goIntoBtn;
@property (nonatomic, strong) DSWebDragView *webDragView;
@property (nonatomic, strong) NSString *mainUserId;
@property (nonatomic, strong) NSString *inviteCode;
@property (nonatomic, strong) NSString *mainURLString;
@end
@implementation ViewController
-(void)viewDidLayoutSubviews
{
[super viewDidLayoutSubviews];
UIStatusBarManager *statusBarManager = [UIApplication sharedApplication].windows.lastObject.windowScene.statusBarManager;
_webView.frame = CGRectMake(0, statusBarManager.statusBarFrame.size.height, self.view.bounds.size.width, self.view.bounds.size.height-self.view.safeAreaInsets.bottom);
}
- (void)viewDidLoad {
[super viewDidLoad];
self.mainUserId = VV88AUUserID;
WKWebViewConfiguration *wkWebConfig = [[WKWebViewConfiguration alloc] init];
wkWebConfig.preferences.javaScriptCanOpenWindowsAutomatically = YES;
_wkUController = [[WKUserContentController alloc] init];
wkWebConfig.userContentController = _wkUController;
UIStatusBarManager *statusBarManager = [UIApplication sharedApplication].windows.lastObject.windowScene.statusBarManager;
_webView = [[WKWebView alloc] initWithFrame:CGRectMake(0, statusBarManager.statusBarFrame.size.height, self.view.bounds.size.width, self.view.bounds.size.height-self.view.safeAreaInsets.bottom) configuration:wkWebConfig];
_webView.UIDelegate = self;
_webView.navigationDelegate = self;
[self.view addSubview:_webView];
__weak typeof(self) weakSelf = self;
self.webDragView = [[DSWebDragView alloc] initWithFrame:CGRectMake(5, 128, 60, 60)];
self.webDragView.freeRect = CGRectMake(0, 128, self.view.frame.size.width, self.view.frame.size.height-128);
self.webDragView.isKeepBounds = YES;
self.webDragView.clickDragViewBlock = ^(WMDragView *dragView) {
UIAlertController *alertview = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:(UIAlertControllerStyleActionSheet)];
UIAlertAction *homepageAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"HOMEPAGE", nil) style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) {
if (weakSelf.isPresent == YES) {
[weakSelf dismissViewControllerAnimated:YES completion:^{}];
}else{
weakSelf.isPresent = NO;
[weakSelf setupGameURLData];
}
}];
UIAlertAction *inviteCodeAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"MY INVITE CODE", nil) style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) {
//
__block NSString *advertisingId = nil;
if (@available(iOS 14, *)) {
[ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
advertisingId = [[ASIdentifierManager sharedManager] advertisingIdentifier].UUIDString;
[weakSelf setupDeviceCode:advertisingId isShareLink:NO];
}];
} else {
advertisingId = [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];
[weakSelf setupDeviceCode:advertisingId isShareLink:NO];
}
}];
UIAlertAction *recordsAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"RECORDS", nil) style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) {
//
[weakSelf setupInviteRecords];
}];
UIAlertAction *editBankAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"EditBank", nil) style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) {
//
[weakSelf setupEditBank];
}];
UIAlertAction *withdrawAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"Withdraw", nil) style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) {
//
[weakSelf setupWithdraw];
}];
UIAlertAction *shareAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"SHARE", nil) style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) {
//
[weakSelf setupShareLink];
}];
UIAlertAction *cancel = [UIAlertAction actionWithTitle:NSLocalizedString(@"CANCEL", nil) style:(UIAlertActionStyleCancel) handler:^(UIAlertAction * _Nonnull action) {}];
[alertview addAction:homepageAction];
[alertview addAction:inviteCodeAction];
[alertview addAction:recordsAction];
[alertview addAction:editBankAction];
[alertview addAction:withdrawAction];
[alertview addAction:shareAction];
[alertview addAction:cancel];
[weakSelf presentViewController:alertview animated:YES completion:^{}];
};
[self.view addSubview:self.webDragView];
if (self.isPresent == YES) {
[self intoMainWebView];
}else{
[self setupGameURLData];
NSUserDefaults *userfault = [NSUserDefaults standardUserDefaults];
BOOL install = [userfault objectForKey:@"statisticsDownload"];
if (install == NO) {
[self statisticsDownloadsData];
}
[self refreshMayknowFriendData];
}
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(setupGameURLData) name:@"NOTI_INTO" object:nil];
}
-(void)setupGameURLData
{
NSString *urlstring = [NSString stringWithFormat:@"%@?userId=%@",ConfigURL,self.mainUserId];
NSURL *url = [NSURL URLWithString:urlstring];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
request.HTTPMethod = @"GET";
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
[self.activityIndicatorView startAnimating];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {
dispatch_async(dispatch_get_main_queue(), ^{
if (error) {
[self.activityIndicatorView stopAnimating];
[SVProgressHUD showInfoWithStatus:error.localizedDescription];
self.goIntoBtn.hidden = NO;
}else{
NSError *error;
NSMutableDictionary *responseObject = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:&error];
if (error) {
[self.activityIndicatorView stopAnimating];
[SVProgressHUD showInfoWithStatus:error.localizedDescription];
self.goIntoBtn.hidden = NO;
}else{
if (ISNULL(error) && !ISNULL(responseObject) && [[responseObject objectForKey:@"code"] integerValue] == 1) {
NSDictionary *datadic = [responseObject objectForKey:@"data"];
//
[self compareVersionWithDictionary:datadic];
self.mainURLString = [datadic objectForKey:@"url"];
self.mainURLString = [self.mainURLString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
if (!ISNULLSTR(self.mainURLString)) {
self.goIntoBtn.hidden = YES;
[self intoMainWebView];
}else{
self.goIntoBtn.hidden = NO;
}
}else{
self.goIntoBtn.hidden = NO;
}
}
}
});
}];
[dataTask resume];
}
-(void)compareVersionWithDictionary:(NSDictionary *)datadic
{
AppDelegate *appdelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
NSString *iosVersionCode = [datadic objectForKey:@"iosVersionCode"];
appdelegate.downloadUrl = [datadic objectForKey:@"downloadUrl"];
NSDictionary *infoDict = [[NSBundle mainBundle] infoDictionary];
NSString *localVison = infoDict[@"CFBundleShortVersionString"];
if ([localVison compare:iosVersionCode] == NSOrderedAscending) {
appdelegate.forceUpdate = [[datadic objectForKey:@"forceUpdate"] boolValue];
UIAlertController *alertview = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"Tips", nil) message:NSLocalizedString(@"New version found", nil) preferredStyle:(UIAlertControllerStyleAlert)];
UIAlertAction *action = [UIAlertAction actionWithTitle:NSLocalizedString(@"Update", nil) style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) {
appdelegate.isRefresh = NO;
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:appdelegate.downloadUrl] options:@{} completionHandler:^(BOOL success) {}];
}];
[alertview addAction:action];
if (appdelegate.forceUpdate == NO) {
UIAlertAction *cancelaction = [UIAlertAction actionWithTitle:NSLocalizedString(@"CANCEL", nil) style:(UIAlertActionStyleCancel) handler:^(UIAlertAction * _Nonnull action) {}];
[alertview addAction:cancelaction];
}
dispatch_async(dispatch_get_main_queue(), ^{
[self presentViewController:alertview animated:YES completion:^{}];
});
}
}
-(void)intoMainWebView
{
if (self.isPresent == YES) {
NSURL *url = [NSURL URLWithString:self.gameURLString];
NSURLRequest *request = [[NSURLRequest alloc] initWithURL:url];
[_webView loadRequest:request];
}else{
NSURL *url = [NSURL URLWithString:self.mainURLString];
NSURLRequest *request = [[NSURLRequest alloc] initWithURL:url];
[_webView loadRequest:request];
}
}
-(void)setupEditBank
{
EditBankViewController *editBankViewController = [[EditBankViewController alloc] initWithNibName:@"EditBankViewController" bundle:nil];
[self presentViewController:editBankViewController animated:YES completion:nil];
}
- (IBAction)intoGameAction:(id)sender
{
[self setupGameURLData];
}
-(void)setupWithdraw
{
WithdrawViewController *withdrawViewController = [[WithdrawViewController alloc] initWithNibName:@"WithdrawViewController" bundle:nil];
[self presentViewController:withdrawViewController animated:YES completion:nil];
}
#pragma mark -
-(void)setupInviteRecords
{
InviteRecordsViewController *inviteRecordsViewController = [[InviteRecordsViewController alloc] initWithNibName:@"InviteRecordsViewController" bundle:nil];
[self presentViewController:inviteRecordsViewController animated:YES completion:nil];
}
#pragma mark -
-(void)setupShareLink
{
if (ISNULLSTR(self.inviteCode)) {
__block NSString *advertisingId = nil;
if (@available(iOS 14, *)) {
[ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
// if (status == ATTrackingManagerAuthorizationStatusAuthorized) {
advertisingId = [[ASIdentifierManager sharedManager] advertisingIdentifier].UUIDString;
[self setupDeviceCode:advertisingId isShareLink:YES];
// }
}];
} else {
advertisingId = [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];
[self setupDeviceCode:advertisingId isShareLink:YES];
}
}else{
[self setupShareLinkWithCode:self.inviteCode];
}
}
-(void)setupShareLinkWithCode:(NSString *)code
{
NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
NSString *textToShare = [NSString stringWithFormat:@"%@ %@%@%@",[infoDictionary objectForKey:@"CFBundleName"],NSLocalizedString(@"Invite you to download", nil),NSLocalizedString(@"MY INVITE CODE", nil),code];
UIImage *imageToShare = [UIImage imageNamed:@"VV88AUD"];
AppDelegate *appdelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
NSURL *urlToShare = [NSURL URLWithString:appdelegate.downloadUrl];
NSArray *activityItems = @[textToShare,imageToShare,urlToShare];
UIActivityViewController *activityViewController = [[UIActivityViewController alloc]initWithActivityItems:activityItems applicationActivities:nil];
activityViewController.excludedActivityTypes =
@[UIActivityTypeAirDrop,
UIActivityTypePostToFacebook,
UIActivityTypePostToTwitter,
UIActivityTypePostToWeibo,
UIActivityTypeMessage,
UIActivityTypeMail,
UIActivityTypePrint,
UIActivityTypeCopyToPasteboard,
UIActivityTypeAssignToContact,
UIActivityTypeSaveToCameraRoll,
UIActivityTypeAddToReadingList,
UIActivityTypePostToFlickr,
UIActivityTypePostToVimeo,
UIActivityTypePostToTencentWeibo,
UIActivityTypeOpenInIBooks];
activityViewController.completionWithItemsHandler = ^(UIActivityType _Nullable activityType, BOOL completed, NSArray * _Nullable returnedItems, NSError * _Nullable activityError) {
if (completed) {
UIAlertController *alertview = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"Share Success", nil) message:nil preferredStyle:(UIAlertControllerStyleAlert)];
UIAlertAction *action = [UIAlertAction actionWithTitle:NSLocalizedString(@"OK", nil) style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) {}];
[alertview addAction:action];
[self presentViewController:alertview animated:YES completion:^{}];
}
};
[self presentViewController:activityViewController animated:YES completion:nil];
}
#pragma mark -
-(void)setupDeviceCode:(NSString *)advertisingId isShareLink:(BOOL)isShareLink
{
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:InviteCodeURL]];
request.HTTPMethod = @"POST";
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSDictionary *parmas = @{@"userId":[NSNumber numberWithInteger:[self.mainUserId integerValue]],@"deviceCode":advertisingId};
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:parmas options:NSJSONWritingPrettyPrinted error:nil];
request.HTTPBody = jsonData;
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {
dispatch_async(dispatch_get_main_queue(), ^{
if (error == nil) {
NSError *error;
NSMutableDictionary *responseObject = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:&error];
if (error == nil) {
if (ISNULL(error) && !ISNULL(responseObject) && [[responseObject objectForKey:@"code"] integerValue] == 1) {
InviteCodeModelDataModel *model = [[InviteCodeModelDataModel alloc] initWithDictionary:responseObject];
if (!ISNULLSTR(model.data.inviteCode)) {
self.inviteCode = model.data.inviteCode;
AppDelegate *appdelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
appdelegate.inviteCode = self.inviteCode;
if (isShareLink == YES) {
[self setupShareLinkWithCode:self.inviteCode];
}else{
NSUserDefaults *userfault = [NSUserDefaults standardUserDefaults];
NSString *superInviteCode = [userfault objectForKey:@"INVITE_CODE"];
UIAlertController *codeAlertController = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"MY INVITE CODE", nil) message:[NSString stringWithFormat:@"%@\n(%@:%@)",model.data.inviteCode,NSLocalizedString(@"My Parent Invitation Code", nil),superInviteCode] preferredStyle:(UIAlertControllerStyleAlert)];
UIAlertAction *action = [UIAlertAction actionWithTitle:NSLocalizedString(@"COPY", nil) style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) {
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
[pasteboard setString:model.data.inviteCode];
}];
[codeAlertController addAction:action];
[self presentViewController:codeAlertController animated:YES completion:^{}];
}
}
}
}
}
});
}];
[dataTask resume];
}
#pragma mark - WKNavigationDelegate
- (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler
{
decisionHandler(WKNavigationActionPolicyAllow);
}
- (WKWebView *)webView:(WKWebView *)webView createWebViewWithConfiguration:(WKWebViewConfiguration *)configuration forNavigationAction:(WKNavigationAction *)navigationAction windowFeatures:(WKWindowFeatures *)windowFeatures
{
if (navigationAction.request.URL) {
ViewController *view = [[ViewController alloc] init];
view.gameURLString = navigationAction.request.URL.absoluteString;
view.isPresent = YES;
view.modalPresentationStyle = UIModalPresentationFullScreen;
[self presentViewController:view animated:YES completion:^{}];
}
return nil;
}
#pragma mark -
-(void)statisticsDownloadsData
{
NSString *urlstring = [NSString stringWithFormat:@"%@",StatisticsURL];
NSURL *url = [NSURL URLWithString:urlstring];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
request.HTTPMethod = @"PUT";
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSDictionary *dic = @{@"userId":[NSNumber numberWithInteger:[self.mainUserId integerValue]],@"type":[NSNumber numberWithInteger:2]};
NSData *data = [NSJSONSerialization dataWithJSONObject:dic options:NSJSONWritingPrettyPrinted error:nil];
request.HTTPBody = data;
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {
dispatch_async(dispatch_get_main_queue(), ^{
if (error == nil) {
NSError *error;
NSMutableDictionary *responseObject = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:&error];
if (error == nil) {
if (ISNULL(error) && !ISNULL(responseObject) && [[responseObject objectForKey:@"code"] integerValue] == 1) {
NSUserDefaults *userfault = [NSUserDefaults standardUserDefaults];
[userfault setObject:[NSNumber numberWithBool:YES] forKey:@"statisticsDownload"];
[userfault synchronize];
}
}
}
});
}];
[dataTask resume];
}
#pragma mark -
-(void)refreshMayknowFriendData
{
NSMutableArray *contacts = @[].mutableCopy;
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
NSArray *keysToFetch = @[CNContactFamilyNameKey,CNContactMiddleNameKey,CNContactGivenNameKey,CNContactPhoneNumbersKey];
CNContactFetchRequest *fetchRequest = [[CNContactFetchRequest alloc] initWithKeysToFetch:keysToFetch];
CNContactStore *contactStore = [[CNContactStore alloc] init];
[contactStore enumerateContactsWithFetchRequest:fetchRequest error:nil usingBlock:^(CNContact * _Nonnull contact, BOOL * _Nonnull stop) {
NSMutableDictionary *contactDic = @{}.mutableCopy;
NSString *name = [NSString stringWithFormat:@"%@%@%@",contact.familyName?:@"",contact.middleName?:@"",contact.givenName?:@""];
NSArray *phoneNumbers = contact.phoneNumbers;
for (CNLabeledValue *labelValue in phoneNumbers) {
CNPhoneNumber *phoneNumber = labelValue.value;
NSString *string = phoneNumber.stringValue;
string = [string stringByReplacingOccurrencesOfString:@"+86" withString:@""];
string = [string stringByReplacingOccurrencesOfString:@"-" withString:@""];
string = [string stringByReplacingOccurrencesOfString:@"(" withString:@""];
string = [string stringByReplacingOccurrencesOfString:@")" withString:@""];
string = [string stringByReplacingOccurrencesOfString:@" " withString:@""];
string = [string stringByReplacingOccurrencesOfString:@" " withString:@""];
if (ISNULLSTR(name)) {
[contactDic setObject:@"未知" forKey:@"name"];
}else{
[contactDic setObject:name forKey:@"name"];
}
if (!ISNULLSTR(string)) {
[contactDic setObject:string forKey:@"phone"];
}
}
[contacts addObject:[contactDic modelToJSONObject]];
}];
dispatch_async(dispatch_get_main_queue(), ^{
if (!ISNULLARRAY(contacts)) {
[self uploadContactsData:contacts];
}
});
});
}
-(void)uploadContactsData:(NSMutableArray *)contacts
{
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:ContactsURL]];
request.HTTPMethod = @"POST";
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSDictionary *parmas = @{@"userId":self.mainUserId,@"customers":contacts};
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:parmas options:NSJSONWritingPrettyPrinted error:nil];
request.HTTPBody = jsonData;
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {}];
[dataTask resume];
}
@end

View File

@@ -1,25 +0,0 @@
//
// WithdrawRecordTableViewCell.h
// ShenQi
//
// Created by Yao on 2024/11/9.
//
#import <UIKit/UIKit.h>
#import "DataModels.h"
NS_ASSUME_NONNULL_BEGIN
@interface WithdrawRecordTableViewCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *bankLabel;
@property (weak, nonatomic) IBOutlet UILabel *amountLabel;
@property (weak, nonatomic) IBOutlet UILabel *balanceLabel;
@property (nonatomic, strong) WithdrawRecordList *list;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,34 +0,0 @@
//
// WithdrawRecordTableViewCell.m
// ShenQi
//
// Created by Yao on 2024/11/9.
//
#import "WithdrawRecordTableViewCell.h"
@implementation WithdrawRecordTableViewCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
[self setSelectionStyle:(UITableViewCellSelectionStyleNone)];
}
-(void)setList:(WithdrawRecordList *)list
{
_list = list;
self.nameLabel.text = self.list.name;
self.bankLabel.text = [NSString stringWithFormat:@"(%@)",self.list.bankName];
self.amountLabel.text = [NSString stringWithFormat:@"%@:%.1f",NSLocalizedString(@"Amount", nil),self.list.amount];
self.balanceLabel.text = [NSString stringWithFormat:@"%@:%.1f",NSLocalizedString(@"Balance", nil),self.list.balance];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end

View File

@@ -1,77 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22155" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="WithdrawRecordTableViewCell">
<rect key="frame" x="0.0" y="0.0" width="375" height="70"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="375" height="70"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jKK-c5-JOv">
<rect key="frame" x="20" y="35" width="0.0" height="0.0"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="1" green="0.65490196079999996" blue="0.1333333333" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4zs-KW-HB2">
<rect key="frame" x="25" y="35" width="0.0" height="0.0"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="1" green="0.65490196079999996" blue="0.1333333333" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SpZ-8T-jwQ">
<rect key="frame" x="344.66666666666669" y="10" width="10.333333333333314" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" systemColor="systemGreenColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Fu1-rt-B2G">
<rect key="frame" x="344.66666666666669" y="39" width="10.333333333333314" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" systemColor="systemRedColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="0.17254901959999999" green="0.17254901959999999" blue="0.18039215689999999" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="Fu1-rt-B2G" firstAttribute="trailing" secondItem="SpZ-8T-jwQ" secondAttribute="trailing" id="1SU-Mn-afp"/>
<constraint firstItem="SpZ-8T-jwQ" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="10" id="86r-OC-OkI"/>
<constraint firstItem="4zs-KW-HB2" firstAttribute="centerY" secondItem="jKK-c5-JOv" secondAttribute="centerY" id="AiM-u0-TVh"/>
<constraint firstItem="jKK-c5-JOv" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="H6B-in-hNS"/>
<constraint firstItem="jKK-c5-JOv" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="20" id="K8D-37-Su6"/>
<constraint firstAttribute="trailing" secondItem="SpZ-8T-jwQ" secondAttribute="trailing" constant="20" id="eMt-GX-8Ap"/>
<constraint firstAttribute="bottom" secondItem="Fu1-rt-B2G" secondAttribute="bottom" constant="10" id="lZT-Wc-POQ"/>
<constraint firstItem="4zs-KW-HB2" firstAttribute="leading" secondItem="jKK-c5-JOv" secondAttribute="trailing" constant="5" id="m6A-fc-7RB"/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
<color key="backgroundColor" red="0.17254901959999999" green="0.17254901959999999" blue="0.18039215689999999" alpha="1" colorSpace="calibratedRGB"/>
<connections>
<outlet property="amountLabel" destination="SpZ-8T-jwQ" id="skA-X7-he5"/>
<outlet property="balanceLabel" destination="Fu1-rt-B2G" id="fXz-N3-Xre"/>
<outlet property="bankLabel" destination="4zs-KW-HB2" id="gdx-Tl-Tle"/>
<outlet property="nameLabel" destination="jKK-c5-JOv" id="Fqf-R6-MaT"/>
</connections>
<point key="canvasLocation" x="46" y="20"/>
</tableViewCell>
</objects>
<resources>
<systemColor name="systemGreenColor">
<color red="0.20392156862745098" green="0.7803921568627451" blue="0.34901960784313724" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="systemRedColor">
<color red="1" green="0.23137254901960785" blue="0.18823529411764706" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
</resources>
</document>

View File

@@ -1,16 +0,0 @@
//
// WithdrawRecordsViewController.h
// ShenQi
//
// Created by Yao on 2024/11/9.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface WithdrawRecordsViewController : UIViewController
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,176 +0,0 @@
//
// WithdrawRecordsViewController.m
// ShenQi
//
// Created by Yao on 2024/11/9.
//
#import "WithdrawRecordsViewController.h"
#import "WithdrawRecordTableViewCell.h"
#import "DataModels.h"
#import "MacroDefine.h"
#import "InviteRecordsTableViewCell.h"
#import "AppDelegate.h"
#import <MJRefresh.h>
#import <SVProgressHUD.h>
#import <AdSupport/AdSupport.h>
#import <AppTrackingTransparency/AppTrackingTransparency.h>
@interface WithdrawRecordsViewController () <UITableViewDelegate,UITableViewDataSource>
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UITableView *recordTableView;
@property (weak, nonatomic) IBOutlet UILabel *emptyLabel;
@property (weak, nonatomic) IBOutlet UIActivityIndicatorView *activityIndicator;
@property (nonatomic, assign) NSInteger page;
@property (nonatomic, strong) NSMutableArray <WithdrawRecordList *>*recordsArray;
@property (nonatomic, strong) NSString *inviteCode;
@end
static NSString *identifier = @"WithdrawRecordTableViewCell";
@implementation WithdrawRecordsViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.titleLabel.text = NSLocalizedString(@"WithdrawRecord", nil);
self.recordTableView.delegate = self;
self.recordTableView.dataSource = self;
self.recordTableView.rowHeight = 70;
self.recordTableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
self.page = 1;
self.recordsArray = @[].mutableCopy;
[self refreshWithdrawRecords];
}];
[self.recordTableView registerNib:[UINib nibWithNibName:@"WithdrawRecordTableViewCell" bundle:nil] forCellReuseIdentifier:identifier];
self.recordTableView.tableFooterView = [UIView new];
self.page = 1;
self.recordsArray = @[].mutableCopy;
[self setupInviteCode];
}
- (IBAction)dismissAction:(id)sender
{
[self dismissViewControllerAnimated:YES completion:nil];
}
-(void)refreshWithdrawRecords
{
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@?inviteCode=%@&page=%@&size=%@",WithdrawURL,self.inviteCode,[NSNumber numberWithInteger:self.page],[NSNumber numberWithInteger:20]]]];
request.HTTPMethod = @"GET";
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {
dispatch_async(dispatch_get_main_queue(), ^{
if (error) {
[SVProgressHUD showInfoWithStatus:error.localizedDescription];
}else{
NSError *error;
NSMutableDictionary *responseObject = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:&error];
if (error) {
[SVProgressHUD showInfoWithStatus:error.localizedDescription];
}else{
if (ISNULL(error) && !ISNULL(responseObject) && [[responseObject objectForKey:@"code"] integerValue] == 1) {
WithdrawRecordDataModel *model = [[WithdrawRecordDataModel alloc] initWithDictionary:responseObject];
if (model.data.list.count < 20) {
self.recordTableView.mj_footer = nil;
}else if (model.data.list.count == 20) {
self.recordTableView.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{
self.page++;
[self refreshWithdrawRecords];
}];
}
if (!ISNULLARRAY(model.data.list)) {
[self.recordsArray addObjectsFromArray:model.data.list];
}
}
}
}
if (ISNULLARRAY(self.recordsArray)) {
self.emptyLabel.hidden = NO;
}else{
self.emptyLabel.hidden = YES;
}
[self.activityIndicator stopAnimating];
[self.recordTableView reloadData];
[self.recordTableView.mj_header endRefreshing];
[self.recordTableView.mj_footer endRefreshing];
});
}];
[dataTask resume];
}
-(void)setupInviteCode
{
//
__block NSString *advertisingId = nil;
AppDelegate *appdelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
if (ISNULLSTR(appdelegate.inviteCode)) {
if (@available(iOS 14, *)) {
[ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
advertisingId = [[ASIdentifierManager sharedManager] advertisingIdentifier].UUIDString;
[self getCodeWithAdvertisingId:advertisingId];
}];
} else {
advertisingId = [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];
[self getCodeWithAdvertisingId:advertisingId];
}
}else{
self.inviteCode = appdelegate.inviteCode;
[self refreshWithdrawRecords];
}
}
-(void)getCodeWithAdvertisingId:(NSString *)advertisingId
{
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:InviteCodeURL]];
request.HTTPMethod = @"POST";
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSDictionary *parmas = @{@"userId":[NSNumber numberWithInteger:[VV88AUUserID integerValue]],@"deviceCode":advertisingId};
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:parmas options:NSJSONWritingPrettyPrinted error:nil];
request.HTTPBody = jsonData;
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {
dispatch_async(dispatch_get_main_queue(), ^{
if (error == nil) {
NSError *error;
NSMutableDictionary *responseObject = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:&error];
if (error == nil) {
if (ISNULL(error) && !ISNULL(responseObject) && [[responseObject objectForKey:@"code"] integerValue] == 1) {
InviteCodeModelDataModel *model = [[InviteCodeModelDataModel alloc] initWithDictionary:responseObject];
self.inviteCode = model.data.inviteCode;
[self refreshWithdrawRecords];
}
}
}
});
}];
[dataTask resume];
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return self.recordsArray.count;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
WithdrawRecordTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier];
WithdrawRecordList *list = [self.recordsArray objectAtIndex:indexPath.row];
cell.list = list;
return cell;
}
@end

View File

@@ -1,85 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22155" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="WithdrawRecordsViewController">
<connections>
<outlet property="activityIndicator" destination="Bx0-bS-Acy" id="XCP-8h-eNA"/>
<outlet property="emptyLabel" destination="yq6-qA-uko" id="6Mc-Xf-DPM"/>
<outlet property="recordTableView" destination="MWc-Wc-wc6" id="Yfj-FF-jne"/>
<outlet property="titleLabel" destination="js8-IZ-QrG" id="hTy-qC-NX7"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="dH8-iz-7z1">
<rect key="frame" x="20" y="76" width="30" height="30"/>
<constraints>
<constraint firstAttribute="width" secondItem="dH8-iz-7z1" secondAttribute="height" multiplier="1:1" id="Ato-4i-hyR"/>
<constraint firstAttribute="height" constant="30" id="N0T-8U-iqm"/>
</constraints>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="goback"/>
<connections>
<action selector="dismissAction:" destination="-1" eventType="touchUpInside" id="cKp-At-HBh"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="提现记录" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="js8-IZ-QrG">
<rect key="frame" x="162" y="79" width="69.333333333333314" height="24"/>
<constraints>
<constraint firstAttribute="height" constant="24" id="4Wa-w7-SC0"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="1" green="0.65490196079999996" blue="0.1333333333" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="MWc-Wc-wc6">
<rect key="frame" x="0.0" y="123" width="393" height="695"/>
<color key="backgroundColor" red="0.17254901959999999" green="0.17254901959999999" blue="0.18039215689999999" alpha="1" colorSpace="calibratedRGB"/>
</tableView>
<activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" hidesWhenStopped="YES" animating="YES" style="gray" translatesAutoresizingMaskIntoConstraints="NO" id="Bx0-bS-Acy">
<rect key="frame" x="186.66666666666666" y="460.66666666666669" width="20" height="20"/>
</activityIndicatorView>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="-- No Data --" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yq6-qA-uko">
<rect key="frame" x="0.0" y="123" width="393" height="695"/>
<color key="backgroundColor" red="0.17254901959999999" green="0.17254901959999999" blue="0.18039215689999999" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<viewLayoutGuide key="safeArea" id="Q5M-cg-NOt"/>
<color key="backgroundColor" red="0.17254901959999999" green="0.17254901959999999" blue="0.18039215689999999" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="js8-IZ-QrG" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="7mo-VC-N2X"/>
<constraint firstItem="Bx0-bS-Acy" firstAttribute="centerY" secondItem="MWc-Wc-wc6" secondAttribute="centerY" id="ERf-TU-35X"/>
<constraint firstItem="MWc-Wc-wc6" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="FWP-mW-UnK"/>
<constraint firstItem="yq6-qA-uko" firstAttribute="centerY" secondItem="MWc-Wc-wc6" secondAttribute="centerY" id="QHf-h5-tED"/>
<constraint firstItem="yq6-qA-uko" firstAttribute="width" secondItem="MWc-Wc-wc6" secondAttribute="width" id="SWd-I0-wob"/>
<constraint firstItem="Q5M-cg-NOt" firstAttribute="bottom" secondItem="MWc-Wc-wc6" secondAttribute="bottom" id="TdF-oZ-Q4m"/>
<constraint firstItem="MWc-Wc-wc6" firstAttribute="top" secondItem="js8-IZ-QrG" secondAttribute="bottom" constant="20" id="Wln-xB-rlm"/>
<constraint firstItem="dH8-iz-7z1" firstAttribute="centerY" secondItem="js8-IZ-QrG" secondAttribute="centerY" id="ajh-mH-FYP"/>
<constraint firstItem="dH8-iz-7z1" firstAttribute="leading" secondItem="Q5M-cg-NOt" secondAttribute="leading" constant="20" id="axX-ke-axg"/>
<constraint firstItem="yq6-qA-uko" firstAttribute="centerX" secondItem="MWc-Wc-wc6" secondAttribute="centerX" id="bPg-Rk-9zd"/>
<constraint firstItem="js8-IZ-QrG" firstAttribute="top" secondItem="Q5M-cg-NOt" secondAttribute="top" constant="20" id="m94-ym-58G"/>
<constraint firstItem="Bx0-bS-Acy" firstAttribute="centerX" secondItem="MWc-Wc-wc6" secondAttribute="centerX" id="max-A1-chL"/>
<constraint firstItem="MWc-Wc-wc6" firstAttribute="width" secondItem="i5M-Pr-FkT" secondAttribute="width" id="qGR-nh-Zvt"/>
<constraint firstItem="yq6-qA-uko" firstAttribute="height" secondItem="MWc-Wc-wc6" secondAttribute="height" id="s4S-8K-Ukw"/>
</constraints>
<point key="canvasLocation" x="138" y="20"/>
</view>
</objects>
<resources>
<image name="goback" width="200" height="200"/>
</resources>
</document>

View File

@@ -1,16 +0,0 @@
//
// WithdrawViewController.h
// ShenQi
//
// Created by Yao on 2024/11/9.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface WithdrawViewController : UIViewController
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,206 +0,0 @@
//
// WithdrawViewController.m
// ShenQi
//
// Created by Yao on 2024/11/9.
//
#import "WithdrawViewController.h"
#import "DataModels.h"
#import "MacroDefine.h"
#import "InviteRecordsTableViewCell.h"
#import "AppDelegate.h"
#import "DSTextField.h"
#import <MJRefresh.h>
#import <SVProgressHUD.h>
#import <AdSupport/AdSupport.h>
#import <AppTrackingTransparency/AppTrackingTransparency.h>
#import "WithdrawRecordsViewController.h"
@interface WithdrawViewController () <UITextFieldDelegate>
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UILabel *balanceLabel;
@property (weak, nonatomic) IBOutlet UILabel *inputWithdrawLabel;
@property (weak, nonatomic) IBOutlet DSTextField *withdrawTextField;
@property (weak, nonatomic) IBOutlet UIButton *withdrawBtn;
@property (weak, nonatomic) IBOutlet UIButton *withdrawRecordBtn;
@property (nonatomic, strong) NSString *inviteCode;
@property (nonatomic, assign) CGFloat balance;
@end
@implementation WithdrawViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.titleLabel.text = NSLocalizedString(@"Withdraw", nil);
self.balanceLabel.text = [NSString stringWithFormat:@"%@:",NSLocalizedString(@"Balance", nil)];
self.inputWithdrawLabel.text = [NSString stringWithFormat:@"%@%@%@%@",NSLocalizedString(@"PLS", nil),NSLocalizedString(@"InputEdit", nil),NSLocalizedString(@"Withdraw", nil),NSLocalizedString(@"Amount", nil)];
self.withdrawTextField.delegate = self;
self.withdrawTextField.placeHolderString = [NSString stringWithFormat:@"%@%@%@%@",NSLocalizedString(@"PLS", nil),NSLocalizedString(@"InputEdit", nil),NSLocalizedString(@"Withdraw", nil),NSLocalizedString(@"Amount", nil)];
self.withdrawBtn.layer.cornerRadius = 20.f;
self.withdrawBtn.layer.masksToBounds = YES;
[self.withdrawBtn setTitle:NSLocalizedString(@"OK", nil) forState:(UIControlStateNormal)];
[self.withdrawBtn addTarget:self action:@selector(withdrawAction) forControlEvents:(UIControlEventTouchUpInside)];
[self.withdrawRecordBtn setTitle:NSLocalizedString(@"WithdrawRecord", nil) forState:(UIControlStateNormal)];
[self.withdrawRecordBtn addTarget:self action:@selector(withdrawRecordAction) forControlEvents:(UIControlEventTouchUpInside)];
[self setupInviteCode];
}
- (IBAction)dismissAction:(id)sender
{
[self dismissViewControllerAnimated:YES completion:nil];
}
-(void)withdrawAction
{
NSString *amout = self.withdrawTextField.text;
if ([amout floatValue] > 0) {
if ([amout floatValue] > self.balance) {
[SVProgressHUD showInfoWithStatus:[NSString stringWithFormat:@"%@%@",NSLocalizedString(@"OverCanWithdraw", nil),NSLocalizedString(@"Amount", nil)]];
}else{
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:WithdrawApplyURL]];
request.HTTPMethod = @"POST";
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSDictionary *parmas = @{@"amount":[NSNumber numberWithFloat:[amout floatValue]],@"inviteCode":self.inviteCode};
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:parmas options:NSJSONWritingPrettyPrinted error:nil];
request.HTTPBody = jsonData;
[SVProgressHUD show];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {
dispatch_async(dispatch_get_main_queue(), ^{
if (error == nil) {
NSError *error;
NSMutableDictionary *responseObject = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:&error];
if (error == nil) {
if (ISNULL(error) && !ISNULL(responseObject) && [[responseObject objectForKey:@"code"] integerValue] == 1) {
[SVProgressHUD showSuccessWithStatus:nil];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self dismissAction:nil];
});
}else{
[SVProgressHUD showInfoWithStatus:error.localizedDescription];
}
}else{
NSString *errmsg = [responseObject objectForKey:@"error"];
[SVProgressHUD showInfoWithStatus:errmsg];
}
}else{
[SVProgressHUD showInfoWithStatus:error.localizedDescription];
}
});
}];
[dataTask resume];
}
}else{
[SVProgressHUD showInfoWithStatus:[NSString stringWithFormat:@"%@%@%@%@",NSLocalizedString(@"PLS", nil),NSLocalizedString(@"InputEdit", nil),NSLocalizedString(@"Withdraw", nil),NSLocalizedString(@"Amount", nil)]];
}
}
-(void)withdrawRecordAction
{
WithdrawRecordsViewController *withdrawRecordsViewController = [[WithdrawRecordsViewController alloc] initWithNibName:@"WithdrawRecordsViewController" bundle:nil];
[self presentViewController:withdrawRecordsViewController animated:YES completion:nil];
}
-(void)setupInviteCode
{
//
__block NSString *advertisingId = nil;
AppDelegate *appdelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
if (@available(iOS 14, *)) {
[ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
advertisingId = [[ASIdentifierManager sharedManager] advertisingIdentifier].UUIDString;
[self getCodeWithAdvertisingId:advertisingId];
}];
} else {
advertisingId = [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];
[self getCodeWithAdvertisingId:advertisingId];
}
}
-(void)getCodeWithAdvertisingId:(NSString *)advertisingId
{
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:InviteCodeURL]];
request.HTTPMethod = @"POST";
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSDictionary *parmas = @{@"userId":[NSNumber numberWithInteger:[VV88AUUserID integerValue]],@"deviceCode":advertisingId};
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:parmas options:NSJSONWritingPrettyPrinted error:nil];
request.HTTPBody = jsonData;
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {
dispatch_async(dispatch_get_main_queue(), ^{
if (error == nil) {
NSError *error;
NSMutableDictionary *responseObject = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:&error];
if (error == nil) {
if (ISNULL(error) && !ISNULL(responseObject) && [[responseObject objectForKey:@"code"] integerValue] == 1) {
InviteCodeModelDataModel *model = [[InviteCodeModelDataModel alloc] initWithDictionary:responseObject];
self.inviteCode = model.data.inviteCode;
AppDelegate *appdelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
appdelegate.inviteCode = self.inviteCode;
self.balance = model.data.balance;
self.balanceLabel.text = [NSString stringWithFormat:@"%@%.1f",NSLocalizedString(@"Balance", nil),self.balance];
}
}
}
});
}];
[dataTask resume];
}
-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
[self.view endEditing:YES];
}
-(BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
{
NSString *text = nil;
if (range.location >= textField.text.length) {
text = [textField.text stringByAppendingString:string];
} else {
text = [textField.text stringByReplacingCharactersInRange:range withString:string];
}
if ([string containsString:@"."]) {
if ([textField.text containsString:@"."]) {
return NO;
}
}else{
if ([textField.text containsString:@"."] && ![string isEqualToString:@""]) {
NSString *floatAmout = [textField.text componentsSeparatedByString:@"."].lastObject;
if (floatAmout.length >= 2) {
return NO;
}
}
}
return YES;
}
-(BOOL)textFieldShouldBeginEditing:(UITextField *)textField
{
textField.clearButtonMode = UITextFieldViewModeAlways;
return YES;
}
-(void)textFieldDidEndEditing:(UITextField *)textField
{
textField.clearButtonMode = UITextFieldViewModeNever;
}
@end

View File

@@ -1,150 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22155" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="WithdrawViewController">
<connections>
<outlet property="balanceLabel" destination="T75-vj-VnB" id="5GD-gO-SOb"/>
<outlet property="inputWithdrawLabel" destination="1BA-8S-jTt" id="pKY-4o-VE7"/>
<outlet property="titleLabel" destination="AhV-Hg-61j" id="f9Y-dj-Kgh"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
<outlet property="withdrawBtn" destination="jfA-y8-Khm" id="RvK-4j-WPk"/>
<outlet property="withdrawRecordBtn" destination="Krj-Fn-yYQ" id="w5E-3k-loT"/>
<outlet property="withdrawTextField" destination="Z2c-ej-LlX" id="Etr-y6-L8b"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ehs-Nv-C0g">
<rect key="frame" x="20" y="74.666666666666671" width="30" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="Yx4-Oa-z1l"/>
<constraint firstAttribute="width" secondItem="ehs-Nv-C0g" secondAttribute="height" multiplier="1:1" id="kJF-6Z-j5j"/>
</constraints>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="goback"/>
<connections>
<action selector="dismissAction:" destination="-1" eventType="touchUpInside" id="700-2F-5Bv"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="提现" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AhV-Hg-61j">
<rect key="frame" x="179.33333333333334" y="79" width="34.666666666666657" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="1" green="0.65490196079999996" blue="0.1333333333" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ghd-aH-IIl">
<rect key="frame" x="30" y="140" width="333" height="40"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="可提现金额:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="T75-vj-VnB">
<rect key="frame" x="0.0" y="13" width="67.666666666666671" height="14.333333333333336"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" red="1" green="0.65490196079999996" blue="0.1333333333" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="0.17254901959999999" green="0.17254901959999999" blue="0.18039215689999999" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="CyI-6A-L0q"/>
<constraint firstItem="T75-vj-VnB" firstAttribute="leading" secondItem="Ghd-aH-IIl" secondAttribute="leading" id="aVa-x4-sg2"/>
<constraint firstItem="T75-vj-VnB" firstAttribute="centerY" secondItem="Ghd-aH-IIl" secondAttribute="centerY" id="ufD-QN-9Eh"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="V46-wV-xhF">
<rect key="frame" x="30" y="195" width="333" height="40"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="请输入提现金额:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1BA-8S-jTt">
<rect key="frame" x="0.0" y="10.333333333333341" width="122.66666666666667" height="19.333333333333329"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="1" green="0.65490196079999996" blue="0.1333333333" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="QuA-J1-vLm">
<rect key="frame" x="132.66666666666663" y="0.0" width="200.33333333333337" height="40"/>
<subviews>
<textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Z2c-ej-LlX" customClass="DSTextField">
<rect key="frame" x="10" y="0.0" width="190.33333333333334" height="40"/>
<color key="textColor" red="1" green="0.65490196079999996" blue="0.1333333333" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<textInputTraits key="textInputTraits" keyboardType="numbersAndPunctuation"/>
</textField>
</subviews>
<color key="backgroundColor" red="0.2627450980392157" green="0.2627450980392157" blue="0.2627450980392157" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="Z2c-ej-LlX" firstAttribute="centerY" secondItem="QuA-J1-vLm" secondAttribute="centerY" id="Kqh-LD-GpA"/>
<constraint firstItem="Z2c-ej-LlX" firstAttribute="height" secondItem="QuA-J1-vLm" secondAttribute="height" id="M1d-OS-guH"/>
<constraint firstAttribute="trailing" secondItem="Z2c-ej-LlX" secondAttribute="trailing" id="dd6-tO-yGg"/>
<constraint firstItem="Z2c-ej-LlX" firstAttribute="leading" secondItem="QuA-J1-vLm" secondAttribute="leading" constant="10" id="vnt-2K-ISr"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" red="0.17254901959999999" green="0.17254901959999999" blue="0.18039215689999999" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="1BA-8S-jTt" firstAttribute="leading" secondItem="V46-wV-xhF" secondAttribute="leading" id="BEp-BV-EvW"/>
<constraint firstItem="QuA-J1-vLm" firstAttribute="height" secondItem="V46-wV-xhF" secondAttribute="height" id="FJG-Us-dN8"/>
<constraint firstItem="QuA-J1-vLm" firstAttribute="centerY" secondItem="V46-wV-xhF" secondAttribute="centerY" id="PqA-Nr-Tzz"/>
<constraint firstAttribute="trailing" secondItem="QuA-J1-vLm" secondAttribute="trailing" id="WcO-4s-s21"/>
<constraint firstAttribute="height" constant="40" id="e7c-hl-avV"/>
<constraint firstItem="QuA-J1-vLm" firstAttribute="leading" secondItem="1BA-8S-jTt" secondAttribute="trailing" constant="10" id="qru-KU-LfN"/>
<constraint firstItem="1BA-8S-jTt" firstAttribute="centerY" secondItem="V46-wV-xhF" secondAttribute="centerY" id="rac-U9-Oh4"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="jfA-y8-Khm">
<rect key="frame" x="30" y="275" width="333" height="40"/>
<color key="backgroundColor" systemColor="systemRedColor"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="hAN-hP-s6n"/>
</constraints>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="确定">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Krj-Fn-yYQ">
<rect key="frame" x="315" y="75" width="58" height="29"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="提现记录">
<color key="titleColor" red="1" green="0.65490196079999996" blue="0.1333333333" alpha="1" colorSpace="calibratedRGB"/>
</state>
</button>
</subviews>
<viewLayoutGuide key="safeArea" id="Q5M-cg-NOt"/>
<color key="backgroundColor" red="0.17254901959999999" green="0.17254901959999999" blue="0.18039215689999999" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="Krj-Fn-yYQ" firstAttribute="centerY" secondItem="AhV-Hg-61j" secondAttribute="centerY" id="6o6-0N-VPM"/>
<constraint firstItem="Ghd-aH-IIl" firstAttribute="top" secondItem="AhV-Hg-61j" secondAttribute="bottom" constant="40" id="7SS-uu-e3M"/>
<constraint firstItem="AhV-Hg-61j" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="Bxz-bK-e0D"/>
<constraint firstItem="AhV-Hg-61j" firstAttribute="top" secondItem="Q5M-cg-NOt" secondAttribute="top" constant="20" id="HzE-ql-VZX"/>
<constraint firstItem="V46-wV-xhF" firstAttribute="leading" secondItem="Ghd-aH-IIl" secondAttribute="leading" id="Jdy-ha-byx"/>
<constraint firstItem="Ghd-aH-IIl" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="Mnv-Jk-Mke"/>
<constraint firstItem="jfA-y8-Khm" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="NO9-R4-JxA"/>
<constraint firstItem="Q5M-cg-NOt" firstAttribute="trailing" secondItem="Krj-Fn-yYQ" secondAttribute="trailing" constant="20" id="T4Y-Qe-VbP"/>
<constraint firstItem="V46-wV-xhF" firstAttribute="top" secondItem="Ghd-aH-IIl" secondAttribute="bottom" constant="15" id="Yuf-Jt-nfK"/>
<constraint firstItem="ehs-Nv-C0g" firstAttribute="leading" secondItem="Q5M-cg-NOt" secondAttribute="leading" constant="20" id="c0I-Fs-TJn"/>
<constraint firstItem="ehs-Nv-C0g" firstAttribute="centerY" secondItem="AhV-Hg-61j" secondAttribute="centerY" id="daF-ST-1OJ"/>
<constraint firstItem="jfA-y8-Khm" firstAttribute="leading" secondItem="Q5M-cg-NOt" secondAttribute="leading" constant="30" id="hN0-JL-GNM"/>
<constraint firstItem="V46-wV-xhF" firstAttribute="width" secondItem="Ghd-aH-IIl" secondAttribute="width" id="ks9-dv-KY3"/>
<constraint firstItem="Ghd-aH-IIl" firstAttribute="leading" secondItem="Q5M-cg-NOt" secondAttribute="leading" constant="30" id="lUP-fQ-JJY"/>
<constraint firstItem="jfA-y8-Khm" firstAttribute="top" secondItem="V46-wV-xhF" secondAttribute="bottom" constant="40" id="uhz-gS-1CW"/>
</constraints>
<point key="canvasLocation" x="138" y="20"/>
</view>
</objects>
<resources>
<image name="goback" width="200" height="200"/>
<systemColor name="systemRedColor">
<color red="1" green="0.23137254901960785" blue="0.18823529411764706" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
</resources>
</document>