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

caoyunxiao

parent be71aab5
...@@ -52,6 +52,24 @@ ...@@ -52,6 +52,24 @@
*/ */
@property (weak, nonatomic) IBOutlet UIButton *sureChangeButton; @property (weak, nonatomic) IBOutlet UIButton *sureChangeButton;
/**
* 用户名背景
*/
@property (weak, nonatomic) IBOutlet UIView *userNameBack;
/**
* 旧密码背景
*/
@property (weak, nonatomic) IBOutlet UIView *oldPasswordBack;
/**
* 新密码背景
*/
@property (weak, nonatomic) IBOutlet UIView *NewPasswrodBack;
@property (nonatomic,assign) id<CancelButtondelegate>delegate; @property (nonatomic,assign) id<CancelButtondelegate>delegate;
......
...@@ -34,16 +34,17 @@ ...@@ -34,16 +34,17 @@
#pragma mark - UI #pragma mark - UI
- (void)uiConfigAction - (void)uiConfigAction
{ {
self.userName.layer.masksToBounds = YES; self.userNameBack.layer.masksToBounds = YES;
self.userName.layer.cornerRadius = kCornerRadius; self.userNameBack.layer.cornerRadius = kCornerRadius;
self.oldPassWord.layer.masksToBounds = YES; self.oldPasswordBack.layer.masksToBounds = YES;
self.oldPassWord.layer.cornerRadius = kCornerRadius; self.oldPasswordBack.layer.cornerRadius = kCornerRadius;
self.NewPassWord.layer.masksToBounds = YES; self.NewPasswrodBack.layer.masksToBounds = YES;
self.NewPassWord.layer.cornerRadius = kCornerRadius; self.NewPasswrodBack.layer.cornerRadius = kCornerRadius;
self.cancelButton.layer.masksToBounds = YES; self.cancelButton.layer.masksToBounds = YES;
self.cancelButton.layer.cornerRadius = kCornerRadius; self.cancelButton.layer.cornerRadius = kCornerRadius;
self.sureChangeButton.layer.masksToBounds = YES; self.sureChangeButton.layer.masksToBounds = YES;
self.sureChangeButton.layer.cornerRadius = kCornerRadius; self.sureChangeButton.layer.cornerRadius = kCornerRadius;
self.userName.text = [Shoppersmanager manager].userNameString;
} }
...@@ -75,17 +76,19 @@ ...@@ -75,17 +76,19 @@
[self ErrorMBProgressView:@"新密码不能为空"]; [self ErrorMBProgressView:@"新密码不能为空"];
} }
[self CreateMBProgressHUDLoding];
ModifyPasswordRequest *modify = [[ModifyPasswordRequest alloc]init]; ModifyPasswordRequest *modify = [[ModifyPasswordRequest alloc]init];
modify.oldPassword = self.oldPassWord.text; modify.oldPassword = self.oldPassWord.text;
modify.Password = self.NewPassWord.text; modify.fnewPassword = self.NewPassWord.text;
modify.employeeId = [Shoppersmanager manager].Shoppers.employee.fid;
//修改密码 //修改密码
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/employee/modifyPassword"] WithRequestType:0 WithParameter:modify WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/employee/modifyPassword"] WithRequestType:0 WithParameter:modify WithReturnValueBlock:^(id returnValue) {
[self RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
NSLog(@"%@",returnValue);
}else }else
{ {
...@@ -98,6 +101,7 @@ ...@@ -98,6 +101,7 @@
} WithFailureBlock:^(id error) { } WithFailureBlock:^(id error) {
NSLog(@"%@",error);
}]; }];
......
...@@ -7,10 +7,13 @@ ...@@ -7,10 +7,13 @@
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="ChangePasswordViewController"> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="ChangePasswordViewController">
<connections> <connections>
<outlet property="NewPassWord" destination="TJV-CB-Mqw" id="SaI-nb-f0s"/> <outlet property="NewPassWord" destination="TJV-CB-Mqw" id="SaI-nb-f0s"/>
<outlet property="NewPasswrodBack" destination="JmR-jX-3js" id="TjS-WL-C60"/>
<outlet property="cancelButton" destination="0eq-Wo-sGl" id="ci8-5b-oY1"/> <outlet property="cancelButton" destination="0eq-Wo-sGl" id="ci8-5b-oY1"/>
<outlet property="oldPassWord" destination="pXm-yF-r4F" id="yxA-Zo-zo2"/> <outlet property="oldPassWord" destination="pXm-yF-r4F" id="yxA-Zo-zo2"/>
<outlet property="oldPasswordBack" destination="xd4-4t-K3O" id="42e-Od-g5a"/>
<outlet property="sureChangeButton" destination="Uy9-G9-RqB" id="6yk-9i-HQ3"/> <outlet property="sureChangeButton" destination="Uy9-G9-RqB" id="6yk-9i-HQ3"/>
<outlet property="userName" destination="I7F-SJ-w3C" id="uNM-v8-eeN"/> <outlet property="userName" destination="I7F-SJ-w3C" id="uNM-v8-eeN"/>
<outlet property="userNameBack" destination="r3Z-dg-r5q" id="gdA-Jv-JOz"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections> </connections>
</placeholder> </placeholder>
...@@ -23,35 +26,14 @@ ...@@ -23,35 +26,14 @@
<rect key="frame" x="10" y="20" width="15" height="15"/> <rect key="frame" x="10" y="20" width="15" height="15"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</imageView> </imageView>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="账户名" textAlignment="natural" minimumFontSize="17" clearButtonMode="always" id="I7F-SJ-w3C">
<rect key="frame" x="38" y="12" width="210" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.94117647058823528" green="0.93725490196078431" blue="0.96078431372549022" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<textInputTraits key="textInputTraits"/>
</textField>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Lock-0" id="p5A-4a-qsN"> <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Lock-0" id="p5A-4a-qsN">
<rect key="frame" x="10" y="60" width="15" height="15"/> <rect key="frame" x="10" y="60" width="15" height="15"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</imageView> </imageView>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="旧密码" textAlignment="natural" minimumFontSize="17" clearButtonMode="always" id="pXm-yF-r4F">
<rect key="frame" x="38" y="53" width="210" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.94117647058823528" green="0.93725490196078431" blue="0.96078431372549022" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<textInputTraits key="textInputTraits"/>
</textField>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Lock-0" id="ETT-6B-Tnz"> <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Lock-0" id="ETT-6B-Tnz">
<rect key="frame" x="10" y="100" width="15" height="15"/> <rect key="frame" x="10" y="100" width="15" height="15"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</imageView> </imageView>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="新密码" textAlignment="natural" minimumFontSize="17" clearButtonMode="always" id="TJV-CB-Mqw">
<rect key="frame" x="38" y="92" width="210" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.94117647058823528" green="0.93725490196078431" blue="0.96078431372549022" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<textInputTraits key="textInputTraits"/>
</textField>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="0eq-Wo-sGl"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="0eq-Wo-sGl">
<rect key="frame" x="10" y="138" width="80" height="30"/> <rect key="frame" x="10" y="138" width="80" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
...@@ -76,6 +58,48 @@ ...@@ -76,6 +58,48 @@
<action selector="sureChangeButtonClick:" destination="-1" eventType="touchUpInside" id="gVs-MV-AHp"/> <action selector="sureChangeButtonClick:" destination="-1" eventType="touchUpInside" id="gVs-MV-AHp"/>
</connections> </connections>
</button> </button>
<view contentMode="scaleToFill" id="r3Z-dg-r5q">
<rect key="frame" x="38" y="13" width="210" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="账户名" textAlignment="natural" minimumFontSize="17" clearButtonMode="always" id="I7F-SJ-w3C">
<rect key="frame" x="10" y="0.0" width="200" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<textInputTraits key="textInputTraits"/>
</textField>
</subviews>
<color key="backgroundColor" red="0.94117647058823528" green="0.93725490196078431" blue="0.96078431372549022" alpha="1" colorSpace="calibratedRGB"/>
</view>
<view contentMode="scaleToFill" id="xd4-4t-K3O">
<rect key="frame" x="38" y="52" width="210" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="旧密码" textAlignment="natural" minimumFontSize="17" clearButtonMode="always" id="pXm-yF-r4F">
<rect key="frame" x="10" y="0.0" width="200" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<textInputTraits key="textInputTraits" secureTextEntry="YES"/>
</textField>
</subviews>
<color key="backgroundColor" red="0.94117647058823528" green="0.93725490196078431" blue="0.96078431372549022" alpha="1" colorSpace="calibratedRGB"/>
</view>
<view contentMode="scaleToFill" id="JmR-jX-3js">
<rect key="frame" x="38" y="92" width="210" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="新密码" textAlignment="natural" minimumFontSize="17" clearButtonMode="always" id="TJV-CB-Mqw">
<rect key="frame" x="10" y="0.0" width="200" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<textInputTraits key="textInputTraits" secureTextEntry="YES"/>
</textField>
</subviews>
<color key="backgroundColor" red="0.94117647058823528" green="0.93725490196078431" blue="0.96078431372549022" alpha="1" colorSpace="calibratedRGB"/>
</view>
</subviews> </subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/> <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
......
...@@ -53,4 +53,39 @@ ...@@ -53,4 +53,39 @@
@property (weak, nonatomic) IBOutlet UITextField *searchPersonInformationField; @property (weak, nonatomic) IBOutlet UITextField *searchPersonInformationField;
/**
* 客户名称背景
*/
@property (weak, nonatomic) IBOutlet UIView *customerNameBack;
/**
* 手机号码背景
*/
@property (weak, nonatomic) IBOutlet UIView *phoneNumberBack;
/**
* 公司地址
*/
@property (weak, nonatomic) IBOutlet UIView *companyNameBack;
/**
* 客户地址
*/
@property (weak, nonatomic) IBOutlet UIView *customerAddressBack;
@end @end
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#import "ClientViewController.h" #import "ClientViewController.h"
#import "InformationTableViewCell.h" #import "InformationTableViewCell.h"
#import "ClientdetailsViewController.h" #import "ClientdetailsViewController.h"
@interface ClientViewController ()<UITableViewDelegate,UITableViewDataSource> @interface ClientViewController ()<UITableViewDelegate,UITableViewDataSource,UITextFieldDelegate>
@end @end
...@@ -47,10 +47,31 @@ ...@@ -47,10 +47,31 @@
#pragma mark -布局 #pragma mark -布局
- (void)uiConfigAction - (void)uiConfigAction
{ {
//圆角
self.customerNameBack.layer.masksToBounds = YES;
self.customerNameBack.layer.cornerRadius = kCornerRadius;
self.phoneNumberBack.layer.masksToBounds = YES;
self.phoneNumberBack.layer.cornerRadius = kCornerRadius;
self.companyNameBack.layer.masksToBounds = YES;
self.companyNameBack.layer.cornerRadius = kCornerRadius;
self.customerAddressBack.layer.masksToBounds = YES;
self.customerAddressBack.layer.cornerRadius = kCornerRadius;
self.addpersonInformationButton.layer.masksToBounds = YES;
self.addpersonInformationButton.layer.cornerRadius = kCornerRadius;
self.changePersonInformationButton.layer.masksToBounds = YES;
self.changePersonInformationButton.layer.cornerRadius = kCornerRadius;
//隐藏更改客户按钮
self.changePersonInformationButton.hidden = YES;
//代理
self.informationTableview.delegate = self; self.informationTableview.delegate = self;
self.informationTableview.dataSource = self; self.informationTableview.dataSource = self;
self.searchPersonInformationField.delegate = self;
} }
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{ {
InformationTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"information" forIndexPath:indexPath]; InformationTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"information" forIndexPath:indexPath];
...@@ -78,6 +99,146 @@ ...@@ -78,6 +99,146 @@
} }
#pragma mark -添加客户信息
- (IBAction)addCustomerInformationORExit:(UIButton *)sender {
if ([sender.currentTitle isEqualToString:@"退出当前客户"]) {
self.customerNameField.text = nil;
self.customerAddress.text = nil;
self.phoneNumberField.text = nil;
self.companyNameField.text = nil;
self.changePersonInformationButton.hidden = YES;
[sender setTitle:@"添加客户信息" forState:UIControlStateNormal];
return;
}
[self addCustomerInformation];
}
#pragma mark -添加客户信息请求
- (void)addCustomerInformation
{
[self.view endEditing:YES];
if (self.customerNameField.text.length == 0) {
[self ErrorMBProgressView:@"客户名不能为空"];
return;
}
if (self.phoneNumberField.text.length == 0) {
[self ErrorMBProgressView:@"手机号码不能为空"];
return;
}
NSString *phoneNumber = self.phoneNumberField.text;
if (![HENLENSONG isValidateMobile:phoneNumber]) {
[self ErrorMBProgressView:@"手机号码格式不正确"];
return;
}
//客户信息类
TOConsumerEntity *customerEntity = [[TOConsumerEntity alloc]init];
customerEntity.createName = self.customerNameField.text;
customerEntity.mobile = self.phoneNumberField.text;
customerEntity.address = self.customerAddress.text;
customerEntity.name = self.companyNameField.text;
[self CreateMBProgressHUDLoding];
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/consumer/save"] WithRequestType:0 WithParameter:customerEntity WithReturnValueBlock:^(id returnValue) {
[self RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) {
[self SuccessMBProgressView:returnValue[@"message"]];
[self.addpersonInformationButton setTitle:@"退出当前客户" forState:UIControlStateNormal];
self.changePersonInformationButton.hidden = NO;
self.customerNameField.enabled = NO;
self.customerAddress.enabled = NO;
self.phoneNumberField.enabled = NO;
self.companyNameField.enabled = NO;
}
else
{
[self ErrorMBProgressView:returnValue[@"message"]];
}
} WithErrorCodeBlock:^(id errorCodeValue) {
} WithFailureBlock:^(id error) {
[self RemoveMBProgressHUDLoding];
}];
}
#pragma mark -更改客户信息
- (IBAction)changeCustomerInformation:(UIButton *)sender {
self.customerNameField.enabled = YES;
self.customerAddress.enabled = YES;
self.phoneNumberField.enabled = YES;
self.companyNameField.enabled = YES;
[self.customerNameField becomeFirstResponder];
}
#pragma mark -UITextFieldDelegate代理 ----搜索
- (BOOL)textFieldShouldReturn:(UITextField *)textField
{
[self searchCustomerInforMation];
return YES;
}
#pragma amrk -搜索客户信息
- (void)searchCustomerInforMation
{
if (self.searchPersonInformationField.text.length == 0) {
[self ErrorMBProgressView:@"搜索信息不能为空"];
return;
}
[self CreateMBProgressHUDLoding];
ConsumerQueryCondition *searchCustomer = [[ConsumerQueryCondition alloc]init];
searchCustomer.nameEquals = self.searchPersonInformationField.text;
searchCustomer.mobileEquals = self.searchPersonInformationField.text;
searchCustomer.page.sort = @"lastVisitedTime";
//request
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/consumer/query"] WithRequestType:0 WithParameter:searchCustomer WithReturnValueBlock:^(id returnValue) {
[self RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) {
ConsumerPageResult *result = [[ConsumerPageResult alloc]initWithDictionary:returnValue error:nil];
NSLog(@"%@",result);
}
else
{
}
} WithErrorCodeBlock:^(id errorCodeValue) {
} WithFailureBlock:^(id error) {
}];
}
- (void)didReceiveMemoryWarning { - (void)didReceiveMemoryWarning {
......
...@@ -81,9 +81,7 @@ ...@@ -81,9 +81,7 @@
#pragma mark -登陆 #pragma mark -登陆
- (IBAction)LoginButtonClick:(UIButton *)sender { - (IBAction)LoginButtonClick:(UIButton *)sender {
// 报错屏蔽登陆
// [self SetTheRootViewController];
// return;
if (self.userName.text.length == 0) { if (self.userName.text.length == 0) {
...@@ -110,7 +108,6 @@ ...@@ -110,7 +108,6 @@
[self.drawerController setCloseDrawerGestureModeMask:MMCloseDrawerGestureModeAll]; [self.drawerController setCloseDrawerGestureModeMask:MMCloseDrawerGestureModeAll];
SHARED_APPDELEGATE.mmdrawer = self.drawerController; SHARED_APPDELEGATE.mmdrawer = self.drawerController;
SHARED_APPDELEGATE.window.rootViewController = self.drawerController; SHARED_APPDELEGATE.window.rootViewController = self.drawerController;
} }
...@@ -128,9 +125,14 @@ ...@@ -128,9 +125,14 @@
[self RemoveMBProgressHUDLoding]; [self RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
LoginResult *result = [[LoginResult alloc] initWithDictionary:returnValue[@"data"]]; //保持导购信息
LoginResult *result = [[LoginResult alloc]initWithDictionary:returnValue[@"data"] error:nil];
[Shoppersmanager manager].Shoppers = result;
[Shoppersmanager manager].userNameString = self.userName.text;
[Shoppersmanager manager].passWordString = self.passWord.text;
[self SetTheRootViewController]; [self SetTheRootViewController];
NSLog(@"成功"); NSLog(@"成功");
}else }else
{ {
...@@ -150,7 +152,6 @@ ...@@ -150,7 +152,6 @@
#pragma mark -RightVCselectedDelegate 方法 #pragma mark -RightVCselectedDelegate 方法
- (void)SelectedControllerWithIndex:(NSString *)Name - (void)SelectedControllerWithIndex:(NSString *)Name
{ {
...@@ -263,7 +264,7 @@ ...@@ -263,7 +264,7 @@
return; return;
} }
number --; number --;
[self.identityView.SendButton setTitle:[NSString stringWithFormat:@"%d",number] forState:UIControlStateNormal]; [self.identityView.SendButton setTitle:[NSString stringWithFormat:@"%ld",number] forState:UIControlStateNormal];
} }
...@@ -329,7 +330,7 @@ ...@@ -329,7 +330,7 @@
[self CreateMBProgressHUDLoding]; [self CreateMBProgressHUDLoding];
//重置密码接口 //重置密码接口
ResetPasswordRequest *passwrod = [[ResetPasswordRequest alloc]init]; ResetPasswordRequest *passwrod = [[ResetPasswordRequest alloc]init];
passwrod.Password = @"123456"; passwrod.fnewPassword = @"123456";
passwrod.username = @"sh1"; passwrod.username = @"sh1";
passwrod.smsCode = @"1234";//验证码 passwrod.smsCode = @"1234";//验证码
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#import "screeningSecondView.h" #import "screeningSecondView.h"
@interface ProductLibraryViewController ()<UICollectionViewDelegate,UICollectionViewDataSource,UIGestureRecognizerDelegate> @interface ProductLibraryViewController ()<UICollectionViewDelegate,UICollectionViewDataSource,UIGestureRecognizerDelegate,ScreeningButtonClickdelegate>
/** /**
* 筛选背景框View * 筛选背景框View
...@@ -32,10 +32,28 @@ ...@@ -32,10 +32,28 @@
*/ */
@property (nonatomic,strong) screeningSecondView *screenSecondView; @property (nonatomic,strong) screeningSecondView *screenSecondView;
/**
* 筛选数据源
*/
@property (nonatomic,strong) NSMutableArray *screeningDatas;
@end @end
@implementation ProductLibraryViewController @implementation ProductLibraryViewController
/**
* 初始化筛选数据源
*/
- (NSMutableArray *)screeningDatas
{
if (_screeningDatas == nil) {
_screeningDatas = [NSMutableArray array];
}
return _screeningDatas;
}
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
...@@ -47,16 +65,118 @@ ...@@ -47,16 +65,118 @@
} }
#pragma mark -获取筛选数据 #pragma mark -获取产品筛选数据
- (void)getScreeningdatas - (void)getScreeningdatas
{ {
[[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/goods/getGoodsFilter"] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) {
if ([returnValue[@"code"] isEqualToNumber:@0]) {
GoodsFilter *goodsStyle = [[GoodsFilter alloc]initWithDictionary:returnValue[@"data"] error:nil];
[self.screeningDatas addObject:goodsStyle.styles];
[self.screeningDatas addObject:goodsStyle.categories];
[self.screeningDatas addObject:goodsStyle.space];
[self.screeningDatas addObject:goodsStyle.material];
[self.screeningDatas addObject:goodsStyle.price];
NSLog(@"%@",self.screeningDatas);
}
else
{
[self ErrorMBProgressView:returnValue[@"message"]];
}
} WithErrorCodeBlock:^(id errorCodeValue) {
} WithFailureBlock:^(id error) {
NSLog(@"%@",error);
}];
} }
/*
{
code = 0;
data = {
categories = (
{
children = (
{
children = (
);
id = 0b44439e54997ce201549986e02c0003;
name = "\U5927\U706f";
},
{
children = (
);
id = 0b44439e54997ce201549987c8550004;
name = "\U5eca\U706f";
}
);
id = "<null>";
name = "\U73b0\U4ee3\U706f";
},
{
children = (
);
id = "<null>";
name = "<null>";
},
{
children = (
);
id = "<null>";
name = "<null>";
},
{
children = (
{
children = (
);
id = 0b44439e54997ce20154998a59450006;
name = "\U53a8\U623f\U706f";
}
);
id = "<null>";
name = "\U7167\U660e\U706f";
},
{
children = (
);
id = "<null>";
name = "<null>";
}
);
material = (
"\U91d1",
"\U94f6",
"\U6728\U8d28"
);
price = (
"500\U4ee5\U4e0b",
"500\U52301000",
"1000\U52302000"
);
space = (
"15\U5e73\U7c73",
"20\U5e73\U7c73",
"35\U5e73\U7c73"
);
styles = (
"\U4e2d\U56fd\U98ce",
"\U82f1\U56fd\U98ce"
);
};
message = "\U64cd\U4f5c\U6210\U529f";
}
*/
#pragma mark -布局 #pragma mark -布局
...@@ -131,9 +251,7 @@ ...@@ -131,9 +251,7 @@
self.screenView = [[[NSBundle mainBundle] loadNibNamed:@"ScreeningView" owner:self options:nil]firstObject]; self.screenView = [[[NSBundle mainBundle] loadNibNamed:@"ScreeningView" owner:self options:nil]firstObject];
self.screenView.frame = CGRectMake(0, 0, ScreenWidth, ScreenHeight); self.screenView.frame = CGRectMake(0, 0, ScreenWidth, ScreenHeight);
self.screenView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.5]; self.screenView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.5];
self.screenView.delegate = self;
//点击手势 //点击手势
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(DismissScreenView)]; UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(DismissScreenView)];
tap.delegate = self; tap.delegate = self;
...@@ -193,6 +311,7 @@ ...@@ -193,6 +311,7 @@
//分类View //分类View
self.screenFirstView = [[[NSBundle mainBundle] loadNibNamed:@"screeningFirstView" owner:self options:nil] firstObject]; self.screenFirstView = [[[NSBundle mainBundle] loadNibNamed:@"screeningFirstView" owner:self options:nil] firstObject];
self.screenFirstView.frame = CGRectMake(0, 50, 470, 310); self.screenFirstView.frame = CGRectMake(0, 50, 470, 310);
self.screenFirstView.datasArray = [self.screeningDatas firstObject];
[self.screenView.backgroundView addSubview:self.screenFirstView]; [self.screenView.backgroundView addSubview:self.screenFirstView];
} }
...@@ -205,6 +324,34 @@ ...@@ -205,6 +324,34 @@
[self.screenView.backgroundView addSubview:self.screenSecondView]; [self.screenView.backgroundView addSubview:self.screenSecondView];
} }
#pragma mark -ScreeningButtonClickdelegate代理
- (void)screeningButtonClick:(NSInteger)buttontag
{
//分类
if (self.screenView.sortingSegmented.selectedSegmentIndex == 0) {
self.screenFirstView.selectedIndex = buttontag;
self.screenFirstView.datasArray = [self.screeningDatas objectAtIndex_opple:buttontag];
}
//筛选
else if (self.screenView.sortingSegmented.selectedSegmentIndex == 1)
{
}
}
#pragma mark -移除筛选框 #pragma mark -移除筛选框
- (void)DismissScreenView - (void)DismissScreenView
{ {
...@@ -219,6 +366,9 @@ ...@@ -219,6 +366,9 @@
}]; }];
} }
#pragma mark -UIGestureRecognizerDelegate代理方法 #pragma mark -UIGestureRecognizerDelegate代理方法
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
{ {
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
@property (nonatomic,strong) UITableView *rightTableview; @property (nonatomic,strong) UITableView *rightTableview;
@property (nonatomic,strong) NSMutableArray *dataArray; @property (nonatomic,strong) NSMutableArray *dataArray;
@property (nonatomic,strong) NSArray *imageArray;
@property (nonatomic,assign) BOOL isOpen; @property (nonatomic,assign) BOOL isOpen;
...@@ -40,6 +40,22 @@ ...@@ -40,6 +40,22 @@
return _dataArray; return _dataArray;
} }
/**
* 图片
*/
- (NSArray *)imageArray
{
if (_imageArray == nil) {
_imageArray = [NSArray arrayWithObjects:@"tiyan",@"changjing",@"chanping",@"kehu",@"guanyu", nil];
}
return _imageArray;
}
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
...@@ -55,6 +71,7 @@ ...@@ -55,6 +71,7 @@
self.rightTableview.dataSource = self; self.rightTableview.dataSource = self;
[self.view addSubview:self.rightTableview]; [self.view addSubview:self.rightTableview];
self.rightTableview.tableFooterView = [UIView new]; self.rightTableview.tableFooterView = [UIView new];
self.rightTableview.separatorStyle = UITableViewCellSeparatorStyleNone;
[self.rightTableview registerClass:[UITableViewCell class] forCellReuseIdentifier:@"rightcell"]; [self.rightTableview registerClass:[UITableViewCell class] forCellReuseIdentifier:@"rightcell"];
[self createHeaderview]; [self createHeaderview];
} }
...@@ -78,6 +95,12 @@ ...@@ -78,6 +95,12 @@
cell.backgroundColor = kMainBlueColor; cell.backgroundColor = kMainBlueColor;
} }
else
{
cell.imageView.image = [UIImage imageNamed:[self.imageArray objectAtIndex_opple:indexPath.row]];
}
return cell; return cell;
} }
...@@ -121,6 +144,10 @@ ...@@ -121,6 +144,10 @@
} }
} }
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return 60;
}
#pragma mark -复原cell #pragma mark -复原cell
......
...@@ -34,6 +34,19 @@ ...@@ -34,6 +34,19 @@
} }
#pragma mark -获取场景筛选数据
- (void)getdatasAction
{
}
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{ {
SeceneLibraryCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"secenelibrary" forIndexPath:indexPath]; SeceneLibraryCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"secenelibrary" forIndexPath:indexPath];
......
//
// ScreeningCollectionReusableView.h
// Lighting
//
// Created by 曹云霄 on 16/5/10.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ScreeningCollectionReusableView : UICollectionReusableView
/**
* 区头labe
*/
@property (nonatomic,strong) UILabel *sectionLabe;
@end
//
// ScreeningCollectionReusableView.m
// Lighting
//
// Created by 曹云霄 on 16/5/10.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "ScreeningCollectionReusableView.h"
@implementation ScreeningCollectionReusableView
- (instancetype)initWithFrame:(CGRect)frame
{
if (self = [super initWithFrame:frame]) {
[self uiCOnfigAction];
}
return self;
}
#pragma mark -UI
- (void)uiCOnfigAction
{
self.sectionLabe.layer.masksToBounds = YES;
self.sectionLabe.layer.cornerRadius = kCornerRadius;
self.sectionLabe.layer.borderWidth = 1;
self.sectionLabe.layer.borderColor = kMainBlueColor.CGColor;
self.sectionLabe = [[UILabel alloc]initWithFrame:self.bounds];
self.sectionLabe.textColor = kMainBlueColor;
self.sectionLabe.font = [UIFont systemFontOfSize:12];
self.sectionLabe.textAlignment = NSTextAlignmentCenter;
[self addSubview:self.sectionLabe];
}
@end
...@@ -24,16 +24,17 @@ ...@@ -24,16 +24,17 @@
#pragma mark -布局 #pragma mark -布局
- (void)uiConfigAction - (void)uiConfigAction
{ {
self.contentView.layer.masksToBounds = YES; self.contentView.layer.masksToBounds = YES;
self.contentView.layer.cornerRadius = kCornerRadius; self.contentView.layer.cornerRadius = kCornerRadius;
self.contentView.layer.borderWidth = 1; self.contentView.layer.borderWidth = 1;
self.contentView.layer.borderColor = kMainBlueColor.CGColor; self.contentView.layer.borderColor = kMainBlueColor.CGColor;
self.titleLabe = [[UILabel alloc]initWithFrame:self.contentView.bounds]; self.titleLabe = [[UILabel alloc]initWithFrame:self.contentView.bounds];
self.titleLabe.textColor = kMainBlueColor; self.titleLabe.textColor = kMainBlueColor;
self.titleLabe.font = [UIFont systemFontOfSize:12];
self.titleLabe.textAlignment = NSTextAlignmentCenter; self.titleLabe.textAlignment = NSTextAlignmentCenter;
[self.contentView addSubview:self.titleLabe]; [self.contentView addSubview:self.titleLabe];
} }
......
...@@ -8,6 +8,20 @@ ...@@ -8,6 +8,20 @@
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
/**
* 右侧筛选菜单点击
*/
@protocol ScreeningButtonClickdelegate <NSObject>
@required
- (void)screeningButtonClick:(NSInteger)buttontag;
@end
@interface ScreeningView : UIView @interface ScreeningView : UIView
...@@ -54,8 +68,10 @@ ...@@ -54,8 +68,10 @@
@property (weak, nonatomic) IBOutlet UIView *shadowView; @property (weak, nonatomic) IBOutlet UIView *shadowView;
/**
* 代理
*/
@property (nonatomic,assign) id<ScreeningButtonClickdelegate> delegate;
......
...@@ -84,6 +84,11 @@ ...@@ -84,6 +84,11 @@
break; break;
} }
if ([self.delegate respondsToSelector:@selector(screeningButtonClick:)]) {
[self.delegate screeningButtonClick:sender.tag-100];
}
[self RemoveAllButtonisSelected]; [self RemoveAllButtonisSelected];
sender.selected = YES; sender.selected = YES;
sender.backgroundColor = kMainBlueColor; sender.backgroundColor = kMainBlueColor;
......
...@@ -78,7 +78,6 @@ ...@@ -78,7 +78,6 @@
toolview.delegate = self; toolview.delegate = self;
[self.tabBar addSubview:toolview]; [self.tabBar addSubview:toolview];
SHARED_APPDELEGATE.tabbar = self.tabBar; SHARED_APPDELEGATE.tabbar = self.tabBar;
} }
......
...@@ -61,6 +61,16 @@ ...@@ -61,6 +61,16 @@
@property (weak, nonatomic) IBOutlet UIButton *changePassword; @property (weak, nonatomic) IBOutlet UIButton *changePassword;
/**
* 用户名背景
*/
@property (weak, nonatomic) IBOutlet UIView *userNameBack;
/**
* 密码背景
*/
@property (weak, nonatomic) IBOutlet UIView *passWordBack;
......
...@@ -26,33 +26,31 @@ ...@@ -26,33 +26,31 @@
#pragma mark -UI #pragma mark -UI
- (void)uiConfigAction - (void)uiConfigAction
{ {
self.userName.layer.masksToBounds = YES; self.userNameBack.layer.masksToBounds = YES;
self.userName.layer.cornerRadius = kCornerRadius; self.userNameBack.layer.cornerRadius = kCornerRadius;
self.userName.layer.borderWidth = 1; self.userNameBack.layer.borderWidth = 0.5;
self.userName.layer.borderColor = kMainBlueColor.CGColor; self.userNameBack.layer.borderColor = kMainBlueColor.CGColor;
self.passWord.layer.masksToBounds = YES; self.passWordBack.layer.masksToBounds = YES;
self.passWord.layer.cornerRadius = kCornerRadius; self.passWordBack.layer.cornerRadius = kCornerRadius;
self.passWord.layer.borderWidth = 1; self.passWordBack.layer.borderWidth = 0.5;
self.passWord.layer.borderColor = kMainBlueColor.CGColor; self.passWordBack.layer.borderColor = kMainBlueColor.CGColor;
self.cancellationButton.layer.masksToBounds = YES; self.cancellationButton.layer.masksToBounds = YES;
self.cancellationButton.layer.cornerRadius = kCornerRadius; self.cancellationButton.layer.cornerRadius = kCornerRadius;
self.switchUser.layer.masksToBounds = YES; self.switchUser.layer.masksToBounds = YES;
self.switchUser.layer.cornerRadius = kCornerRadius; self.switchUser.layer.cornerRadius = kCornerRadius;
self.changePassword.layer.masksToBounds = YES; self.changePassword.layer.masksToBounds = YES;
self.changePassword.layer.cornerRadius = kCornerRadius; self.changePassword.layer.cornerRadius = kCornerRadius;
self.changePassword.layer.borderWidth = 1; self.changePassword.layer.borderWidth = 0.5;
self.changePassword.layer.borderColor = kMainBlueColor.CGColor; self.changePassword.layer.borderColor = kMainBlueColor.CGColor;
self.userName.text = [Shoppersmanager manager].userNameString;
self.passWord.text = [Shoppersmanager manager].passWordString;
} }
#pragma mark -修改密码 #pragma mark -修改密码
- (IBAction)ChangPasswordButtonClick:(UIButton *)sender { - (IBAction)ChangPasswordButtonClick:(UIButton *)sender {
...@@ -67,11 +65,69 @@ ...@@ -67,11 +65,69 @@
#pragma mark -注销 #pragma mark -注销
- (IBAction)cancellationButtonClick:(UIButton *)sender { - (IBAction)cancellationButtonClick:(UIButton *)sender {
} }
#pragma mark -切换账户 #pragma mark -切换账户
- (IBAction)switchUserButtonClick:(UIButton *)sender { - (IBAction)switchUserButtonClick:(UIButton *)sender {
if (self.userName.text.length == 0) {
[self ErrorMBProgressView:@"用户名不能为空"];
return;
}
if (self.passWord.text.length == 0) {
[self ErrorMBProgressView:@"密码不能为空"];
return;
}
[self CreateMBProgressHUDLoding];
NSString *URL = [NSString stringWithFormat:@"%@%@",ServerAddress,@"/employee/login"];
LoginInfo *login = [[LoginInfo alloc]init];
login.username = self.userName.text;
login.password = self.passWord.text;
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:URL WithRequestType:0 WithParameter:login WithReturnValueBlock:^(id returnValue) {
[self RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) {
LoginResult *result = [[LoginResult alloc] initWithDictionary:returnValue[@"data"] error:nil];
[Shoppersmanager manager].userNameString = self.userName.text;
[Shoppersmanager manager].passWordString = self.passWord.text;
}else
{
[self ErrorMBProgressView:returnValue[@"message"]];
[self recoveryUsernamePasswrod];
}
} WithErrorCodeBlock:^(id errorCodeValue) {
NSLog(@"%@",errorCodeValue);
} WithFailureBlock:^(id error) {
[self RemoveMBProgressHUDLoding];
[self recoveryUsernamePasswrod];
}];
}
#pragma mark -切换失败后账户密码复原
- (void)recoveryUsernamePasswrod
{
self.userName.text = [Shoppersmanager manager].userNameString;
self.passWord.text = [Shoppersmanager manager].passWordString;
} }
......
...@@ -9,9 +9,11 @@ ...@@ -9,9 +9,11 @@
<outlet property="cancellationButton" destination="m0J-Ji-o4P" id="sjF-hF-f7G"/> <outlet property="cancellationButton" destination="m0J-Ji-o4P" id="sjF-hF-f7G"/>
<outlet property="changePassword" destination="MmS-T7-ieX" id="FlY-Na-P0f"/> <outlet property="changePassword" destination="MmS-T7-ieX" id="FlY-Na-P0f"/>
<outlet property="passWord" destination="iPT-ib-2cp" id="H67-mf-uqf"/> <outlet property="passWord" destination="iPT-ib-2cp" id="H67-mf-uqf"/>
<outlet property="passWordBack" destination="6JT-hH-lKv" id="af3-IA-3s3"/>
<outlet property="switchUser" destination="7l0-kF-pfD" id="vc3-Kf-zAK"/> <outlet property="switchUser" destination="7l0-kF-pfD" id="vc3-Kf-zAK"/>
<outlet property="userHeader" destination="tuQ-DW-D80" id="aWE-cf-oQH"/> <outlet property="userHeader" destination="tuQ-DW-D80" id="aWE-cf-oQH"/>
<outlet property="userName" destination="cgR-tl-g1N" id="qeK-vw-Mf8"/> <outlet property="userName" destination="cgR-tl-g1N" id="qeK-vw-Mf8"/>
<outlet property="userNameBack" destination="t40-Q6-t1i" id="ZmL-Wm-8Wh"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections> </connections>
</placeholder> </placeholder>
...@@ -32,20 +34,6 @@ ...@@ -32,20 +34,6 @@
<rect key="frame" x="10" y="69" width="15" height="15"/> <rect key="frame" x="10" y="69" width="15" height="15"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</imageView> </imageView>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" clearButtonMode="always" id="cgR-tl-g1N">
<rect key="frame" x="34" y="20" width="130" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.94117647058823528" green="0.93725490196078431" blue="0.96078431372549022" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<textInputTraits key="textInputTraits"/>
</textField>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" id="iPT-ib-2cp">
<rect key="frame" x="34" y="62" width="130" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.94117647058823528" green="0.93725490196078431" blue="0.96078431372549022" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<textInputTraits key="textInputTraits"/>
</textField>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="7l0-kF-pfD"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="7l0-kF-pfD">
<rect key="frame" x="10" y="125" width="80" height="30"/> <rect key="frame" x="10" y="125" width="80" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
...@@ -82,6 +70,34 @@ ...@@ -82,6 +70,34 @@
<action selector="cancellationButtonClick:" destination="-1" eventType="touchUpInside" id="iQU-lO-tNY"/> <action selector="cancellationButtonClick:" destination="-1" eventType="touchUpInside" id="iQU-lO-tNY"/>
</connections> </connections>
</button> </button>
<view contentMode="scaleToFill" id="6JT-hH-lKv">
<rect key="frame" x="34" y="62" width="130" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="密码" minimumFontSize="17" id="iPT-ib-2cp">
<rect key="frame" x="10" y="0.0" width="120" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<textInputTraits key="textInputTraits" secureTextEntry="YES"/>
</textField>
</subviews>
<color key="backgroundColor" red="0.94117647058823528" green="0.93725490196078431" blue="0.96078431372549022" alpha="1" colorSpace="calibratedRGB"/>
</view>
<view contentMode="scaleToFill" id="t40-Q6-t1i">
<rect key="frame" x="34" y="21" width="130" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="用户名" textAlignment="natural" minimumFontSize="17" clearButtonMode="always" id="cgR-tl-g1N">
<rect key="frame" x="10" y="0.0" width="120" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<textInputTraits key="textInputTraits"/>
</textField>
</subviews>
<color key="backgroundColor" red="0.94117647058823528" green="0.93725490196078431" blue="0.96078431372549022" alpha="1" colorSpace="calibratedRGB"/>
</view>
</subviews> </subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/> <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
......
...@@ -21,5 +21,14 @@ ...@@ -21,5 +21,14 @@
*/ */
@property (weak, nonatomic) IBOutlet UICollectionViewFlowLayout *classificationLayout; @property (weak, nonatomic) IBOutlet UICollectionViewFlowLayout *classificationLayout;
/**
* 分类数据源
*/
@property (nonatomic,strong) NSArray *datasArray;
/**
* 筛选按钮选中的index
*/
@property (nonatomic) NSInteger selectedIndex;
@end @end
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#import "screeningFirstView.h" #import "screeningFirstView.h"
#import "ScreeningFirstCollectionViewCell.h" #import "ScreeningFirstCollectionViewCell.h"
#import "ScreeningCollectionReusableView.h"
#define WIDTH self.frame.size.width #define WIDTH self.frame.size.width
@implementation screeningFirstView @implementation screeningFirstView
...@@ -28,6 +28,17 @@ ...@@ -28,6 +28,17 @@
[self uiConfigAction]; [self uiConfigAction];
} }
#pragma mark -更新
- (void)setDatasArray:(NSArray *)datasArray
{
_datasArray = datasArray;
[self.classificationCollectionView reloadData];
}
#pragma mark -UI #pragma mark -UI
- (void)uiConfigAction - (void)uiConfigAction
{ {
...@@ -40,27 +51,57 @@ ...@@ -40,27 +51,57 @@
self.classificationCollectionView.dataSource = self; self.classificationCollectionView.dataSource = self;
self.classificationCollectionView.delegate = self; self.classificationCollectionView.delegate = self;
} }
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{ {
ScreeningFirstCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"cell" forIndexPath:indexPath]; ScreeningFirstCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"cell" forIndexPath:indexPath];
cell.titleLabe.text = @"壁灯"; cell.titleLabe.text = [self.datasArray objectAtIndex_opple:indexPath.row];
return cell; return cell;
} }
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
{ {
return 20; if (self.selectedIndex == 1) {
return [[self.datasArray objectAtIndex_opple:section] count];
}
return self.datasArray.count;
} }
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
{ {
NSLog(@"%d",indexPath.item); NSLog(@"选中%ld",indexPath.item);
} }
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView
{
if (self.selectedIndex == 1) {
return self.datasArray.count;
}
return 1;
}
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout referenceSizeForHeaderInSection:(NSInteger)section{
if (section == 0) {
return CGSizeMake(320, 80);
}else{
return CGSizeMake(320, 15);
}
}
- (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath
{
}
......
...@@ -31,4 +31,25 @@ ...@@ -31,4 +31,25 @@
*/ */
@property (weak, nonatomic) IBOutlet UICollectionViewFlowLayout *screeningLayout; @property (weak, nonatomic) IBOutlet UICollectionViewFlowLayout *screeningLayout;
/**
* 分类数据源
*/
@property (nonatomic,strong) NSArray *datasArray;
/**
* 筛选结果显示
*/
@property (weak, nonatomic) IBOutlet UIButton *screeningResultButton;
@end @end
...@@ -84,6 +84,10 @@ ...@@ -84,6 +84,10 @@
#pragma mark -筛选结果点击
- (IBAction)ScreeningResultButtonClick:(UIButton *)sender {
}
......
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</tableView> </tableView>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsVerticalScrollIndicator="NO" dataMode="none" id="M9i-37-c6i"> <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsVerticalScrollIndicator="NO" dataMode="none" id="M9i-37-c6i">
<rect key="frame" x="0.0" y="0.0" width="390" height="310"/> <rect key="frame" x="0.0" y="0.0" width="390" height="250"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <color key="backgroundColor" red="1" green="0.70412693910000002" blue="0.69044467629999995" alpha="1" colorSpace="calibratedRGB"/>
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="8xy-wK-EQd"> <collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="8xy-wK-EQd">
<size key="itemSize" width="50" height="50"/> <size key="itemSize" width="50" height="50"/>
<size key="headerReferenceSize" width="0.0" height="0.0"/> <size key="headerReferenceSize" width="0.0" height="0.0"/>
...@@ -26,12 +26,25 @@ ...@@ -26,12 +26,25 @@
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/> <inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
</collectionViewFlowLayout> </collectionViewFlowLayout>
</collectionView> </collectionView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="wmR-6Z-yhR">
<rect key="frame" x="45" y="262" width="300" height="35"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<color key="backgroundColor" red="0.34901960784313724" green="0.67450980392156867" blue="0.86274509803921573" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<state key="normal" title="筛选结果共122件商品">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="ScreeningResultButtonClick:" destination="iN0-l3-epB" eventType="touchUpInside" id="AE1-Ep-lWK"/>
</connections>
</button>
</subviews> </subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/> <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<connections> <connections>
<outlet property="screeningCollectionView" destination="M9i-37-c6i" id="wpH-q5-dxp"/> <outlet property="screeningCollectionView" destination="M9i-37-c6i" id="wpH-q5-dxp"/>
<outlet property="screeningLayout" destination="8xy-wK-EQd" id="e2b-GV-sFe"/> <outlet property="screeningLayout" destination="8xy-wK-EQd" id="e2b-GV-sFe"/>
<outlet property="screeningResultButton" destination="wmR-6Z-yhR" id="bEB-Od-AhW"/>
<outlet property="screeningTableview" destination="0kR-UB-h2z" id="c5h-EF-OgK"/> <outlet property="screeningTableview" destination="0kR-UB-h2z" id="c5h-EF-OgK"/>
</connections> </connections>
<point key="canvasLocation" x="484" y="256"/> <point key="canvasLocation" x="484" y="256"/>
......
...@@ -87,7 +87,9 @@ ...@@ -87,7 +87,9 @@
29EC331A1CE023D5005F0C13 /* ChangePasswordViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29EC33181CE023D5005F0C13 /* ChangePasswordViewController.m */; }; 29EC331A1CE023D5005F0C13 /* ChangePasswordViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29EC33181CE023D5005F0C13 /* ChangePasswordViewController.m */; };
29EC331B1CE023D5005F0C13 /* ChangePasswordViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 29EC33191CE023D5005F0C13 /* ChangePasswordViewController.xib */; }; 29EC331B1CE023D5005F0C13 /* ChangePasswordViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 29EC33191CE023D5005F0C13 /* ChangePasswordViewController.xib */; };
29EC331F1CE02AFA005F0C13 /* PopoverViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29EC331E1CE02AFA005F0C13 /* PopoverViewController.m */; }; 29EC331F1CE02AFA005F0C13 /* PopoverViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29EC331E1CE02AFA005F0C13 /* PopoverViewController.m */; };
29EC33271CE07018005F0C13 /* opple_objc_json_client.m in Sources */ = {isa = PBXBuildFile; fileRef = 29EC33261CE07018005F0C13 /* opple_objc_json_client.m */; }; 29F725FB1CE17B0D0072FE0E /* Shoppersmanager.m in Sources */ = {isa = PBXBuildFile; fileRef = 29F725FA1CE17B0D0072FE0E /* Shoppersmanager.m */; };
29F725FE1CE1928F0072FE0E /* opple_objc_json_client.m in Sources */ = {isa = PBXBuildFile; fileRef = 29F725FD1CE1928F0072FE0E /* opple_objc_json_client.m */; };
29F726011CE1D05D0072FE0E /* ScreeningCollectionReusableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 29F726001CE1D05D0072FE0E /* ScreeningCollectionReusableView.m */; };
86076CC959C487B30F69CC32 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 18E6D8479D48A4650167EAF2 /* libPods.a */; }; 86076CC959C487B30F69CC32 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 18E6D8479D48A4650167EAF2 /* libPods.a */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
...@@ -235,8 +237,12 @@ ...@@ -235,8 +237,12 @@
29EC33191CE023D5005F0C13 /* ChangePasswordViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ChangePasswordViewController.xib; sourceTree = "<group>"; }; 29EC33191CE023D5005F0C13 /* ChangePasswordViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ChangePasswordViewController.xib; sourceTree = "<group>"; };
29EC331D1CE02AFA005F0C13 /* PopoverViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PopoverViewController.h; sourceTree = "<group>"; }; 29EC331D1CE02AFA005F0C13 /* PopoverViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PopoverViewController.h; sourceTree = "<group>"; };
29EC331E1CE02AFA005F0C13 /* PopoverViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PopoverViewController.m; sourceTree = "<group>"; }; 29EC331E1CE02AFA005F0C13 /* PopoverViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PopoverViewController.m; sourceTree = "<group>"; };
29EC33251CE07018005F0C13 /* opple_objc_json_client.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = opple_objc_json_client.h; sourceTree = "<group>"; }; 29F725F91CE17B0D0072FE0E /* Shoppersmanager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Shoppersmanager.h; sourceTree = "<group>"; };
29EC33261CE07018005F0C13 /* opple_objc_json_client.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = opple_objc_json_client.m; sourceTree = "<group>"; }; 29F725FA1CE17B0D0072FE0E /* Shoppersmanager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Shoppersmanager.m; sourceTree = "<group>"; };
29F725FC1CE1928F0072FE0E /* opple_objc_json_client.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = opple_objc_json_client.h; sourceTree = "<group>"; };
29F725FD1CE1928F0072FE0E /* opple_objc_json_client.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = opple_objc_json_client.m; sourceTree = "<group>"; };
29F725FF1CE1D05D0072FE0E /* ScreeningCollectionReusableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScreeningCollectionReusableView.h; sourceTree = "<group>"; };
29F726001CE1D05D0072FE0E /* ScreeningCollectionReusableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ScreeningCollectionReusableView.m; sourceTree = "<group>"; };
CA5ED00287EA4EE622158E3C /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; }; CA5ED00287EA4EE622158E3C /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
D537F80EFAB9298B3ADA241A /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; }; D537F80EFAB9298B3ADA241A /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */ /* End PBXFileReference section */
...@@ -348,6 +354,7 @@ ...@@ -348,6 +354,7 @@
2928F7DE1CD085430036D761 /* Tools */ = { 2928F7DE1CD085430036D761 /* Tools */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
29F725F81CE17AE40072FE0E /* Shopperscenter */,
29E28CE51CE0B90600812A55 /* Regularexpressions */, 29E28CE51CE0B90600812A55 /* Regularexpressions */,
29EC33241CE06FD1005F0C13 /* Jastor */, 29EC33241CE06FD1005F0C13 /* Jastor */,
29EC331C1CE02ADC005F0C13 /* popoverController */, 29EC331C1CE02ADC005F0C13 /* popoverController */,
...@@ -617,6 +624,8 @@ ...@@ -617,6 +624,8 @@
29834EBA1CDF1FBC001A484F /* screeningFirstView.xib */, 29834EBA1CDF1FBC001A484F /* screeningFirstView.xib */,
29834EBE1CDF5E4E001A484F /* ScreeningFirstCollectionViewCell.h */, 29834EBE1CDF5E4E001A484F /* ScreeningFirstCollectionViewCell.h */,
29834EBF1CDF5E4E001A484F /* ScreeningFirstCollectionViewCell.m */, 29834EBF1CDF5E4E001A484F /* ScreeningFirstCollectionViewCell.m */,
29F725FF1CE1D05D0072FE0E /* ScreeningCollectionReusableView.h */,
29F726001CE1D05D0072FE0E /* ScreeningCollectionReusableView.m */,
); );
name = screeningFirstView; name = screeningFirstView;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -871,12 +880,21 @@ ...@@ -871,12 +880,21 @@
29EC33241CE06FD1005F0C13 /* Jastor */ = { 29EC33241CE06FD1005F0C13 /* Jastor */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
29EC33251CE07018005F0C13 /* opple_objc_json_client.h */, 29F725FC1CE1928F0072FE0E /* opple_objc_json_client.h */,
29EC33261CE07018005F0C13 /* opple_objc_json_client.m */, 29F725FD1CE1928F0072FE0E /* opple_objc_json_client.m */,
); );
name = Jastor; name = Jastor;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
29F725F81CE17AE40072FE0E /* Shopperscenter */ = {
isa = PBXGroup;
children = (
29F725F91CE17B0D0072FE0E /* Shoppersmanager.h */,
29F725FA1CE17B0D0072FE0E /* Shoppersmanager.m */,
);
name = Shopperscenter;
sourceTree = "<group>";
};
4333C4B25549A396FC0CD944 /* Frameworks */ = { 4333C4B25549A396FC0CD944 /* Frameworks */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -1049,6 +1067,7 @@ ...@@ -1049,6 +1067,7 @@
299876271CD9837C00C90D0A /* OrderTableViewCell.m in Sources */, 299876271CD9837C00C90D0A /* OrderTableViewCell.m in Sources */,
2998763C1CD9983A00C90D0A /* CommodityListTableViewCell.m in Sources */, 2998763C1CD9983A00C90D0A /* CommodityListTableViewCell.m in Sources */,
2962D0791CD1CBC60058829D /* NetworkRequestClassManager.m in Sources */, 2962D0791CD1CBC60058829D /* NetworkRequestClassManager.m in Sources */,
29F725FB1CE17B0D0072FE0E /* Shoppersmanager.m in Sources */,
29EAAEA01CDC79DC00C4DBA2 /* CustomerOrderViewController.m in Sources */, 29EAAEA01CDC79DC00C4DBA2 /* CustomerOrderViewController.m in Sources */,
2928F8321CD09E320036D761 /* Toolview.m in Sources */, 2928F8321CD09E320036D761 /* Toolview.m in Sources */,
2942F8A61CDD80C2005B377E /* authenticateView.m in Sources */, 2942F8A61CDD80C2005B377E /* authenticateView.m in Sources */,
...@@ -1059,6 +1078,7 @@ ...@@ -1059,6 +1078,7 @@
29EAAE9C1CDC74CA00C4DBA2 /* AllCustomerViewController.m in Sources */, 29EAAE9C1CDC74CA00C4DBA2 /* AllCustomerViewController.m in Sources */,
04A14A2B1CE0FC7F00DAD5F3 /* FootSubView.m in Sources */, 04A14A2B1CE0FC7F00DAD5F3 /* FootSubView.m in Sources */,
2933934F1CD3158B000D997B /* instructionsLabe.m in Sources */, 2933934F1CD3158B000D997B /* instructionsLabe.m in Sources */,
29F726011CE1D05D0072FE0E /* ScreeningCollectionReusableView.m in Sources */,
29C584E91CDA249300C6F677 /* ProductCollectionViewCell.m in Sources */, 29C584E91CDA249300C6F677 /* ProductCollectionViewCell.m in Sources */,
299876361CD997F100C90D0A /* PersonInformationTableViewCell.m in Sources */, 299876361CD997F100C90D0A /* PersonInformationTableViewCell.m in Sources */,
2962D0711CD1A58B0058829D /* RightViewController.m in Sources */, 2962D0711CD1A58B0058829D /* RightViewController.m in Sources */,
...@@ -1076,7 +1096,6 @@ ...@@ -1076,7 +1096,6 @@
29706DB21CD082990003C412 /* Lighting.xcdatamodeld in Sources */, 29706DB21CD082990003C412 /* Lighting.xcdatamodeld in Sources */,
29834EB91CDF1FB3001A484F /* screeningFirstView.m in Sources */, 29834EB91CDF1FB3001A484F /* screeningFirstView.m in Sources */,
299249401CDB4D1D00786B1E /* AddaddressViewController.m in Sources */, 299249401CDB4D1D00786B1E /* AddaddressViewController.m in Sources */,
29EC33271CE07018005F0C13 /* opple_objc_json_client.m in Sources */,
299249371CDB3C6500786B1E /* GenerateOrdersViewController.m in Sources */, 299249371CDB3C6500786B1E /* GenerateOrdersViewController.m in Sources */,
2992493A1CDB3E4500786B1E /* GenerateOrdersTableViewCell.m in Sources */, 2992493A1CDB3E4500786B1E /* GenerateOrdersTableViewCell.m in Sources */,
2962D0811CD1E6010058829D /* UIView+Frame.m in Sources */, 2962D0811CD1E6010058829D /* UIView+Frame.m in Sources */,
...@@ -1089,6 +1108,7 @@ ...@@ -1089,6 +1108,7 @@
299249441CDB51B100786B1E /* ModifyShippingAddressView.m in Sources */, 299249441CDB51B100786B1E /* ModifyShippingAddressView.m in Sources */,
2906B5D71CD89246000849B4 /* ClientDetailsTableViewCell.m in Sources */, 2906B5D71CD89246000849B4 /* ClientDetailsTableViewCell.m in Sources */,
29BB27801CD9DFD7009A0813 /* AboutViewController.m in Sources */, 29BB27801CD9DFD7009A0813 /* AboutViewController.m in Sources */,
29F725FE1CE1928F0072FE0E /* opple_objc_json_client.m in Sources */,
29834EC01CDF5E4E001A484F /* ScreeningFirstCollectionViewCell.m in Sources */, 29834EC01CDF5E4E001A484F /* ScreeningFirstCollectionViewCell.m in Sources */,
29834EC51CDF76C1001A484F /* UserViewController.m in Sources */, 29834EC51CDF76C1001A484F /* UserViewController.m in Sources */,
29BB277D1CD9DFCB009A0813 /* CustomerManagementViewController.m in Sources */, 29BB277D1CD9DFCB009A0813 /* CustomerManagementViewController.m in Sources */,
...@@ -1213,8 +1233,10 @@ ...@@ -1213,8 +1233,10 @@
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "Brand Assets"; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "Brand Assets";
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Fanfan Cui (7S27LB84E2)"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Fanfan Cui (7S27LB84E2)";
COMPRESS_PNG_FILES = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "$(SRCROOT)/Tools/PrefixHeader.pch"; GCC_PREFIX_HEADER = "$(SRCROOT)/Tools/PrefixHeader.pch";
INFOPLIST_FILE = Lighting/Info.plist; INFOPLIST_FILE = Lighting/Info.plist;
...@@ -1252,6 +1274,7 @@ ...@@ -1252,6 +1274,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.cntaiping.opple; PRODUCT_BUNDLE_IDENTIFIER = com.cntaiping.opple;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "1984600d-9582-4f80-b666-2975a03aee8f"; PROVISIONING_PROFILE = "1984600d-9582-4f80-b666-2975a03aee8f";
STRIP_PNG_TEXT = NO;
USER_HEADER_SEARCH_PATHS = "$(PODS_ROOT)/**"; USER_HEADER_SEARCH_PATHS = "$(PODS_ROOT)/**";
}; };
name = Debug; name = Debug;
...@@ -1262,8 +1285,10 @@ ...@@ -1262,8 +1285,10 @@
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "Brand Assets"; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "Brand Assets";
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Fanfan Cui (7S27LB84E2)"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Fanfan Cui (7S27LB84E2)";
COMPRESS_PNG_FILES = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "$(SRCROOT)/Tools/PrefixHeader.pch"; GCC_PREFIX_HEADER = "$(SRCROOT)/Tools/PrefixHeader.pch";
INFOPLIST_FILE = Lighting/Info.plist; INFOPLIST_FILE = Lighting/Info.plist;
...@@ -1301,6 +1326,7 @@ ...@@ -1301,6 +1326,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.cntaiping.opple; PRODUCT_BUNDLE_IDENTIFIER = com.cntaiping.opple;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "1984600d-9582-4f80-b666-2975a03aee8f"; PROVISIONING_PROFILE = "1984600d-9582-4f80-b666-2975a03aee8f";
STRIP_PNG_TEXT = NO;
USER_HEADER_SEARCH_PATHS = "$(PODS_ROOT)/**"; USER_HEADER_SEARCH_PATHS = "$(PODS_ROOT)/**";
}; };
name = Release; name = Release;
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/> <fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/> <textInputTraits key="textInputTraits" secureTextEntry="YES"/>
</textField> </textField>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Lock-0" id="Kfr-XI-9d4"> <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Lock-0" id="Kfr-XI-9d4">
<rect key="frame" x="10" y="12" width="15" height="15"/> <rect key="frame" x="10" y="12" width="15" height="15"/>
......
{
"images" : [
{
"idiom" : "universal",
"filename" : "changjing.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "changjing@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "chanping.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "chanping@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "guanyu.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "guanyu@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "kehu.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "kehu@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "tiyan.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "tiyan@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
...@@ -15,7 +15,7 @@ PODS: ...@@ -15,7 +15,7 @@ PODS:
- AFNetworking/UIKit (3.1.0): - AFNetworking/UIKit (3.1.0):
- AFNetworking/NSURLSession - AFNetworking/NSURLSession
- IQKeyboardManager (4.0.2) - IQKeyboardManager (4.0.2)
- jastor (0.2.1) - JSONModel (1.2.0)
- Masonry (0.6.4) - Masonry (0.6.4)
- MBProgressHUD (0.9.2) - MBProgressHUD (0.9.2)
- MJExtension (3.0.10) - MJExtension (3.0.10)
...@@ -40,7 +40,7 @@ PODS: ...@@ -40,7 +40,7 @@ PODS:
DEPENDENCIES: DEPENDENCIES:
- AFNetworking (~> 3.1.0) - AFNetworking (~> 3.1.0)
- IQKeyboardManager (~> 4.0.0) - IQKeyboardManager (~> 4.0.0)
- jastor (~> 0.2.1) - JSONModel (~> 1.2.0)
- Masonry (~> 0.6.4) - Masonry (~> 0.6.4)
- MBProgressHUD (~> 0.9.2) - MBProgressHUD (~> 0.9.2)
- MJExtension (~> 3.0.10) - MJExtension (~> 3.0.10)
...@@ -52,7 +52,7 @@ DEPENDENCIES: ...@@ -52,7 +52,7 @@ DEPENDENCIES:
SPEC CHECKSUMS: SPEC CHECKSUMS:
AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67 AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67
IQKeyboardManager: 2341089c4ae25fa2fa82ce356a259fcd267dc6b6 IQKeyboardManager: 2341089c4ae25fa2fa82ce356a259fcd267dc6b6
jastor: fe9ff71f4b683698253d6a0d9a2561987fd9aff3 JSONModel: 12523685c4b623553ccf844bbbf7007624317b2c
Masonry: 281802d04d787ea2973179ee8bcb50500579ede2 Masonry: 281802d04d787ea2973179ee8bcb50500579ede2
MBProgressHUD: 1569cf7ace17a8bac47aabfbb8580a49690386d1 MBProgressHUD: 1569cf7ace17a8bac47aabfbb8580a49690386d1
MJExtension: d86aacb740c87519d20e3cca55b6fa4be6cc7548 MJExtension: d86aacb740c87519d20e3cca55b6fa4be6cc7548
......
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
void (^completionHandler)(UIPrintInteractionController *, BOOL, NSError *) = void (^completionHandler)(UIPrintInteractionController *, BOOL, NSError *) =
^(UIPrintInteractionController *pic, BOOL completed, NSError *error) { ^(UIPrintInteractionController *pic, BOOL completed, NSError *error) {
if (!completed && error) if (!completed && error)
NSLog(@"FAILED! due to error in domain %@ with error code %d", NSLog(@"FAILED! due to error in domain %@ with error code %ld",
error.domain, error.code); error.domain, error.code);
}; };
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
// //
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import "Jastor.h"
#import "opple_objc_json_client.h" #import "opple_objc_json_client.h"
//定义返回数据的block类型 //定义返回数据的block类型
...@@ -47,7 +46,7 @@ typedef enum { ...@@ -47,7 +46,7 @@ typedef enum {
*/ */
- (void)NetworkRequestWithURL:(NSString *) requestURLString - (void)NetworkRequestWithURL:(NSString *) requestURLString
WithRequestType:(NetworkRequestType) requestType WithRequestType:(NetworkRequestType) requestType
WithParameter:(Jastor *) jastorobject WithParameter:(JSONModel *) jastorobject
WithReturnValueBlock:(ReturnValueBlock) successBlock WithReturnValueBlock:(ReturnValueBlock) successBlock
WithErrorCodeBlock:(ErrorCodeBlock) errorCodeBlock WithErrorCodeBlock:(ErrorCodeBlock) errorCodeBlock
WithFailureBlock:(FailureBlock) failureBlock; WithFailureBlock:(FailureBlock) failureBlock;
......
...@@ -52,7 +52,7 @@ static NetworkRequestClassManager *manager = nil; ...@@ -52,7 +52,7 @@ static NetworkRequestClassManager *manager = nil;
- (void)NetworkRequestWithURL:(NSString *) requestURLString - (void)NetworkRequestWithURL:(NSString *) requestURLString
WithRequestType:(NetworkRequestType) requestType WithRequestType:(NetworkRequestType) requestType
WithParameter:(Jastor *) jastorobject WithParameter:(JSONModel *) jastorobject
WithReturnValueBlock:(ReturnValueBlock) successBlock WithReturnValueBlock:(ReturnValueBlock) successBlock
WithErrorCodeBlock:(ErrorCodeBlock) errorCodeBlock WithErrorCodeBlock:(ErrorCodeBlock) errorCodeBlock
WithFailureBlock:(FailureBlock) failureBlock WithFailureBlock:(FailureBlock) failureBlock
......
...@@ -20,9 +20,10 @@ ...@@ -20,9 +20,10 @@
#import "ClientViewController.h" #import "ClientViewController.h"
#import "Masonry.h" #import "Masonry.h"
#import "PopoverViewController.h" #import "PopoverViewController.h"
#import "Jastor.h"
#import "opple_objc_json_client.h" #import "opple_objc_json_client.h"
#import "HENLENSONG.h" #import "HENLENSONG.h"
#import "JSONModel.h"
#import "Shoppersmanager.h"
// Include any system framework and library headers here that should be included in all compilation units. // Include any system framework and library headers here that should be included in all compilation units.
// You will also need to set the Prefix Header build setting of one or more of your targets to reference this file. // You will also need to set the Prefix Header build setting of one or more of your targets to reference this file.
...@@ -106,7 +107,7 @@ ...@@ -106,7 +107,7 @@
/** /**
* 默认圆角系数 * 默认圆角系数
*/ */
#define kCornerRadius 5 #define kCornerRadius 4
/** /**
......
//
// Shoppersmanager.h
// Lighting
//
// Created by 曹云霄 on 16/5/10.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "opple_objc_json_client.h"
@interface Shoppersmanager : NSObject
/**
* 导购个人信息Jastor对象
*/
@property (nonatomic,strong) LoginResult *Shoppers;
/**
* 导购个人信息类单例
*/
+ (Shoppersmanager *)manager;
/**
* 账号
*/
@property (nonatomic,copy) NSString *userNameString;
/**
* 密码
*/
@property (nonatomic,copy) NSString *passWordString;
@end
//
// Shoppersmanager.m
// Lighting
//
// Created by 曹云霄 on 16/5/10.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "Shoppersmanager.h"
@implementation Shoppersmanager
static Shoppersmanager *manager = nil;
+ (Shoppersmanager *)manager
{
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
manager = [[Shoppersmanager alloc]init];
});
return manager;
}
+ (id)allocWithZone:(struct _NSZone *)zone
{
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
manager = [super allocWithZone:zone];
});
return manager;
}
@end
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
- (void)setInstructionsNumber:(NSInteger)instructionsNumber - (void)setInstructionsNumber:(NSInteger)instructionsNumber
{ {
_instructionsNumber = instructionsNumber; _instructionsNumber = instructionsNumber;
self.text = [NSString stringWithFormat:@"%d",_instructionsNumber]; self.text = [NSString stringWithFormat:@"%ld",_instructionsNumber];
} }
@end @end
This diff is collapsed.
...@@ -5,33 +5,80 @@ ...@@ -5,33 +5,80 @@
@synthesize page; @synthesize page;
@synthesize rows; @synthesize rows;
@synthesize total; @synthesize total;
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
return YES;
}
@end @end
@implementation RsResponse @implementation RsResponse
@synthesize code; @synthesize code;
@synthesize message; @synthesize message;
@synthesize data; @synthesize data;
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
return YES;
}
@end @end
@implementation LoginInfo @implementation LoginInfo
@synthesize username; @synthesize username;
@synthesize password; @synthesize password;
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
return YES;
}
@end @end
@implementation ModifyPasswordRequest @implementation ModifyPasswordRequest
@synthesize employeeId; @synthesize employeeId;
@synthesize oldPassword; @synthesize oldPassword;
@synthesize Password; @synthesize fnewPassword;
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
return YES;
}
+(JSONKeyMapper*)keyMapper
{
return [[JSONKeyMapper alloc] initWithDictionary:@{
@"newPassword": @"fnewPassword",
}];
}
@end @end
@implementation GoodsCategory @implementation GoodsCategory
@synthesize identifier; @synthesize fid;
@synthesize name; @synthesize name;
@synthesize children; @synthesize children;
+ (Class)children_class { +(BOOL)propertyIsOptional:(NSString*)propertyName
return [GoodsCategory class]; {
return YES;
} }
+(JSONKeyMapper*)keyMapper
{
return [[JSONKeyMapper alloc] initWithDictionary:@{
@"id": @"fid",
}];
}
@end @end
@implementation GoodsFilter @implementation GoodsFilter
...@@ -41,33 +88,23 @@ ...@@ -41,33 +88,23 @@
@synthesize material; @synthesize material;
@synthesize price; @synthesize price;
+ (Class)styles_class { +(BOOL)propertyIsOptional:(NSString*)propertyName
return [NSString class]; {
return YES;
} }
+ (Class)categories_class {
return [GoodsCategory class];
}
+ (Class)space_class {
return [NSString class];
}
+ (Class)material_class {
return [NSString class];
}
+ (Class)price_class {
return [NSDecimalNumber class];
}
@end @end
@implementation HotTagResponse @implementation HotTagResponse
@synthesize list; @synthesize list;
+ (Class)list_class { +(BOOL)propertyIsOptional:(NSString*)propertyName
return [TOHottagEntity class]; {
return YES;
} }
@end @end
@implementation OrderBill @implementation OrderBill
...@@ -75,19 +112,29 @@ ...@@ -75,19 +112,29 @@
@synthesize order; @synthesize order;
@synthesize orderdetailList; @synthesize orderdetailList;
+ (Class)orderdetailList_class { +(BOOL)propertyIsOptional:(NSString*)propertyName
return [TOOrderdetailEntity class]; {
return YES;
} }
@end @end
@implementation SceneCondition @implementation SceneCondition
@synthesize styleEquals; @synthesize styleEquals;
@synthesize spaceEquals; @synthesize spaceEquals;
@synthesize page; @synthesize page;
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
return YES;
}
@end @end
@implementation TOConsumerEntity @implementation TOConsumerEntity
@synthesize identifier; @synthesize fid;
@synthesize createName; @synthesize createName;
@synthesize createBy; @synthesize createBy;
@synthesize createDate; @synthesize createDate;
...@@ -100,15 +147,45 @@ ...@@ -100,15 +147,45 @@
@synthesize address; @synthesize address;
@synthesize picture; @synthesize picture;
@synthesize lastVisitedTime; @synthesize lastVisitedTime;
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
return YES;
}
+(JSONKeyMapper*)keyMapper
{
return [[JSONKeyMapper alloc] initWithDictionary:@{
@"id": @"fid",
}];
}
@end @end
@implementation TOHottagEntity @implementation TOHottagEntity
@synthesize identifier; @synthesize fid;
@synthesize name; @synthesize name;
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
return YES;
}
+(JSONKeyMapper*)keyMapper
{
return [[JSONKeyMapper alloc] initWithDictionary:@{
@"id": @"fid",
}];
}
@end @end
@implementation TOOrderdetailEntity @implementation TOOrderdetailEntity
@synthesize identifier; @synthesize fid;
@synthesize goodsId; @synthesize goodsId;
@synthesize goodsCode; @synthesize goodsCode;
@synthesize goodsName; @synthesize goodsName;
...@@ -119,10 +196,25 @@ ...@@ -119,10 +196,25 @@
@synthesize goodsPrice; @synthesize goodsPrice;
@synthesize goodsTotalPrice; @synthesize goodsTotalPrice;
@synthesize orderId; @synthesize orderId;
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
return YES;
}
+(JSONKeyMapper*)keyMapper
{
return [[JSONKeyMapper alloc] initWithDictionary:@{
@"id": @"fid",
}];
}
@end @end
@implementation TOShopcartEntity @implementation TOShopcartEntity
@synthesize identifier; @synthesize fid;
@synthesize createName; @synthesize createName;
@synthesize createBy; @synthesize createBy;
@synthesize createDate; @synthesize createDate;
...@@ -141,10 +233,40 @@ ...@@ -141,10 +233,40 @@
@synthesize goodsPrice; @synthesize goodsPrice;
@synthesize goodsTotalPrice; @synthesize goodsTotalPrice;
@synthesize consumerId; @synthesize consumerId;
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
return YES;
}
+(JSONKeyMapper*)keyMapper
{
return [[JSONKeyMapper alloc] initWithDictionary:@{
@"id": @"fid",
}];
}
@end @end
@implementation IdEntity @implementation IdEntity
@synthesize identifier; @synthesize fid;
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
return YES;
}
+(JSONKeyMapper*)keyMapper
{
return [[JSONKeyMapper alloc] initWithDictionary:@{
@"id": @"fid",
}];
}
@end @end
#ifndef DEF_SortDirection_M #ifndef DEF_SortDirection_M
...@@ -154,17 +276,32 @@ NSString * const SORTDIRECTION_DESC = @"desc"; ...@@ -154,17 +276,32 @@ NSString * const SORTDIRECTION_DESC = @"desc";
#endif /* DEF_SortDirection_M */ #endif /* DEF_SortDirection_M */
@implementation TOSceneEntity @implementation TOSceneEntity
@synthesize identifier; @synthesize fid;
@synthesize sceneCode; @synthesize sceneCode;
@synthesize name; @synthesize name;
@synthesize pricure; @synthesize pricure;
@synthesize category; @synthesize category;
@synthesize style; @synthesize style;
@synthesize space; @synthesize space;
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
return YES;
}
+(JSONKeyMapper*)keyMapper
{
return [[JSONKeyMapper alloc] initWithDictionary:@{
@"id": @"fid",
}];
}
@end @end
@implementation TOOrderEntity @implementation TOOrderEntity
@synthesize identifier; @synthesize fid;
@synthesize createName; @synthesize createName;
@synthesize createBy; @synthesize createBy;
@synthesize createDate; @synthesize createDate;
...@@ -186,10 +323,25 @@ NSString * const SORTDIRECTION_DESC = @"desc"; ...@@ -186,10 +323,25 @@ NSString * const SORTDIRECTION_DESC = @"desc";
@synthesize billType; @synthesize billType;
@synthesize billTitle; @synthesize billTitle;
@synthesize payType; @synthesize payType;
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
return YES;
}
+(JSONKeyMapper*)keyMapper
{
return [[JSONKeyMapper alloc] initWithDictionary:@{
@"id": @"fid",
}];
}
@end @end
@implementation TOGoodsEntity @implementation TOGoodsEntity
@synthesize identifier; @synthesize fid;
@synthesize createDate; @synthesize createDate;
@synthesize onlineTime; @synthesize onlineTime;
@synthesize company; @synthesize company;
...@@ -222,6 +374,21 @@ NSString * const SORTDIRECTION_DESC = @"desc"; ...@@ -222,6 +374,21 @@ NSString * const SORTDIRECTION_DESC = @"desc";
@synthesize installMethod; @synthesize installMethod;
@synthesize lightNumber; @synthesize lightNumber;
@synthesize pictures; @synthesize pictures;
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
return YES;
}
+(JSONKeyMapper*)keyMapper
{
return [[JSONKeyMapper alloc] initWithDictionary:@{
@"id": @"fid",
}];
}
@end @end
@implementation GoodsCondition @implementation GoodsCondition
...@@ -233,29 +400,71 @@ NSString * const SORTDIRECTION_DESC = @"desc"; ...@@ -233,29 +400,71 @@ NSString * const SORTDIRECTION_DESC = @"desc";
@synthesize startprice; @synthesize startprice;
@synthesize endprice; @synthesize endprice;
@synthesize page; @synthesize page;
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
return YES;
}
@end @end
@implementation ResetPasswordRequest @implementation ResetPasswordRequest
@synthesize username; @synthesize username;
@synthesize smsCode; @synthesize smsCode;
@synthesize Password; @synthesize fnewPassword;
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
return YES;
}
+(JSONKeyMapper*)keyMapper
{
return [[JSONKeyMapper alloc] initWithDictionary:@{
@"newPassword": @"fnewPassword",
}];
}
@end @end
@implementation LoginResult @implementation LoginResult
@synthesize employee; @synthesize employee;
@synthesize commission; @synthesize commission;
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
return YES;
}
@end @end
@implementation ConsumerQueryCondition @implementation ConsumerQueryCondition
@synthesize nameEquals; @synthesize nameEquals;
@synthesize nameLike;
@synthesize mobileEquals; @synthesize mobileEquals;
@synthesize page; @synthesize page;
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
return YES;
}
@end @end
@implementation ExceptionCode @implementation ExceptionCode
@synthesize code; @synthesize code;
@synthesize message; @synthesize message;
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
return YES;
}
@end @end
@implementation DataPage @implementation DataPage
...@@ -264,27 +473,47 @@ NSString * const SORTDIRECTION_DESC = @"desc"; ...@@ -264,27 +473,47 @@ NSString * const SORTDIRECTION_DESC = @"desc";
@synthesize rows; @synthesize rows;
@synthesize sort; @synthesize sort;
@synthesize order; @synthesize order;
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
return YES;
}
@end @end
@implementation TSUserOrg @implementation TSUserOrg
@synthesize tsUser; @synthesize tsUser;
@synthesize tsDepart; @synthesize tsDepart;
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
return YES;
}
@end @end
@implementation SceneResponse @implementation SceneResponse
@synthesize list; @synthesize list;
+ (Class)list_class { +(BOOL)propertyIsOptional:(NSString*)propertyName
return [TOSceneEntity class]; {
return YES;
} }
@end @end
@implementation ShopCartResponse @implementation ShopCartResponse
@synthesize shopcart; @synthesize shopcart;
+ (Class)shopcart_class { +(BOOL)propertyIsOptional:(NSString*)propertyName
return [TOShopcartEntity class]; {
return YES;
} }
@end @end
@implementation TSBaseUser @implementation TSBaseUser
...@@ -300,15 +529,18 @@ NSString * const SORTDIRECTION_DESC = @"desc"; ...@@ -300,15 +529,18 @@ NSString * const SORTDIRECTION_DESC = @"desc";
@synthesize currentDepart; @synthesize currentDepart;
@synthesize userOrgList; @synthesize userOrgList;
+ (Class)userOrgList_class { +(BOOL)propertyIsOptional:(NSString*)propertyName
return [TSUserOrg class]; {
return YES;
} }
@end @end
@implementation TSDepart @implementation TSDepart
@synthesize TSPDepart; @synthesize TSPDepart;
@synthesize departname; @synthesize departname;
@synthesize description; @synthesize fdescription;
@synthesize TSDeparts; @synthesize TSDeparts;
@synthesize orgCode; @synthesize orgCode;
@synthesize orgType; @synthesize orgType;
...@@ -316,33 +548,53 @@ NSString * const SORTDIRECTION_DESC = @"desc"; ...@@ -316,33 +548,53 @@ NSString * const SORTDIRECTION_DESC = @"desc";
@synthesize fax; @synthesize fax;
@synthesize address; @synthesize address;
+ (Class)TSDeparts_class { +(BOOL)propertyIsOptional:(NSString*)propertyName
return [TSDepart class]; {
return YES;
}
+(JSONKeyMapper*)keyMapper
{
return [[JSONKeyMapper alloc] initWithDictionary:@{
@"description": @"fdescription",
}];
} }
@end @end
@implementation OrderResponse @implementation OrderResponse
@synthesize orderBillList; @synthesize orderBillList;
+ (Class)orderBillList_class { +(BOOL)propertyIsOptional:(NSString*)propertyName
return [OrderBill class]; {
return YES;
} }
@end @end
@implementation GoodsResponse @implementation GoodsResponse
@synthesize categories; @synthesize goodsEntity;
+ (Class)categories_class { +(BOOL)propertyIsOptional:(NSString*)propertyName
return [TOGoodsEntity class]; {
return YES;
} }
@end @end
@implementation ConsumerPageResult @implementation ConsumerPageResult
@synthesize results; @synthesize results;
+ (Class)results_class { +(BOOL)propertyIsOptional:(NSString*)propertyName
return [TOConsumerEntity class]; {
return YES;
} }
@end @end
@implementation TSUser @implementation TSUser
...@@ -356,9 +608,23 @@ NSString * const SORTDIRECTION_DESC = @"desc"; ...@@ -356,9 +608,23 @@ NSString * const SORTDIRECTION_DESC = @"desc";
@synthesize updateDate; @synthesize updateDate;
@synthesize updateBy; @synthesize updateBy;
@synthesize updateName; @synthesize updateName;
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
return YES;
}
@end @end
@implementation TOEmployee @implementation TOEmployee
@synthesize positions; @synthesize positions;
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
return YES;
}
@end @end
...@@ -9,4 +9,4 @@ pod 'Masonry', '~> 0.6.4' ...@@ -9,4 +9,4 @@ pod 'Masonry', '~> 0.6.4'
pod 'MJRefresh', '~> 3.1.0' pod 'MJRefresh', '~> 3.1.0'
pod 'SDWebImage', '~> 3.7.5' pod 'SDWebImage', '~> 3.7.5'
pod 'AFNetworking', '~> 3.1.0' pod 'AFNetworking', '~> 3.1.0'
pod 'jastor', '~> 0.2.1' pod 'JSONModel', '~> 1.2.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