Commit e2d8f84b by lee

search exclude bonpoint|edit address can input space

parent 52e68ef5
...@@ -353,6 +353,7 @@ ...@@ -353,6 +353,7 @@
DA4E36981F17729C0007E4D0 /* KWMCategoryModel.m in Sources */ = {isa = PBXBuildFile; fileRef = DA4E36971F17729C0007E4D0 /* KWMCategoryModel.m */; }; DA4E36981F17729C0007E4D0 /* KWMCategoryModel.m in Sources */ = {isa = PBXBuildFile; fileRef = DA4E36971F17729C0007E4D0 /* KWMCategoryModel.m */; };
DA4E369E1F188B400007E4D0 /* BUYClient+FilterSoldout.m in Sources */ = {isa = PBXBuildFile; fileRef = DA4E369D1F188B400007E4D0 /* BUYClient+FilterSoldout.m */; }; DA4E369E1F188B400007E4D0 /* BUYClient+FilterSoldout.m in Sources */ = {isa = PBXBuildFile; fileRef = DA4E369D1F188B400007E4D0 /* BUYClient+FilterSoldout.m */; };
DA4E36A11F18A6CB0007E4D0 /* KWMPageResult.m in Sources */ = {isa = PBXBuildFile; fileRef = DA4E36A01F18A6CB0007E4D0 /* KWMPageResult.m */; }; DA4E36A11F18A6CB0007E4D0 /* KWMPageResult.m in Sources */ = {isa = PBXBuildFile; fileRef = DA4E36A01F18A6CB0007E4D0 /* KWMPageResult.m */; };
DA7DF8E51F1DB01600D5239B /* NSString+Format.m in Sources */ = {isa = PBXBuildFile; fileRef = DA7DF8E41F1DB01600D5239B /* NSString+Format.m */; };
DAB6431A1F04CFE5002CD7FE /* AppDelegate+Deeplink.m in Sources */ = {isa = PBXBuildFile; fileRef = DAB643191F04CFE5002CD7FE /* AppDelegate+Deeplink.m */; }; DAB6431A1F04CFE5002CD7FE /* AppDelegate+Deeplink.m in Sources */ = {isa = PBXBuildFile; fileRef = DAB643191F04CFE5002CD7FE /* AppDelegate+Deeplink.m */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
...@@ -982,6 +983,8 @@ ...@@ -982,6 +983,8 @@
DA4E369D1F188B400007E4D0 /* BUYClient+FilterSoldout.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "BUYClient+FilterSoldout.m"; sourceTree = "<group>"; }; DA4E369D1F188B400007E4D0 /* BUYClient+FilterSoldout.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "BUYClient+FilterSoldout.m"; sourceTree = "<group>"; };
DA4E369F1F18A6CB0007E4D0 /* KWMPageResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KWMPageResult.h; sourceTree = "<group>"; }; DA4E369F1F18A6CB0007E4D0 /* KWMPageResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KWMPageResult.h; sourceTree = "<group>"; };
DA4E36A01F18A6CB0007E4D0 /* KWMPageResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KWMPageResult.m; sourceTree = "<group>"; }; DA4E36A01F18A6CB0007E4D0 /* KWMPageResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KWMPageResult.m; sourceTree = "<group>"; };
DA7DF8E31F1DB01600D5239B /* NSString+Format.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+Format.h"; sourceTree = "<group>"; };
DA7DF8E41F1DB01600D5239B /* NSString+Format.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+Format.m"; sourceTree = "<group>"; };
DAB643181F04CFE5002CD7FE /* AppDelegate+Deeplink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "AppDelegate+Deeplink.h"; sourceTree = "<group>"; }; DAB643181F04CFE5002CD7FE /* AppDelegate+Deeplink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "AppDelegate+Deeplink.h"; sourceTree = "<group>"; };
DAB643191F04CFE5002CD7FE /* AppDelegate+Deeplink.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "AppDelegate+Deeplink.m"; sourceTree = "<group>"; }; DAB643191F04CFE5002CD7FE /* AppDelegate+Deeplink.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "AppDelegate+Deeplink.m"; sourceTree = "<group>"; };
/* End PBXFileReference section */ /* End PBXFileReference section */
...@@ -1080,6 +1083,8 @@ ...@@ -1080,6 +1083,8 @@
DA4E36941F1726B80007E4D0 /* UIViewController+HTTP.m */, DA4E36941F1726B80007E4D0 /* UIViewController+HTTP.m */,
DA4E369C1F188B400007E4D0 /* BUYClient+FilterSoldout.h */, DA4E369C1F188B400007E4D0 /* BUYClient+FilterSoldout.h */,
DA4E369D1F188B400007E4D0 /* BUYClient+FilterSoldout.m */, DA4E369D1F188B400007E4D0 /* BUYClient+FilterSoldout.m */,
DA7DF8E31F1DB01600D5239B /* NSString+Format.h */,
DA7DF8E41F1DB01600D5239B /* NSString+Format.m */,
); );
path = Classify; path = Classify;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -2610,6 +2615,7 @@ ...@@ -2610,6 +2615,7 @@
C0A6B3C41F01FC5300D85673 /* KWMSecondDetailView.m in Sources */, C0A6B3C41F01FC5300D85673 /* KWMSecondDetailView.m in Sources */,
DA4E36A11F18A6CB0007E4D0 /* KWMPageResult.m in Sources */, DA4E36A11F18A6CB0007E4D0 /* KWMPageResult.m in Sources */,
9B8298E61EF237FC00743438 /* NSDecimalNumber+Currency.m in Sources */, 9B8298E61EF237FC00743438 /* NSDecimalNumber+Currency.m in Sources */,
DA7DF8E51F1DB01600D5239B /* NSString+Format.m in Sources */,
C034E6F51D6AF197006EE129 /* KWMPickView.m in Sources */, C034E6F51D6AF197006EE129 /* KWMPickView.m in Sources */,
C08870EB1F03481C00C9C1C8 /* KWMCustomsClearance.m in Sources */, C08870EB1F03481C00C9C1C8 /* KWMCustomsClearance.m in Sources */,
C034E8651D6B10A0006EE129 /* PhotoImageView.m in Sources */, C034E8651D6B10A0006EE129 /* PhotoImageView.m in Sources */,
......
//
// NSString+Format.h
// iCemarose
//
// Created by Sanchew on 2017/7/18.
// Copyright © 2017年 kollway. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSString (Format)
- (NSString *) trim;
@end
//
// NSString+Format.m
// iCemarose
//
// Created by Sanchew on 2017/7/18.
// Copyright © 2017年 kollway. All rights reserved.
//
#import "NSString+Format.h"
@implementation NSString (Format)
- (NSString *)trim {
return [self stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
}
@end
...@@ -145,6 +145,7 @@ static NSString *idStr = @"KWMBrandCaramelCell"; ...@@ -145,6 +145,7 @@ static NSString *idStr = @"KWMBrandCaramelCell";
[self.dataList removeAllObjects]; [self.dataList removeAllObjects];
self.searchText = text; self.searchText = text;
self.vBackground.hidden = YES; self.vBackground.hidden = YES;
self.currentPage = @0;
[self getSearchProduct]; [self getSearchProduct];
} }
...@@ -188,6 +189,11 @@ static NSString *idStr = @"KWMBrandCaramelCell"; ...@@ -188,6 +189,11 @@ static NSString *idStr = @"KWMBrandCaramelCell";
//搜索API //搜索API
- (void)getSearchProduct{ - (void)getSearchProduct{
if ([[_searchText lowercaseString] isEqualToString:@"bonpoint"]) {
self.vNoGoods.hidden = NO;
return;
}
if (self.currentPage.integerValue == endPage && endPage != 0) { if (self.currentPage.integerValue == endPage && endPage != 0) {
[self showToast:@"已经是最后一页"]; [self showToast:@"已经是最后一页"];
[self hideLoading]; [self hideLoading];
......
...@@ -145,17 +145,17 @@ ...@@ -145,17 +145,17 @@
}else{ }else{
requestAddress = [[BUYAddress alloc] initWithModelManager:self.client.modelManager JSONDictionary:nil]; requestAddress = [[BUYAddress alloc] initWithModelManager:self.client.modelManager JSONDictionary:nil];
} }
requestAddress.lastName = self.tfName.text; requestAddress.lastName = [self.tfName.text trim];
requestAddress.phone = self.tfPhone.text; requestAddress.phone = [self.tfPhone.text trim];
requestAddress.province = self.tfProvince.text; requestAddress.province = [self.tfProvince.text trim];
requestAddress.provinceCode = 0; requestAddress.provinceCode = 0;
requestAddress.city = self.tfCity.text; requestAddress.city = [self.tfCity.text trim];
requestAddress.address1 = self.tfAddress.text; requestAddress.address1 = [self.tfAddress.text trim];
requestAddress.address2 = self.tfAddressDetail.text; requestAddress.address2 = [self.tfAddressDetail.text trim];
requestAddress.country = self.tfCountry.text; requestAddress.country = [self.tfCountry.text trim];
requestAddress.countryCode = @""; requestAddress.countryCode = @"";
requestAddress.zip = self.tfZip.text; requestAddress.zip = [self.tfZip.text trim];
requestAddress.firstName = requestAddress.firstName?requestAddress.firstName:@""; requestAddress.firstName = [(requestAddress.firstName?requestAddress.firstName:@"") trim];
return requestAddress; return requestAddress;
} }
...@@ -234,7 +234,8 @@ ...@@ -234,7 +234,8 @@
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
{ {
return ![string isEqualToString:@" "]; // return ![string isEqualToString:@" "];
return YES;
} }
#pragma mark - UITextFieldDelegate #pragma mark - UITextFieldDelegate
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#import "UIViewController+HTTP.h" #import "UIViewController+HTTP.h"
#import <RXCollections/RXCollection.h> #import <RXCollections/RXCollection.h>
#import <RegexKitLite/RegexKitLite.h> #import <RegexKitLite/RegexKitLite.h>
#import "NSString+Format.h"
#ifndef Header_Prefix_h #ifndef Header_Prefix_h
#define Header_Prefix_h #define Header_Prefix_h
......
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