Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
ALand
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张杰
ALand
Commits
f88230c5
Commit
f88230c5
authored
May 19, 2016
by
Sandy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更改商品搜索接口
parent
1f749328
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
398 additions
and
121 deletions
+398
-121
project.pbxproj
ALand.xcodeproj/project.pbxproj
+21
-1
OrderListFooterView.h
ALand/CodeClass/Home/View/Order/OrderListFooterView.h
+15
-0
OrderListFooterView.m
ALand/CodeClass/Home/View/Order/OrderListFooterView.m
+31
-0
OrderListFooterView.xib
ALand/CodeClass/Home/View/Order/OrderListFooterView.xib
+75
-0
OrderListHeaderView.h
ALand/CodeClass/Home/View/Order/OrderListHeaderView.h
+14
-0
OrderListHeaderView.m
ALand/CodeClass/Home/View/Order/OrderListHeaderView.m
+33
-0
OrderListHeaderView.xib
ALand/CodeClass/Home/View/Order/OrderListHeaderView.xib
+99
-0
CommodityListViewController.m
...me/ViewController/Commodity/CommodityListViewController.m
+4
-3
CommoditySearchViewController.m
.../ViewController/Commodity/CommoditySearchViewController.m
+5
-3
CustomerManagementViewController.m
...ler/CustomerManagement/CustomerManagementViewController.m
+18
-17
NoPaymentTableViewController.m
.../Home/ViewController/Order/NoPaymentTableViewController.m
+36
-30
OrderDetailViewController.m
...ass/Home/ViewController/Order/OrderDetailViewController.m
+2
-5
OrderViewController.m
...CodeClass/Home/ViewController/Order/OrderViewController.m
+1
-1
LoginViewController.m
ALand/CodeClass/Login/LoginViewController.m
+2
-0
AddBankCardIDViewController.m
...e/ViewController/MyBandCard/AddBankCardIDViewController.m
+1
-1
ChangeMyBankCardViewController.m
...iewController/MyBandCard/ChangeMyBankCardViewController.m
+1
-1
NSString+Category.h
ALand/General/Categories/NSString+Category.h
+2
-1
NSString+Category.m
ALand/General/Categories/NSString+Category.m
+37
-58
AppHeader.h
ALand/Macro/AppHeader.h
+1
-0
No files found.
ALand.xcodeproj/project.pbxproj
View file @
f88230c5
...
@@ -128,6 +128,10 @@
...
@@ -128,6 +128,10 @@
194FB0E01CE452EE0089A3D5
/* MessageTableViewCell.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
194FB0DE1CE452EE0089A3D5
/* MessageTableViewCell.xib */
;
};
194FB0E01CE452EE0089A3D5
/* MessageTableViewCell.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
194FB0DE1CE452EE0089A3D5
/* MessageTableViewCell.xib */
;
};
194FB0E31CE472C40089A3D5
/* NavigationbarView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
194FB0E21CE472C40089A3D5
/* NavigationbarView.m */
;
};
194FB0E31CE472C40089A3D5
/* NavigationbarView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
194FB0E21CE472C40089A3D5
/* NavigationbarView.m */
;
};
194FB0E51CE472D20089A3D5
/* NavigationbarView.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
194FB0E41CE472D20089A3D5
/* NavigationbarView.xib */
;
};
194FB0E51CE472D20089A3D5
/* NavigationbarView.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
194FB0E41CE472D20089A3D5
/* NavigationbarView.xib */
;
};
1952C2ED1CED93D80017E4D6
/* OrderListHeaderView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
1952C2EC1CED93D80017E4D6
/* OrderListHeaderView.m */
;
};
1952C2EF1CED93E90017E4D6
/* OrderListHeaderView.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
1952C2EE1CED93E90017E4D6
/* OrderListHeaderView.xib */
;
};
1952C2F21CED95230017E4D6
/* OrderListFooterView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
1952C2F11CED95230017E4D6
/* OrderListFooterView.m */
;
};
1952C2F41CED952B0017E4D6
/* OrderListFooterView.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
1952C2F31CED952B0017E4D6
/* OrderListFooterView.xib */
;
};
19563C471CDAE60B00AFD0E0
/* MyBandCardViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
19563C461CDAE60B00AFD0E0
/* MyBandCardViewController.m */
;
};
19563C471CDAE60B00AFD0E0
/* MyBandCardViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
19563C461CDAE60B00AFD0E0
/* MyBandCardViewController.m */
;
};
19563C4A1CDAEA3800AFD0E0
/* MyBandBottomView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
19563C491CDAEA3800AFD0E0
/* MyBandBottomView.m */
;
};
19563C4A1CDAEA3800AFD0E0
/* MyBandBottomView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
19563C491CDAEA3800AFD0E0
/* MyBandBottomView.m */
;
};
19563C4C1CDAEA4500AFD0E0
/* MyBandBottomView.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
19563C4B1CDAEA4500AFD0E0
/* MyBandBottomView.xib */
;
};
19563C4C1CDAEA4500AFD0E0
/* MyBandBottomView.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
19563C4B1CDAEA4500AFD0E0
/* MyBandBottomView.xib */
;
};
...
@@ -559,6 +563,12 @@
...
@@ -559,6 +563,12 @@
194FB0E11CE472C40089A3D5
/* NavigationbarView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
NavigationbarView.h
;
sourceTree
=
"<group>"
;
};
194FB0E11CE472C40089A3D5
/* NavigationbarView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
NavigationbarView.h
;
sourceTree
=
"<group>"
;
};
194FB0E21CE472C40089A3D5
/* NavigationbarView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
NavigationbarView.m
;
sourceTree
=
"<group>"
;
};
194FB0E21CE472C40089A3D5
/* NavigationbarView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
NavigationbarView.m
;
sourceTree
=
"<group>"
;
};
194FB0E41CE472D20089A3D5
/* NavigationbarView.xib */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
file.xib
;
path
=
NavigationbarView.xib
;
sourceTree
=
"<group>"
;
};
194FB0E41CE472D20089A3D5
/* NavigationbarView.xib */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
file.xib
;
path
=
NavigationbarView.xib
;
sourceTree
=
"<group>"
;
};
1952C2EB1CED93D80017E4D6
/* OrderListHeaderView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
OrderListHeaderView.h
;
sourceTree
=
"<group>"
;
};
1952C2EC1CED93D80017E4D6
/* OrderListHeaderView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
OrderListHeaderView.m
;
sourceTree
=
"<group>"
;
};
1952C2EE1CED93E90017E4D6
/* OrderListHeaderView.xib */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
file.xib
;
path
=
OrderListHeaderView.xib
;
sourceTree
=
"<group>"
;
};
1952C2F01CED95230017E4D6
/* OrderListFooterView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
OrderListFooterView.h
;
sourceTree
=
"<group>"
;
};
1952C2F11CED95230017E4D6
/* OrderListFooterView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
OrderListFooterView.m
;
sourceTree
=
"<group>"
;
};
1952C2F31CED952B0017E4D6
/* OrderListFooterView.xib */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
file.xib
;
path
=
OrderListFooterView.xib
;
sourceTree
=
"<group>"
;
};
19563C451CDAE60B00AFD0E0
/* MyBandCardViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
MyBandCardViewController.h
;
sourceTree
=
"<group>"
;
};
19563C451CDAE60B00AFD0E0
/* MyBandCardViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
MyBandCardViewController.h
;
sourceTree
=
"<group>"
;
};
19563C461CDAE60B00AFD0E0
/* MyBandCardViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
MyBandCardViewController.m
;
sourceTree
=
"<group>"
;
};
19563C461CDAE60B00AFD0E0
/* MyBandCardViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
MyBandCardViewController.m
;
sourceTree
=
"<group>"
;
};
19563C481CDAEA3800AFD0E0
/* MyBandBottomView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
MyBandBottomView.h
;
sourceTree
=
"<group>"
;
};
19563C481CDAEA3800AFD0E0
/* MyBandBottomView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
MyBandBottomView.h
;
sourceTree
=
"<group>"
;
};
...
@@ -1010,6 +1020,12 @@
...
@@ -1010,6 +1020,12 @@
19D906B81CC87F3B00CD42DC
/* OrderExpressTableViewCell.h */
,
19D906B81CC87F3B00CD42DC
/* OrderExpressTableViewCell.h */
,
19D906B91CC87F3B00CD42DC
/* OrderExpressTableViewCell.m */
,
19D906B91CC87F3B00CD42DC
/* OrderExpressTableViewCell.m */
,
19D906BA1CC87F3B00CD42DC
/* OrderExpressTableViewCell.xib */
,
19D906BA1CC87F3B00CD42DC
/* OrderExpressTableViewCell.xib */
,
1952C2EB1CED93D80017E4D6
/* OrderListHeaderView.h */
,
1952C2EC1CED93D80017E4D6
/* OrderListHeaderView.m */
,
1952C2EE1CED93E90017E4D6
/* OrderListHeaderView.xib */
,
1952C2F01CED95230017E4D6
/* OrderListFooterView.h */
,
1952C2F11CED95230017E4D6
/* OrderListFooterView.m */
,
1952C2F31CED952B0017E4D6
/* OrderListFooterView.xib */
,
1913833E1CAB9DD4005F6440
/* OrderCellView.h */
,
1913833E1CAB9DD4005F6440
/* OrderCellView.h */
,
1913833F1CAB9DD4005F6440
/* OrderCellView.m */
,
1913833F1CAB9DD4005F6440
/* OrderCellView.m */
,
1913833C1CAB9DC2005F6440
/* OrderCellView.xib */
,
1913833C1CAB9DC2005F6440
/* OrderCellView.xib */
,
...
@@ -2251,7 +2267,7 @@
...
@@ -2251,7 +2267,7 @@
TargetAttributes
=
{
TargetAttributes
=
{
1940D2E61C9A56730080678C
=
{
1940D2E61C9A56730080678C
=
{
CreatedOnToolsVersion
=
7.2.1
;
CreatedOnToolsVersion
=
7.2.1
;
DevelopmentTeam
=
4WRSWKXL27
;
DevelopmentTeam
=
W54V2VB863
;
};
};
1940D2F91C9A56730080678C
=
{
1940D2F91C9A56730080678C
=
{
CreatedOnToolsVersion
=
7.2.1
;
CreatedOnToolsVersion
=
7.2.1
;
...
@@ -2299,6 +2315,7 @@
...
@@ -2299,6 +2315,7 @@
194FB0E01CE452EE0089A3D5
/* MessageTableViewCell.xib in Resources */
,
194FB0E01CE452EE0089A3D5
/* MessageTableViewCell.xib in Resources */
,
1900A3421CB6059000B2B7C4
/* introductionViewController.xib in Resources */
,
1900A3421CB6059000B2B7C4
/* introductionViewController.xib in Resources */
,
199B4D6A1CABBEF400451E0E
/* OrderDetailTopView.xib in Resources */
,
199B4D6A1CABBEF400451E0E
/* OrderDetailTopView.xib in Resources */
,
1952C2F41CED952B0017E4D6
/* OrderListFooterView.xib in Resources */
,
199BC7B81C9ADD5500E4E0B8
/* ToLoginViewController.xib in Resources */
,
199BC7B81C9ADD5500E4E0B8
/* ToLoginViewController.xib in Resources */
,
196944DE1CEC4E780036E574
/* NoBillHistoryView.xib in Resources */
,
196944DE1CEC4E780036E574
/* NoBillHistoryView.xib in Resources */
,
19DC6B3E1CC0E06C0064A9FD
/* CustomerTableViewCell.xib in Resources */
,
19DC6B3E1CC0E06C0064A9FD
/* CustomerTableViewCell.xib in Resources */
,
...
@@ -2343,6 +2360,7 @@
...
@@ -2343,6 +2360,7 @@
19563CA21CDC2E0E00AFD0E0
/* BankTableViewCell.xib in Resources */
,
19563CA21CDC2E0E00AFD0E0
/* BankTableViewCell.xib in Resources */
,
192940201CC8DA5B00E377EE
/* InvitePartnerViewController.xib in Resources */
,
192940201CC8DA5B00E377EE
/* InvitePartnerViewController.xib in Resources */
,
19563C9D1CDB345400AFD0E0
/* AddDetailInfoViewController.xib in Resources */
,
19563C9D1CDB345400AFD0E0
/* AddDetailInfoViewController.xib in Resources */
,
1952C2EF1CED93E90017E4D6
/* OrderListHeaderView.xib in Resources */
,
);
);
runOnlyForDeploymentPostprocessing
=
0
;
runOnlyForDeploymentPostprocessing
=
0
;
};
};
...
@@ -2502,6 +2520,7 @@
...
@@ -2502,6 +2520,7 @@
19DC6B191CC0B5690064A9FD
/* MyTeamCollectionViewCell.m in Sources */
,
19DC6B191CC0B5690064A9FD
/* MyTeamCollectionViewCell.m in Sources */
,
19DCCB691C9A9EB30072C3BF
/* IBTObject.m in Sources */
,
19DCCB691C9A9EB30072C3BF
/* IBTObject.m in Sources */
,
192900811CD1AECB00D226E7
/* ShareInstance.m in Sources */
,
192900811CD1AECB00D226E7
/* ShareInstance.m in Sources */
,
1952C2ED1CED93D80017E4D6
/* OrderListHeaderView.m in Sources */
,
19DCCBDD1C9AA0450072C3BF
/* IBTFileManager.m in Sources */
,
19DCCBDD1C9AA0450072C3BF
/* IBTFileManager.m in Sources */
,
1921EF6D1CE5987B00B0BC4A
/* HomeCollectionFooterReusableView.m in Sources */
,
1921EF6D1CE5987B00B0BC4A
/* HomeCollectionFooterReusableView.m in Sources */
,
1929009A1CD2129B00D226E7
/* MyAcountViewController.m in Sources */
,
1929009A1CD2129B00D226E7
/* MyAcountViewController.m in Sources */
,
...
@@ -2616,6 +2635,7 @@
...
@@ -2616,6 +2635,7 @@
19632DB11CB39B190024A8A1
/* SelectPhotoView.m in Sources */
,
19632DB11CB39B190024A8A1
/* SelectPhotoView.m in Sources */
,
19DCCB621C9A9EB30072C3BF
/* IBTTableViewInfo.m in Sources */
,
19DCCB621C9A9EB30072C3BF
/* IBTTableViewInfo.m in Sources */
,
19ADD38E1CA4EC1000EE6E5A
/* AddCommodityHeaderCollectionReusableView.m in Sources */
,
19ADD38E1CA4EC1000EE6E5A
/* AddCommodityHeaderCollectionReusableView.m in Sources */
,
1952C2F21CED95230017E4D6
/* OrderListFooterView.m in Sources */
,
194FB0AC1CE2E95B0089A3D5
/* UserInfoBaseClass.m in Sources */
,
194FB0AC1CE2E95B0089A3D5
/* UserInfoBaseClass.m in Sources */
,
194FB0BE1CE2F8400089A3D5
/* JavenBankCards.m in Sources */
,
194FB0BE1CE2F8400089A3D5
/* JavenBankCards.m in Sources */
,
191383351CAB95F5005F6440
/* NoPaymentTableViewController.m in Sources */
,
191383351CAB95F5005F6440
/* NoPaymentTableViewController.m in Sources */
,
...
...
ALand/CodeClass/Home/View/Order/OrderListFooterView.h
0 → 100644
View file @
f88230c5
//
// OrderListFooterView.h
// ALand
//
// Created by Z on 16/5/19.
// Copyright © 2016年 Z. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "JavenOrderModel.h"
@interface
OrderListFooterView
:
UITableViewHeaderFooterView
-
(
void
)
setUpViewWithModel
:(
JavenOrderModel
*
)
model
;
@end
ALand/CodeClass/Home/View/Order/OrderListFooterView.m
0 → 100644
View file @
f88230c5
//
// OrderListFooterView.m
// ALand
//
// Created by Z on 16/5/19.
// Copyright © 2016年 Z. All rights reserved.
//
#import "OrderListFooterView.h"
@interface
OrderListFooterView
()
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
labelTotal
;
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
labelCommissions
;
@end
@implementation
OrderListFooterView
-
(
void
)
setUpViewWithModel
:(
JavenOrderModel
*
)
model
{
self
.
labelTotal
.
text
=
[
NSString
stringWithFormat
:
@"¥%.2f"
,
model
.
total
];
self
.
labelCommissions
.
text
=
[
NSString
stringWithFormat
:
@"¥%.2f"
,
model
.
commissions
];
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/
@end
ALand/CodeClass/Home/View/Order/OrderListFooterView.xib
0 → 100644
View file @
f88230c5
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"9532"
systemVersion=
"15D21"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
>
<dependencies>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"9530"
/>
</dependencies>
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
/>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"-2"
customClass=
"UIResponder"
/>
<view
contentMode=
"scaleToFill"
id=
"iN0-l3-epB"
customClass=
"OrderListFooterView"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"600"
height=
"600"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<subviews>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"zjG-YU-5RC"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"600"
height=
"600"
/>
<subviews>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"总计:"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"LFc-F6-JT0"
>
<rect
key=
"frame"
x=
"374"
y=
"290"
width=
"39"
height=
"21"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"17"
/>
<color
key=
"textColor"
red=
"0.50823958329999996"
green=
"0.50823958329999996"
blue=
"0.50823958329999996"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"¥837"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"kDR-7B-Oxx"
>
<rect
key=
"frame"
x=
"421"
y=
"290"
width=
"48"
height=
"21"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"17"
/>
<color
key=
"textColor"
red=
"0.0"
green=
"0.0"
blue=
"0.0"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"佣金:"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"QaC-wG-Ylh"
>
<rect
key=
"frame"
x=
"495"
y=
"290"
width=
"39"
height=
"21"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"17"
/>
<color
key=
"textColor"
red=
"0.50823958329999996"
green=
"0.50823958329999996"
blue=
"0.50823958329999996"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"¥83.7"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"u6I-iG-56m"
>
<rect
key=
"frame"
x=
"542"
y=
"290"
width=
"52"
height=
"21"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"17"
/>
<color
key=
"textColor"
red=
"1"
green=
"0.3921568627"
blue=
"0.3921568627"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
</label>
</subviews>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"44"
id=
"97a-c1-hZ5"
/>
<constraint
firstItem=
"u6I-iG-56m"
firstAttribute=
"centerY"
secondItem=
"LFc-F6-JT0"
secondAttribute=
"centerY"
id=
"ABp-n7-EXt"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"u6I-iG-56m"
secondAttribute=
"trailing"
constant=
"6"
id=
"E2f-Ho-SZk"
/>
<constraint
firstItem=
"u6I-iG-56m"
firstAttribute=
"leading"
secondItem=
"QaC-wG-Ylh"
secondAttribute=
"trailing"
constant=
"8"
id=
"HEb-O0-aVj"
/>
<constraint
firstItem=
"LFc-F6-JT0"
firstAttribute=
"centerY"
secondItem=
"zjG-YU-5RC"
secondAttribute=
"centerY"
id=
"eiE-pG-cG2"
/>
<constraint
firstItem=
"kDR-7B-Oxx"
firstAttribute=
"centerY"
secondItem=
"LFc-F6-JT0"
secondAttribute=
"centerY"
id=
"l2R-QV-mF4"
/>
<constraint
firstItem=
"QaC-wG-Ylh"
firstAttribute=
"leading"
secondItem=
"kDR-7B-Oxx"
secondAttribute=
"trailing"
constant=
"26"
id=
"mMT-fH-Frn"
/>
<constraint
firstItem=
"kDR-7B-Oxx"
firstAttribute=
"leading"
secondItem=
"LFc-F6-JT0"
secondAttribute=
"trailing"
constant=
"8"
id=
"mUj-9s-7Ly"
/>
<constraint
firstItem=
"QaC-wG-Ylh"
firstAttribute=
"centerY"
secondItem=
"LFc-F6-JT0"
secondAttribute=
"centerY"
id=
"xEg-Jf-5Pq"
/>
</constraints>
<variation
key=
"default"
>
<mask
key=
"constraints"
>
<exclude
reference=
"97a-c1-hZ5"
/>
</mask>
</variation>
</view>
</subviews>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"calibratedWhite"
/>
<constraints>
<constraint
firstItem=
"zjG-YU-5RC"
firstAttribute=
"leading"
secondItem=
"iN0-l3-epB"
secondAttribute=
"leading"
id=
"CRC-Im-KQW"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"zjG-YU-5RC"
secondAttribute=
"trailing"
id=
"MIB-Fc-10d"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"zjG-YU-5RC"
secondAttribute=
"bottom"
id=
"a8N-jy-7sp"
/>
<constraint
firstItem=
"zjG-YU-5RC"
firstAttribute=
"top"
secondItem=
"iN0-l3-epB"
secondAttribute=
"top"
id=
"cgl-RT-iyZ"
/>
</constraints>
<connections>
<outlet
property=
"labelCommissions"
destination=
"u6I-iG-56m"
id=
"p8Z-HH-axB"
/>
<outlet
property=
"labelTotal"
destination=
"kDR-7B-Oxx"
id=
"G7b-eP-AWW"
/>
</connections>
<point
key=
"canvasLocation"
x=
"409"
y=
"326"
/>
</view>
</objects>
</document>
ALand/CodeClass/Home/View/Order/OrderListHeaderView.h
0 → 100644
View file @
f88230c5
//
// OrderListHeaderView.h
// ALand
//
// Created by Z on 16/5/19.
// Copyright © 2016年 Z. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "JavenOrderModel.h"
@interface
OrderListHeaderView
:
UITableViewHeaderFooterView
-
(
void
)
setUpViewWithModel
:(
JavenOrderModel
*
)
model
state
:(
NSString
*
)
state
;
@end
ALand/CodeClass/Home/View/Order/OrderListHeaderView.m
0 → 100644
View file @
f88230c5
//
// OrderListHeaderView.m
// ALand
//
// Created by Z on 16/5/19.
// Copyright © 2016年 Z. All rights reserved.
//
#import "OrderListHeaderView.h"
@interface
OrderListHeaderView
()
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
labelState
;
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
labelCosumer
;
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
labelTime
;
@end
@implementation
OrderListHeaderView
-
(
void
)
setUpViewWithModel
:(
JavenOrderModel
*
)
model
state
:(
NSString
*
)
state
{
self
.
labelCosumer
.
text
=
model
.
consumer
.
code
;
self
.
labelTime
.
text
=
[(
JavenCreateInfo
*
)
model
.
createInfo
time
];
self
.
labelState
.
text
=
state
;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/
@end
ALand/CodeClass/Home/View/Order/OrderListHeaderView.xib
0 → 100644
View file @
f88230c5
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"9532"
systemVersion=
"15D21"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
>
<dependencies>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"9530"
/>
</dependencies>
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
/>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"-2"
customClass=
"UIResponder"
/>
<view
contentMode=
"scaleToFill"
id=
"iN0-l3-epB"
customClass=
"OrderListHeaderView"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"98"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<subviews>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"bDx-im-OlJ"
customClass=
"OrderTableViewHeader"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"98"
/>
<subviews>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"买家:"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"J9b-ML-jvM"
>
<rect
key=
"frame"
x=
"16"
y=
"18"
width=
"51"
height=
"21"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"17"
/>
<color
key=
"textColor"
red=
"0.0"
green=
"0.0"
blue=
"0.0"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"谢德彬"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"5EO-l6-bfh"
>
<rect
key=
"frame"
x=
"82"
y=
"18"
width=
"51"
height=
"21"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"17"
/>
<color
key=
"textColor"
red=
"0.0"
green=
"0.0"
blue=
"0.0"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"待支付"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"2mu-Pa-ilv"
>
<rect
key=
"frame"
x=
"308"
y=
"18"
width=
"51"
height=
"21"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"17"
/>
<color
key=
"textColor"
red=
"1"
green=
"0.0"
blue=
"0.0"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"下单时间:"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"BQ9-4D-64A"
>
<rect
key=
"frame"
x=
"16"
y=
"70"
width=
"73"
height=
"21"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"17"
/>
<color
key=
"textColor"
red=
"0.63360416669999997"
green=
"0.63360416669999997"
blue=
"0.63360416669999997"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"2016-10-12 09:13:00"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"QOM-gl-ITn"
>
<rect
key=
"frame"
x=
"102"
y=
"70"
width=
"167"
height=
"21"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"17"
/>
<color
key=
"textColor"
red=
"0.63360416669999997"
green=
"0.63360416669999997"
blue=
"0.63360416669999997"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
</label>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"WiJ-0o-z8U"
>
<rect
key=
"frame"
x=
"16"
y=
"97"
width=
"343"
height=
"1"
/>
<color
key=
"backgroundColor"
red=
"0.94901960780000005"
green=
"0.94901960780000005"
blue=
"0.94901960780000005"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"1"
id=
"Avm-qE-YDv"
/>
</constraints>
</view>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"5zz-8I-Brj"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"10"
/>
<color
key=
"backgroundColor"
red=
"0.86666666670000003"
green=
"0.86666666670000003"
blue=
"0.86666666670000003"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"10"
id=
"Vet-ol-Bms"
/>
</constraints>
</view>
</subviews>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"calibratedWhite"
/>
<constraints>
<constraint
firstItem=
"J9b-ML-jvM"
firstAttribute=
"leading"
secondItem=
"bDx-im-OlJ"
secondAttribute=
"leading"
constant=
"16"
id=
"FIL-az-yTq"
/>
<constraint
firstItem=
"QOM-gl-ITn"
firstAttribute=
"leading"
secondItem=
"BQ9-4D-64A"
secondAttribute=
"trailing"
constant=
"13"
id=
"KN6-xG-6C3"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"WiJ-0o-z8U"
secondAttribute=
"trailing"
constant=
"16"
id=
"NWe-pY-ooK"
/>
<constraint
firstItem=
"2mu-Pa-ilv"
firstAttribute=
"centerY"
secondItem=
"5EO-l6-bfh"
secondAttribute=
"centerY"
id=
"PXj-38-174"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"2mu-Pa-ilv"
secondAttribute=
"trailing"
constant=
"16"
id=
"Q9X-MY-SAq"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"5zz-8I-Brj"
secondAttribute=
"trailing"
id=
"Vis-cH-xsQ"
/>
<constraint
firstItem=
"5zz-8I-Brj"
firstAttribute=
"leading"
secondItem=
"bDx-im-OlJ"
secondAttribute=
"leading"
id=
"XGZ-zI-Tee"
/>
<constraint
firstItem=
"QOM-gl-ITn"
firstAttribute=
"centerY"
secondItem=
"BQ9-4D-64A"
secondAttribute=
"centerY"
id=
"ZYv-om-KeZ"
/>
<constraint
firstItem=
"J9b-ML-jvM"
firstAttribute=
"top"
secondItem=
"5zz-8I-Brj"
secondAttribute=
"bottom"
constant=
"8"
id=
"Zck-OC-roQ"
/>
<constraint
firstItem=
"WiJ-0o-z8U"
firstAttribute=
"top"
secondItem=
"QOM-gl-ITn"
secondAttribute=
"bottom"
constant=
"6"
id=
"e04-eX-sxp"
/>
<constraint
firstItem=
"BQ9-4D-64A"
firstAttribute=
"leading"
secondItem=
"J9b-ML-jvM"
secondAttribute=
"leading"
id=
"fqy-71-anj"
/>
<constraint
firstItem=
"WiJ-0o-z8U"
firstAttribute=
"leading"
secondItem=
"bDx-im-OlJ"
secondAttribute=
"leading"
constant=
"16"
id=
"fu9-Pa-l4F"
/>
<constraint
firstItem=
"5EO-l6-bfh"
firstAttribute=
"leading"
secondItem=
"J9b-ML-jvM"
secondAttribute=
"trailing"
constant=
"15"
id=
"hgI-rG-Pg7"
/>
<constraint
firstItem=
"5EO-l6-bfh"
firstAttribute=
"centerY"
secondItem=
"J9b-ML-jvM"
secondAttribute=
"centerY"
id=
"lFK-eV-SlU"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"WiJ-0o-z8U"
secondAttribute=
"bottom"
id=
"sR3-Rc-0pz"
/>
<constraint
firstItem=
"5zz-8I-Brj"
firstAttribute=
"top"
secondItem=
"bDx-im-OlJ"
secondAttribute=
"top"
id=
"scp-zi-LOW"
/>
</constraints>
</view>
</subviews>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"calibratedWhite"
/>
<constraints>
<constraint
firstItem=
"bDx-im-OlJ"
firstAttribute=
"top"
secondItem=
"iN0-l3-epB"
secondAttribute=
"top"
id=
"HKh-Fk-pcX"
/>
<constraint
firstItem=
"bDx-im-OlJ"
firstAttribute=
"leading"
secondItem=
"iN0-l3-epB"
secondAttribute=
"leading"
id=
"Na5-QH-frK"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"bDx-im-OlJ"
secondAttribute=
"trailing"
id=
"WSz-S8-jZS"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"bDx-im-OlJ"
secondAttribute=
"bottom"
id=
"X22-I8-sxC"
/>
</constraints>
<freeformSimulatedSizeMetrics
key=
"simulatedDestinationMetrics"
/>
<connections>
<outlet
property=
"labelCosumer"
destination=
"5EO-l6-bfh"
id=
"Msd-CY-Ahd"
/>
<outlet
property=
"labelState"
destination=
"2mu-Pa-ilv"
id=
"HZ6-NF-SN8"
/>
<outlet
property=
"labelTime"
destination=
"QOM-gl-ITn"
id=
"6wZ-73-K5I"
/>
</connections>
<point
key=
"canvasLocation"
x=
"563.5"
y=
"65"
/>
</view>
</objects>
</document>
ALand/CodeClass/Home/ViewController/Commodity/CommodityListViewController.m
View file @
f88230c5
...
@@ -43,6 +43,7 @@
...
@@ -43,6 +43,7 @@
[
self
setUpSortView
];
[
self
setUpSortView
];
[
self
setUpCollectionView
];
[
self
setUpCollectionView
];
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
[
self
setUpData
];
[
self
setUpData
];
// Do any additional setup after loading the view.
// Do any additional setup after loading the view.
}
}
...
@@ -89,7 +90,6 @@
...
@@ -89,7 +90,6 @@
@"page"
:
@
(
self
.
page
),
@"page"
:
@
(
self
.
page
),
@"probePages"
:
@0
},
@"probePages"
:
@0
},
@"fetchParts"
:
@[
@"string"
]};
@"fetchParts"
:
@[
@"string"
]};
WS
(
weakSelf
)
WS
(
weakSelf
)
[[
HTTPCilent
shareCilent
]
POST
:
@"goods/query2"
parameters
:
myDictionary
success
:^
(
NSURLSessionDataTask
*
task
,
id
responseObject
)
{
[[
HTTPCilent
shareCilent
]
POST
:
@"goods/query2"
parameters
:
myDictionary
success
:^
(
NSURLSessionDataTask
*
task
,
id
responseObject
)
{
...
@@ -97,7 +97,7 @@
...
@@ -97,7 +97,7 @@
CommotityListModel
*
model
=
[
CommotityListModel
modelObjectWithDictionary
:
dic
];
CommotityListModel
*
model
=
[
CommotityListModel
modelObjectWithDictionary
:
dic
];
[
weakSelf
.
arrItemDatas
addObject
:
model
];
[
weakSelf
.
arrItemDatas
addObject
:
model
];
}
}
[
MBProgressHUD
hideHUDForView
:
weakSelf
.
view
];
[
weakSelf
.
collectionView
reloadData
];
[
weakSelf
.
collectionView
reloadData
];
[
weakSelf
.
collectionView
.
mj_header
endRefreshing
];
[
weakSelf
.
collectionView
.
mj_header
endRefreshing
];
if
([
responseObject
[
@"queryResult"
]
count
]
<
kPageSize
)
{
if
([
responseObject
[
@"queryResult"
]
count
]
<
kPageSize
)
{
...
@@ -189,6 +189,7 @@
...
@@ -189,6 +189,7 @@
//改变排序条件之后重新请求数据
//改变排序条件之后重新请求数据
-
(
void
)
resetReloadData
{
-
(
void
)
resetReloadData
{
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
[
self
.
arrItemDatas
removeAllObjects
];
[
self
.
arrItemDatas
removeAllObjects
];
[
self
setUpData
];
[
self
setUpData
];
...
@@ -222,7 +223,7 @@
...
@@ -222,7 +223,7 @@
}];
}];
_collectionView
.
mj_footer
=
[
MJRefreshAutoNormalFooter
footerWithRefreshingBlock
:
^
{
_collectionView
.
mj_footer
=
[
MJRefreshAutoNormalFooter
footerWithRefreshingBlock
:
^
{
s
elf
.
page
+=
1
;
weakS
elf
.
page
+=
1
;
[
weakSelf
setUpData
];
[
weakSelf
setUpData
];
}];
}];
...
...
ALand/CodeClass/Home/ViewController/Commodity/CommoditySearchViewController.m
View file @
f88230c5
...
@@ -76,8 +76,10 @@
...
@@ -76,8 +76,10 @@
-
(
void
)
setUpData
{
-
(
void
)
setUpData
{
NSDictionary
*
myDictionary
=
@{
@"defintion"
:
@{
@"conditions"
:
@[@{
@"operation"
:
@"g
oodsData
name like"
,
NSDictionary
*
myDictionary
=
@{
@"defintion"
:
@{
@"conditions"
:
@[@{
@"operation"
:
@"g
lobal
name like"
,
@"parameters"
:
@[
self
.
searchText
]},
@"parameters"
:
@[
self
.
searchText
]},
@{
@"operation"
:
@"online only"
,
@"parameters"
:
@[[
NSNull
null
]]},
@{
@"operation"
:
@"domain equals"
,
@{
@"operation"
:
@"domain equals"
,
@"parameters"
:
@[[
UserInfo
shareInstance
].
domain
]},
@"parameters"
:
@[[
UserInfo
shareInstance
].
domain
]},
],
],
...
@@ -150,13 +152,13 @@
...
@@ -150,13 +152,13 @@
break
;
break
;
case
3
:
//佣金
case
3
:
//佣金
{
{
self
.
field
=
@"
brokerageRate
"
;
self
.
field
=
@"
commission
"
;
self
.
direction
=
@"desc"
;
self
.
direction
=
@"desc"
;
}
}
break
;
break
;
case
4
:
case
4
:
{
{
self
.
field
=
@"
brokerageRate
"
;
self
.
field
=
@"
commission
"
;
self
.
direction
=
@"asc"
;
self
.
direction
=
@"asc"
;
}
}
break
;
break
;
...
...
ALand/CodeClass/Home/ViewController/CustomerManagement/CustomerManagementViewController.m
View file @
f88230c5
...
@@ -36,6 +36,7 @@
...
@@ -36,6 +36,7 @@
[
super
viewDidLoad
];
[
super
viewDidLoad
];
self
.
view
.
backgroundColor
=
kBacroundColor
;
self
.
view
.
backgroundColor
=
kBacroundColor
;
self
.
page
=
0
;
self
.
page
=
0
;
self
.
phoneNo
=
[
NSNull
null
];
[
self
setUpDefaultConditions
];
[
self
setUpDefaultConditions
];
[
self
setUpSearchBar
];
[
self
setUpSearchBar
];
[
self
setUpSortView
];
[
self
setUpSortView
];
...
@@ -48,7 +49,6 @@
...
@@ -48,7 +49,6 @@
self
.
field
=
@"commission"
;
self
.
field
=
@"commission"
;
self
.
direction
=
@"desc"
;
self
.
direction
=
@"desc"
;
self
.
customerCreateDate
=
@"2011-04-09 00:00:00"
;
self
.
customerCreateDate
=
@"2011-04-09 00:00:00"
;
self
.
phoneNo
=
[
NSNull
null
];
}
}
...
@@ -72,7 +72,7 @@
...
@@ -72,7 +72,7 @@
[[
HTTPCilent
shareCilent
]
POST
:
@"reseller/customer/query"
parameters
:[
self
getParams
]
success
:^
(
NSURLSessionDataTask
*
task
,
id
responseObject
)
{
[[
HTTPCilent
shareCilent
]
POST
:
@"reseller/customer/query"
parameters
:[
self
getParams
]
success
:^
(
NSURLSessionDataTask
*
task
,
id
responseObject
)
{
if
([
responseObject
[
@"code"
]
isEqualToNumber
:
@0
])
{
if
([
responseObject
[
@"code"
]
isEqualToNumber
:
@0
])
{
NSMutableArray
*
arr
=
weakSelf
.
searchBar
.
isFirstResponder
?
weakSelf
.
results
:
weakSelf
.
arrCellData
;
NSMutableArray
*
arr
=
weakSelf
.
searchBar
.
isFirstResponder
?
weakSelf
.
results
:
weakSelf
.
arrCellData
;
for
(
NSDictionary
*
dic
in
responseObject
[
@"queryResult"
])
{
for
(
NSDictionary
*
dic
in
responseObject
[
@"queryResult"
])
{
JavenCustomer
*
customer
=
[
JavenCustomer
modelObjectWithDictionary
:
dic
];
JavenCustomer
*
customer
=
[
JavenCustomer
modelObjectWithDictionary
:
dic
];
[
arr
addObject
:
customer
];
[
arr
addObject
:
customer
];
...
@@ -113,6 +113,7 @@
...
@@ -113,6 +113,7 @@
@"page"
:
@
(
self
.
page
),
@"page"
:
@
(
self
.
page
),
@"probePages"
:
@0
},
@"probePages"
:
@0
},
@"fetchParts"
:
@[
@""
]};
@"fetchParts"
:
@[
@""
]};
NSString
*
strJson
=
[
params
mj_JSONString
];
return
params
;
return
params
;
}
}
...
@@ -131,7 +132,7 @@
...
@@ -131,7 +132,7 @@
self
.
searchBar
.
backgroundImage
=
[
UIImage
imageWithColor
:
color
];
self
.
searchBar
.
backgroundImage
=
[
UIImage
imageWithColor
:
color
];
[
titleView
addSubview
:
self
.
searchBar
];
[
titleView
addSubview
:
self
.
searchBar
];
self
.
navigationItem
.
titleView
=
titleView
;
self
.
navigationItem
.
titleView
=
titleView
;
}
}
-
(
void
)
setUpSortView
{
-
(
void
)
setUpSortView
{
...
@@ -205,7 +206,7 @@
...
@@ -205,7 +206,7 @@
break
;
break
;
case
2
:
//本周新增
case
2
:
//本周新增
{
{
NSDate
*
aweekBefore
=
[
NSDate
dateWithTimeIntervalSinceNow
:
-
24
*
60
*
60
*
7
];
NSDate
*
aweekBefore
=
[
NSDate
dateWithTimeIntervalSinceNow
:
-
24
*
60
*
60
*
7
];
NSDateFormatter
*
f
=
[[
NSDateFormatter
alloc
]
init
];
NSDateFormatter
*
f
=
[[
NSDateFormatter
alloc
]
init
];
[
f
setDateFormat
:
@"yyyy-MM-dd 00:00:00"
];
[
f
setDateFormat
:
@"yyyy-MM-dd 00:00:00"
];
NSString
*
dateStr
=
[
f
stringFromDate
:
aweekBefore
];
NSString
*
dateStr
=
[
f
stringFromDate
:
aweekBefore
];
...
@@ -282,7 +283,7 @@
...
@@ -282,7 +283,7 @@
-
(
void
)
searchBarCancelButtonClicked
:
(
UISearchBar
*
)
searchBar
-
(
void
)
searchBarCancelButtonClicked
:
(
UISearchBar
*
)
searchBar
{
{
// self.sortView.userInteractionEnabled = YES
;
self
.
phoneNo
=
[
NSNull
null
]
;
self
.
searchBar
.
text
=
@""
;
self
.
searchBar
.
text
=
@""
;
self
.
phoneNo
=
[
NSNull
null
];
self
.
phoneNo
=
[
NSNull
null
];
[
self
.
searchBar
endEditing
:
YES
];
[
self
.
searchBar
endEditing
:
YES
];
...
@@ -292,24 +293,24 @@
...
@@ -292,24 +293,24 @@
-
(
BOOL
)
searchBarShouldBeginEditing
:
(
UISearchBar
*
)
searchBar
-
(
BOOL
)
searchBarShouldBeginEditing
:
(
UISearchBar
*
)
searchBar
{
{
[
self
.
sortView
hide
];
[
self
.
sortView
hide
];
// self.sortView.userInteractionEnabled = NO;
// self.sortView.userInteractionEnabled = NO;
self
.
searchBar
.
showsCancelButton
=
YES
;
self
.
searchBar
.
showsCancelButton
=
YES
;
return
YES
;
return
YES
;
}
}
-
(
BOOL
)
searchBarShouldEndEditing
:
(
UISearchBar
*
)
searchBar
-
(
BOOL
)
searchBarShouldEndEditing
:
(
UISearchBar
*
)
searchBar
{
{
self
.
searchBar
.
showsCancelButton
=
NO
;
self
.
searchBar
.
showsCancelButton
=
NO
;
return
YES
;
return
YES
;
}
}
-
(
void
)
searchBarSearchButtonClicked
:
(
UISearchBar
*
)
searchBar
{
-
(
void
)
searchBarSearchButtonClicked
:
(
UISearchBar
*
)
searchBar
{
// self.sortView.userInteractionEnabled = YES;
// self.sortView.userInteractionEnabled = YES;
[
self
.
results
removeAllObjects
];
[
self
.
results
removeAllObjects
];
[
self
setUpDefaultConditions
];
[
self
setUpDefaultConditions
];
[
self
setUpData
];
[
self
setUpData
];
}
}
...
@@ -325,13 +326,13 @@
...
@@ -325,13 +326,13 @@
}
}
/*
/*
#pragma mark - Navigation
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
// Pass the selected object to the new view controller.
}
}
*/
*/
@end
@end
ALand/CodeClass/Home/ViewController/Order/NoPaymentTableViewController.m
View file @
f88230c5
...
@@ -13,10 +13,15 @@
...
@@ -13,10 +13,15 @@
#import "JavenOrderModel.h"
#import "JavenOrderModel.h"
#import "JavenGoodsDetails.h"
#import "JavenGoodsDetails.h"
#import "MJRefresh.h"
#import "MJRefresh.h"
#import "OrderDetailTableViewCell.h"
#import "OrderListHeaderView.h"
#import "OrderListFooterView.h"
#define kExpressCell @"OrderExpressTableViewCell.h"
#define kExpressCell @"OrderExpressTableViewCell.h"
#define kCellId @"OrderTableViewCell.h"
#define kCellId @"OrderTableViewCell.h"
#define kPageSize 4
#define kPageSize 4
#define kHeaderID @"headerId"
#define kFooterID @"footerId"
@interface
NoPaymentTableViewController
()
@interface
NoPaymentTableViewController
()
@property
(
nonatomic
,
assign
)
NSInteger
page
;
@property
(
nonatomic
,
assign
)
NSInteger
page
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
arrDatas
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
arrDatas
;
...
@@ -26,8 +31,10 @@
...
@@ -26,8 +31,10 @@
-
(
void
)
viewDidLoad
{
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
[
super
viewDidLoad
];
[
self
.
tableView
registerNib
:[
UINib
nibWithNibName
:
@"OrderTableViewCell"
bundle
:[
NSBundle
mainBundle
]]
forCellReuseIdentifier
:
kCellId
];
[
self
.
tableView
registerNib
:[
UINib
nibWithNibName
:
@"OrderExpressTableViewCell"
bundle
:
nil
]
forCellReuseIdentifier
:
kExpressCell
];
[
self
.
tableView
registerNib
:[
UINib
nibWithNibName
:
@"OrderDetailTableViewCell"
bundle
:[
NSBundle
mainBundle
]]
forCellReuseIdentifier
:
kCellId
];
[
self
.
tableView
registerNib
:[
UINib
nibWithNibName
:
@"OrderListHeaderView"
bundle
:
nil
]
forHeaderFooterViewReuseIdentifier
:
kHeaderID
];
[
self
.
tableView
registerNib
:[
UINib
nibWithNibName
:
@"OrderListFooterView"
bundle
:
nil
]
forHeaderFooterViewReuseIdentifier
:
kFooterID
];
self
.
tableView
.
separatorStyle
=
UITableViewCellSeparatorStyleNone
;
self
.
tableView
.
separatorStyle
=
UITableViewCellSeparatorStyleNone
;
self
.
tableView
.
contentInset
=
UIEdgeInsetsMake
(
0
,
0
,
64
,
0
);
self
.
tableView
.
contentInset
=
UIEdgeInsetsMake
(
0
,
0
,
64
,
0
);
WS
(
weakSelf
)
WS
(
weakSelf
)
...
@@ -115,16 +122,7 @@
...
@@ -115,16 +122,7 @@
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
// if ([self.orderTag isEqualToString:@"待支付"]) {
return
110
;
// }else if([self.orderTag isEqualToString:@"待发货"]){
// }else if ([self.orderTag isEqualToString:@"已发货"]){
// return 170 + 120 * [self.arrDatas[indexPath.row] goodsDetails].count;
// }else if ([self.orderTag isEqualToString:@"已完成"]){
// return 170 + 120 * [self.arrDatas[indexPath.row] goodsDetails].count;
// }else if ([self.orderTag isEqualToString:@"已取消"]){
// }
return
115
+
120
*
[
self
.
arrDatas
[
indexPath
.
row
]
goodsDetails
].
count
;
}
}
...
@@ -136,31 +134,39 @@
...
@@ -136,31 +134,39 @@
#pragma mark - Table view data source
#pragma mark - Table view data source
-
(
NSInteger
)
numberOfSectionsInTableView
:
(
UITableView
*
)
tableView
{
-
(
NSInteger
)
numberOfSectionsInTableView
:
(
UITableView
*
)
tableView
{
return
1
;
return
self
.
arrDatas
.
count
;
}
}
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
return
self
.
arrDatas
.
count
;
return
[[
self
.
arrDatas
[
section
]
goodsDetails
]
count
];
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForHeaderInSection
:
(
NSInteger
)
section
{
return
80
;
}
}
-
(
UIView
*
)
tableView
:
(
UITableView
*
)
tableView
viewForHeaderInSection
:
(
NSInteger
)
section
{
OrderListHeaderView
*
header
=
[
tableView
dequeueReusableHeaderFooterViewWithIdentifier
:
kHeaderID
];
[
header
setUpViewWithModel
:
self
.
arrDatas
[
section
]
state
:
self
.
orderTag
];
return
header
;
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForFooterInSection
:
(
NSInteger
)
section
{
return
40
;
}
-
(
UIView
*
)
tableView
:
(
UITableView
*
)
tableView
viewForFooterInSection
:
(
NSInteger
)
section
{
OrderListFooterView
*
footer
=
[
tableView
dequeueReusableHeaderFooterViewWithIdentifier
:
kFooterID
];
[
footer
setUpViewWithModel
:
self
.
arrDatas
[
section
]];
return
footer
;
}
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
// if ([self.orderTag isEqualToString:@"已发货"] || [self.orderTag isEqualToString:@"已完成"]) {
// OrderExpressTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:kExpressCell forIndexPath:indexPath];
//
// [cell cellWithModel:self.arrDatas[indexPath.row]];
// [cell setState:_orderTag];
// cell.checkExpress.hidden = NO;
// return cell;
//
// }else{
OrderTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kCellId
forIndexPath
:
indexPath
];
OrderDetailTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kCellId
forIndexPath
:
indexPath
];
[
cell
cellWithModel
:
self
.
arrDatas
[
indexPath
.
row
]];
[
cell
cellWithModel
:[
self
.
arrDatas
[
indexPath
.
section
]
goodsDetails
][
indexPath
.
row
]];
[
cell
setState
:
_orderTag
];
return
cell
;
return
cell
;
// }
}
}
...
...
ALand/CodeClass/Home/ViewController/Order/OrderDetailViewController.m
View file @
f88230c5
...
@@ -73,18 +73,15 @@
...
@@ -73,18 +73,15 @@
[
self
.
atopView
updateHeight
];
[
self
.
atopView
updateHeight
];
self
.
atopView
.
frame
=
CGRectMake
(
0
,
-
self
.
atopView
.
height
,
kWidth
,
self
.
atopView
.
height
);
self
.
atopView
.
frame
=
CGRectMake
(
0
,
-
self
.
atopView
.
height
,
kWidth
,
self
.
atopView
.
height
);
[
self
.
bottomView
updateHeight
];
[
self
.
bottomView
updateHeight
];
//self.bottomView.y = kHeight - self.bottomView.height;
self
.
bottomView
.
width
=
kWidth
;
self
.
bottomView
.
width
=
kWidth
;
self
.
tableView
.
contentInset
=
UIEdgeInsetsMake
(
self
.
atopView
.
height
,
0
,
self
.
bottomView
.
height
-
250
,
0
);
self
.
tableView
.
contentInset
=
UIEdgeInsetsMake
(
self
.
atopView
.
height
,
0
,
self
.
bottomView
.
height
-
250
,
0
);
[
self
.
tableView
scrollToRowAtIndexPath
:[
NSIndexPath
indexPathForRow
:
0
inSection
:
0
]
atScrollPosition
:
UITableViewScrollPositionTop
animated
:
YES
];
[
self
.
tableView
scrollToRowAtIndexPath
:[
NSIndexPath
indexPathForRow
:
0
inSection
:
0
]
atScrollPosition
:
UITableViewScrollPositionTop
animated
:
YES
];
}
}
-
(
NSInteger
)
numberOfSectionsInTableView
:
(
UITableView
*
)
tableView
{
-
(
NSInteger
)
numberOfSectionsInTableView
:
(
UITableView
*
)
tableView
{
return
1
;
return
1
;
}
}
...
...
ALand/CodeClass/Home/ViewController/Order/OrderViewController.m
View file @
f88230c5
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
for
(
int
i
=
0
;
i
<
arrTitle
.
count
;
i
++
)
{
for
(
int
i
=
0
;
i
<
arrTitle
.
count
;
i
++
)
{
NSLog
(
@"-----%ld"
,
(
long
)
i
);
NSLog
(
@"-----%ld"
,
(
long
)
i
);
NoPaymentTableViewController
*
noPayMentVC
=
[[
NoPaymentTableViewController
alloc
]
init
];
NoPaymentTableViewController
*
noPayMentVC
=
[[
NoPaymentTableViewController
alloc
]
init
WithStyle
:
UITableViewStyleGrouped
];
noPayMentVC
.
orderTag
=
arrTitle
[
i
];
noPayMentVC
.
orderTag
=
arrTitle
[
i
];
[
arrVC
addObject
:
noPayMentVC
];
[
arrVC
addObject
:
noPayMentVC
];
}
}
...
...
ALand/CodeClass/Login/LoginViewController.m
View file @
f88230c5
...
@@ -95,6 +95,8 @@
...
@@ -95,6 +95,8 @@
-
(
IBAction
)
loginACtion
:
(
UIButton
*
)
sender
{
-
(
IBAction
)
loginACtion
:
(
UIButton
*
)
sender
{
[
self
defaultLoginAction
];
ToLoginViewController
*
toLoginVC
=
[[
ToLoginViewController
alloc
]
initWithNibName
:
@"ToLoginViewController"
bundle
:[
NSBundle
mainBundle
]];
ToLoginViewController
*
toLoginVC
=
[[
ToLoginViewController
alloc
]
initWithNibName
:
@"ToLoginViewController"
bundle
:[
NSBundle
mainBundle
]];
toLoginVC
.
isShowNavigationBar
=
YES
;
toLoginVC
.
isShowNavigationBar
=
YES
;
[
self
.
navigationController
pushViewController
:
toLoginVC
animated
:
YES
];
[
self
.
navigationController
pushViewController
:
toLoginVC
animated
:
YES
];
...
...
ALand/CodeClass/MIne/ViewController/MyBandCard/AddBankCardIDViewController.m
View file @
f88230c5
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
-
(
BOOL
)
textField
:
(
UITextField
*
)
textField
shouldChangeCharactersInRange
:
(
NSRange
)
range
replacementString
:
(
NSString
*
)
string
{
-
(
BOOL
)
textField
:
(
UITextField
*
)
textField
shouldChangeCharactersInRange
:
(
NSRange
)
range
replacementString
:
(
NSString
*
)
string
{
NSString
*
strBankCardID
=
[
textField
.
text
stringByReplacingCharactersInRange
:
range
withString
:
string
];
//变化后的字符串
NSString
*
strBankCardID
=
[
textField
.
text
stringByReplacingCharactersInRange
:
range
withString
:
string
];
//变化后的字符串
if
([
strBankCardID
bankCardluhmCheck
])
{
if
([
strBankCardID
isBankCard
])
{
self
.
btnNext
.
enabled
=
YES
;
self
.
btnNext
.
enabled
=
YES
;
}
else
{
}
else
{
self
.
btnNext
.
enabled
=
NO
;
self
.
btnNext
.
enabled
=
NO
;
...
...
ALand/CodeClass/MIne/ViewController/MyBandCard/ChangeMyBankCardViewController.m
View file @
f88230c5
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
{
{
//check cardNo validate
//check cardNo validate
NSString
*
strBankCardID
=
[
textField
.
text
stringByReplacingCharactersInRange
:
range
withString
:
string
];
//变化后的字符串
NSString
*
strBankCardID
=
[
textField
.
text
stringByReplacingCharactersInRange
:
range
withString
:
string
];
//变化后的字符串
if
([
strBankCardID
bankCardluhmCheck
])
{
if
([
strBankCardID
isBankCard
])
{
NSString
*
strBankNameAndType
=
[
MyBankClass
returnBankName
:
strBankCardID
];
NSString
*
strBankNameAndType
=
[
MyBankClass
returnBankName
:
strBankCardID
];
self
.
labelCardName
.
text
=
[
strBankNameAndType
componentsSeparatedByString
:
@"·"
][
0
];
self
.
labelCardName
.
text
=
[
strBankNameAndType
componentsSeparatedByString
:
@"·"
][
0
];
}
else
{
}
else
{
...
...
ALand/General/Categories/NSString+Category.h
View file @
f88230c5
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
/**
/**
* 银行卡的有效性
* 银行卡的有效性
*/
*/
-
(
BOOL
)
bankCardluhmCheck
;
-
(
BOOL
)
isBankCard
;
/**
/**
* IP地址有效性
* IP地址有效性
...
@@ -77,6 +77,7 @@
...
@@ -77,6 +77,7 @@
*/
*/
-
(
BOOL
)
isValidTaxNo
;
-
(
BOOL
)
isValidTaxNo
;
/**
/**
@brief 是否符合最小长度、最长长度,是否包含中文,首字母是否可以为数字
@brief 是否符合最小长度、最长长度,是否包含中文,首字母是否可以为数字
@param minLenth 账号最小长度
@param minLenth 账号最小长度
...
...
ALand/General/Categories/NSString+Category.m
View file @
f88230c5
...
@@ -281,69 +281,49 @@
...
@@ -281,69 +281,49 @@
* 2,将奇位乘积的个十位全部相加,再加上所有偶数位上的数字
* 2,将奇位乘积的个十位全部相加,再加上所有偶数位上的数字
* 3,将加法和加上校验位能被 10 整除。
* 3,将加法和加上校验位能被 10 整除。
*/
*/
-
(
BOOL
)
bankCardluhmCheck
{
-
(
BOOL
)
isBankCard
{
int
oddsum
=
0
;
//奇数求和
int
evensum
=
0
;
//偶数求和
int
allsum
=
0
;
int
cardNoLength
=
(
int
)[
self
length
];
int
lastNum
=
[[
self
substringFromIndex
:
cardNoLength
-
1
]
intValue
];
if
(
self
.
length
!=
19
)
{
NSString
*
cardNo
=
[
self
substringToIndex
:
cardNoLength
-
1
];
return
NO
;
for
(
int
i
=
cardNoLength
-
1
;
i
>=
1
;
i
--
)
{
NSString
*
tmpString
=
[
cardNo
substringWithRange
:
NSMakeRange
(
i
-
1
,
1
)];
}
else
{
int
tmpVal
=
[
tmpString
intValue
];
NSString
*
lastNum
=
[[
self
substringFromIndex
:(
self
.
length
-
1
)]
copy
];
//取出最后一位
if
(
cardNoLength
%
2
==
1
)
{
NSString
*
forwardNum
=
[[
self
substringToIndex
:(
self
.
length
-
1
)]
copy
];
//前15或18位
if
((
i
%
2
)
==
0
){
tmpVal
*=
2
;
NSMutableArray
*
forwardArr
=
[[
NSMutableArray
alloc
]
initWithCapacity
:
0
];
if
(
tmpVal
>=
10
)
for
(
int
i
=
0
;
i
<
forwardNum
.
length
;
i
++
)
{
tmpVal
-=
9
;
NSString
*
subStr
=
[
forwardNum
substringWithRange
:
NSMakeRange
(
i
,
1
)];
evensum
+=
tmpVal
;
[
forwardArr
addObject
:
subStr
];
}
else
{
}
oddsum
+=
tmpVal
;
}
NSMutableArray
*
forwardDescArr
=
[[
NSMutableArray
alloc
]
initWithCapacity
:
0
];
}
else
{
for
(
int
i
=
(
int
)(
forwardArr
.
count
-
1
);
i
>
-
1
;
i
--
)
{
//前15位或者前18位倒序存进数组
if
((
i
%
2
)
==
1
){
[
forwardDescArr
addObject
:
forwardArr
[
i
]];
tmpVal
*=
2
;
}
if
(
tmpVal
>=
10
)
tmpVal
-=
9
;
NSMutableArray
*
arrOddNum
=
[[
NSMutableArray
alloc
]
initWithCapacity
:
0
];
//奇数位*2的积 < 9
evensum
+=
tmpVal
;
NSMutableArray
*
arrOddNum2
=
[[
NSMutableArray
alloc
]
initWithCapacity
:
0
];
//奇数位*2的积 > 9
}
else
{
NSMutableArray
*
arrEvenNum
=
[[
NSMutableArray
alloc
]
initWithCapacity
:
0
];
//偶数位数组
oddsum
+=
tmpVal
;
for
(
int
i
=
0
;
i
<
forwardDescArr
.
count
;
i
++
)
{
NSInteger
num
=
[
forwardDescArr
[
i
]
intValue
];
if
(
i
%
2
)
{
//偶数位
[
arrEvenNum
addObject
:[
NSNumber
numberWithInteger
:
num
]];
}
else
{
//奇数位
if
(
num
*
2
<
9
)
{
[
arrOddNum
addObject
:[
NSNumber
numberWithInteger
:
num
*
2
]];
}
else
{
NSInteger
decadeNum
=
(
num
*
2
)
/
10
;
NSInteger
unitNum
=
(
num
*
2
)
%
10
;
[
arrOddNum2
addObject
:[
NSNumber
numberWithInteger
:
unitNum
]];
[
arrOddNum2
addObject
:[
NSNumber
numberWithInteger
:
decadeNum
]];
}
}
}
}
}
__block
NSInteger
sumOddNumTotal
=
0
;
[
arrOddNum
enumerateObjectsUsingBlock
:
^
(
NSNumber
*
obj
,
NSUInteger
idx
,
BOOL
*
stop
)
{
sumOddNumTotal
+=
[
obj
integerValue
];
}];
__block
NSInteger
sumOddNum2Total
=
0
;
[
arrOddNum2
enumerateObjectsUsingBlock
:
^
(
NSNumber
*
obj
,
NSUInteger
idx
,
BOOL
*
stop
)
{
sumOddNum2Total
+=
[
obj
integerValue
];
}];
__block
NSInteger
sumEvenNumTotal
=
0
;
[
arrEvenNum
enumerateObjectsUsingBlock
:
^
(
NSNumber
*
obj
,
NSUInteger
idx
,
BOOL
*
stop
)
{
sumEvenNumTotal
+=
[
obj
integerValue
];
}];
NSInteger
lastNumber
=
[
lastNum
integerValue
];
NSInteger
luhmTotal
=
lastNumber
+
sumEvenNumTotal
+
sumOddNum2Total
+
sumOddNumTotal
;
return
(
luhmTotal
%
10
==
0
)?
YES
:
NO
;
}
}
allsum
=
oddsum
+
evensum
;
allsum
+=
lastNum
;
if
((
allsum
%
10
)
==
0
)
return
YES
;
else
return
NO
;
}
}
-
(
BOOL
)
isIPAddress
{
-
(
BOOL
)
isIPAddress
{
NSString
*
regex
=
[
NSString
stringWithFormat
:
@"^(
\\\\
d{1,3})
\\\\
.(
\\\\
d{1,3})
\\\\
.(
\\\\
d{1,3})
\\\\
.(
\\\\
d{1,3})$"
];
NSString
*
regex
=
[
NSString
stringWithFormat
:
@"^(
\\\\
d{1,3})
\\\\
.(
\\\\
d{1,3})
\\\\
.(
\\\\
d{1,3})
\\\\
.(
\\\\
d{1,3})$"
];
NSPredicate
*
pre
=
[
NSPredicate
predicateWithFormat
:
@"SELF MATCHES %@"
,
regex
];
NSPredicate
*
pre
=
[
NSPredicate
predicateWithFormat
:
@"SELF MATCHES %@"
,
regex
];
...
@@ -367,5 +347,4 @@
...
@@ -367,5 +347,4 @@
}
}
@end
@end
ALand/Macro/AppHeader.h
View file @
f88230c5
...
@@ -58,6 +58,7 @@
...
@@ -58,6 +58,7 @@
#define kMoneyFromDouble(doubleData) [NSString stringWithFormat:@"¥%.2f", doubleData]
#define kMoneyFromDouble(doubleData) [NSString stringWithFormat:@"¥%.2f", doubleData]
#define kMoneyFromIDNumber(doubleData) [NSString stringWithFormat:@"%.2f", [doubleData doubleValue]]
#define kMoneyFromIDNumber(doubleData) [NSString stringWithFormat:@"%.2f", [doubleData doubleValue]]
#define kIsResponseSuccess(responseObject) [responseObject[@"code"] isEqualToNumber:@0]
#define kIsResponseSuccess(responseObject) [responseObject[@"code"] isEqualToNumber:@0]
#define kWindow [UIApplication sharedApplication].keyWindow
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment