Commit 0ec81de6 authored by 勾芒's avatar 勾芒

debug

parent 2691c8bf
...@@ -242,13 +242,18 @@ ...@@ -242,13 +242,18 @@
OrderBill *allOrder = [[OrderBill alloc]init]; OrderBill *allOrder = [[OrderBill alloc]init];
//分页 //分页
DataPage *page = [[DataPage alloc]init]; DataPage *page = [[DataPage alloc]init];
page.page = 0; page.page = 1;
page.rows = 10; page.rows = 99999;
//订单 //订单
TOOrderEntity *Neworder = [[TOOrderEntity alloc]init]; TOOrderEntity *Neworder = [[TOOrderEntity alloc]init];
Neworder.guideId = [Shoppersmanager manager].Shoppers.employee.fid; Neworder.guideId = [Shoppersmanager manager].Shoppers.employee.fid;
allOrder.datapage = page; allOrder.datapage = page;
allOrder.order = Neworder; allOrder.order = Neworder;
//客户
TOConsumerEntity *customer = [[TOConsumerEntity alloc]init];
customer.fid = _model.fid;
allOrder.consumer = customer;
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/order/query"] WithRequestType:0 WithParameter:allOrder WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/order/query"] WithRequestType:0 WithParameter:allOrder WithReturnValueBlock:^(id returnValue) {
[self RemoveMBProgressHUDLoding]; [self RemoveMBProgressHUDLoding];
......
...@@ -66,4 +66,6 @@ ...@@ -66,4 +66,6 @@
@end @end
...@@ -38,6 +38,15 @@ ...@@ -38,6 +38,15 @@
*/ */
@property (nonatomic,copy) NSString *verifyCode; @property (nonatomic,copy) NSString *verifyCode;
/**
* 用户名
*/
@property (nonatomic,copy) NSString *userNameString;
/**
* 密码
*/
@property (nonatomic,copy) NSString *passWordString;
@end @end
...@@ -57,9 +66,7 @@ ...@@ -57,9 +66,7 @@
[super viewDidLoad]; [super viewDidLoad];
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
[self uiConfigAction]; [self uiConfigAction];
} }
...@@ -76,9 +83,12 @@ ...@@ -76,9 +83,12 @@
self.userNameLoginView.layer.cornerRadius = 10; self.userNameLoginView.layer.cornerRadius = 10;
self.forgotPasswordButton.titleLabel.font = [UIFont boldSystemFontOfSize:16]; self.forgotPasswordButton.titleLabel.font = [UIFont boldSystemFontOfSize:16];
self.followHeartView=[[FollowHeartViewController alloc]init]; self.followHeartView=[[FollowHeartViewController alloc]init];
self.userName.text = @"demo1";
self.passWord.text = @"123456";
//加载本地的用户名密码
self.userNameString = [[NSUserDefaults standardUserDefaults] objectForKey:USERNAME];
self.passWordString = [[NSUserDefaults standardUserDefaults] objectForKey:PASSWORD];
self.userName.text = self.userNameString;
self.passWord.text = self.passWordString;
} }
...@@ -111,11 +121,33 @@ ...@@ -111,11 +121,33 @@
[self.drawerController setOpenDrawerGestureModeMask:MMOpenDrawerGestureModeAll]; [self.drawerController setOpenDrawerGestureModeMask:MMOpenDrawerGestureModeAll];
[self.drawerController setCloseDrawerGestureModeMask:MMCloseDrawerGestureModeAll]; [self.drawerController setCloseDrawerGestureModeMask:MMCloseDrawerGestureModeAll];
SHARED_APPDELEGATE.mmdrawer = self.drawerController; SHARED_APPDELEGATE.mmdrawer = self.drawerController;
SHARED_APPDELEGATE.window.rootViewController = self.drawerController; [self restoreRootViewController:self.drawerController];
SHARED_APPDELEGATE.Mytabbar = self.customtabbar; SHARED_APPDELEGATE.Mytabbar = self.customtabbar;
} }
#pragma mark -切换rootViewcontroller
- (void)restoreRootViewController:(UIViewController *)rootViewController
{
typedef void (^Animation)(void);
UIWindow* window = SHARED_APPDELEGATE.window;
rootViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
Animation animation = ^{
BOOL oldState = [UIView areAnimationsEnabled];
[UIView setAnimationsEnabled:NO];
window.rootViewController = rootViewController;
[UIView setAnimationsEnabled:oldState];
};
[UIView transitionWithView:window
duration:0.5f
options:UIViewAnimationOptionTransitionFlipFromTop
animations:animation
completion:nil];
}
#pragma mark -判断用户名密码是否正确 #pragma mark -判断用户名密码是否正确
- (void)judgeUserNameAndPassword - (void)judgeUserNameAndPassword
{ {
...@@ -135,6 +167,9 @@ ...@@ -135,6 +167,9 @@
[Shoppersmanager manager].Shoppers = result; [Shoppersmanager manager].Shoppers = result;
[Shoppersmanager manager].userNameString = self.userName.text; [Shoppersmanager manager].userNameString = self.userName.text;
[Shoppersmanager manager].passWordString = self.passWord.text; [Shoppersmanager manager].passWordString = self.passWord.text;
//保存用户名密码
[[NSUserDefaults standardUserDefaults] setObject:self.userName.text forKey:USERNAME];
[[NSUserDefaults standardUserDefaults] setObject:self.passWord.text forKey:PASSWORD];
[self SetTheRootViewController]; [self SetTheRootViewController];
}else }else
......
...@@ -315,7 +315,7 @@ ...@@ -315,7 +315,7 @@
ProductCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"productcell" forIndexPath:indexPath]; ProductCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"productcell" forIndexPath:indexPath];
NSArray *imageArray = [[[self.datasArray objectAtIndex_opple:indexPath.item] pictures] componentsSeparatedByString:@","]; NSArray *imageArray = [[[self.datasArray objectAtIndex_opple:indexPath.item] pictures] componentsSeparatedByString:@","];
[cell.productImageView sd_setImageWithURL:[NSURL URLWithString:[imageArray firstObject]] placeholderImage:REPLACEIMAGE]; [cell.productImageView sd_setImageWithURL:[NSURL URLWithString:[imageArray firstObject]] placeholderImage:REPLACEIMAGE];
cell.productPrice.text = [NSString stringWithFormat:@"¥%@",[[[self.datasArray objectAtIndex_opple:indexPath.item] guidePrice] stringValue]]; cell.productPrice.text = [NSString stringWithFormat:@"¥%@",[[[self.datasArray objectAtIndex_opple:indexPath.item] tagPrice] stringValue]];
cell.cellindex = indexPath.item; cell.cellindex = indexPath.item;
cell.productParameter.text = [[self.datasArray objectAtIndex_opple:indexPath.item] productProfile]; cell.productParameter.text = [[self.datasArray objectAtIndex_opple:indexPath.item] productProfile];
cell.specifications.text = [NSString stringWithFormat:@"%@(%@)",[[self.datasArray objectAtIndex_opple:indexPath.item] series],[[self.datasArray objectAtIndex_opple:indexPath.item] spec]]; cell.specifications.text = [NSString stringWithFormat:@"%@(%@)",[[self.datasArray objectAtIndex_opple:indexPath.item] series],[[self.datasArray objectAtIndex_opple:indexPath.item] spec]];
......
This diff is collapsed.
...@@ -177,7 +177,6 @@ ...@@ -177,7 +177,6 @@
pop.barButtonItem = [[UIBarButtonItem alloc]initWithCustomView:button]; pop.barButtonItem = [[UIBarButtonItem alloc]initWithCustomView:button];
[self presentViewController:userVC animated:YES completion:nil]; [self presentViewController:userVC animated:YES completion:nil];
} }
break; break;
//我的客户 //我的客户
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#import "UserViewController.h" #import "UserViewController.h"
#import "ChangePasswordViewController.h" #import "ChangePasswordViewController.h"
#import "LoginViewController.h"
@interface UserViewController () @interface UserViewController ()
...@@ -66,9 +66,58 @@ ...@@ -66,9 +66,58 @@
#pragma mark -注销 #pragma mark -注销
- (IBAction)cancellationButtonClick:(UIButton *)sender { - (IBAction)cancellationButtonClick:(UIButton *)sender {
UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:@"提示" message:@"注销将清空用户数据,是否继续?" preferredStyle:UIAlertControllerStyleAlert];
__weak typeof(self) weakSelf = self;
[alertVC addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
[weakSelf dismissViewControllerAnimated:YES completion:nil];
}]];
[alertVC addAction:[UIAlertAction actionWithTitle:@"确认" style:UIAlertActionStyleDestructive handler:^(UIAlertAction * _Nonnull action) {
[weakSelf CreateMBProgressHUDLoding];
[[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/employee/logout"] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) {
[weakSelf RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) {
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
LoginViewController *loginVC = [storyboard instantiateViewControllerWithIdentifier:@"Login"];
[[NSUserDefaults standardUserDefaults] removeObjectForKey:USERNAME];
[[NSUserDefaults standardUserDefaults] removeObjectForKey:PASSWORD];
[weakSelf restoreRootViewController:loginVC];
}else
{
[weakSelf promptCustomerWithString:@"注销失败"];
}
} WithErrorCodeBlock:^(id errorCodeValue) {
} WithFailureBlock:^(id error) {
[weakSelf RemoveMBProgressHUDLoding];
}];
}]];
[self presentViewController:alertVC animated:YES completion:nil];
}
#pragma mark -切换rootViewcontroller
- (void)restoreRootViewController:(UIViewController *)rootViewController
{
typedef void (^Animation)(void);
UIWindow* window = SHARED_APPDELEGATE.window;
rootViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
Animation animation = ^{
BOOL oldState = [UIView areAnimationsEnabled];
[UIView setAnimationsEnabled:NO];
window.rootViewController = rootViewController;
[UIView setAnimationsEnabled:oldState];
};
[UIView transitionWithView:window
duration:0.5f
options:UIViewAnimationOptionTransitionFlipFromBottom
animations:animation
completion:nil];
} }
...@@ -101,8 +150,7 @@ ...@@ -101,8 +150,7 @@
LoginResult *result = [[LoginResult alloc] initWithDictionary:returnValue[@"data"] error:nil]; LoginResult *result = [[LoginResult alloc] initWithDictionary:returnValue[@"data"] error:nil];
[Shoppersmanager manager].userNameString = self.userName.text; [Shoppersmanager manager].userNameString = self.userName.text;
[Shoppersmanager manager].passWordString = self.passWord.text; [Shoppersmanager manager].passWordString = self.passWord.text;
[Shoppersmanager manager].Shoppers = result;
}else }else
{ {
......
...@@ -465,7 +465,6 @@ ...@@ -465,7 +465,6 @@
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="曹云霄" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="ssg-dl-sxk"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="曹云霄" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="ssg-dl-sxk">
<rect key="frame" x="184" y="22" width="143" height="21"/> <rect key="frame" x="184" y="22" width="143" height="21"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="1" green="0.7124683436" blue="0.054982668810000003" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/> <fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/> <color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
...@@ -473,7 +472,6 @@ ...@@ -473,7 +472,6 @@
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="曹云霄" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="0Ww-BX-90J"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="曹云霄" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="0Ww-BX-90J">
<rect key="frame" x="198" y="56" width="143" height="21"/> <rect key="frame" x="198" y="56" width="143" height="21"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="1" green="0.7124683436" blue="0.054982668810000003" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/> <fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/> <color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
...@@ -481,7 +479,6 @@ ...@@ -481,7 +479,6 @@
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="曹云霄" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="bhI-Ns-YHq"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="曹云霄" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="bhI-Ns-YHq">
<rect key="frame" x="420" y="22" width="215" height="21"/> <rect key="frame" x="420" y="22" width="215" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="1" green="0.7124683436" blue="0.054982668810000003" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/> <fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/> <color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
...@@ -489,7 +486,6 @@ ...@@ -489,7 +486,6 @@
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="曹云霄" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="hLZ-vb-nAK"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="曹云霄" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="hLZ-vb-nAK">
<rect key="frame" x="420" y="56" width="143" height="21"/> <rect key="frame" x="420" y="56" width="143" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="1" green="0.7124683436" blue="0.054982668810000003" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/> <fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/> <color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
...@@ -497,7 +493,6 @@ ...@@ -497,7 +493,6 @@
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="曹云霄" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="mLm-o2-IUg"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="曹云霄" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="mLm-o2-IUg">
<rect key="frame" x="613" y="56" width="86" height="21"/> <rect key="frame" x="613" y="56" width="86" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="1" green="0.7124683436" blue="0.054982668810000003" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/> <fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/> <color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
...@@ -1160,7 +1155,7 @@ ...@@ -1160,7 +1155,7 @@
</collectionViewFlowLayout> </collectionViewFlowLayout>
<cells> <cells>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="productcell" id="J5m-0M-uqb" customClass="ProductCollectionViewCell"> <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="productcell" id="J5m-0M-uqb" customClass="ProductCollectionViewCell">
<rect key="frame" x="0.0" y="64" width="300" height="300"/> <rect key="frame" x="0.0" y="0.0" width="300" height="300"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center"> <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="300" height="300"/> <rect key="frame" x="0.0" y="0.0" width="300" height="300"/>
...@@ -1242,7 +1237,7 @@ ...@@ -1242,7 +1237,7 @@
<color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="calibratedRGB"/> <color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="calibratedRGB"/>
<prototypes> <prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="productDetailscell" rowHeight="170" id="Sye-2R-IQf" customClass="ProductDetailsTableViewCell"> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="productDetailscell" rowHeight="170" id="Sye-2R-IQf" customClass="ProductDetailsTableViewCell">
<rect key="frame" x="0.0" y="113.5" width="768" height="170"/> <rect key="frame" x="0.0" y="49.5" width="768" height="170"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Sye-2R-IQf" id="CXs-SR-gHP"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Sye-2R-IQf" id="CXs-SR-gHP">
<rect key="frame" x="0.0" y="0.0" width="768" height="169.5"/> <rect key="frame" x="0.0" y="0.0" width="768" height="169.5"/>
......
...@@ -173,9 +173,15 @@ ...@@ -173,9 +173,15 @@
#define REFRESHSHOPPINGCAR @"GOODSNUMBER" #define REFRESHSHOPPINGCAR @"GOODSNUMBER"
/**
* 保存用户名key
*/
#define USERNAME @"username"
/**
* 保存密码key
*/
#define PASSWORD @"password"
......
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