Commit f3a2ab00 authored by 曹云霄's avatar 曹云霄

修复支付二维码为空崩溃,登陆超时判断修改

parent dc908858
...@@ -108,6 +108,8 @@ ...@@ -108,6 +108,8 @@
self.enddateButton.layer.masksToBounds = YES; self.enddateButton.layer.masksToBounds = YES;
self.enddateButton.layer.cornerRadius = 10; self.enddateButton.layer.cornerRadius = 10;
//经销商代码
self.conditionModel.resellerCodeEquals = [[Shoppersmanager manager].Shoppers.employee.currentDepart orgCode];
//下拉刷新 //下拉刷新
MjRefreshHeaderCustom *headerRefresh = [MjRefreshHeaderCustom headerWithRefreshingBlock:^{ MjRefreshHeaderCustom *headerRefresh = [MjRefreshHeaderCustom headerWithRefreshingBlock:^{
DataPage *page = [[DataPage alloc]init]; DataPage *page = [[DataPage alloc]init];
...@@ -373,22 +375,20 @@ ...@@ -373,22 +375,20 @@
self.conditionModel.nameEquals = self.searchTextfield.text; self.conditionModel.nameEquals = self.searchTextfield.text;
self.conditionModel.mobileEquals = self.searchTextfield.text; self.conditionModel.mobileEquals = self.searchTextfield.text;
if (self.searchTextfield.text.length == 0) { if (self.searchTextfield.text.length == 0) {
[self ErrorMBProgressView:@"搜索信息不能为空"]; self.conditionModel.nameEquals = nil;
return YES; self.conditionModel.mobileEquals = nil;
} }
[self.allCustomerTableview.mj_header beginRefreshing]; [self.allCustomerTableview.mj_header beginRefreshing];
return YES; return YES;
} }
#pragma mark -友好界面 #pragma mark -友好界面
- (UIImage *)imageForEmptyDataSet:(UIScrollView *)scrollView - (UIImage *)imageForEmptyDataSet:(UIScrollView *)scrollView
{ {
return kNoDataImage; return kNoDataImage;
} }
- (NSAttributedString *)titleForEmptyDataSet:(UIScrollView *)scrollView - (NSAttributedString *)titleForEmptyDataSet:(UIScrollView *)scrollView
{ {
return [[NSAttributedString alloc]initWithString:@"暂无数据" attributes:nil]; return [[NSAttributedString alloc]initWithString:@"暂无数据" attributes:nil];
...@@ -400,19 +400,6 @@ ...@@ -400,19 +400,6 @@
} }
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end @end
...@@ -121,7 +121,7 @@ ...@@ -121,7 +121,7 @@
//下拉刷新 //下拉刷新
MjRefreshHeaderCustom *headerRefresh = [MjRefreshHeaderCustom headerWithRefreshingBlock:^{ MjRefreshHeaderCustom *headerRefresh = [MjRefreshHeaderCustom headerWithRefreshingBlock:^{
weakSelf.condition.resellerCodeEquals = [[Shoppersmanager manager].Shoppers.employee.currentDepart orgCode]; weakSelf.condition.resellerCodeEquals = [Shoppersmanager manager].Shoppers.employee.currentDepart.orgCode;
DataPage *page = [[DataPage alloc]init]; DataPage *page = [[DataPage alloc]init];
page.page = 1; page.page = 1;
weakSelf.condition.page = page; weakSelf.condition.page = page;
......
...@@ -126,7 +126,6 @@ ...@@ -126,7 +126,6 @@
} }
}]; }];
self.customerOrderTableView.mj_footer.automaticallyHidden = YES; self.customerOrderTableView.mj_footer.automaticallyHidden = YES;
} }
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="3.0" toolsVersion="10117" systemVersion="15G31" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none">
<dependencies> <dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies> </dependencies>
...@@ -36,56 +36,56 @@ ...@@ -36,56 +36,56 @@
<color key="backgroundColor" red="0.81960784313725488" green="0.81960784313725488" blue="0.81960784313725488" alpha="1" colorSpace="calibratedRGB"/> <color key="backgroundColor" red="0.81960784313725488" green="0.81960784313725488" blue="0.81960784313725488" alpha="1" colorSpace="calibratedRGB"/>
</view> </view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="编号:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="usf-4V-c8q"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="编号:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="usf-4V-c8q">
<rect key="frame" x="530" y="44" width="56" height="17"/> <rect key="frame" x="530" y="41" width="56" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/> <fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="b7B-yI-JEC"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="b7B-yI-JEC">
<rect key="frame" x="588" y="42" width="163" height="20"/> <rect key="frame" x="588" y="39" width="163" height="20"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="20"/> <fontDescription key="fontDescription" type="system" pointSize="20"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="名称:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="5aK-6t-o1q"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="名称:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="5aK-6t-o1q">
<rect key="frame" x="530" y="76" width="56" height="17"/> <rect key="frame" x="530" y="78" width="56" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/> <fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="NlJ-8b-gcl"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="NlJ-8b-gcl">
<rect key="frame" x="588" y="76" width="163" height="17"/> <rect key="frame" x="588" y="66" width="163" height="40"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/> <fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="品牌:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="hX3-Vg-O1n"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="品牌:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="hX3-Vg-O1n">
<rect key="frame" x="530" y="106" width="56" height="17"/> <rect key="frame" x="530" y="115" width="56" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/> <fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Hf9-WK-7u5"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Hf9-WK-7u5">
<rect key="frame" x="588" y="106" width="130" height="17"/> <rect key="frame" x="588" y="115" width="130" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/> <fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="吊牌价:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="ol6-U8-o5v"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="吊牌价:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="ol6-U8-o5v">
<rect key="frame" x="530" y="150" width="56" height="17"/> <rect key="frame" x="530" y="152" width="56" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/> <fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Rka-oV-nyM"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Rka-oV-nyM">
<rect key="frame" x="588" y="148" width="163" height="20"/> <rect key="frame" x="588" y="151" width="163" height="20"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="20"/> <fontDescription key="fontDescription" type="system" pointSize="20"/>
<color key="textColor" red="0.9882352941176471" green="0.33725490196078434" blue="0.12156862745098039" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.9882352941176471" green="0.33725490196078434" blue="0.12156862745098039" alpha="1" colorSpace="calibratedRGB"/>
......
...@@ -345,7 +345,7 @@ ...@@ -345,7 +345,7 @@
break; break;
case 101://增加 case 101://增加
{ {
if (goodsNumber >= [self.entity.number integerValue]) { if (goodsNumber >= self.entity.inv) {
//不能大于库存 //不能大于库存
[self ErrorMBProgressView:@"超过库存"]; [self ErrorMBProgressView:@"超过库存"];
...@@ -362,9 +362,6 @@ ...@@ -362,9 +362,6 @@
} }
#pragma mark -UITextFieldDelegate #pragma mark -UITextFieldDelegate
- (void)textFieldDidEndEditing:(UITextField *)textField - (void)textFieldDidEndEditing:(UITextField *)textField
{ {
...@@ -375,10 +372,10 @@ ...@@ -375,10 +372,10 @@
textField.text = @"1"; textField.text = @"1";
return; return;
} }
if ([inputString integerValue] > [self.entity.number integerValue]) { if ([inputString integerValue] > self.entity.inv) {
[self ErrorMBProgressView:@"超过库存数量"]; [self ErrorMBProgressView:@"超过库存数量"];
textField.text = [NSString stringWithFormat:@"%ld",(long)[self.entity.number integerValue]]; textField.text = [NSString stringWithFormat:@"%ld",(long)self.entity.inv];
return; return;
} }
} }
...@@ -462,7 +459,7 @@ ...@@ -462,7 +459,7 @@
[self ErrorMBProgressView:@"必须设置当前客户"]; [self ErrorMBProgressView:@"必须设置当前客户"];
return; return;
} }
if ([self.headerView.goodsNumber.text integerValue] > [self.entity.number integerValue]) { if ([self.headerView.goodsNumber.text integerValue] > self.entity.inv) {
[self ErrorMBProgressView:@"超过库存"]; [self ErrorMBProgressView:@"超过库存"];
return; return;
} }
......
...@@ -161,6 +161,9 @@ ...@@ -161,6 +161,9 @@
- (IBAction)WechatButtonClick:(UIButton *)sender { - (IBAction)WechatButtonClick:(UIButton *)sender {
[self.payController dismissViewControllerAnimated:NO completion:nil]; [self.payController dismissViewControllerAnimated:NO completion:nil];
if ([self.weiXinLabe isKindOfClass:[NSNull class]]) {
[self SHOWPrompttext:@"微信支付二维码为空,暂停使用!"];return;
}
self.showPayQrCodeImageView.hidden = NO; self.showPayQrCodeImageView.hidden = NO;
sender.selected = NO; sender.selected = NO;
[self.showPayQrCodeImageView sd_setImageWithURL:[NSURL URLWithString:self.weiXinLabe] placeholderImage:REPLACEIMAGE]; [self.showPayQrCodeImageView sd_setImageWithURL:[NSURL URLWithString:self.weiXinLabe] placeholderImage:REPLACEIMAGE];
...@@ -174,6 +177,9 @@ ...@@ -174,6 +177,9 @@
- (IBAction)ZhifubaoPayButtonClick:(UIButton *)sender { - (IBAction)ZhifubaoPayButtonClick:(UIButton *)sender {
[self.payController dismissViewControllerAnimated:NO completion:nil]; [self.payController dismissViewControllerAnimated:NO completion:nil];
if ([self.zhiFubaoLabe isKindOfClass:[NSNull class]]) {
[self SHOWPrompttext:@"支付宝支付二维码为空,暂停使用!"];return;
}
self.showPayQrCodeImageView.hidden = NO; self.showPayQrCodeImageView.hidden = NO;
sender.selected = NO; sender.selected = NO;
[self.showPayQrCodeImageView sd_setImageWithURL:[NSURL URLWithString:self.zhiFubaoLabe] placeholderImage:REPLACEIMAGE]; [self.showPayQrCodeImageView sd_setImageWithURL:[NSURL URLWithString:self.zhiFubaoLabe] placeholderImage:REPLACEIMAGE];
...@@ -202,8 +208,6 @@ ...@@ -202,8 +208,6 @@
} }
#pragma mark -是否开票 #pragma mark -是否开票
- (IBAction)isinvoiceButtonClick:(UIButton *)sender { - (IBAction)isinvoiceButtonClick:(UIButton *)sender {
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15G31" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none">
<dependencies> <dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies> </dependencies>
...@@ -1181,14 +1181,14 @@ ...@@ -1181,14 +1181,14 @@
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="名称" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="KUt-Kl-mRA"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="名称" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="KUt-Kl-mRA">
<rect key="frame" x="18" y="222" width="226" height="18"/> <rect key="frame" x="18" y="222" width="266" height="18"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/> <fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/> <color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="规格" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="AHz-0L-1Qg"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="规格" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="AHz-0L-1Qg">
<rect key="frame" x="18" y="244" width="226" height="18"/> <rect key="frame" x="18" y="244" width="266" height="18"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/> <fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/> <color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
......
...@@ -70,7 +70,6 @@ ...@@ -70,7 +70,6 @@
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
self.automaticallyAdjustsScrollViewInsets = NO; self.automaticallyAdjustsScrollViewInsets = NO;
self.view.backgroundColor = [UIColor whiteColor]; self.view.backgroundColor = [UIColor whiteColor];
//检测登陆超时通知 //检测登陆超时通知
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(logintimeoutNotification:) name:LOGINTIMEOUT object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(logintimeoutNotification:) name:LOGINTIMEOUT object:nil];
......
...@@ -77,10 +77,11 @@ static NetworkRequestClassManager *manager = nil; ...@@ -77,10 +77,11 @@ static NetworkRequestClassManager *manager = nil;
[manager POST:requestURLString parameters:[jastorobject toDictionary] progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) { [manager POST:requestURLString parameters:[jastorobject toDictionary] progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
//登陆超时 //登陆超时
if ([responseObject[@"code"] isEqualToNumber:@(-1)]) { if ([responseObject[@"code"] isEqualToNumber:@1]) {
[[NSNotificationCenter defaultCenter] postNotificationName:LOGINTIMEOUT object:nil];return; [[NSNotificationCenter defaultCenter] postNotificationName:LOGINTIMEOUT object:nil];return;
}else {
successBlock(responseObject);
} }
successBlock(responseObject);
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) { } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
...@@ -93,10 +94,11 @@ static NetworkRequestClassManager *manager = nil; ...@@ -93,10 +94,11 @@ static NetworkRequestClassManager *manager = nil;
[manager GET:requestURLString parameters:[jastorobject toDictionary] progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) { [manager GET:requestURLString parameters:[jastorobject toDictionary] progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
//登陆超时 //登陆超时
if ([responseObject[@"code"] isEqualToNumber:@(-1)]) { if ([responseObject[@"code"] isEqualToNumber:@1]) {
[[NSNotificationCenter defaultCenter] postNotificationName:LOGINTIMEOUT object:nil];return; [[NSNotificationCenter defaultCenter] postNotificationName:LOGINTIMEOUT object:nil];return;
}else{
successBlock(responseObject);
} }
successBlock(responseObject);
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) { } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
......
...@@ -112,12 +112,12 @@ ...@@ -112,12 +112,12 @@
/** /**
* 服务器开发地址 * 服务器开发地址
*/ */
//#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://139.196.195.30:8090/opple-web/app%@",URL] #define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://139.196.195.30:8090/opple-web/app%@",URL]
/** /**
* 服务器测试地址 * 服务器测试地址
*/ */
#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://dg-dev.opple.com/opple-web/app%@",URL] //#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://dg-dev.opple.com/opple-web/app%@",URL]
///** ///**
// * 服务器正式地址 // * 服务器正式地址
......
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