Commit 6e8c7fc8 authored by Sandy's avatar Sandy

添加友盟分享

parent e6861c04
......@@ -12,6 +12,8 @@
1900A3411CB6059000B2B7C4 /* introductionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1900A33F1CB6059000B2B7C4 /* introductionViewController.m */; };
1900A3421CB6059000B2B7C4 /* introductionViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1900A3401CB6059000B2B7C4 /* introductionViewController.xib */; };
1900A34A1CB6306600B2B7C4 /* HotBrandModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1900A3491CB6306600B2B7C4 /* HotBrandModel.m */; };
1912FCD71CCDC945004CF976 /* JavenReseller.m in Sources */ = {isa = PBXBuildFile; fileRef = 1912FCD61CCDC945004CF976 /* JavenReseller.m */; };
1912FCDA1CCDC955004CF976 /* JavenResellerModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1912FCD91CCDC955004CF976 /* JavenResellerModel.m */; };
191383351CAB95F5005F6440 /* NoPaymentTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 191383341CAB95F5005F6440 /* NoPaymentTableViewController.m */; };
1913833A1CAB96D4005F6440 /* OrderTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 191383381CAB96D4005F6440 /* OrderTableViewCell.m */; };
1913833B1CAB96D4005F6440 /* OrderTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 191383391CAB96D4005F6440 /* OrderTableViewCell.xib */; };
......@@ -260,6 +262,10 @@
1900A3401CB6059000B2B7C4 /* introductionViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = introductionViewController.xib; sourceTree = "<group>"; };
1900A3481CB6306600B2B7C4 /* HotBrandModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HotBrandModel.h; sourceTree = "<group>"; };
1900A3491CB6306600B2B7C4 /* HotBrandModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HotBrandModel.m; sourceTree = "<group>"; };
1912FCD51CCDC945004CF976 /* JavenReseller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavenReseller.h; sourceTree = "<group>"; };
1912FCD61CCDC945004CF976 /* JavenReseller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JavenReseller.m; sourceTree = "<group>"; };
1912FCD81CCDC955004CF976 /* JavenResellerModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavenResellerModel.h; sourceTree = "<group>"; };
1912FCD91CCDC955004CF976 /* JavenResellerModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JavenResellerModel.m; sourceTree = "<group>"; };
191383331CAB95F5005F6440 /* NoPaymentTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NoPaymentTableViewController.h; path = ../NoPaymentTableViewController.h; sourceTree = "<group>"; };
191383341CAB95F5005F6440 /* NoPaymentTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NoPaymentTableViewController.m; path = ../NoPaymentTableViewController.m; sourceTree = "<group>"; };
191383371CAB96D4005F6440 /* OrderTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OrderTableViewCell.h; sourceTree = "<group>"; };
......@@ -761,6 +767,15 @@
path = Storemanagement;
sourceTree = "<group>";
};
1912FCC71CCDC652004CF976 /* MyTeams */ = {
isa = PBXGroup;
children = (
1912FCD81CCDC955004CF976 /* JavenResellerModel.h */,
1912FCD91CCDC955004CF976 /* JavenResellerModel.m */,
);
path = MyTeams;
sourceTree = "<group>";
};
191383361CAB961B005F6440 /* Order */ = {
isa = PBXGroup;
children = (
......@@ -863,6 +878,8 @@
191AEE651CBCEB7B00F5E535 /* ModelsFiles */ = {
isa = PBXGroup;
children = (
1912FCD51CCDC945004CF976 /* JavenReseller.h */,
1912FCD61CCDC945004CF976 /* JavenReseller.m */,
191AEE761CBCEE6B00F5E535 /* JavenCategory.h */,
191AEE771CBCEE6B00F5E535 /* JavenCategory.m */,
191AEE781CBCEE6B00F5E535 /* JavenCreateInfo.h */,
......@@ -1385,6 +1402,7 @@
19DCCA861C9A95E70072C3BF /* Model */ = {
isa = PBXGroup;
children = (
1912FCC71CCDC652004CF976 /* MyTeams */,
1929401B1CC8D9EF00E377EE /* InviteParterner */,
19DC6B301CC0D5330064A9FD /* CustomerManagement */,
19DC6AFA1CBF867E0064A9FD /* JavenShopModel.h */,
......@@ -1994,6 +2012,7 @@
199BC7BE1C9B045B00E4E0B8 /* RigistViewController.m in Sources */,
199BC7D01C9BAC9600E4E0B8 /* MyTools.m in Sources */,
199B4D681CABBCF600451E0E /* OrderDetailViewController.m in Sources */,
1912FCD71CCDC945004CF976 /* JavenReseller.m in Sources */,
199B4D861CAE43F800451E0E /* OrderDetailTableViewCell.m in Sources */,
199BC7B11C9AD4FD00E4E0B8 /* LoginViewController.m in Sources */,
1979752E1CA90D6C00407E3F /* CommodityManagementViewController.m in Sources */,
......@@ -2078,6 +2097,7 @@
19DCCB661C9A9EB30072C3BF /* IBTCommon.m in Sources */,
197975421CAA23BC00407E3F /* UITableView+Category.m in Sources */,
19DCCB611C9A9EB30072C3BF /* IBTTableViewCellInfo.m in Sources */,
1912FCDA1CCDC955004CF976 /* JavenResellerModel.m in Sources */,
191AEE121CBB818600F5E535 /* UserInfoLastModifyInfo.m in Sources */,
191AEE5E1CBCC6D100F5E535 /* Conditions.m in Sources */,
1979753A1CA9260C00407E3F /* CommodityManagementSortView.m in Sources */,
......@@ -2307,6 +2327,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer";
ENABLE_BITCODE = NO;
GCC_PREFIX_HEADER = Aland/PrefixHeader.pch;
HEADER_SEARCH_PATHS = (
"$(inherited)",
......@@ -2320,7 +2341,7 @@
);
INFOPLIST_FILE = ALand/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = Javen.ALand;
PRODUCT_BUNDLE_IDENTIFIER = com.gomore.aland;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
USER_HEADER_SEARCH_PATHS = "${SRCROOT}/**";
......@@ -2332,7 +2353,8 @@
baseConfigurationReference = AAF51B5D53AE9938C03065C3 /* Pods.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_IDENTITY = "iPhone Distribution: Shanghai Gomore Information Technology Co.,Ltd";
ENABLE_BITCODE = NO;
GCC_PREFIX_HEADER = Aland/PrefixHeader.pch;
HEADER_SEARCH_PATHS = (
"$(inherited)",
......@@ -2346,7 +2368,7 @@
);
INFOPLIST_FILE = ALand/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = Javen.ALand;
PRODUCT_BUNDLE_IDENTIFIER = com.gomore.aland;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
USER_HEADER_SEARCH_PATHS = "${SRCROOT}/**";
......
......@@ -9,6 +9,9 @@
#import "AppDelegate.h"
#import "BaseViewController.h"
#import "LoginViewController.h"
#import "UMSocial.h"
#import "UMSocialQQHandler.h"
#import "UMSocialWechatHandler.h"
@interface AppDelegate ()
@end
......@@ -22,6 +25,9 @@
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
[UMSocialData setAppKey:@"507fcab25270157b37000010"];
[UMSocialQQHandler setQQWithAppId:@"100424468" appKey:@"c7394704798a158208a74ab60104f0ba" url:@"http://www.umeng.com/social"];
[UMSocialWechatHandler setWXAppId:@"wx2e218a9fb84928fa" appSecret:@"400c1925383f36f7768de707c69035e2" url:@"http://www.umeng.com/social"];
if ([UserInfo shareInstance].uuid) {
BaseViewController *baseVC = [[BaseViewController alloc] init];
......
//
// JavenResellerModel.h
//
// Created by Z on 16/4/25
// Copyright (c) 2016 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "JavenReseller.h"
@interface JavenResellerModel : NSObject <NSCoding, NSCopying>
@property (nonatomic, strong) JavenReseller *reseller;
@property (nonatomic, assign) double commission;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
- (instancetype)initWithDictionary:(NSDictionary *)dict;
- (NSDictionary *)dictionaryRepresentation;
@end
//
// JavenResellerModel.m
//
// Created by Z on 16/4/25
// Copyright (c) 2016 __MyCompanyName__. All rights reserved.
//
#import "JavenResellerModel.h"
NSString *const kJavenResellerModelReseller = @"reseller";
NSString *const kJavenResellerModelCommission = @"commission";
@interface JavenResellerModel ()
- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict;
@end
@implementation JavenResellerModel
@synthesize reseller = _reseller;
@synthesize commission = _commission;
+ (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.reseller = [JavenReseller modelObjectWithDictionary:[dict objectForKey:kJavenResellerModelReseller]];
self.commission = [[self objectOrNilForKey:kJavenResellerModelCommission fromDictionary:dict] doubleValue];
}
return self;
}
- (NSDictionary *)dictionaryRepresentation
{
NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
[mutableDict setValue:[self.reseller dictionaryRepresentation] forKey:kJavenResellerModelReseller];
[mutableDict setValue:[NSNumber numberWithDouble:self.commission] forKey:kJavenResellerModelCommission];
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.reseller = [aDecoder decodeObjectForKey:kJavenResellerModelReseller];
self.commission = [aDecoder decodeDoubleForKey:kJavenResellerModelCommission];
return self;
}
- (void)encodeWithCoder:(NSCoder *)aCoder
{
[aCoder encodeObject:_reseller forKey:kJavenResellerModelReseller];
[aCoder encodeDouble:_commission forKey:kJavenResellerModelCommission];
}
- (id)copyWithZone:(NSZone *)zone
{
JavenResellerModel *copy = [[JavenResellerModel alloc] init];
if (copy) {
copy.reseller = [self.reseller copyWithZone:zone];
copy.commission = self.commission;
}
return copy;
}
@end
......@@ -7,9 +7,9 @@
//
#import <UIKit/UIKit.h>
#import "JavenResellerModel.h"
@interface MyTeamCollectionViewCell : UICollectionViewCell
- (void)cellWithModel:(id)model;
- (void)cellWithModel:(JavenResellerModel *)model;
@end
......@@ -24,10 +24,11 @@
// Initialization code
}
- (void)cellWithModel:(id)model
- (void)cellWithModel:(JavenResellerModel *)model
{
self.labelPhone.text = model.reseller.name;
self.labelTeamNums.text = [NSString stringWithFormat:@"一级成员(%d)", 2];
self.labelAmount.text = [NSString stringWithFormat:@"¥%0.2f",12.34];
self.labelAmount.text = [NSString stringWithFormat:@"¥%0.2f",model.commission];
}
@end
......@@ -21,7 +21,6 @@
- (void)updateByOrderType {
if (self.orderType == ORDERTOPTYPE_TRANSPORTED || self.orderType == ORDERTOPTYPE_COMMPLETE) {
[self.viewExpress removeFromSuperview];
}else{
[self.viewExpress removeFromSuperview];
......
......@@ -208,7 +208,7 @@
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
return section == 1 ? 4 : [self.arrData[section] count];
return [self.arrData[section] count];
}
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
......
......@@ -9,18 +9,22 @@
#import "MyTeamViewController.h"
#import "MyTeamCollectionViewCell.h"
#import "MyteamTopView.h"
#import "JavenResellerModel.h"
#define kItemId @"MyTeamCollectionViewCell.h"
@interface MyTeamViewController ()<UICollectionViewDelegate, UICollectionViewDataSource>
@property (nonatomic, strong) UICollectionView *collectionView;
@property (nonatomic, strong) NSMutableArray *arrData;
@end
@implementation MyTeamViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.arrData = [NSMutableArray array];
self.navigationItem.title = @"我的团队";
[self setUpCollectionView];
[self setUpData];
// Do any additional setup after loading the view.
}
......@@ -41,6 +45,37 @@
[self setUpTopView];
}
- (void)setUpData {
NSDictionary *params = @{@"defintion" : @{@"conditions" : @[@{@"operation" : @"reseller uuid equals",
@"parameters" : @[[UserInfo shareInstance].uuid]},
@{@"operation" : @"domain equals",
@"parameters" : @[[UserInfo shareInstance].domain]}],
@"orders" : @[@{@"direction" : @"desc",
@"field" : @""}],
@"page" : @0,
@"pageSize" : @999,
@"probePages" : @0},
@"fetchParts" : [NSNull null]};
WS(weakSelf)
[[HTTPCilent shareCilent] POST:@"reseller/team/query" parameters:params success:^(NSURLSessionDataTask *task, id responseObject) {
if ([responseObject[@"code"] isEqualToNumber:@0]) {
for (NSDictionary *dic in responseObject[@"queryResult"]) {
JavenResellerModel *model = [JavenResellerModel modelObjectWithDictionary:dic];
[weakSelf.arrData addObject:model];
}
[weakSelf.collectionView reloadData];
}
} failure:^(NSURLSessionDataTask *task, NSError *error) {
}];
}
- (void)setUpTopView {
MyteamTopView *topView = [MyteamTopView viewWithNibName:@"MyTeamTopView"];
topView.frame = CGRectMake(0, -140 + 20, kWidth, 100);
......@@ -50,12 +85,13 @@
#pragma mark =========== collection delegate ===========
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
return 10;
return self.arrData.count;
}
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
MyTeamCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:kItemId forIndexPath:indexPath];
[cell cellWithModel:self.arrData[indexPath.row]];
return cell;
}
......
......@@ -19,12 +19,30 @@
[super viewDidLoad];
self.navigationItem.title = @"订单管理";
[self setUpView];
[self setUPData];
// Do any additional setup after loading the view.
}
- (void)setUPData {
NSDictionary *myDictionary = @{@"defintion" : @{@"conditions" : @[@{@"operation" : @"shop uuid equals",
@"parameters" : @[[UserInfo shareInstance].shop.uuid]}],
@"orders" : @[@{@"field" : @"state",
@"direction" : @"desc"}],
@"pageSize" : @0,
@"page" : @99,
@"probePages" : @0},
@"fetchParts" : @[@"string"]};
[[HTTPCilent shareCilent] POST:@"order/query" parameters:myDictionary success:^(NSURLSessionDataTask *task, id responseObject) {
} failure:^(NSURLSessionDataTask *task, NSError *error) {
}];
}
- (void)setUpView {
NSArray *arrTitle = @[@"代支付",@"待发货",@"已发货",@"已完成",@"已取消"];
......
......@@ -13,7 +13,8 @@
#import "StoreNameViewController.h"
#import "introductionViewController.h"
#import "CommodityManagementViewController.h"
@interface StoreManagermentViewController ()<UINavigationControllerDelegate, UIImagePickerControllerDelegate>
#import "UMSocial.h"
@interface StoreManagermentViewController ()<UINavigationControllerDelegate, UIImagePickerControllerDelegate, UMSocialUIDelegate>
@property (nonatomic, strong) SelectPhotoView *photoView;
@property (nonatomic, strong) CoverShadowView *shadowView;
@property (nonatomic, strong) JavenShopModel *shopModel;
......@@ -134,7 +135,22 @@
commodityVC.isShowNavigationBar = YES;
[self.navigationController pushViewController:commodityVC animated:YES];
}
- (IBAction)actionShare:(id)sender {
[UMSocialSnsService presentSnsIconSheetView:self
appKey:@"507fcab25270157b37000010"
shareText:@"你要分享的文字"
shareImage:[UIImage imageNamed:@"icon.png"]
shareToSnsNames:[NSArray arrayWithObjects:UMShareToSina,UMShareToWechatSession,UMShareToQQ,nil]
delegate:self];
}
- (IBAction)QRCodeAction:(id)sender {
StoreQRCodeViewController *QRCodeVC = [[StoreQRCodeViewController alloc] initWithNibName:@"StoreQRCodeViewController" bundle:nil];
[self.navigationController pushViewController:QRCodeVC animated:YES];
}
- (IBAction)actionBack:(id)sender {
[self PopViewControllerAnimated:YES];
}
......@@ -158,12 +174,6 @@
}
- (IBAction)shopLV:(id)sender {
}
- (IBAction)QRCodeAction:(id)sender {
StoreQRCodeViewController *QRCodeVC = [[StoreQRCodeViewController alloc] initWithNibName:@"StoreQRCodeViewController" bundle:nil];
[self.navigationController pushViewController:QRCodeVC animated:YES];
}
- (void)didReceiveMemoryWarning {
......
......@@ -408,6 +408,9 @@
<exclude reference="UX3-LW-Snm"/>
</mask>
</variation>
<connections>
<action selector="actionShare:" destination="-1" eventType="touchUpInside" id="M4r-uZ-Lt8"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="boZ-fm-b1V">
<rect key="frame" x="250" y="0.0" width="125" height="120"/>
......
......@@ -47,7 +47,7 @@
// BaseViewController *baseVC = [[BaseViewController alloc] init];
// baseVC.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
// [self presentViewController:baseVC animated:YES completion:nil];
//
if ([[NSUserDefaults standardUserDefaults] objectForKey:@"passWord"]) {
......@@ -74,10 +74,10 @@
[MBProgressHUD Javen_showError:responseObject[@"message"] onView:weakSelf.view delay:2 complete:nil];
}
} failure:^(NSURLSessionDataTask *task, NSError *error) {
[MBProgressHUD hideHUDForView:self.view animated:YES];
[MBProgressHUD hideHUDForView:self.view animated:YES];
}];
}
}
......
......@@ -74,7 +74,7 @@
NSDictionary *parameters = @{@"domain":@"0001",
@"invitationCode":@"",
@"smsCode":@"1234",
@"smsCode":self.codeTextField.text,
@"mobilephone":self.phoneNumberTextFiled.text,
@"password":[self.passwordTextFiled.text MD5String]};
......
......@@ -26,6 +26,8 @@
@property (nonatomic, assign) BOOL isTableOpen;
@property (nonatomic, assign) BOOL isLeft;
@property (nonatomic, assign) BOOL isLeftOpen;
@property (nonatomic, assign) CGFloat PI;
@end
@implementation JavenSortView
......@@ -37,6 +39,7 @@
- (instancetype)initSortViewLeftTitles:(NSArray *)leftTitles rightTitles:(NSArray *)rightTitles {
self = [super init];
self.PI = 3.143;
self.arrLeft = leftTitles;
self.arrRight = rightTitles;
......@@ -225,7 +228,7 @@
- (void)leftAction:(UIButton *)btn {
[self rightIconAnimateToDefault];
_arrTitles = _arrLeft;
if (self.clickCount != M_PI) {
if (self.clickCount != self.PI) {
[self showTableView];
self.isLeftOpen = YES;
......@@ -240,7 +243,7 @@
- (void)rightBtnAction {
[self leftIconAnimateToDefault];
_arrTitles = _arrRight;
if (self.rightClickCount != M_PI) {
if (self.rightClickCount != self.PI) {
[self showTableView];
self.isLeftOpen = NO;
}else{
......@@ -256,9 +259,9 @@
//控制左边的按钮上的剪头动画
- (void)iconAnimate {
self.clickCount = self.clickCount + M_PI;
if (self.clickCount > M_PI * 2 ) {
self.clickCount = M_PI;
self.clickCount = self.clickCount + self.PI;
if (self.clickCount > self.PI * 2 ) {
self.clickCount = self.PI;
}
WS(weakSelf)
[UIView animateWithDuration:0.3 animations:^{
......@@ -284,9 +287,9 @@
- (void)rightIconAnimate {
self.rightClickCount = self.rightClickCount + M_PI;
if (self.rightClickCount > M_PI * 2 ) {
self.rightClickCount = M_PI;
self.rightClickCount = self.rightClickCount + self.PI;
if (self.rightClickCount > self.PI * 2 ) {
self.rightClickCount = self.PI;
}
WS(weakSelf)
[UIView animateWithDuration:0.3 animations:^{
......
//
// JavenReseller.h
//
// Created by Z on 16/4/25
// Copyright (c) 2016 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface JavenReseller : NSObject <NSCoding, NSCopying>
@property (nonatomic, strong) NSString *mobilephone;
@property (nonatomic, assign) id code;
@property (nonatomic, strong) NSString *name;
@property (nonatomic, assign) id portrait;
@property (nonatomic, strong) NSString *uuid;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
- (instancetype)initWithDictionary:(NSDictionary *)dict;
- (NSDictionary *)dictionaryRepresentation;
@end
//
// JavenReseller.m
//
// Created by Z on 16/4/25
// Copyright (c) 2016 __MyCompanyName__. All rights reserved.
//
#import "JavenReseller.h"
NSString *const kJavenResellerMobilephone = @"mobilephone";
NSString *const kJavenResellerCode = @"code";
NSString *const kJavenResellerName = @"name";
NSString *const kJavenResellerPortrait = @"portrait";
NSString *const kJavenResellerUuid = @"uuid";
@interface JavenReseller ()
- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict;
@end
@implementation JavenReseller
@synthesize mobilephone = _mobilephone;
@synthesize code = _code;
@synthesize name = _name;
@synthesize portrait = _portrait;
@synthesize uuid = _uuid;
+ (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.mobilephone = [self objectOrNilForKey:kJavenResellerMobilephone fromDictionary:dict];
self.code = [self objectOrNilForKey:kJavenResellerCode fromDictionary:dict];
self.name = [self objectOrNilForKey:kJavenResellerName fromDictionary:dict];
self.portrait = [self objectOrNilForKey:kJavenResellerPortrait fromDictionary:dict];
self.uuid = [self objectOrNilForKey:kJavenResellerUuid fromDictionary:dict];
}
return self;
}
- (NSDictionary *)dictionaryRepresentation
{
NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
[mutableDict setValue:self.mobilephone forKey:kJavenResellerMobilephone];
[mutableDict setValue:self.code forKey:kJavenResellerCode];
[mutableDict setValue:self.name forKey:kJavenResellerName];
[mutableDict setValue:self.portrait forKey:kJavenResellerPortrait];
[mutableDict setValue:self.uuid forKey:kJavenResellerUuid];
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.mobilephone = [aDecoder decodeObjectForKey:kJavenResellerMobilephone];
self.code = [aDecoder decodeObjectForKey:kJavenResellerCode];
self.name = [aDecoder decodeObjectForKey:kJavenResellerName];
self.portrait = [aDecoder decodeObjectForKey:kJavenResellerPortrait];
self.uuid = [aDecoder decodeObjectForKey:kJavenResellerUuid];
return self;
}
- (void)encodeWithCoder:(NSCoder *)aCoder
{
[aCoder encodeObject:_mobilephone forKey:kJavenResellerMobilephone];
[aCoder encodeObject:_code forKey:kJavenResellerCode];
[aCoder encodeObject:_name forKey:kJavenResellerName];
[aCoder encodeObject:_portrait forKey:kJavenResellerPortrait];
[aCoder encodeObject:_uuid forKey:kJavenResellerUuid];
}
- (id)copyWithZone:(NSZone *)zone
{
JavenReseller *copy = [[JavenReseller alloc] init];
if (copy) {
copy.mobilephone = [self.mobilephone copyWithZone:zone];
copy.code = [self.code copyWithZone:zone];
copy.name = [self.name copyWithZone:zone];
copy.portrait = [self.portrait copyWithZone:zone];
copy.uuid = [self.uuid copyWithZone:zone];
}
return copy;
}
@end
......@@ -4,10 +4,12 @@
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>zh_CN</string>
<key>CFBundleDisplayName</key>
<string>Aland</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>com.gomore.patrol</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
......@@ -18,6 +20,27 @@
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>QQ05FC5B14</string>
<key>CFBundleURLSchemes</key>
<array>
<string>tencent100424468</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>wx2e218a9fb84928fa</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
......@@ -44,5 +67,78 @@
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>LSApplicationQueriesSchemes</key>
<array>
<!-- 微信 URL Scheme 白名单-->
<string>wechat</string>
<string>weixin</string>
<!-- 新浪微博 URL Scheme 白名单-->
<string>sinaweibohd</string>
<string>sinaweibo</string>
<string>sinaweibosso</string>
<string>weibosdk</string>
<string>weibosdk2.5</string>
<!-- QQ、Qzone URL Scheme 白名单-->
<string>mqqapi</string>
<string>mqq</string>
<string>mqqOpensdkSSoLogin</string>
<string>mqqconnect</string>
<string>mqqopensdkdataline</string>
<string>mqqopensdkgrouptribeshare</string>
<string>mqqopensdkfriend</string>
<string>mqqopensdkapi</string>
<string>mqqopensdkapiV2</string>
<string>mqqopensdkapiV3</string>
<string>mqzoneopensdk</string>
<string>wtloginmqq</string>
<string>wtloginmqq2</string>
<string>mqqwpa</string>
<string>mqzone</string>
<string>mqzonev2</string>
<string>mqzoneshare</string>
<string>wtloginqzone</string>
<string>mqzonewx</string>
<string>mqzoneopensdkapiV2</string>
<string>mqzoneopensdkapi19</string>
<string>mqzoneopensdkapi</string>
<string>mqqbrowser</string>
<string>mttbrowser</string>
<!-- 支付宝 URL Scheme 白名单-->
<string>alipay</string>
<string>alipayshare</string>
<!-- 人人 URL Scheme 白名单-->
<string>renrenios</string>
<string>renrenapi</string>
<string>renren</string>
<string>renreniphone</string>
<!-- 来往 URL Scheme 白名单-->
<string>laiwangsso</string>
<!-- 易信 URL Scheme 白名单-->
<string>yixin</string>
<string>yixinopenapi</string>
<!-- instagram URL Scheme 白名单-->
<string>instagram</string>
<!-- whatsapp URL Scheme 白名单-->
<string>whatsapp</string>
<!-- line URL Scheme 白名单-->
<string>line</string>
<!-- Facebook URL Scheme 白名单-->
<string>fbapi</string>
<string>fb-messenger-api</string>
<string>fbauth2</string>
<string>fbshareextension</string>
</array>
</dict>
</plist>
......@@ -8,3 +8,5 @@ pod 'IQKeyboardManager', '~> 4.0.0'
pod 'SDCycleScrollView', '~> 1.61'
pod 'AFNetworking', '~> 3.0.4'
pod 'MJExtension', '~> 3.0.10'
pod 'UMengSocial', '~> 5.0'
......@@ -27,6 +27,7 @@ PODS:
- SDWebImage/Core (= 3.7.5)
- SDWebImage/Core (3.7.5)
- SSKeychain (1.3.1)
- UMengSocial (5.0)
DEPENDENCIES:
- AFNetworking (~> 3.0.4)
......@@ -38,6 +39,7 @@ DEPENDENCIES:
- SDCycleScrollView (~> 1.61)
- SDWebImage (~> 3.7.5)
- SSKeychain (~> 1.3.1)
- UMengSocial (~> 5.0)
SPEC CHECKSUMS:
AFNetworking: a0075feb321559dc78d9d85b55d11caa19eabb93
......@@ -49,5 +51,6 @@ SPEC CHECKSUMS:
SDCycleScrollView: a002d85b30cfa9d0ac74069cd3973ca19ff4f22f
SDWebImage: 69c6303e3348fba97e03f65d65d4fbc26740f461
SSKeychain: 04c4ec40f4c3deda524e269bc76e5f30e638a174
UMengSocial: 48b67179c492a8cf7803fbb0438b8f55432e2fc1
COCOAPODS: 0.39.0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment