Commit 6b88076d authored by 曹云霄's avatar 曹云霄

caoyunxiao

parent 6d40a954
...@@ -193,6 +193,7 @@ ...@@ -193,6 +193,7 @@
#pragma mark -UITextFieldDelegate代理 ----搜索 #pragma mark -UITextFieldDelegate代理 ----搜索
- (BOOL)textFieldShouldReturn:(UITextField *)textField - (BOOL)textFieldShouldReturn:(UITextField *)textField
{ {
[textField resignFirstResponder];
[self searchCustomerInforMation]; [self searchCustomerInforMation];
return YES; return YES;
} }
...@@ -209,9 +210,11 @@ ...@@ -209,9 +210,11 @@
[self CreateMBProgressHUDLoding]; [self CreateMBProgressHUDLoding];
ConsumerQueryCondition *searchCustomer = [[ConsumerQueryCondition alloc]init]; ConsumerQueryCondition *searchCustomer = [[ConsumerQueryCondition alloc]init];
DataPage *page = [[DataPage alloc]init];
page.page = 0;
searchCustomer.page = page;
searchCustomer.nameEquals = self.searchPersonInformationField.text; searchCustomer.nameEquals = self.searchPersonInformationField.text;
searchCustomer.mobileEquals = self.searchPersonInformationField.text; searchCustomer.mobileEquals = self.searchPersonInformationField.text;
searchCustomer.page.sort = @"lastVisitedTime";
//request //request
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/consumer/query"] WithRequestType:0 WithParameter:searchCustomer WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/consumer/query"] WithRequestType:0 WithParameter:searchCustomer WithReturnValueBlock:^(id returnValue) {
......
...@@ -487,13 +487,17 @@ ...@@ -487,13 +487,17 @@
condition.spaceEquals = spaceCode; condition.spaceEquals = spaceCode;
condition.materialEqueals = materialCode; condition.materialEqueals = materialCode;
if (![priceTitle isEqualToString:@"全部"]) {
//价格字符串切割 //价格字符串切割
NSArray *spacrArray = [priceTitle componentsSeparatedByString:@"到"]; NSArray *spacrArray = [priceTitle componentsSeparatedByString:@"到"];
condition.startprice = [NSNumber numberWithInteger:[[spacrArray objectAtIndex_opple:0] integerValue]]; condition.startprice = [NSNumber numberWithInteger:[[spacrArray objectAtIndex_opple:0] integerValue]];
condition.endprice = [NSNumber numberWithInteger:[[spacrArray objectAtIndex_opple:1] integerValue]]; condition.endprice = [NSNumber numberWithInteger:[[spacrArray objectAtIndex_opple:1] integerValue]];
}
__weak typeof (self) Weakself = self; __weak typeof (self) Weakself = self;
NSLog(@"%@",[condition toDictionary]); // NSLog(@"%@",[condition toDictionary]);
[self getGoodsListdatas:condition returnResponse:^(GoodsResponse *response) { [self getGoodsListdatas:condition returnResponse:^(GoodsResponse *response) {
Weakself.screenSecondView.totalNumber = response.total; Weakself.screenSecondView.totalNumber = response.total;
......
...@@ -214,6 +214,14 @@ ...@@ -214,6 +214,14 @@
} }
#pragma mark -二维码扫描
- (void)QrcodeButtonClick
{
NSLog(@"二维码扫描");
}
- (void)didReceiveMemoryWarning { - (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning]; [super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated. // Dispose of any resources that can be recreated.
......
...@@ -17,6 +17,11 @@ ...@@ -17,6 +17,11 @@
*/ */
- (void)ButtonClickAction:(NSInteger)Buttontag withButton:(UIButton *)button; - (void)ButtonClickAction:(NSInteger)Buttontag withButton:(UIButton *)button;
/**
* 点击二维码扫描按钮
*/
- (void)QrcodeButtonClick;
@end @end
......
...@@ -61,37 +61,43 @@ ...@@ -61,37 +61,43 @@
[self addSubview:backView]; [self addSubview:backView];
//搜索图标 //搜索图标
UIImageView *imageview = [[UIImageView alloc]initWithFrame:CGRectMake(10, 7.5, 20, 20)];
imageview.image = TCImage(@"search");
[backView addSubview:imageview];
//输入框 //输入框
UITextField *inputField = [[UITextField alloc]initWithFrame:CGRectMake(50, 0, 170, 35)]; UITextField *inputField = [[UITextField alloc]initWithFrame:CGRectMake(45, 0, 170, 35)];
inputField.borderStyle = UITextBorderStyleNone; inputField.borderStyle = UITextBorderStyleNone;
inputField.placeholder = @"请输入关键字"; inputField.placeholder = @"请输入关键字";
inputField.font = [UIFont systemFontOfSize:12]; inputField.font = [UIFont systemFontOfSize:12];
[backView addSubview:inputField]; [backView addSubview:inputField];
//扫描二维码
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
button.frame = CGRectMake(backView.frame.size.width+backView.frame.origin.x+15, (NavigationHeight-20)/2, 25, 20);
[button setBackgroundImage:TCImage(@"圆角矩形-3") forState:UIControlStateNormal];
[button addTarget:self action:@selector(QrCodeButtonClickAction) forControlEvents:UIControlEventTouchUpInside];
[self addSubview:button];
//按钮 //按钮
NSArray *titleArray = [NSArray arrayWithObjects:@"右视图",@"某某用户",@"我的客户",@"购物车", nil]; NSArray *titleArray = [NSArray arrayWithObjects:@"右视图",@"某某用户",@"我的客户",@"购物车", nil];
//图片
NSArray *imageArray = [NSArray arrayWithObjects:@"dial",@"Cog",@"data",@"ablum", nil];
for (int i=1; i<5; i++) { for (int i=1; i<5; i++) {
CustomButton *button = [CustomButton buttonWithType:UIButtonTypeCustom]; CustomButton *button = [CustomButton buttonWithType:UIButtonTypeCustom];
button.frame = CGRectMake(ScreenWidth-(i*ButtonWIDTH + Buttoninterval*(i-1)), 10, ButtonWIDTH, ButtonRIGHT); button.frame = CGRectMake(ScreenWidth-(i*ButtonWIDTH + Buttoninterval*(i-1)), 10, ButtonWIDTH, ButtonRIGHT);
[button setTitleColor:[UIColor redColor] forState:UIControlStateNormal]; [button setTitleColor:kMainBlueColor forState:UIControlStateNormal];
[button setTitle:[titleArray objectAtIndex_opple:i-1] forState:UIControlStateNormal]; [button setTitle:[titleArray objectAtIndex_opple:i-1] forState:UIControlStateNormal];
button.tag = 100+i-1; button.tag = 100+i-1;
[button addTarget:self action:@selector(ButtonClick:) forControlEvents:UIControlEventTouchUpInside]; [button addTarget:self action:@selector(ButtonClick:) forControlEvents:UIControlEventTouchUpInside];
if (i == 4) { if (i == 4) {
button.instructionsNumber = i; button.instructionsNumber = i;
} }
if (i==1) { [button setImage:TCImage([imageArray objectAtIndex_opple:i-1]) forState:UIControlStateNormal];
[button setImage:TCImage(@"business") forState:UIControlStateNormal];
}else
{
[button setImage:TCImage(@"data") forState:UIControlStateNormal];
}
[self addSubview:button]; [self addSubview:button];
} }
...@@ -104,6 +110,15 @@ ...@@ -104,6 +110,15 @@
} }
#pragma mark -二维码扫描码
- (void)QrCodeButtonClickAction
{
if ([self.delegate respondsToSelector:@selector(QrcodeButtonClick)]) {
[self.delegate QrcodeButtonClick];
}
}
#pragma mark -按钮事件响应 #pragma mark -按钮事件响应
- (void)ButtonClick:(UIButton *)button - (void)ButtonClick:(UIButton *)button
{ {
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
{ {
if (self = [super initWithFrame:frame]) { if (self = [super initWithFrame:frame]) {
self.titleLabel.font = [UIFont systemFontOfSize:13]; self.titleLabel.font = [UIFont systemFontOfSize:11];
self.titleLabel.textAlignment = NSTextAlignmentCenter; self.titleLabel.textAlignment = NSTextAlignmentCenter;
} }
......
...@@ -74,7 +74,10 @@ static NetworkRequestClassManager *manager = nil; ...@@ -74,7 +74,10 @@ static NetworkRequestClassManager *manager = nil;
if (requestType == 0) { if (requestType == 0) {
[manager POST:requestURLString parameters:[jastorobject toDictionary] progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) { NSLog(@"%@",[jastorobject toDictionary]);
// toDictionary 转字典
[manager POST:requestURLString parameters:[jastorobject toJSONString] progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
successBlock(responseObject); successBlock(responseObject);
...@@ -86,7 +89,7 @@ static NetworkRequestClassManager *manager = nil; ...@@ -86,7 +89,7 @@ static NetworkRequestClassManager *manager = nil;
}else if (requestType == 1){ }else if (requestType == 1){
[manager GET:requestURLString parameters:[jastorobject toDictionary] progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) { [manager GET:requestURLString parameters:[jastorobject toJSONString] progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
successBlock(responseObject); successBlock(responseObject);
......
...@@ -57,6 +57,10 @@ ...@@ -57,6 +57,10 @@
*/ */
#define TCImage(imageName) [UIImage imageNamed:[NSString stringWithFormat:@"%@",imageName]] #define TCImage(imageName) [UIImage imageNamed:[NSString stringWithFormat:@"%@",imageName]]
/**
* 默认显示头像
*/
#define ReplaceImage [UIImage imageNamed:@"矢量智能对象"]]
/** /**
* AppDelegate代理 * AppDelegate代理
......
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