//
//  MyAcountViewController.m
//  ALand
//
//  Created by Z on 16/4/28.
//  Copyright © 2016年 Z. All rights reserved.
//

#import "MyAcountViewController.h"
#import "JavenShopModel.h"
#import "MyAcountHelfViewController.h"
@interface MyAcountViewController ()
@property (nonatomic, strong) JavenShopModel *shopModel;
@end

@implementation MyAcountViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    [self setUpdata];
}

- (void)setUpdata {
    
    WS(weakSelf)
    [[HTTPCilent shareCilent] GET:[NSString stringWithFormat:@"shop/get/%@", [UserInfo shareInstance].shop.uuid] parameters:nil success:^(NSURLSessionDataTask *task, id responseObject) {
        
        if (weakSelf.shopModel) {
            [weakSelf.shopModel updateWithDictionary:responseObject[@"shop"]];
        }else{
            weakSelf.shopModel = [JavenShopModel modelObjectWithDictionary:responseObject[@"shop"]];
        }
        CLog(@"%p",weakSelf.shopModel);
        //[weakSelf.viewHomeTop updateTopViewInfo:weakSelf.shopModel];
    } failure:^(NSURLSessionDataTask *task, NSError *error) {
        
    }];
    
}
- (IBAction)actionHelp:(id)sender {
    MyAcountHelfViewController *helpVC = [[MyAcountHelfViewController alloc] init];
    helpVC.isShowNavigationBar = YES;
    [self.navigationController pushViewController:helpVC animated:YES];
    
}
- (IBAction)actionBac:(id)sender {
    [self popAction];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
