xiongzhu 7 lat temu
rodzic
commit
215939c41e
22 zmienionych plików z 333 dodań i 155 usunięć
  1. BIN
      .DS_Store
  2. BIN
      model/Classes/Controllers/Controller/.DS_Store
  3. 22 15
      model/Classes/Controllers/Controller/MyTeamVC/MyMemberController.m
  4. 2 2
      model/Classes/Controllers/Controller/MyTeamVC/MyMemberController.xib
  5. 23 15
      model/Classes/Controllers/Controller/MyTeamVC/MyModelController.m
  6. 2 2
      model/Classes/Controllers/Controller/MyTeamVC/MyModelController.xib
  7. 1 1
      model/Classes/Controllers/Controller/MyTeamVC/MyTeamCell.h
  8. 8 0
      model/Classes/Controllers/Controller/MyTeamVC/MyTeamCell.m
  9. 34 2
      model/Classes/Controllers/Controller/MyTeamVC/MyTeamController.m
  10. 3 15
      model/Classes/Controllers/Controller/MyTeamVC/MyTeamController.xib
  11. 3 1
      model/Classes/Controllers/Controller/MyTeamVC/MyTeamHeader.h
  12. 32 1
      model/Classes/Controllers/Controller/MyTeamVC/MyTeamHeader.m
  13. 39 10
      model/Classes/Controllers/Controller/MyTeamVC/MyTeamHeader.xib
  14. 7 1
      model/Classes/Controllers/Controller/MyTeamVC/TabControl.h
  15. 34 0
      model/Classes/Controllers/Controller/MyTeamVC/TabControl.m
  16. 21 1
      model/Classes/Controllers/Controller/MyTeamVC/TabControl.xib
  17. 1 9
      model/Classes/Controllers/Controller/MyWalletVC/MyWalletController.m
  18. 1 9
      model/Classes/Controllers/Controller/MyWalletVC/WithdrawalController.m
  19. 48 2
      model/Classes/Controllers/Controller/PromoteVC/PromoteController.m
  20. 10 35
      model/Classes/Controllers/Controller/PromoteVC/PromoteController.xib
  21. 31 28
      model/Classes/Controllers/Controller/SettingsVC/SettingsViewController.m
  22. 11 6
      model/ModelHeader.h

BIN
.DS_Store


BIN
model/Classes/Controllers/Controller/.DS_Store


+ 22 - 15
model/Classes/Controllers/Controller/MyTeamVC/MyMemberController.m

@@ -15,32 +15,39 @@ static NSString *cellId = @"MyTeamCell";
 @interface MyMemberController () <UITableViewDelegate, UITableViewDataSource>
 @property (weak, nonatomic) IBOutlet UITableView *tableView;
 @property(nonatomic,strong) NSMutableArray* data;
-@property(nonatomic, strong) UIView* tableHeader;
+@property(nonatomic, strong) MyTeamHeader* tableHeader;
 @end
 
 @implementation MyMemberController
 
 - (void)viewDidLoad {
     [super viewDidLoad];
-    UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
-    btn.frame = CGRectMake(0, 0, 40, 40);
-    [btn setImage:[UIImage imageNamed:@"backBtn"] forState:UIControlStateNormal];
-    btn.imageEdgeInsets = UIEdgeInsetsMake(0, -20, 0, 0);
-    [btn addTarget:self action:@selector(backClick) forControlEvents:UIControlEventTouchUpInside];
-    UIBarButtonItem *leftItem = [[UIBarButtonItem alloc] initWithCustomView:btn];
-    UIBarButtonItem *nagetiveSpacer = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil];
-    nagetiveSpacer.width = -12;//这个值可以根据自己需要自己调整
-    self.navigationItem.leftBarButtonItems = @[nagetiveSpacer, leftItem];
-    self.navigationItem.title = @"推广明细";
     
     self.tableView.delegate = self;
     self.tableView.dataSource = self;
     self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
     self.tableView.tableHeaderView = self.tableHeader;
+    
+    [self getData];
 }
 
-- (void)backClick {
-    [self.navigationController popViewControllerAnimated:YES];
+- (void)getData {
+    ModelUser *modelUser = [ModelUser user];
+    NSDictionary *dic = [[NSDictionary alloc] initWithObjectsAndKeys:modelUser.pk, @"memberpk", @"8", @"type", nil];
+    [YanCNetWorkManager requestPostWithURLStr:Url_myTeam(PublicUrl)
+                                   parameters:dic
+                                       finish:^(id responese) {
+                                           BOOL success = [responese[@"success"] intValue] == 1;
+                                           if (success) {
+                                               self.tableHeader.introduceNum = [responese[@"introduceNum"] stringValue];
+                                               self.tableHeader.totalCoin = [responese[@"totalCoin"] stringValue];
+                                               [self.data addObjectsFromArray:responese[@"introduceList"]];
+                                               [self.tableView reloadData];
+                                           } else {
+                                               [MBProgressHUD showInfo:@"请求失败!"];
+                                           }
+                                       } enError:^(NSError *error) {
+                                       }];
 }
 
 - (NSMutableArray *)data {
@@ -64,8 +71,7 @@ static NSString *cellId = @"MyTeamCell";
 }
 
 -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
-//    return self.data.count;
-    return 10;
+    return self.data.count;
 }
 
 -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
@@ -74,6 +80,7 @@ static NSString *cellId = @"MyTeamCell";
         NSArray *nib = [[NSBundle mainBundle] loadNibNamed:cellId owner:self options:nil];
         cell = [nib objectAtIndex:0];
         cell.selectionStyle = UITableViewCellSelectionStyleNone;
+        cell.data = [self.data objectAtIndex:indexPath.row];
     }
     return cell;
 }

+ 2 - 2
model/Classes/Controllers/Controller/MyTeamVC/MyMemberController.xib

@@ -22,13 +22,13 @@
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <subviews>
                 <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="s3n-ZJ-rfK">
-                    <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                    <rect key="frame" x="0.0" y="20" width="375" height="647"/>
                     <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                 </tableView>
             </subviews>
             <color key="backgroundColor" red="0.94901960784313721" green="0.95686274509803915" blue="0.96078431372549022" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
             <constraints>
-                <constraint firstItem="Q5M-cg-NOt" firstAttribute="top" secondItem="s3n-ZJ-rfK" secondAttribute="top" constant="20" id="98r-NT-RZn"/>
+                <constraint firstItem="Q5M-cg-NOt" firstAttribute="top" secondItem="s3n-ZJ-rfK" secondAttribute="top" id="98r-NT-RZn"/>
                 <constraint firstItem="Q5M-cg-NOt" firstAttribute="bottom" secondItem="s3n-ZJ-rfK" secondAttribute="bottom" id="cMA-Sc-3HN"/>
                 <constraint firstItem="s3n-ZJ-rfK" firstAttribute="leading" secondItem="Q5M-cg-NOt" secondAttribute="leading" id="cZx-pE-lor"/>
                 <constraint firstItem="Q5M-cg-NOt" firstAttribute="trailing" secondItem="s3n-ZJ-rfK" secondAttribute="trailing" id="cpD-rl-uMd"/>

+ 23 - 15
model/Classes/Controllers/Controller/MyTeamVC/MyModelController.m

@@ -15,32 +15,39 @@ static NSString *cellId = @"MyTeamCell";
 @interface MyModelController () <UITableViewDelegate, UITableViewDataSource>
 @property (weak, nonatomic) IBOutlet UITableView *tableView;
 @property(nonatomic,strong) NSMutableArray* data;
-@property(nonatomic, strong) UIView* tableHeader;
+@property(nonatomic, strong) MyTeamHeader* tableHeader;
 @end
 
 @implementation MyModelController
 
 - (void)viewDidLoad {
     [super viewDidLoad];
-    UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
-    btn.frame = CGRectMake(0, 0, 40, 40);
-    [btn setImage:[UIImage imageNamed:@"backBtn"] forState:UIControlStateNormal];
-    btn.imageEdgeInsets = UIEdgeInsetsMake(0, -20, 0, 0);
-    [btn addTarget:self action:@selector(backClick) forControlEvents:UIControlEventTouchUpInside];
-    UIBarButtonItem *leftItem = [[UIBarButtonItem alloc] initWithCustomView:btn];
-    UIBarButtonItem *nagetiveSpacer = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil];
-    nagetiveSpacer.width = -12;//这个值可以根据自己需要自己调整
-    self.navigationItem.leftBarButtonItems = @[nagetiveSpacer, leftItem];
-    self.navigationItem.title = @"推广明细";
     
     self.tableView.delegate = self;
     self.tableView.dataSource = self;
     self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
     self.tableView.tableHeaderView = self.tableHeader;
+    
+    [self getData];
 }
 
-- (void)backClick {
-    [self.navigationController popViewControllerAnimated:YES];
+- (void)getData {
+    ModelUser *modelUser = [ModelUser user];
+    NSDictionary *dic = [[NSDictionary alloc] initWithObjectsAndKeys:modelUser.pk, @"memberpk", @"7", @"type", nil];
+    [YanCNetWorkManager requestPostWithURLStr:Url_myTeam(PublicUrl)
+                                   parameters:dic
+                                       finish:^(id responese) {
+                                           BOOL success = [responese[@"success"] intValue] == 1;
+                                           if (success) {
+                                               self.tableHeader.introduceNum = [responese[@"introduceNum"] stringValue];
+                                               self.tableHeader.totalCoin = [responese[@"totalCoin"] stringValue];
+                                               [self.data addObjectsFromArray:responese[@"introduceList"]];
+                                               [self.tableView reloadData];
+                                           } else {
+                                               [MBProgressHUD showInfo:@"请求失败!"];
+                                           }
+                                       } enError:^(NSError *error) {
+                                       }];
 }
 
 - (NSMutableArray *)data {
@@ -54,6 +61,7 @@ static NSString *cellId = @"MyTeamCell";
     if(!_tableHeader){
         _tableHeader = [[MyTeamHeader alloc] init];
         _tableHeader.frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, 107);
+        _tableHeader.type = @"model";
     }
     return _tableHeader;
 }
@@ -64,8 +72,7 @@ static NSString *cellId = @"MyTeamCell";
 }
 
 -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
-//    return self.data.count;
-    return 10;
+    return self.data.count;
 }
 
 -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
@@ -74,6 +81,7 @@ static NSString *cellId = @"MyTeamCell";
         NSArray *nib = [[NSBundle mainBundle] loadNibNamed:cellId owner:self options:nil];
         cell = [nib objectAtIndex:0];
         cell.selectionStyle = UITableViewCellSelectionStyleNone;
+        cell.data = [self.data objectAtIndex:indexPath.row];
     }
     return cell;
 }

+ 2 - 2
model/Classes/Controllers/Controller/MyTeamVC/MyModelController.xib

@@ -22,13 +22,13 @@
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <subviews>
                 <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="s3n-ZJ-rfK">
-                    <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                    <rect key="frame" x="0.0" y="20" width="375" height="647"/>
                     <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                 </tableView>
             </subviews>
             <color key="backgroundColor" red="0.94901960784313721" green="0.95686274509803915" blue="0.96078431372549022" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
             <constraints>
-                <constraint firstItem="Q5M-cg-NOt" firstAttribute="top" secondItem="s3n-ZJ-rfK" secondAttribute="top" constant="20" id="98r-NT-RZn"/>
+                <constraint firstItem="Q5M-cg-NOt" firstAttribute="top" secondItem="s3n-ZJ-rfK" secondAttribute="top" id="98r-NT-RZn"/>
                 <constraint firstItem="Q5M-cg-NOt" firstAttribute="bottom" secondItem="s3n-ZJ-rfK" secondAttribute="bottom" id="cMA-Sc-3HN"/>
                 <constraint firstItem="s3n-ZJ-rfK" firstAttribute="leading" secondItem="Q5M-cg-NOt" secondAttribute="leading" id="cZx-pE-lor"/>
                 <constraint firstItem="Q5M-cg-NOt" firstAttribute="trailing" secondItem="s3n-ZJ-rfK" secondAttribute="trailing" id="cpD-rl-uMd"/>

+ 1 - 1
model/Classes/Controllers/Controller/MyTeamVC/MyTeamCell.h

@@ -11,7 +11,7 @@
 NS_ASSUME_NONNULL_BEGIN
 
 @interface MyTeamCell : UITableViewCell
-
+@property(nonatomic, strong) NSDictionary* data;
 @end
 
 NS_ASSUME_NONNULL_END

+ 8 - 0
model/Classes/Controllers/Controller/MyTeamVC/MyTeamCell.m

@@ -19,6 +19,8 @@
     [super awakeFromNib];
     self.content.layer.backgroundColor = [UIColor colorWithRed:255/255.0 green:255/255.0 blue:255/255.0 alpha:1].CGColor;
     self.content.layer.cornerRadius = 8;
+    self.avatar.layer.masksToBounds = YES;
+    self.avatar.layer.cornerRadius = 18;
 }
 
 - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
@@ -27,4 +29,10 @@
     // Configure the view for the selected state
 }
 
+- (void)setData:(NSDictionary *)data {
+    [self.avatar sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@", imageURl, data[@"avatar"]]]];
+    self.name.text = data[@"name"];
+    self.reward.text = [NSString stringWithFormat:@"奖励%@", data[@"total"]];
+}
+
 @end

+ 34 - 2
model/Classes/Controllers/Controller/MyTeamVC/MyTeamController.m

@@ -8,16 +8,31 @@
 
 #import "MyTeamController.h"
 #import "TabControl.h"
+#import "MyModelController.h"
+#import "MyMemberController.h"
 
-@interface MyTeamController()
-
+@interface MyTeamController() <UIScrollViewDelegate, TabControlDelegate>
+@property (weak, nonatomic) IBOutlet UIScrollView *scrollView;
+@property (weak, nonatomic) IBOutlet TabControl *tabControl;
+@property(nonatomic, strong) MyModelController* myModelVC;
+@property(nonatomic, strong) MyMemberController* myMemberVC;
 @end
 
 @implementation MyTeamController
 
 - (void)viewDidLoad {
     [super viewDidLoad];
+    self.scrollView.delegate = self;
+    self.tabControl.delegate = self;
 
+    self.myModelVC = [[MyModelController alloc] init];
+    self.myMemberVC = [[MyMemberController alloc] init];
+    [self addChildViewController:self.myModelVC];
+    [self addChildViewController:self.myMemberVC];
+    self.myModelVC.view.frame = CGRectMake(0, 0, self.scrollView.bounds.size.width, self.scrollView.bounds.size.height);
+    self.myMemberVC.view.frame = CGRectMake(self.scrollView.bounds.size.width, 0, self.scrollView.bounds.size.width, self.scrollView.bounds.size.height);
+    [self.scrollView addSubview:self.myModelVC.view];
+    [self.scrollView addSubview:self.myMemberVC.view];
 }
 
 - (void)viewWillAppear:(BOOL)animated {
@@ -30,11 +45,28 @@
     [self.navigationController setNavigationBarHidden:NO animated:YES];
 }
 
+- (void)viewDidLayoutSubviews {
+    self.scrollView.contentSize = CGSizeMake(2 *  [UIScreen mainScreen].bounds.size.width, 0);
+    [self.myModelVC.view layoutIfNeeded];
+    [self.myMemberVC.view layoutIfNeeded];
+}
+
 - (IBAction)backClick:(id)sender {
     [self.navigationController popViewControllerAnimated:YES];
 }
 
+#pragma mark - UIScrollView Delegate
+- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView {
+    int index = scrollView.contentOffset.x / scrollView.frame.size.width;
+    self.tabControl.index = index;
+}
+#pragma mark -
 
+#pragma mark - TabControl Delegate
+- (void)tabChange:(NSInteger)index {
+    [self.scrollView setContentOffset:CGPointMake(self.scrollView.frame.size.width * index, 0) animated:YES];
+}
+#pragma mark -
 
 
 @end

+ 3 - 15
model/Classes/Controllers/Controller/MyTeamVC/MyTeamController.xib

@@ -12,6 +12,8 @@
     <objects>
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="MyTeamController">
             <connections>
+                <outlet property="scrollView" destination="OAU-8x-3Qa" id="H3J-uo-b1K"/>
+                <outlet property="tabControl" destination="5Ae-xL-FI1" id="62r-ux-UeK"/>
                 <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
             </connections>
         </placeholder>
@@ -53,22 +55,8 @@
                         <constraint firstAttribute="height" constant="44" id="tE0-rY-eUI"/>
                     </constraints>
                 </view>
-                <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="OAU-8x-3Qa">
+                <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" pagingEnabled="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="OAU-8x-3Qa">
                     <rect key="frame" x="0.0" y="88" width="375" height="690"/>
-                    <subviews>
-                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rDO-bN-y02">
-                            <rect key="frame" x="0.0" y="0.0" width="375" height="690"/>
-                            <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                        </view>
-                    </subviews>
-                    <constraints>
-                        <constraint firstAttribute="bottom" secondItem="rDO-bN-y02" secondAttribute="bottom" id="1hR-kP-yll"/>
-                        <constraint firstItem="rDO-bN-y02" firstAttribute="leading" secondItem="OAU-8x-3Qa" secondAttribute="leading" id="F1b-d5-CZ6"/>
-                        <constraint firstAttribute="trailing" secondItem="rDO-bN-y02" secondAttribute="trailing" id="JeR-89-ZS4"/>
-                        <constraint firstItem="rDO-bN-y02" firstAttribute="centerY" secondItem="OAU-8x-3Qa" secondAttribute="centerY" id="Lwt-hA-my6"/>
-                        <constraint firstItem="rDO-bN-y02" firstAttribute="centerX" secondItem="OAU-8x-3Qa" secondAttribute="centerX" id="PCh-wr-e0P"/>
-                        <constraint firstItem="rDO-bN-y02" firstAttribute="top" secondItem="OAU-8x-3Qa" secondAttribute="top" id="UwV-fC-CXw"/>
-                    </constraints>
                 </scrollView>
             </subviews>
             <color key="backgroundColor" red="0.94901960784313721" green="0.95686274509803915" blue="0.96078431372549022" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>

+ 3 - 1
model/Classes/Controllers/Controller/MyTeamVC/MyTeamHeader.h

@@ -11,7 +11,9 @@
 NS_ASSUME_NONNULL_BEGIN
 
 @interface MyTeamHeader : UIView
-
+@property(nonatomic, strong) NSString* type;
+@property(nonatomic, strong) NSString* introduceNum;
+@property(nonatomic, strong) NSString* totalCoin;
 @end
 
 NS_ASSUME_NONNULL_END

+ 32 - 1
model/Classes/Controllers/Controller/MyTeamVC/MyTeamHeader.m

@@ -11,6 +11,9 @@
 @property (weak, nonatomic) IBOutlet UIView *content;
 @property (weak, nonatomic) IBOutlet UILabel *inviteLabel;
 @property (weak, nonatomic) IBOutlet UILabel *rewardLabel;
+@property (weak, nonatomic) IBOutlet UILabel *labelAuth;
+@property (weak, nonatomic) IBOutlet UILabel *labelAuthed;
+@property (weak, nonatomic) IBOutlet UIView *coinView;
 
 @end
 @implementation MyTeamHeader
@@ -42,7 +45,7 @@
     [super layoutSubviews];
     // gradient
     CAGradientLayer *gl = [CAGradientLayer layer];
-    gl.frame = self.content.bounds;
+    gl.frame = CGRectMake(0, 0, self.bounds.size.width - 40, self.bounds.size.height - 22);
     gl.startPoint = CGPointMake(0.03, 0.47);
     gl.endPoint = CGPointMake(0.97, 0.47);
     gl.colors = @[(__bridge id)[UIColor colorWithRed:251/255.0 green:92/255.0 blue:163/255.0 alpha:1].CGColor, (__bridge id)[UIColor colorWithRed:253/255.0 green:127/255.0 blue:141/255.0 alpha:1].CGColor];
@@ -50,4 +53,32 @@
     self.content.layer.cornerRadius = 12;
     [self.content.layer insertSublayer:gl atIndex:0];
 }
+
+- (void)setType:(NSString *)type {
+    _type = type;
+    if ([@"model" isEqualToString:type]) {
+        self.coinView.hidden = YES;
+        self.labelAuth.hidden = NO;
+        self.labelAuthed.hidden = YES;
+    } else {
+        self.coinView.hidden = NO;
+        self.labelAuth.hidden = YES;
+        self.labelAuthed.hidden = YES;
+    }
+}
+
+- (void)setIntroduceNum:(NSString*)introduceNum {
+    _introduceNum = introduceNum;
+    self.inviteLabel.text = introduceNum;
+    if ([@"model" isEqualToString:self.type] && [introduceNum intValue] >= 30) {
+        self.coinView.hidden = NO;
+        self.labelAuth.hidden = YES;
+        self.labelAuthed.hidden = NO;
+    }
+}
+
+- (void)setTotalCoin:(NSString*)totalCoin {
+    _totalCoin = totalCoin;
+    self.rewardLabel.text = totalCoin;
+}
 @end

+ 39 - 10
model/Classes/Controllers/Controller/MyTeamVC/MyTeamHeader.xib

@@ -12,30 +12,33 @@
     <objects>
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="MyTeamHeader">
             <connections>
+                <outlet property="coinView" destination="8DZ-ch-0Ho" id="sZI-OH-Uls"/>
                 <outlet property="content" destination="jtV-2Z-ZoG" id="z4R-zJ-eKJ"/>
                 <outlet property="inviteLabel" destination="1Cq-ex-pTd" id="nYd-st-QGc"/>
+                <outlet property="labelAuth" destination="3dA-z2-4qZ" id="Oob-03-Kvl"/>
+                <outlet property="labelAuthed" destination="1gi-qd-eKM" id="2gv-iR-7yx"/>
                 <outlet property="rewardLabel" destination="NLi-aO-DUZ" id="XNP-y1-b7T"/>
             </connections>
         </placeholder>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
         <view contentMode="scaleToFill" id="iN0-l3-epB">
-            <rect key="frame" x="0.0" y="0.0" width="464" height="169"/>
+            <rect key="frame" x="0.0" y="0.0" width="200" height="107"/>
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <subviews>
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="jtV-2Z-ZoG">
-                    <rect key="frame" x="20" y="12" width="424" height="142"/>
+                    <rect key="frame" x="20" y="12" width="160" height="80"/>
                     <subviews>
                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4P9-cP-TYX">
-                            <rect key="frame" x="0.0" y="0.0" width="212" height="142"/>
+                            <rect key="frame" x="0.0" y="0.0" width="80" height="80"/>
                             <subviews>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1Cq-ex-pTd">
-                                    <rect key="frame" x="99" y="14" width="14.5" height="27"/>
+                                    <rect key="frame" x="33" y="14" width="14.5" height="27"/>
                                     <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="22"/>
                                     <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                     <nil key="highlightedColor"/>
                                 </label>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="已邀请" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Iad-tF-zEP">
-                                    <rect key="frame" x="86" y="45" width="40" height="16"/>
+                                    <rect key="frame" x="20" y="45" width="40" height="16"/>
                                     <fontDescription key="fontDescription" type="system" pointSize="13"/>
                                     <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                     <nil key="highlightedColor"/>
@@ -50,16 +53,16 @@
                             </constraints>
                         </view>
                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8DZ-ch-0Ho">
-                            <rect key="frame" x="212" y="0.0" width="212" height="142"/>
+                            <rect key="frame" x="80" y="0.0" width="80" height="80"/>
                             <subviews>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="NLi-aO-DUZ">
-                                    <rect key="frame" x="99" y="14" width="14.5" height="27"/>
+                                    <rect key="frame" x="33" y="14" width="14.5" height="27"/>
                                     <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="22"/>
                                     <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                     <nil key="highlightedColor"/>
                                 </label>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="营销奖" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="p2Y-KM-9kF">
-                                    <rect key="frame" x="86" y="45" width="40" height="16"/>
+                                    <rect key="frame" x="20" y="45" width="40" height="16"/>
                                     <fontDescription key="fontDescription" type="system" pointSize="13"/>
                                     <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                     <nil key="highlightedColor"/>
@@ -73,6 +76,28 @@
                                 <constraint firstItem="NLi-aO-DUZ" firstAttribute="top" secondItem="8DZ-ch-0Ho" secondAttribute="top" constant="14" id="vVl-oe-93f"/>
                             </constraints>
                         </view>
+                        <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="邀请30人
即可认证经纪人" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3dA-z2-4qZ">
+                            <rect key="frame" x="73.5" y="24.5" width="93" height="31.5"/>
+                            <fontDescription key="fontDescription" name=".AppleSystemUIFont" family=".AppleSystemUIFont" pointSize="13"/>
+                            <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <label hidden="YES" opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1gi-qd-eKM">
+                            <rect key="frame" x="110" y="4" width="46" height="22"/>
+                            <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="22" id="K6c-Y6-iYQ"/>
+                                <constraint firstAttribute="width" constant="46" id="Qf0-Pl-MA4"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="system" pointSize="11"/>
+                            <color key="textColor" red="1" green="0.25098039215686274" blue="0.58431372549019611" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            <nil key="highlightedColor"/>
+                            <userDefinedRuntimeAttributes>
+                                <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
+                                    <integer key="value" value="11"/>
+                                </userDefinedRuntimeAttribute>
+                            </userDefinedRuntimeAttributes>
+                        </label>
                     </subviews>
                     <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                     <constraints>
@@ -82,13 +107,17 @@
                         <constraint firstItem="4P9-cP-TYX" firstAttribute="top" secondItem="jtV-2Z-ZoG" secondAttribute="top" id="PwE-J0-BZf"/>
                         <constraint firstAttribute="trailing" secondItem="8DZ-ch-0Ho" secondAttribute="trailing" id="QNk-ZC-2lR"/>
                         <constraint firstAttribute="bottom" secondItem="8DZ-ch-0Ho" secondAttribute="bottom" id="TX5-39-Gcx"/>
+                        <constraint firstItem="1gi-qd-eKM" firstAttribute="top" secondItem="jtV-2Z-ZoG" secondAttribute="top" constant="4" id="U89-KS-1rw"/>
                         <constraint firstItem="8DZ-ch-0Ho" firstAttribute="width" secondItem="4P9-cP-TYX" secondAttribute="width" id="XJG-hr-i3a"/>
                         <constraint firstItem="4P9-cP-TYX" firstAttribute="leading" secondItem="jtV-2Z-ZoG" secondAttribute="leading" id="ccr-LU-205"/>
+                        <constraint firstAttribute="trailing" secondItem="1gi-qd-eKM" secondAttribute="trailing" constant="4" id="exE-dt-wE1"/>
+                        <constraint firstItem="3dA-z2-4qZ" firstAttribute="centerX" secondItem="8DZ-ch-0Ho" secondAttribute="centerX" id="ns7-HJ-BKa"/>
+                        <constraint firstItem="3dA-z2-4qZ" firstAttribute="centerY" secondItem="8DZ-ch-0Ho" secondAttribute="centerY" id="qs4-Ks-oHs"/>
                         <constraint firstItem="8DZ-ch-0Ho" firstAttribute="top" secondItem="jtV-2Z-ZoG" secondAttribute="top" id="uYt-WA-tgU"/>
                     </constraints>
                 </view>
             </subviews>
-            <color key="backgroundColor" red="0.94901960784313721" green="0.95686274509803915" blue="0.96078431372549022" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
             <constraints>
                 <constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="jtV-2Z-ZoG" secondAttribute="trailing" constant="20" id="0YS-Aj-IqU"/>
                 <constraint firstItem="jtV-2Z-ZoG" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" constant="20" id="GXu-rL-jTA"/>
@@ -99,7 +128,7 @@
             <nil key="simulatedBottomBarMetrics"/>
             <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
             <viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
-            <point key="canvasLocation" x="112" y="264.91754122938534"/>
+            <point key="canvasLocation" x="71.200000000000003" y="287.85607196401799"/>
         </view>
     </objects>
 </document>

+ 7 - 1
model/Classes/Controllers/Controller/MyTeamVC/TabControl.h

@@ -10,8 +10,14 @@
 
 NS_ASSUME_NONNULL_BEGIN
 IB_DESIGNABLE
-@interface TabControl : UIView
+@protocol TabControlDelegate <NSObject>
+
+- (void) tabChange:(NSInteger) index;
 
+@end
+@interface TabControl : UIView
+@property (nonatomic, assign) NSInteger index;
+@property (nonatomic, retain) id<TabControlDelegate> delegate;
 @end
 
 NS_ASSUME_NONNULL_END

+ 34 - 0
model/Classes/Controllers/Controller/MyTeamVC/TabControl.m

@@ -10,6 +10,8 @@
 
 @interface TabControl()
 @property (weak, nonatomic) IBOutlet UIView *indicator;
+@property (weak, nonatomic) IBOutlet UILabel *label0;
+@property (weak, nonatomic) IBOutlet UILabel *label1;
 @end
 @implementation TabControl
 
@@ -35,10 +37,42 @@
     view.backgroundColor = [UIColor clearColor];
     [self addSubview:view];
     self.clipsToBounds = YES;
+    _index = 0;
 }
 
 -(void)layoutSubviews {
     self.layer.cornerRadius = self.frame.size.height / 2;
     self.indicator.layer.cornerRadius = self.frame.size.height / 2;
 }
+
+- (void)setIndex:(NSInteger)index {
+    if(_index != index) {
+        [UIView animateWithDuration:0.25
+                              delay:0
+                            options:UIViewAnimationOptionCurveEaseOut
+                         animations:^{
+                             self.indicator.transform = CGAffineTransformMakeTranslation(self.indicator.frame.size.width * index, 0);
+                             if(index == 0) {
+                                 self.label0.textColor = [UIColor whiteColor];
+                                 self.label1.textColor = [UIColor blackColor];
+                             } else {
+                                 self.label0.textColor = [UIColor blackColor];
+                                 self.label1.textColor = [UIColor whiteColor];
+                             }
+                         }
+                         completion:nil];
+    }
+    _index = index;
+}
+
+- (IBAction)tapTab:(id)sender {
+    NSInteger index = ((UITapGestureRecognizer*)sender).view.tag;
+    if(self.index != index) {
+        [self setIndex:index];
+        if (self.delegate) {
+            [self.delegate tabChange:index];
+        }
+    }
+}
+
 @end

+ 21 - 1
model/Classes/Controllers/Controller/MyTeamVC/TabControl.xib

@@ -13,6 +13,8 @@
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="TabControl">
             <connections>
                 <outlet property="indicator" destination="NbV-UF-lm6" id="vy0-gX-aXa"/>
+                <outlet property="label0" destination="hDU-Rh-m1v" id="nIw-et-ENx"/>
+                <outlet property="label1" destination="cyQ-k9-akf" id="DXD-R1-ucU"/>
             </connections>
         </placeholder>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
@@ -35,12 +37,16 @@
                         </label>
                     </subviews>
                     <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                    <gestureRecognizers/>
                     <constraints>
                         <constraint firstItem="hDU-Rh-m1v" firstAttribute="centerY" secondItem="Hff-Om-rU2" secondAttribute="centerY" id="Pz6-Fd-1Pl"/>
                         <constraint firstItem="hDU-Rh-m1v" firstAttribute="centerX" secondItem="Hff-Om-rU2" secondAttribute="centerX" id="nVt-Uk-7fO"/>
                     </constraints>
+                    <connections>
+                        <outletCollection property="gestureRecognizers" destination="Ud6-PX-pkf" appends="YES" id="Rvw-MS-m7C"/>
+                    </connections>
                 </view>
-                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6BD-bn-fPa">
+                <view tag="1" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6BD-bn-fPa">
                     <rect key="frame" x="90" y="0.0" width="90" height="34"/>
                     <subviews>
                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="用户" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cyQ-k9-akf">
@@ -50,10 +56,14 @@
                         </label>
                     </subviews>
                     <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                    <gestureRecognizers/>
                     <constraints>
                         <constraint firstItem="cyQ-k9-akf" firstAttribute="centerY" secondItem="6BD-bn-fPa" secondAttribute="centerY" id="Osz-fk-KKx"/>
                         <constraint firstItem="cyQ-k9-akf" firstAttribute="centerX" secondItem="6BD-bn-fPa" secondAttribute="centerX" id="r6a-fr-orD"/>
                     </constraints>
+                    <connections>
+                        <outletCollection property="gestureRecognizers" destination="SV7-w3-OvR" appends="YES" id="Rkw-Ii-ZJf"/>
+                    </connections>
                 </view>
             </subviews>
             <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -78,5 +88,15 @@
             <viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
             <point key="canvasLocation" x="-178.40000000000001" y="116.49175412293854"/>
         </view>
+        <tapGestureRecognizer id="Ud6-PX-pkf">
+            <connections>
+                <action selector="tapTab:" destination="-1" id="Kbz-rk-bQR"/>
+            </connections>
+        </tapGestureRecognizer>
+        <tapGestureRecognizer id="SV7-w3-OvR">
+            <connections>
+                <action selector="tapTab:" destination="-1" id="rEQ-54-7sW"/>
+            </connections>
+        </tapGestureRecognizer>
     </objects>
 </document>

+ 1 - 9
model/Classes/Controllers/Controller/MyWalletVC/MyWalletController.m

@@ -24,11 +24,7 @@
 - (void)viewWillAppear:(BOOL)animated {
     [super viewWillAppear:animated];
     self.navigationController.navigationBar.barStyle = UIBarStyleBlack;
-    //设置导航栏透明
-    [self.navigationController.navigationBar setTranslucent:true];
-    //把背景设为空
     [self.navigationController.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];
-    //处理导航栏有条线的问题
     [self.navigationController.navigationBar setShadowImage:[UIImage new]];
     [self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]}];
 }
@@ -36,13 +32,9 @@
 - (void)viewWillDisappear:(BOOL)animated {
     [super viewWillDisappear:animated];
     self.navigationController.navigationBar.barStyle = UIBarStyleDefault;
-    //设置导航栏透明
-    [self.navigationController.navigationBar setTranslucent:NO];
-    //把背景设为空
     [self.navigationController.navigationBar setBackgroundImage:nil forBarMetrics:UIBarMetricsDefault];
-    //处理导航栏有条线的问题
     [self.navigationController.navigationBar setShadowImage:nil];
-    [self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor blackColor]}];
+    [self.navigationController.navigationBar setTitleTextAttributes:nil];
 }
 
 - (void)viewDidLoad {

+ 1 - 9
model/Classes/Controllers/Controller/MyWalletVC/WithdrawalController.m

@@ -29,11 +29,7 @@
 - (void)viewWillAppear:(BOOL)animated {
     [super viewWillAppear:animated];
     self.navigationController.navigationBar.barStyle = UIBarStyleBlack;
-    //设置导航栏透明
-    [self.navigationController.navigationBar setTranslucent:true];
-    //把背景设为空
     [self.navigationController.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];
-    //处理导航栏有条线的问题
     [self.navigationController.navigationBar setShadowImage:[UIImage new]];
     [self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]}];
     
@@ -43,13 +39,9 @@
 - (void)viewWillDisappear:(BOOL)animated {
     [super viewWillDisappear:animated];
     self.navigationController.navigationBar.barStyle = UIBarStyleDefault;
-    //设置导航栏透明
-    [self.navigationController.navigationBar setTranslucent:NO];
-    //    //把背景设为空
     [self.navigationController.navigationBar setBackgroundImage:nil forBarMetrics:UIBarMetricsDefault];
-    //处理导航栏有条线的问题
     [self.navigationController.navigationBar setShadowImage:nil];
-    [self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor blackColor]}];
+    [self.navigationController.navigationBar setTitleTextAttributes:nil];
 }
 
 - (void)viewDidLoad {

+ 48 - 2
model/Classes/Controllers/Controller/PromoteVC/PromoteController.m

@@ -11,7 +11,10 @@
 #import "ChooseShareController.h"
 #import "MyTeamController.h"
 
-@interface PromoteController ()<ShareProtocol>
+@interface PromoteController ()<ShareProtocol>{
+    double total;
+    double available;
+}
 @property (weak, nonatomic) IBOutlet UILabel *rewardLabel;
 @property (weak, nonatomic) IBOutlet UILabel *descLabel;
 @property (weak, nonatomic) IBOutlet UIView *contentView;
@@ -49,6 +52,10 @@
     [paragraphStyle setLineSpacing:2];
     [attrStr addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, str.length)];
     self.descLabel.attributedText = attrStr;
+    
+    total = 0.0;
+    available = 0.0;
+    [self getData];
 }
 
 -(void)viewWillAppear:(BOOL)animated{
@@ -94,10 +101,49 @@
     [self.navigationController pushViewController:vc animated:YES];
 }
 
-- (IBAction)withdraw:(id)sender {
+- (void)getData {
+    NSDictionary *dic = [[NSDictionary alloc] initWithObjectsAndKeys:[ModelUser user].pk, @"memberpk", nil];
+    [YanCNetWorkManager requestPostWithURLStr:Url_getCurrentShareCoin(PublicUrl)
+                                   parameters:dic
+                                       finish:^(id response) {
+                                           BOOL success = [response[@"success"] intValue];
+                                           if (success) {
+                                               total = [response[@"total"] doubleValue];
+                                               available = [response[@"available"] doubleValue];
+                                               self.rewardLabel.text = [response[@"total"] stringValue];
+                                           } else {
+                                               [MBProgressHUD showInfo:@"请求失败!"];
+                                           }
+                                       }
+                                      enError:^(NSError *error) {
+                                      }];
 }
 
 - (IBAction)transfer:(id)sender {
+    UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"提示" message:@"确认转到M币?" preferredStyle:UIAlertControllerStyleAlert];
+    [alert addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:nil]];
+    [alert addAction:[UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+        [self transferCoin];
+    }]];
+    [self.navigationController presentViewController:alert animated:YES completion:nil];
+}
+
+- (void)transferCoin {
+    __weak PromoteController *this = self;
+    NSDictionary *dic = [[NSDictionary alloc] initWithObjectsAndKeys:[ModelUser user].pk, @"memberpk", nil];
+    [YanCNetWorkManager requestPostWithURLStr:Url_transferCoin(PublicUrl)
+                                   parameters:dic
+                                       finish:^(id response) {
+                                           BOOL success = [response[@"success"] intValue] == 1;
+                                           if (success) {
+                                               [MBProgressHUD showSuccess:@"转出成功"];
+                                           } else {
+                                               [MBProgressHUD showInfo:response[@"error"]];
+                                           }
+                                           [this getData];
+                                       }
+                                      enError:^(NSError *error) {
+                                      }];
 }
 
 - (IBAction)invite:(id)sender {

+ 10 - 35
model/Classes/Controllers/Controller/PromoteVC/PromoteController.xib

@@ -39,7 +39,7 @@
                                     <nil key="highlightedColor"/>
                                 </label>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="营销奖励" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="h8u-dM-IdH">
-                                    <rect key="frame" x="159" y="85" width="57.5" height="17"/>
+                                    <rect key="frame" x="158.5" y="85" width="58" height="17"/>
                                     <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                     <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                     <nil key="highlightedColor"/>
@@ -47,40 +47,19 @@
                                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="uTQ-p4-Xiu">
                                     <rect key="frame" x="20" y="119" width="335" height="456"/>
                                     <subviews>
-                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="A4s-Kz-RTb">
-                                            <rect key="frame" x="65.5" y="30" width="66" height="42"/>
-                                            <constraints>
-                                                <constraint firstAttribute="height" constant="42" id="201-23-gDT"/>
-                                            </constraints>
-                                            <fontDescription key="fontDescription" type="system" pointSize="16"/>
-                                            <state key="normal" title="申请提现">
-                                                <color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                            </state>
-                                            <connections>
-                                                <action selector="withdraw:" destination="-1" eventType="touchUpInside" id="iSv-uG-uQo"/>
-                                            </connections>
-                                        </button>
                                         <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rbn-Ju-pC8">
-                                            <rect key="frame" x="203.5" y="30" width="66" height="42"/>
+                                            <rect key="frame" x="136" y="30" width="63" height="42"/>
                                             <constraints>
                                                 <constraint firstAttribute="height" constant="42" id="ev2-Ye-sK5"/>
                                             </constraints>
-                                            <fontDescription key="fontDescription" type="system" pointSize="16"/>
-                                            <state key="normal" title="转到币">
+                                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
+                                            <state key="normal" title="转到M币">
                                                 <color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                             </state>
                                             <connections>
                                                 <action selector="transfer:" destination="-1" eventType="touchUpInside" id="BBD-xk-WSq"/>
                                             </connections>
                                         </button>
-                                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="lHR-Zs-o9l">
-                                            <rect key="frame" x="167" y="41" width="1" height="20"/>
-                                            <color key="backgroundColor" white="0.0" alpha="0.080000000000000002" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                            <constraints>
-                                                <constraint firstAttribute="height" constant="20" id="AcF-sn-5vI"/>
-                                                <constraint firstAttribute="width" constant="1" id="IjV-mO-phH"/>
-                                            </constraints>
-                                        </view>
                                         <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="wMg-RN-Aib">
                                             <rect key="frame" x="67.5" y="92" width="200" height="64"/>
                                             <state key="normal" image="btu_yaoqing"/>
@@ -89,13 +68,13 @@
                                             </connections>
                                         </button>
                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="分享奖励规则" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="TJ2-3P-bKl">
-                                            <rect key="frame" x="118.5" y="171" width="98" height="19.5"/>
+                                            <rect key="frame" x="118.5" y="171" width="98" height="20"/>
                                             <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
                                             <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                             <nil key="highlightedColor"/>
                                         </label>
-                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="1:所有用户都可参与推广奖励 2:通过分享自己的专属“推广链接”或“二维码”下载千模通告及注册的用户,才算做“我的推广用户” 3:用户充值分成比例为10% 4:分成金额可用于提现或兑换服务" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AC2-E9-oro">
-                                            <rect key="frame" x="15" y="210.5" width="305" height="57.5"/>
+                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="1:所有用户都可参与推广奖励 2:通过分享自己的专属“推广链接”或“二维码”下载千模通告及注册的用户,才算做“我的推广用户” 3:用户充值分成比例为10% 4:分成金额可用于提现或兑换服务" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AC2-E9-oro">
+                                            <rect key="frame" x="15" y="211" width="305" height="57.5"/>
                                             <fontDescription key="fontDescription" type="system" pointSize="12"/>
                                             <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                             <nil key="highlightedColor"/>
@@ -103,16 +82,12 @@
                                     </subviews>
                                     <color key="backgroundColor" red="1" green="0.84705882352941175" blue="0.52549019607843139" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                     <constraints>
-                                        <constraint firstItem="A4s-Kz-RTb" firstAttribute="top" secondItem="uTQ-p4-Xiu" secondAttribute="top" constant="30" id="62y-jk-AJY"/>
-                                        <constraint firstItem="lHR-Zs-o9l" firstAttribute="centerY" secondItem="A4s-Kz-RTb" secondAttribute="centerY" id="9BG-Ln-U17"/>
-                                        <constraint firstItem="lHR-Zs-o9l" firstAttribute="centerX" secondItem="uTQ-p4-Xiu" secondAttribute="centerX" id="Hiv-Tx-HSr"/>
+                                        <constraint firstItem="rbn-Ju-pC8" firstAttribute="centerX" secondItem="uTQ-p4-Xiu" secondAttribute="centerX" id="8S6-7v-vQh"/>
                                         <constraint firstItem="AC2-E9-oro" firstAttribute="top" secondItem="TJ2-3P-bKl" secondAttribute="bottom" constant="20" id="LiB-cc-DLe"/>
-                                        <constraint firstItem="wMg-RN-Aib" firstAttribute="top" secondItem="A4s-Kz-RTb" secondAttribute="bottom" constant="20" id="PP3-g9-Soh"/>
                                         <constraint firstItem="AC2-E9-oro" firstAttribute="leading" secondItem="uTQ-p4-Xiu" secondAttribute="leading" constant="15" id="Qqq-Dw-trA"/>
                                         <constraint firstAttribute="height" constant="456" id="Ssi-Pu-aVJ"/>
-                                        <constraint firstItem="rbn-Ju-pC8" firstAttribute="centerY" secondItem="A4s-Kz-RTb" secondAttribute="centerY" id="bfQ-45-edS"/>
-                                        <constraint firstItem="rbn-Ju-pC8" firstAttribute="leading" secondItem="uTQ-p4-Xiu" secondAttribute="centerX" constant="36" id="dXK-8Q-rhX"/>
-                                        <constraint firstItem="A4s-Kz-RTb" firstAttribute="trailing" secondItem="uTQ-p4-Xiu" secondAttribute="centerX" constant="-36" id="fFx-91-ycB"/>
+                                        <constraint firstItem="wMg-RN-Aib" firstAttribute="top" secondItem="rbn-Ju-pC8" secondAttribute="bottom" constant="20" id="TpB-0V-YpG"/>
+                                        <constraint firstItem="rbn-Ju-pC8" firstAttribute="top" secondItem="uTQ-p4-Xiu" secondAttribute="top" constant="30" id="ZsQ-N7-tEq"/>
                                         <constraint firstAttribute="trailing" secondItem="AC2-E9-oro" secondAttribute="trailing" constant="15" id="i38-oR-X0c"/>
                                         <constraint firstItem="TJ2-3P-bKl" firstAttribute="top" secondItem="wMg-RN-Aib" secondAttribute="bottom" constant="15" id="sou-rA-G22"/>
                                         <constraint firstItem="wMg-RN-Aib" firstAttribute="centerX" secondItem="uTQ-p4-Xiu" secondAttribute="centerX" id="y5a-1F-qvK"/>

+ 31 - 28
model/Classes/Controllers/Controller/SettingsVC/SettingsViewController.m

@@ -77,34 +77,37 @@
 - (void)getInfo {
     [MBProgressHUD showHUDAddedTo:self.view animated:YES];
     NSDictionary *dic = [[NSDictionary alloc] initWithObjectsAndKeys:[ModelUser user].modelpk,@"modelpk", nil];
-    [YanCNetWorkManager requestPostWithURLStr:Url_refreshLogin(PublicUrl) parameters:dic finish:^(id dataDic) {
-        [MBProgressHUD hideHUDForView:self.view animated:YES];
-        
-        NSString *issuccess = dataDic[@"msg"];
-        if ([issuccess isEqualToString:@"success"]) {
-            ModelUser *user = [ModelUser modelUser];
-            [user setValuesForKeysWithDictionary:dataDic[@"data"]];
-            user.modelpk = dataDic[@"data"][@"modelpk"];
-            user.coin_a = dataDic[@"data"][@"coin_a"];
-            user.coin_ir = dataDic[@"data"][@"coin_ir"];
-            user.pk = dataDic[@"data"][@"pk"];
-            user.qrcode = dataDic[@"data"][@"qrcode"];
-            [ModelUser save:user];
-            
-            self.nickname.text = [NSString stringWithFormat:@"%@", dataDic[@"data"][@"pet"]];
-            [self.avatar sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@/%@", PublicUrl, dataDic[@"data"][@"hphoto"]]] placeholderImage:[UIImage imageNamed:@"morentouxiang"]];
-            
-            //            if ([dataDic[@"data"][@"hasred"] isEqualToString:@"1"]) {
-            //                self.notificationView.hidden = NO;
-            //            }else{
-            //                self.notificationView.hidden = YES;
-            //            }
-        } else {
-            [MBProgressHUD showInfo:@"请求失败!"];
-        }
-    } enError:^(NSError *error) {
-        [MBProgressHUD hideHUDForView:self.view animated:YES];
-    }];
+    [YanCNetWorkManager requestPostWithURLStr:Url_refreshLogin(PublicUrl)
+                                   parameters:dic
+                                       finish:^(id dataDic) {
+                                           [MBProgressHUD hideHUDForView:self.view animated:YES];
+                                           
+                                           NSString *issuccess = dataDic[@"msg"];
+                                           if ([issuccess isEqualToString:@"success"]) {
+                                               ModelUser *user = [ModelUser modelUser];
+                                               [user setValuesForKeysWithDictionary:dataDic[@"data"]];
+                                               user.modelpk = dataDic[@"data"][@"modelpk"];
+                                               user.coin_a = dataDic[@"data"][@"coin_a"];
+                                               user.coin_ir = dataDic[@"data"][@"coin_ir"];
+                                               user.pk = dataDic[@"data"][@"pk"];
+                                               user.qrcode = dataDic[@"data"][@"qrcode"];
+                                               [ModelUser save:user];
+                                               
+                                               self.nickname.text = [NSString stringWithFormat:@"%@", dataDic[@"data"][@"pet"]];
+                                               [self.avatar sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@/%@", PublicUrl, dataDic[@"data"][@"hphoto"]]] placeholderImage:[UIImage imageNamed:@"morentouxiang"]];
+                                               
+                                               //            if ([dataDic[@"data"][@"hasred"] isEqualToString:@"1"]) {
+                                               //                self.notificationView.hidden = NO;
+                                               //            }else{
+                                               //                self.notificationView.hidden = YES;
+                                               //            }
+                                           } else {
+                                               [MBProgressHUD showInfo:@"请求失败!"];
+                                           }
+                                       }
+                                      enError:^(NSError *error) {
+                                          [MBProgressHUD hideHUDForView:self.view animated:YES];
+                                      }];
 }
 
 - (void)PushInfo {

+ 11 - 6
model/ModelHeader.h

@@ -15,13 +15,13 @@
 //#define imageURl @"http://118.190.49.85/thmodel/"
 //#define apnsCernameStr @"chmoModelPush"
 
-#define PublicUrl @"http://118.190.49.85:8080/thmodeltest"
-#define imageURl @"http://118.190.49.85:8080/thmodeltest/"
-#define apnsCernameStr @"chmoModelTest"
+//#define PublicUrl @"http://118.190.49.85:8080/thmodeltest"
+//#define imageURl @"http://118.190.49.85:8080/thmodeltest/"
+//#define apnsCernameStr @"chmoModelTest"
 
-//#define PublicUrl @"http://192.168.50.132:8081"
-//#define imageURl @"http://192.168.50.132:8081/"
-//#define apnsCernameStr @"chmoMemberTest"
+#define PublicUrl @"http://192.168.50.132:8081"
+#define imageURl @"http://192.168.50.132:8081/"
+#define apnsCernameStr @"chmoMemberTest"
 
 //#define PublicUrl @"http://192.168.123.90:8080"
 //#define imageURl @"http://192.168.123.90:8080/"
@@ -132,6 +132,11 @@
 /// 27  删除评论
 #define Url_deletePinglun(x) [NSString stringWithFormat:@"%@/model?action=doRemoveComments",x]
 
+#define Url_myTeam(x) [NSString stringWithFormat:@"%@/memberInfo?action=myTeam", x]
+
+#define Url_getCurrentShareCoin(x) [NSString stringWithFormat:@"%@/memberInfo?action=getCurrentShareCoin", x]
+
+#define Url_transferCoin(x) [NSString stringWithFormat:@"%@/memberInfo?action=transferShareCoin", x]
 #endif /* ModelHeader_h */