修改细节

This commit is contained in:
wushenghua
2016-01-20 17:14:02 +08:00
parent 3b3db7397a
commit e0bbd64444
7 changed files with 169 additions and 68 deletions
Vendored
BIN
View File
Binary file not shown.
+149
View File
@@ -0,0 +1,149 @@
#
# Be sure to run `pod spec lint WlianWorld.podspec' to ensure this is a
# valid spec and to remove all comments including this before submitting the spec.
#
# To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html
# To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/
#
Pod::Spec.new do |s|
# ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# These will help people to find your library, and whilst it
# can feel like a chore to fill in it's definitely to your advantage. The
# summary should be tweet-length, and the description more in depth.
#
s.name = "WlianWorld"
s.version = "0.0.1"
s.summary = "微连天下"
# This description is used to generate tags and improve search results.
# * Think: What does it do? Why did you write it? What is the focus?
# * Try to keep it short, snappy and to the point.
# * Write the description between the DESC delimiters below.
# * Finally, don't worry about the indent, CocoaPods strips it!
s.homepage = "https://github.com/wu736139669"
# s.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif"
# ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Licensing your code is important. See http://choosealicense.com for more info.
# CocoaPods will detect a license file if there is a named LICENSE*
# Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'.
#
# s.license = "MIT (example)"
s.license = { :type => "MIT", :file => "LICENSE" }
# ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Specify the authors of the library, with email addresses. Email addresses
# of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also
# accepts just a name if you'd rather not provide an email address.
#
# Specify a social_media_url where others can refer to, for example a twitter
# profile URL.
#
s.author = { "wushenghua" => "https://github.com/wu736139669" }
# Or just: s.author = "wushenghua"
# s.authors = { "wushenghua" => "https://github.com/wu736139669" }
# s.social_media_url = "http://twitter.com/wushenghua"
# ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# If this Pod runs only on iOS or OS X, then specify the platform and
# the deployment target. You can optionally include the target after the platform.
#
s.platform = :ios
s.platform = :ios, "7.0"
# When using multiple platforms
# s.ios.deployment_target = "5.0"
# s.osx.deployment_target = "10.7"
# s.watchos.deployment_target = "2.0"
# s.tvos.deployment_target = "9.0"
# ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Specify the location from where the source should be retrieved.
# Supports git, hg, bzr, svn and HTTP.
#
s.source = { :git => "https://github.com/wu736139669/WlianWorld.git", :tag => "0.0.1" }
# ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# CocoaPods is smart about how it includes source code. For source files
# giving a folder will include any swift, h, m, mm, c & cpp files.
# For header files it will include any header in the folder.
# Not including the public_header_files will make all headers public.
#
s.source_files = 'WlianWorld/Model/*','WlianWorld/Util/**/*','WlianWorld/View/*','WlianWorld/ViewModel/*','WlianWorld/Config/*'
# s.exclude_files = "Classes/Exclude"
s.public_header_files = 'WlianWorld/Config/*.{h}','WlianWorld/Model/*.{h}','WlianWorld/Util/*.{h}'
s.frameworks = "UIKit"
s.dependency 'AFNetworking', '~> 2.5.4'
s.dependency 'DTCoreText', '~>1.6.17'
s.dependency 'EGOCache', '~>2.13'
s.dependency 'Godzippa', '~>1.1.0'
s.dependency 'MBProgressHUD', '~>0.9.2'
s.dependency 'MJRefresh', '~>3.1.0'
s.dependency 'Reachability', '~>3.2'
s.dependency 'ReactiveCocoa', '~>2.5'
s.dependency 'SDWebImage', '~>3.7.4'
s.dependency 'SecureUDID', '~>1.1'
s.dependency 'STableViewController', '~>0.0.1'
s.dependency 'SVWebViewController', '~>1.0'
s.dependency 'SBJson', '~>4.0.2'
# ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# A list of resources included with the Pod. These are copied into the
# target bundle with a build phase script. Anything else will be cleaned.
# You can preserve files from being cleaned, please don't preserve
# non-essential files like tests, examples and documentation.
#
# s.resource = "icon.png"
# s.resources = "Resources/*.png"
# s.preserve_paths = "FilesToSave", "MoreFilesToSave"
# ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Link your library with frameworks, or libraries. Libraries do not include
# the lib prefix of their name.
#
# s.framework = "SomeFramework"
# s.frameworks = "SomeFramework", "AnotherFramework"
# s.library = "iconv"
# s.libraries = "iconv", "xml2"
# ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# If your library depends on compiler flags you can set them in the xcconfig hash
# where they will only apply to your library. If you depend on other Podspecs
# you can include multiple dependencies to ensure it works.
s.requires_arc = true
# s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" }
# s.dependency "JSONKit", "~> 1.4"
end
-30
View File
@@ -1,30 +0,0 @@
Pod::Spec.new do |spec|
spec.name = "WlianWorld"
spec.version = "1.0.0"
spec.summary = "WlianWorld, 微连天下"
spec.homepage = "https://github.com/wu736139669"
spec.license = { :type => 'MIT', :file => 'LICENSE' }
spec.author = { "wushenghua" => "736139669@qq.com.com" }
spec.source = { :git => "https://github.com/wu736139669/WlianWorld.git", :tag => "1.0.0" }
spec.platform = :ios, "7.0"
spec.requires_arc = true
spec.source_files = 'WlianWorld/Model/*,WlianWorld/Util/**/*,WlianWorld/View/*,WlianWorld/ViewModel/*'
spec.resource_bundles = {
'Resources' => ['WlianWorld/Resource/*.{xib,json,png,jpg,gif,js}']
}
spec.frameworks = "UIKit"
spec.dependency 'AFNetworking', '~> 2.5.4'
spec.dependency 'DTCoreText', '~>1.6.17'
spec.dependency 'EGOCache', '~>2.13'
spec.dependency 'Godzippa', '~>1.1.0'
spec.dependency 'MBProgressHUD', '~>0.9.2'
spec.dependency 'MJRefresh', '~>3.1.0'
spec.dependency 'Reachability', '~>3.2'
spec.dependency 'ReactiveCocoa', '~>2.5'
spec.dependency 'SDWebImage', '~>3.7.4'
spec.dependency 'SecureUDID', '~>1.1'
spec.dependency 'STableViewController', '~>0.0.1'
spec.dependency 'SVWebViewController', '~>1.0'
spec.dependency 'SBJson', '~>4.0.2
end
@@ -51,22 +51,6 @@
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "WlianWorld/Model/LoginModel.m"
timestampString = "469434914.778453"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "46"
endingLineNumber = "46"
landmarkName = "-loginSignalWithAccount:withPassword:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
+8 -8
View File
@@ -6,17 +6,17 @@
// Copyright © 2015年 ash. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "BaseModel.h"
#import <ReactiveCocoa/ReactiveCocoa.h>
@interface LoginModel : BaseModel
@property (nonatomic,readonly) NSNumber* status;
@property (nonatomic, readonly) NSString *msg;
@property (nonatomic,readonly) NSString* userid;
@property (nonatomic, readonly) NSString *username;
@property (nonatomic,readonly) NSString* shopid;
@property (nonatomic, readonly) NSString *shopname;
@property (nonatomic,readonly) NSString* token;
@property (nonatomic, readonly) NSNumber* status;
@property (nonatomic, readonly) NSString* msg;
@property (nonatomic, readonly) NSString* userid;
@property (nonatomic, readonly) NSString* username;
@property (nonatomic, readonly) NSString* shopid;
@property (nonatomic, readonly) NSString* shopname;
@property (nonatomic, readonly) NSString* token;
- (RACSignal*)loginSignalWithAccount:(NSString*)account withPassword:(NSString*)password;
@end
+9 -11
View File
@@ -10,8 +10,8 @@
#import "LoginViewModel.h"
@implementation LoginModel
+ (NSDictionary *)JSONKeyPathsByPropertyKey {
+ (NSDictionary*)JSONKeyPathsByPropertyKey
{
NSMutableDictionary* dic = [NSMutableDictionary dictionaryWithDictionary:[super JSONKeyPathsByPropertyKey]];
[dic setObject:@"info.msg" forKey:@"msg"];
[dic setObject:@"info.status" forKey:@"status"];
@@ -22,11 +22,10 @@
[dic setObject:@"info.userinfo.token" forKey:@"token"];
return dic;
}
- (instancetype)initWithDictionary:(NSDictionary *)dictionaryValue error:(NSError **)error
- (instancetype)initWithDictionary:(NSDictionary*)dictionaryValue error:(NSError**)error
{
self = [super initWithDictionary:dictionaryValue error:error];
if (self != nil)
{
if (self != nil) {
}
return self;
}
@@ -34,22 +33,21 @@
{
self = [super init];
if (self)
{
if (self) {
}
return self;
}
-(RACSignal*)loginSignalWithAccount:(NSString *)account withPassword:(NSString *)password
- (RACSignal*)loginSignalWithAccount:(NSString*)account withPassword:(NSString*)password
{
RACSignal* singnal = [BaseWLService requireWithProperty:[self requireWithDic:[NSDictionary dictionaryWithObjectsAndKeys:account,@"username",password,@"password", nil] ]];
RACSignal* singnal = [BaseWLService requireWithProperty:[self requireWithDic:[NSDictionary dictionaryWithObjectsAndKeys:account, @"username", password, @"password", nil]]];
return singnal;
}
-(BaseEntity*)requireWithDic:(NSDictionary *)dic
- (BaseEntity*)requireWithDic:(NSDictionary*)dic
{
BaseEntity *pro = [[BaseEntity alloc] init];
BaseEntity* pro = [[BaseEntity alloc] init];
pro.requireType = HTTPRequestTypeWithPOST;
pro.responesOBJ = self.class;
pro.reqURL = @"";