Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
Opple-iOS
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
张杰
Opple-iOS
Commits
e2a3ea1d
Commit
e2a3ea1d
authored
Jan 17, 2017
by
曹云霄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改项说明:
parent
c9ac86ec
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
197 additions
and
59 deletions
+197
-59
AnnouncementViewController.m
Class/Announcement/AnnouncementViewController.m
+1
-1
BindingSuccessViewController.m
Class/BindingSuccessViewController.m
+2
-2
PaymentsDetailsTableViewController.h
Class/PaymentsDetailsTableViewController.h
+1
-1
PaymentsDetailsTableViewController.m
Class/PaymentsDetailsTableViewController.m
+3
-14
PaymentsViewController.m
Class/PaymentsViewController.m
+4
-15
RebateDetailsViewController.m
Class/RebateDetailsViewController.m
+1
-1
WithdrawalTableViewCell.m
Class/WithdrawalTableViewCell.m
+1
-1
WithdrawalViewController.m
Class/WithdrawalViewController.m
+1
-1
Info.plist
Lighting/Info.plist
+1
-1
BaseViewController.h
Tools/BaseViewController.h
+8
-0
BaseViewController.m
Tools/BaseViewController.m
+13
-3
CYConstManager.h
Tools/CYConstManager.h
+5
-0
CYConstManager.m
Tools/CYConstManager.m
+5
-1
UIView+BadgeValue.h
Tools/Category/UIView+BadgeValue.h
+12
-0
UIView+BadgeValue.m
Tools/Category/UIView+BadgeValue.m
+66
-0
opple_objc_json_client.h
Tools/opple_objc_json_client.h
+57
-18
opple_objc_json_client.m
Tools/opple_objc_json_client.m
+16
-0
No files found.
Class/Announcement/AnnouncementViewController.m
View file @
e2a3ea1d
...
...
@@ -162,7 +162,7 @@
[
headerRefresh
beginRefreshing
];
self
.
announcementTableView
.
mj_header
=
headerRefresh
;
MJRefreshAutoNormalFooter
*
footer
=
[
MJRefreshAutoNormalFooter
footerWithRefreshingBlock
:
^
{
if
(
++
weakSelf
.
afficheModel
.
page
.
page
>
=
weakSelf
.
totalPage
)
{
if
(
++
weakSelf
.
afficheModel
.
page
.
page
>
weakSelf
.
totalPage
)
{
[
weakSelf
.
announcementTableView
.
mj_footer
endRefreshingWithNoMoreData
];
}
else
{
[
weakSelf
getAnnouncementDatas
:
NO
];
...
...
Class/BindingSuccessViewController.m
View file @
e2a3ea1d
...
...
@@ -25,7 +25,7 @@
#pragma mark - UI
-
(
void
)
setUpUIAction
{
self
.
mobileNumberLabel
.
text
=
[
NSString
stringWithFormat
:
@"请输入%@接收到的验证码"
,[
self
phoneNumberEncryption
:
[
Shoppersmanager
manager
].
Shoppers
.
employee
.
mobilePhone
]];
self
.
mobileNumberLabel
.
text
=
[
NSString
stringWithFormat
:
@"请输入%@接收到的验证码"
,[
self
phoneNumberEncryption
:
self
.
bankEntity
.
phoneNumber
]];
self
.
bankNameAndCardTypeLabel
.
text
=
self
.
bankType
;
}
...
...
@@ -35,7 +35,7 @@
WS
(
weakSelf
);
[
XBLoadingView
showHUDViewWithDefault
];
//发送验证码
NSString
*
urlString
=
[
NSString
stringWithFormat
:
SERVERREQUESTURL
(
SENDSMS
),[
Shoppersmanager
manager
].
Shoppers
.
employee
.
mobilePhone
,[
Shoppersmanager
manager
].
Shoppers
.
employee
.
userName
];
NSString
*
urlString
=
[
NSString
stringWithFormat
:
SERVERREQUESTURL
(
SENDSMS
BANK
),
self
.
bankEntity
.
phoneNumber
,[
Shoppersmanager
manager
].
Shoppers
.
employee
.
userName
];
[[
NetworkRequestClassManager
Manager
]
NetworkWithDictionaryRequestWithURL
:
urlString
WithRequestType
:
ONE
WithParameter
:
nil
WithReturnValueBlock
:^
(
id
returnValue
)
{
[
XBLoadingView
hideHUDViewWithDefault
];
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
...
...
Class/PaymentsDetailsTableViewController.h
View file @
e2a3ea1d
...
...
@@ -13,6 +13,6 @@
/**
* 数据源
*/
@property
(
nonatomic
,
strong
)
TOCommissionHistEntity
*
model
;
@property
(
nonatomic
,
strong
)
ApplyHist
*
model
;
@end
Class/PaymentsDetailsTableViewController.m
View file @
e2a3ea1d
...
...
@@ -58,23 +58,12 @@
NSString
*
string
=
([
self
.
model
.
amount
floatValue
]
>
0
)?[
NSString
stringWithFormat
:
@"+%.2f"
,[
self
.
model
.
amount
floatValue
]]:[
NSString
stringWithFormat
:
@"%.2f"
,[
self
.
model
.
amount
floatValue
]];
self
.
amountLabel
.
text
=
string
;
self
.
createTimeLabel
.
text
=
self
.
model
.
createDate
;
self
.
serialNumberLabel
.
text
=
self
.
model
.
order
Number
;
self
.
amountTypeLabel
.
text
=
[
self
separatePaymentsAndWithfrawal
:
self
.
model
.
stat
e
];
self
.
currentAmountLabel
.
text
=
[
self
.
model
.
aftera
mount
stringValue
];
self
.
serialNumberLabel
.
text
=
self
.
model
.
bill
Number
;
self
.
amountTypeLabel
.
text
=
[
BaseViewController
separatePaymentsAndWithfrawal
:
self
.
model
.
amount
withType
:
self
.
model
.
typ
e
];
self
.
currentAmountLabel
.
text
=
[
self
.
model
.
remainA
mount
stringValue
];
}
#pragma mark - 区分提现还是返佣
-
(
NSString
*
)
separatePaymentsAndWithfrawal
:
(
NSString
*
)
state
{
if
([
state
isEqualToString
:
@"0"
])
{
return
@"返佣"
;
}
if
([
state
isEqualToString
:
@"1"
])
{
return
@"提现"
;
}
return
nil
;
}
...
...
Class/PaymentsViewController.m
View file @
e2a3ea1d
...
...
@@ -82,7 +82,7 @@
headerRefresh
.
lastUpdatedTimeLabel
.
hidden
=
YES
;
self
.
paymentsTableView
.
mj_header
=
headerRefresh
;
MJRefreshAutoNormalFooter
*
footer
=
[
MJRefreshAutoNormalFooter
footerWithRefreshingBlock
:
^
{
if
(
++
weakSelf
.
model
.
page
.
page
>
=
weakSelf
.
totalPage
)
{
if
(
++
weakSelf
.
model
.
page
.
page
>
weakSelf
.
totalPage
)
{
[
weakSelf
.
paymentsTableView
.
mj_footer
endRefreshingWithNoMoreData
];
}
else
{
...
...
@@ -110,7 +110,7 @@
}
RsCommissionResponse
*
result
=
[[
RsCommissionResponse
alloc
]
initWithDictionary
:
returnValue
[
@"data"
]
error
:
nil
];
weakSelf
.
totalPage
=
result
.
totalpages
;
for
(
TOCommissionHistEntity
*
entity
in
result
.
list
)
{
for
(
ApplyHist
*
entity
in
result
.
list
)
{
[
weakSelf
.
resultArray
addObject
:
entity
];
}
[
weakSelf
.
paymentsTableView
reloadData
];
...
...
@@ -130,9 +130,9 @@
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
PaymentsTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
@"PaymentsTableViewCell"
forIndexPath
:
indexPath
];
TOCommissionHistEntity
*
entity
=
self
.
resultArray
[
indexPath
.
row
];
ApplyHist
*
entity
=
self
.
resultArray
[
indexPath
.
row
];
cell
.
createTimeLabel
.
text
=
entity
.
createDate
;
cell
.
moneyTypeLabel
.
text
=
[
self
separatePaymentsAndWithfrawal
:
entity
.
stat
e
];
cell
.
moneyTypeLabel
.
text
=
[
[
self
class
]
separatePaymentsAndWithfrawal
:
entity
.
amount
withType
:
entity
.
typ
e
];
NSString
*
string
=
([
entity
.
amount
floatValue
]
>
0
)?[
NSString
stringWithFormat
:
@"+%.2f"
,[
entity
.
amount
floatValue
]]:[
NSString
stringWithFormat
:
@"%.2f"
,[
entity
.
amount
floatValue
]];
cell
.
amountLabel
.
text
=
string
;
return
cell
;
...
...
@@ -156,17 +156,6 @@
[
self
.
navigationController
pushViewController
:
paymentsDetailsVC
animated
:
YES
];
}
#pragma mark - 区分提现还是返佣
-
(
NSString
*
)
separatePaymentsAndWithfrawal
:
(
NSString
*
)
state
{
if
([
state
isEqualToString
:
@"0"
])
{
return
@"返佣"
;
}
if
([
state
isEqualToString
:
@"1"
])
{
return
@"提现"
;
}
return
nil
;
}
#pragma mark -友好界面
-
(
UIImage
*
)
imageForEmptyDataSet
:
(
UIScrollView
*
)
scrollView
...
...
Class/RebateDetailsViewController.m
View file @
e2a3ea1d
...
...
@@ -43,7 +43,7 @@
if
([
self
.
inputRebateTextField
.
text
floatValue
]
>
self
.
rebateAmount
)
{
[
XBLoadingView
showHUDViewWithText
:
@"当前账户余额不足"
];
return
;
}
if
([
self
.
inputRebateTextField
.
text
floatValue
]
<
=
10
&&
[
self
.
billType
isEqualToString
:
redPackage
])
{
if
([
self
.
inputRebateTextField
.
text
floatValue
]
<
10
&&
[
self
.
billType
isEqualToString
:
redPackage
])
{
[
XBLoadingView
showHUDViewWithText
:
@"提现金额不能小于10"
];
return
;
}
if
([
self
includeChinese
:
self
.
inputRebateTextField
.
text
])
{
...
...
Class/WithdrawalTableViewCell.m
View file @
e2a3ea1d
...
...
@@ -22,7 +22,7 @@
self
.
createTimeLabel
.
text
=
entity
.
createDate
;
self
.
progressLabel
.
textColor
=
[
BaseViewController
setupLabelColor
:
entity
.
billStates
][
@"color"
];
self
.
progressLabel
.
text
=
[
BaseViewController
setupLabelColor
:
entity
.
billStates
][
@"text"
];
self
.
progressTitleLabel
.
text
=
[
BaseViewController
setupLabelColor
:
entity
.
billType
][
@"text"
];
self
.
progressTitleLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@ 进度"
,[
BaseViewController
setupLabelColor
:
entity
.
billType
][
@"text"
]
];
}
@end
Class/WithdrawalViewController.m
View file @
e2a3ea1d
...
...
@@ -82,7 +82,7 @@
self
.
withdrawalTableView
.
mj_header
=
headerRefresh
;
MJRefreshAutoNormalFooter
*
footer
=
[
MJRefreshAutoNormalFooter
footerWithRefreshingBlock
:
^
{
if
(
++
weakSelf
.
model
.
page
.
page
>
=
weakSelf
.
totalPage
)
{
if
(
++
weakSelf
.
model
.
page
.
page
>
weakSelf
.
totalPage
)
{
[
weakSelf
.
withdrawalTableView
.
mj_footer
endRefreshingWithNoMoreData
];
}
else
{
...
...
Lighting/Info.plist
View file @
e2a3ea1d
...
...
@@ -15,7 +15,7 @@
<
k
e
y
>
CFBundleName
<
/k
e
y
>
<
string
>
欧立方
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
2.0.
1
<
/string
>
<
string
>
2.0.
2
<
/string
>
<
k
e
y
>
CFBundleURLTypes
<
/k
e
y
>
<
a
rr
a
y
>
<
d
i
c
t
>
...
...
Tools/BaseViewController.h
View file @
e2a3ea1d
...
...
@@ -131,6 +131,14 @@
*/
+
(
NSDictionary
*
)
setupLabelColor
:(
NSString
*
)
text
;
/**
收支明细
@param number 金额
@param type 类型
*/
+
(
NSString
*
)
separatePaymentsAndWithfrawal
:(
NSNumber
*
)
number
withType
:(
NSString
*
)
type
;
/**
考核题型转义
*/
...
...
Tools/BaseViewController.m
View file @
e2a3ea1d
...
...
@@ -231,14 +231,24 @@
string
=
@"驳回"
;
}
else
if
([
text
isEqualToString
:
@"commission"
])
{
color
=
[
UIColor
blackColor
];
string
=
@"【产品返利】
进度:
"
;
string
=
@"【产品返利】"
;
}
else
if
([
text
isEqualToString
:
@"redPackage"
])
{
color
=
[
UIColor
blackColor
];
string
=
@"【欧普奖励】
进度:
"
;
string
=
@"【欧普奖励】"
;
}
return
@{
@"text"
:
string
?
string
:
text
,
@"color"
:
color
};
text
=
[[
self
class
]
isBlankString
:
text
]?
@"未知状态"
:
text
;
return
@{
@"text"
:
[[
self
class
]
isBlankString
:
string
]?
text
:
string
,
@"color"
:
color
};
}
#pragma mark - 区分提现还是返佣
+
(
NSString
*
)
separatePaymentsAndWithfrawal
:
(
NSNumber
*
)
number
withType
:
(
NSString
*
)
type
{
CGFloat
money
=
[
number
floatValue
];
NSString
*
moneyType
=
[[
self
class
]
setupLabelColor
:
type
][
@"text"
];
return
[
NSString
stringWithFormat
:
@"%@%@"
,
moneyType
,(
money
>
0
)?
@"返佣"
:
@"提现"
];
}
#pragma mark - 获取当前时间之前或者之后的时间(之前传入负数)
+
(
NSString
*
)
getTimeby
:
(
NSInteger
)
day
...
...
Tools/CYConstManager.h
View file @
e2a3ea1d
...
...
@@ -20,6 +20,11 @@ extern NSString *const LOGIN;
*/
extern
NSString
*
const
SENDSMS
;
/**
* 绑定银行卡
*/
extern
NSString
*
const
SENDSMSBANK
;
/**
* 重置密码
*/
...
...
Tools/CYConstManager.m
View file @
e2a3ea1d
...
...
@@ -15,10 +15,14 @@
NSString
*
const
LOGIN
=
@"/employee/login"
;
/**
* 发送验证码
*
修改密码
发送验证码
*/
NSString
*
const
SENDSMS
=
@"/system/sendSms?mobilephone=%@&username=%@"
;
/**
* 绑定银行卡
*/
NSString
*
const
SENDSMSBANK
=
@"/system/bankCardBindSendSms?mobilephone=%@&username=%@"
;
/**
* 重置密码
*/
...
...
Tools/Category/UIView+BadgeValue.h
0 → 100755
View file @
e2a3ea1d
#import <UIKit/UIKit.h>
@interface
UIView
(
BadgeValue
)
/**
* @author Clarence
*
* 设置消息数,设置小于或等于0 、@"" 、nil 就隐藏
*/
@property
(
nonatomic
,
copy
)
NSString
*
fl_badgeValue
;
@end
Tools/Category/UIView+BadgeValue.m
0 → 100755
View file @
e2a3ea1d
#import "UIView+BadgeValue.h"
#import <objc/runtime.h>
static
char
fl_badgeValue_static
;
static
CGFloat
fl_badgeValue_height
=
15
;
@implementation
UIView
(
BadgeValue
)
-
(
void
)
setFl_badgeValue
:(
NSString
*
)
fl_badgeValue
{
objc_setAssociatedObject
(
self
,
&
fl_badgeValue_static
,
fl_badgeValue
,
OBJC_ASSOCIATION_COPY_NONATOMIC
);
if
(
fl_badgeValue
==
nil
||
[
fl_badgeValue
isEqualToString
:
@""
]
||
([
self
fl_isAllNumber
:
fl_badgeValue
]
&&
fl_badgeValue
.
integerValue
<=
0
))
{
[
self
fl_clearBadgeValue
];
}
else
{
// NSAssert([self fl_isAllNumber:fl_badgeValue], @"字符串内容必须是数字");
CGRect
rect
=
[
fl_badgeValue
boundingRectWithSize
:
CGSizeMake
(
MAXFLOAT
,
MAXFLOAT
)
options
:
NSStringDrawingUsesLineFragmentOrigin
attributes
:
@{
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:[
UIFont
smallSystemFontSize
]]}
context
:
nil
];
// 创建红点
UIButton
*
redBtn
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
rect
.
size
.
width
>
fl_badgeValue_height
?
rect
.
size
.
width
+
6
:
fl_badgeValue_height
,
fl_badgeValue_height
)];
redBtn
.
center
=
CGPointMake
(
self
.
frame
.
size
.
width
,
0
);
redBtn
.
tag
=
1008611
;
redBtn
.
layer
.
cornerRadius
=
fl_badgeValue_height
/
2
;
redBtn
.
layer
.
masksToBounds
=
YES
;
redBtn
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:[
UIFont
smallSystemFontSize
]];
redBtn
.
backgroundColor
=
[
UIColor
redColor
];
[
redBtn
setTitle
:
fl_badgeValue
forState
:
UIControlStateNormal
];
[
self
addSubview
:
redBtn
];
[
self
bringSubviewToFront
:
redBtn
];
}
}
-
(
NSString
*
)
fl_badgeValue
{
NSString
*
badgeValue
=
objc_getAssociatedObject
(
self
,
&
fl_badgeValue_static
);
// 少于0 重置为0
if
(
badgeValue
.
integerValue
<
0
)
{
return
@"0"
;
}
else
{
return
badgeValue
;
}
}
-
(
void
)
fl_clearBadgeValue
{
for
(
UIView
*
view
in
self
.
subviews
)
{
if
([
view
isKindOfClass
:[
UIButton
class
]]
&&
view
.
tag
==
1008611
)
{
[
view
removeFromSuperview
];
}
}
}
// 判断是否全是数字
-
(
BOOL
)
fl_isAllNumber
:
(
NSString
*
)
text
{
unichar
str
;
for
(
NSInteger
index
=
0
;
index
<
text
.
length
;
index
++
)
{
str
=
[
text
characterAtIndex
:
index
];
if
(
isdigit
(
str
))
{
return
YES
;
}
}
return
NO
;
}
@end
Tools/opple_objc_json_client.h
View file @
e2a3ea1d
...
...
@@ -128,7 +128,7 @@ extern NSString * const GRADEMETHOD_MANUL;
@class
ApplyHist
;
@class
ApplyRequest
;
@class
RsApplyBillRequest
;
@class
RsCommissionRequest
;
...
...
@@ -260,6 +260,7 @@ extern NSString * const GRADEMETHOD_MANUL;
@class
ForumReplyResponse
;
@protocol
ApplyHist
@end
@protocol
ApplyRequest
@end
@protocol
ForumReplyResponse
@end
@protocol
ForumReplyCondition
@end
...
...
@@ -5208,6 +5209,61 @@ extern NSString * const GRADEMETHOD_MANUL;
@end
/* interface TOForumReplyEntity */
/**
* 流水明细分页查询结果
@author nevermore
@since 0.1
*/
@interface
RsCommissionResponse
:
PageRows
/**
* (no documentation provided)
* @see ApplyHist
*
*/
@property
(
nonatomic
,
strong
)
NSArray
<
ApplyHist
>
*
list
;
@end
/* interface RsCommissionResponse */
/**
* @author cyy24
@since 0.1
*/
@interface
ApplyHist
:
JSONModel
/**
* (no documentation provided)
*
*
*/
@property
(
nonatomic
,
copy
)
NSString
*
type
;
/**
* (no documentation provided)
*
*
*/
@property
(
nonatomic
,
copy
)
NSString
*
createDate
;
/**
* (no documentation provided)
*
*
*/
@property
(
nonatomic
,
strong
)
NSNumber
*
amount
;
/**
* (no documentation provided)
*
*
*/
@property
(
nonatomic
,
copy
)
NSString
*
billNumber
;
/**
* (no documentation provided)
*
*
*/
@property
(
nonatomic
,
strong
)
NSNumber
*
remainAmount
;
@end
/* interface ApplyHist */
/**
* @Title: Entity
...
...
@@ -6042,23 +6098,6 @@ extern NSString * const GRADEMETHOD_MANUL;
/**
* 流水明细分页查询结果
@author nevermore
@since 0.1
*/
@interface
RsCommissionResponse
:
PageRows
/**
* (no documentation provided)
* @see TOCommissionHistEntity
*
*/
@property
(
nonatomic
,
strong
)
NSArray
<
TOCommissionHistEntity
>
*
list
;
@end
/* interface RsCommissionResponse */
/**
* 系统用户父类表
...
...
Tools/opple_objc_json_client.m
View file @
e2a3ea1d
...
...
@@ -2149,6 +2149,22 @@ NSString * const GRADEMETHOD_MANUL = @"manul";
}
@end
@implementation
ApplyHist
@synthesize
type
;
@synthesize
createDate
;
@synthesize
amount
;
@synthesize
billNumber
;
@synthesize
remainAmount
;
+
(
BOOL
)
propertyIsOptional
:(
NSString
*
)
propertyName
{
return
YES
;
}
@end
@implementation
RsCommissionResponse
...
...
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