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
5fd771a7
Commit
5fd771a7
authored
Jun 16, 2016
by
曹云霄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug
parent
bfca1600
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
64 additions
and
28 deletions
+64
-28
ClientViewController.m
Lighting/Class/ClientViewController.m
+4
-2
LoginViewController.m
Lighting/Class/Login/LoginViewController.m
+2
-1
ProductDetailsViewController.m
Lighting/Class/ProductDetailsViewController.m
+4
-1
AddressViewController.m
Lighting/Class/Shoppingcart/AddressViewController.m
+22
-16
AddressViewController.xib
Lighting/Class/Shoppingcart/AddressViewController.xib
+1
-1
GenerateOrdersTableViewCell.m
Lighting/Class/Shoppingcart/GenerateOrdersTableViewCell.m
+11
-1
GenerateOrdersViewController.m
Lighting/Class/Shoppingcart/GenerateOrdersViewController.m
+0
-1
Toolview.m
Lighting/Class/Tabbar/Toolview.m
+14
-0
UserViewController.m
Lighting/Class/UserViewController.m
+3
-2
PrefixHeader.pch
Lighting/Tools/PrefixHeader.pch
+2
-2
QRViewController.m
Lighting/Tools/QRViewController.m
+1
-1
No files found.
Lighting/Class/ClientViewController.m
View file @
5fd771a7
...
...
@@ -601,7 +601,8 @@
[
self
.
informationTableview
.
mj_header
beginRefreshing
];
//新增保存ID
if
(
!
isChange
)
{
[
Customermanager
manager
].
model
.
fid
=
returnValue
[
@"data"
];
customerEntity
.
fid
=
returnValue
[
@"data"
];
[
Customermanager
manager
].
model
=
customerEntity
;
[
self
SuccessMBProgressView
:
@"新增成功"
];
[
self
addAddressInformationRequest
];
}
else
...
...
@@ -645,7 +646,8 @@
-
(
void
)
addAddressInformationRequest
{
TOShippingAddrEntity
*
address
=
[[
TOShippingAddrEntity
alloc
]
init
];
address
.
consumerId
=
[
Customermanager
manager
].
model
.
fid
;
MyclientEntityModel
*
model
=
[
Customermanager
manager
].
model
;
address
.
consumerId
=
model
.
fid
;
address
.
name
=
self
.
customerNameField
.
text
;
address
.
miblephone
=
self
.
phoneNumberField
.
text
;
address
.
address
=
self
.
customerAddress
.
text
;
...
...
Lighting/Class/Login/LoginViewController.m
View file @
5fd771a7
...
...
@@ -312,7 +312,8 @@
}
[
self
CreateMBProgressHUDLoding
];
//发送验证码
[[
NetworkRequestClassManager
Manager
]
NetworkWithDictionaryRequestWithURL
:[
NSString
stringWithFormat
:
SERVERREQUESTURL
(
SENDSMS
),
inputPhoneNumber
,
self
.
identityView
.
userName
.
text
]
WithRequestType
:
1
WithParameter
:
nil
WithReturnValueBlock
:^
(
id
returnValue
)
{
NSString
*
urlString
=
[
NSString
stringWithFormat
:
SERVERREQUESTURL
(
SENDSMS
),
inputPhoneNumber
,
self
.
identityView
.
userName
.
text
];
[[
NetworkRequestClassManager
Manager
]
NetworkWithDictionaryRequestWithURL
:
urlString
WithRequestType
:
1
WithParameter
:
nil
WithReturnValueBlock
:^
(
id
returnValue
)
{
[
self
RemoveMBProgressHUDLoding
];
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
...
...
Lighting/Class/ProductDetailsViewController.m
View file @
5fd771a7
...
...
@@ -448,7 +448,6 @@
#pragma mark -完成加入购物车动画完成后回调
-
(
void
)
animationDidStop
:
(
CAAnimation
*
)
anim
finished
:
(
BOOL
)
flag
{
NSLog
(
@"动画完成了"
);
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
@"ADDGOODSNUMBER"
object
:
@
([
self
.
headerView
.
goodsNumber
.
text
integerValue
])];
}
...
...
@@ -462,6 +461,10 @@
[
self
ErrorMBProgressView
:
@"必须设置当前客户"
];
return
;
}
if
([
self
.
headerView
.
goodsNumber
.
text
integerValue
]
>
[
self
.
entity
.
number
integerValue
])
{
[
self
ErrorMBProgressView
:
@"超过库存"
];
return
;
}
[
self
StartAddShoppingCarAnimationWithimage
:
self
.
headerView
.
goodsImageview
.
image
withStartpoint
:[
self
.
headerView
convertPoint
:[
self
.
headerView
.
goodsImageview
center
]
toView
:
self
.
view
.
window
]
withSize
:
self
.
headerView
.
goodsImageview
.
frame
.
size
];
SaveShoppingCartRequest
*
shopCar
=
[[
SaveShoppingCartRequest
alloc
]
init
];
shopCar
.
consumerId
=
[
Customermanager
manager
].
model
.
fid
;
...
...
Lighting/Class/Shoppingcart/AddressViewController.m
View file @
5fd771a7
...
...
@@ -73,11 +73,13 @@
[
self
.
citySelected
addTarget
:
self
action
:
@selector
(
SelectedCityButtonClick
)
forControlEvents
:
UIControlEventTouchUpInside
];
//判断是修改还是新增
if
(
_isChange
)
{
self
.
changAddressLabe
.
text
=
@"修改收货地址"
;
[
self
.
delectAddressButton
setTitle
:
@"删除"
forState
:
UIControlStateNormal
];
[
self
.
modifyButton
setTitle
:
@"保存"
forState
:
UIControlStateNormal
];
}
else
{
self
.
changAddressLabe
.
text
=
@"新增收货地址"
;
}
self
.
recipientPerson
.
text
=
_model
.
name
;
self
.
PhoneNumber
.
text
=
_model
.
miblephone
;
[
self
.
citySelected
setTitle
:
_model
.
city
forState
:
UIControlStateNormal
];
...
...
@@ -90,8 +92,6 @@
self
.
view
.
superview
.
layer
.
cornerRadius
=
0
;
}
#pragma mark -城市选择器
-
(
void
)
SelectedCityButtonClick
{
...
...
@@ -125,7 +125,6 @@
}
#pragma mark -关闭地址输入框
-
(
IBAction
)
turnoffAddressView
:
(
UIButton
*
)
sender
{
...
...
@@ -146,6 +145,10 @@
-
(
IBAction
)
addAddressButtonClick
:
(
UIButton
*
)
sender
{
NSString
*
phoneNumber
=
self
.
PhoneNumber
.
text
;
if
(
!
self
.
recipientPerson
.
text
.
length
)
{
[
self
ErrorMBProgressView
:
@"请输入收货人姓名"
];
return
;
}
if
(
phoneNumber
.
length
<=
0
)
{
[
self
ErrorMBProgressView
:
@"手机号码不能为空"
];
return
;
...
...
@@ -155,10 +158,6 @@
[
self
ErrorMBProgressView
:
@"手机号码格式不正确"
];
return
;
}
if
(
!
self
.
recipientPerson
.
text
.
length
)
{
[
self
ErrorMBProgressView
:
@"请输入收货人姓名"
];
return
;
}
if
(
!
self
.
detailsAddress
.
text
.
length
)
{
[
self
ErrorMBProgressView
:
@"请输入详细地址"
];
return
;
...
...
@@ -186,7 +185,6 @@
address
.
province
=
self
.
provincesString
;
}
address
.
address
=
self
.
detailsAddress
.
text
;
[
self
CreateMBProgressHUDLoding
];
[[
NetworkRequestClassManager
Manager
]
NetworkRequestWithURL
:
SERVERREQUESTURL
(
ADDADDRESS
)
WithRequestType
:
0
WithParameter
:
address
WithReturnValueBlock
:^
(
id
returnValue
)
{
...
...
@@ -196,14 +194,15 @@
AddressModel
*
model
=
[[
AddressModel
alloc
]
init
];
model
.
name
=
self
.
recipientPerson
.
text
;
model
.
miblephone
=
self
.
PhoneNumber
.
text
;
if
([[
self
.
citySelected
currentTitle
]
isEqualToString
:
self
.
provincesString
])
{
model
.
city
=
self
.
citySelected
.
currentTitle
;
//地址拼接
if
(
!
[
self
.
provincesString
isEqualToString
:[
self
.
citySelected
currentTitle
]])
{
model
.
address
=
[
NSString
stringWithFormat
:
@"%@%@%@"
,
self
.
provincesString
,
self
.
citySelected
.
currentTitle
,
self
.
detailsAddress
.
text
];
model
.
province
=
nil
;
}
else
{
model
.
address
=
[
NSString
stringWithFormat
:
@"%@%@"
,
self
.
citySelected
.
currentTitle
,
self
.
detailsAddress
.
text
];
model
.
city
=
self
.
citySelected
.
currentTitle
;
model
.
province
=
self
.
provincesString
;
}
model
.
address
=
self
.
detailsAddress
.
text
;
model
.
consumerId
=
[
Customermanager
manager
].
model
.
fid
;
model
.
fid
=
returnValue
[
@"data"
];
model
.
isSelected
=
NO
;
...
...
@@ -253,10 +252,17 @@
model
.
name
=
self
.
recipientPerson
.
text
;
model
.
miblephone
=
self
.
PhoneNumber
.
text
;
model
.
city
=
self
.
citySelected
.
currentTitle
;
model
.
address
=
self
.
detailsAddress
.
text
;
model
.
consumerId
=
[
Customermanager
manager
].
model
.
fid
;
model
.
province
=
self
.
provincesString
?
self
.
provincesString
:
@""
;
model
.
fid
=
self
.
model
.
fid
;
model
.
isSelected
=
NO
;
//地址拼接
if
(
!
[
self
.
provincesString
isEqualToString
:[
self
.
citySelected
currentTitle
]])
{
model
.
address
=
[
NSString
stringWithFormat
:
@"%@"
,
self
.
detailsAddress
.
text
];
}
else
{
model
.
address
=
[
NSString
stringWithFormat
:
@"%@"
,
self
.
detailsAddress
.
text
];
}
//修改地址
if
([
self
.
delegate
respondsToSelector
:
@selector
(
ChangeAddresscell
:
Withcellindex
:
)])
{
...
...
Lighting/Class/Shoppingcart/AddressViewController.xib
View file @
5fd771a7
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1011
6"
systemVersion=
"15E65
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1011
7"
systemVersion=
"15F34
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
>
<dependencies>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"10085"
/>
</dependencies>
...
...
Lighting/Class/Shoppingcart/GenerateOrdersTableViewCell.m
View file @
5fd771a7
...
...
@@ -24,7 +24,17 @@
self
.
isSelectedButton
.
selected
=
NewModel
.
isSelected
;
self
.
consigneeName
.
text
=
_NewModel
.
name
;
self
.
consigneemobile
.
text
=
_NewModel
.
miblephone
;
self
.
consigneeAddress
.
text
=
_NewModel
.
address
;
if
(
_NewModel
.
province
&&
_NewModel
.
city
)
{
if
(
!
[
_NewModel
.
province
isEqualToString
:
_NewModel
.
city
])
{
self
.
consigneeAddress
.
text
=
[
NSString
stringWithFormat
:
@"%@%@%@"
,
_NewModel
.
province
,
_NewModel
.
city
,
_NewModel
.
address
];
}
else
{
self
.
consigneeAddress
.
text
=
[
NSString
stringWithFormat
:
@"%@%@"
,
_NewModel
.
city
,
_NewModel
.
address
];
}
}
else
{
self
.
consigneeAddress
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
_NewModel
.
address
];
}
}
...
...
Lighting/Class/Shoppingcart/GenerateOrdersViewController.m
View file @
5fd771a7
...
...
@@ -199,7 +199,6 @@
}
else
if
(
indexPath
.
section
==
2
)
{
NSArray
*
Addressarr
=
[
self
.
datasArray
objectAtIndex_opple
:
indexPath
.
section
];
if
(
indexPath
.
row
==
Addressarr
.
count
-
1
)
{
...
...
Lighting/Class/Tabbar/Toolview.m
View file @
5fd771a7
...
...
@@ -115,6 +115,9 @@
//更改用户名
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
ChangeCustomerName
:
)
name
:
@"CHANGECUSTOMERNAME"
object
:
nil
];
//更改导购名
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
ChangeShoppersName
:
)
name
:
@"CHANGESHOPPERSNAME"
object
:
nil
];
}
...
...
@@ -142,6 +145,17 @@
[
button
setTitle
:
userName
forState
:
UIControlStateNormal
];
}
#pragma mark -更改导购名字
-
(
void
)
ChangeShoppersName
:
(
NSNotification
*
)
not
{
UIButton
*
button
=
[
self
viewWithTag
:
101
];
NSString
*
userName
=
not
.
object
;
if
(
userName
.
length
==
0
||
!
userName
)
{
userName
=
@"导购"
;
}
[
button
setTitle
:
userName
forState
:
UIControlStateNormal
];
}
#pragma mark -二维码扫描码
-
(
void
)
QrCodeButtonClickAction
...
...
Lighting/Class/UserViewController.m
View file @
5fd771a7
...
...
@@ -63,7 +63,7 @@
[[
NetworkRequestClassManager
Manager
]
NetworkWithDictionaryRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
SERVERREQUESTURL
(
SHOPPERSCOMMISSION
),[
Shoppersmanager
manager
].
Shoppers
.
employee
.
fid
]
WithRequestType
:
1
WithParameter
:
nil
WithReturnValueBlock
:^
(
id
returnValue
)
{
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
self
.
rebateLabe
.
text
=
[
NSString
stringWithFormat
:
@"¥%
@"
,
returnValue
[
@"data"
]];
self
.
rebateLabe
.
text
=
[
NSString
stringWithFormat
:
@"¥%
.2f"
,[
returnValue
[
@"data"
]
floatValue
]];
}
}
WithErrorCodeBlock
:^
(
id
errorCodeValue
)
{
}
WithFailureBlock
:^
(
id
error
)
{
...
...
@@ -297,7 +297,8 @@
[
Shoppersmanager
manager
].
passWordString
=
self
.
passWord
.
text
;
[
Shoppersmanager
manager
].
currentCustomer
=
NO
;
[
Shoppersmanager
manager
].
Shoppers
=
result
;
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
@"CHANGESHOPPERSNAME"
object
:
result
.
employee
.
realName
];
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
@"CHANGECUSTOMERNAME"
object
:
nil
];
//保存用户名密码
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
self
.
userName
.
text
forKey
:
USERNAME
];
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
self
.
passWord
.
text
forKey
:
PASSWORD
];
...
...
Lighting/Tools/PrefixHeader.pch
View file @
5fd771a7
...
...
@@ -110,12 +110,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]
/**
* 搜索框输入通知
...
...
Lighting/Tools/QRViewController.m
View file @
5fd771a7
...
...
@@ -233,7 +233,7 @@
return
_backBtn
;
}
#pragma mark -设置扫描范围
-
(
QRView
*
)
qrView
{
if
(
!
_qrView
)
{
...
...
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