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
e1af42d5
Commit
e1af42d5
authored
Jul 15, 2016
by
曹云霄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
体验中心购物袋修改
parent
fbb0b125
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
96 additions
and
25 deletions
+96
-25
AllCustomerViewController.m
Lighting/Class/AllCustomerViewController.m
+0
-4
project.pbxproj
Lighting/Lighting.xcodeproj/project.pbxproj
+6
-6
StoryboardwithCYX.storyboard
Lighting/Lighting/StoryboardwithCYX.storyboard
+1
-1
BaseViewController.m
Lighting/Tools/BaseViewController.m
+47
-5
NetworkRequestClassManager.m
Lighting/Tools/NetworkRequestClassManager.m
+8
-1
PrefixHeader.pch
Lighting/Tools/PrefixHeader.pch
+12
-4
ShoppingBagViewController.m
Lighting/Tools/ShoppingBagViewController.m
+22
-4
No files found.
Lighting/Class/AllCustomerViewController.m
View file @
e1af42d5
...
@@ -66,11 +66,9 @@
...
@@ -66,11 +66,9 @@
// Do any additional setup after loading the view.
// Do any additional setup after loading the view.
[
self
uiConfigAction
];
[
self
uiConfigAction
];
}
}
#pragma mark -UI
#pragma mark -UI
-
(
void
)
uiConfigAction
-
(
void
)
uiConfigAction
{
{
...
@@ -105,8 +103,6 @@
...
@@ -105,8 +103,6 @@
//设置按钮时间
//设置按钮时间
[
self
.
begindateButton
setTitle
:[
self
dateAsString
:[
NSDate
date
]]
forState
:
UIControlStateNormal
];
[
self
.
begindateButton
setTitle
:[
self
dateAsString
:[
NSDate
date
]]
forState
:
UIControlStateNormal
];
[
self
.
enddateButton
setTitle
:[
self
dateAsString
:[
NSDate
date
]]
forState
:
UIControlStateNormal
];
[
self
.
enddateButton
setTitle
:[
self
dateAsString
:[
NSDate
date
]]
forState
:
UIControlStateNormal
];
self
.
begindateButton
.
layer
.
masksToBounds
=
YES
;
self
.
begindateButton
.
layer
.
masksToBounds
=
YES
;
self
.
begindateButton
.
layer
.
cornerRadius
=
10
;
self
.
begindateButton
.
layer
.
cornerRadius
=
10
;
self
.
enddateButton
.
layer
.
masksToBounds
=
YES
;
self
.
enddateButton
.
layer
.
masksToBounds
=
YES
;
...
...
Lighting/Lighting.xcodeproj/project.pbxproj
View file @
e1af42d5
...
@@ -1717,8 +1717,8 @@
...
@@ -1717,8 +1717,8 @@
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME
=
"Brand Assets"
;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME
=
"Brand Assets"
;
CLANG_ENABLE_OBJC_WEAK
=
YES
;
CLANG_ENABLE_OBJC_WEAK
=
YES
;
CODE_SIGN_IDENTITY
=
"iPhone D
eveloper
"
;
CODE_SIGN_IDENTITY
=
"iPhone D
istribution: Shanghai Gomore Information Technology Co.,Ltd
"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone D
eveloper: 云霄 曹 (WM8ZU7YY98)
"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone D
istribution: Shanghai Gomore Information Technology Co.,Ltd
"
;
COMPRESS_PNG_FILES
=
NO
;
COMPRESS_PNG_FILES
=
NO
;
ENABLE_BITCODE
=
NO
;
ENABLE_BITCODE
=
NO
;
FRAMEWORK_SEARCH_PATHS
=
"$(inherited)"
;
FRAMEWORK_SEARCH_PATHS
=
"$(inherited)"
;
...
@@ -1761,7 +1761,7 @@
...
@@ -1761,7 +1761,7 @@
);
);
PRODUCT_BUNDLE_IDENTIFIER
=
com.gomore.opple
;
PRODUCT_BUNDLE_IDENTIFIER
=
com.gomore.opple
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PROVISIONING_PROFILE
=
"
e9bd3600-5e9c-4cd0-a0d5-b7d8b0882ca8
"
;
PROVISIONING_PROFILE
=
"
10361169-d429-4810-90f6-528335fe4062
"
;
STRIP_PNG_TEXT
=
NO
;
STRIP_PNG_TEXT
=
NO
;
TARGETED_DEVICE_FAMILY
=
2
;
TARGETED_DEVICE_FAMILY
=
2
;
USER_HEADER_SEARCH_PATHS
=
"$(PODS_ROOT)/**"
;
USER_HEADER_SEARCH_PATHS
=
"$(PODS_ROOT)/**"
;
...
@@ -1775,8 +1775,8 @@
...
@@ -1775,8 +1775,8 @@
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME
=
"Brand Assets"
;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME
=
"Brand Assets"
;
CLANG_ENABLE_OBJC_WEAK
=
YES
;
CLANG_ENABLE_OBJC_WEAK
=
YES
;
CODE_SIGN_IDENTITY
=
"iPhone D
eveloper
"
;
CODE_SIGN_IDENTITY
=
"iPhone D
istribution: Shanghai Gomore Information Technology Co.,Ltd
"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone D
eveloper: 云霄 曹 (WM8ZU7YY98)
"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone D
istribution: Shanghai Gomore Information Technology Co.,Ltd
"
;
COMPRESS_PNG_FILES
=
NO
;
COMPRESS_PNG_FILES
=
NO
;
ENABLE_BITCODE
=
NO
;
ENABLE_BITCODE
=
NO
;
FRAMEWORK_SEARCH_PATHS
=
"$(inherited)"
;
FRAMEWORK_SEARCH_PATHS
=
"$(inherited)"
;
...
@@ -1819,7 +1819,7 @@
...
@@ -1819,7 +1819,7 @@
);
);
PRODUCT_BUNDLE_IDENTIFIER
=
com.gomore.opple
;
PRODUCT_BUNDLE_IDENTIFIER
=
com.gomore.opple
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PROVISIONING_PROFILE
=
"
e9bd3600-5e9c-4cd0-a0d5-b7d8b0882ca8
"
;
PROVISIONING_PROFILE
=
"
10361169-d429-4810-90f6-528335fe4062
"
;
STRIP_PNG_TEXT
=
NO
;
STRIP_PNG_TEXT
=
NO
;
TARGETED_DEVICE_FAMILY
=
2
;
TARGETED_DEVICE_FAMILY
=
2
;
USER_HEADER_SEARCH_PATHS
=
"$(PODS_ROOT)/**"
;
USER_HEADER_SEARCH_PATHS
=
"$(PODS_ROOT)/**"
;
...
...
Lighting/Lighting/StoryboardwithCYX.storyboard
View file @
e1af42d5
...
@@ -1717,7 +1717,7 @@
...
@@ -1717,7 +1717,7 @@
<nil
key=
"highlightedColor"
/>
<nil
key=
"highlightedColor"
/>
</label>
</label>
<view
contentMode=
"scaleToFill"
id=
"uTf-41-q0k"
>
<view
contentMode=
"scaleToFill"
id=
"uTf-41-q0k"
>
<rect
key=
"frame"
x=
"523"
y=
"2
3
"
width=
"80"
height=
"30"
/>
<rect
key=
"frame"
x=
"523"
y=
"2
5
"
width=
"80"
height=
"30"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<subviews>
<subviews>
<textField
opaque=
"NO"
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"left"
contentVerticalAlignment=
"center"
text=
"5500"
textAlignment=
"center"
minimumFontSize=
"17"
id=
"Q7k-hi-4Ks"
>
<textField
opaque=
"NO"
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"left"
contentVerticalAlignment=
"center"
text=
"5500"
textAlignment=
"center"
minimumFontSize=
"17"
id=
"Q7k-hi-4Ks"
>
...
...
Lighting/Tools/BaseViewController.m
View file @
e1af42d5
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
//
//
#import "BaseViewController.h"
#import "BaseViewController.h"
#import "LoginViewController.h"
@interface
BaseViewController
()
<
UIPrintInteractionControllerDelegate
,
UIWebViewDelegate
>
@interface
BaseViewController
()
<
UIPrintInteractionControllerDelegate
,
UIWebViewDelegate
>
...
@@ -70,13 +70,55 @@
...
@@ -70,13 +70,55 @@
// 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
];
}
#pragma mark -登陆超时回调
-
(
void
)
logintimeoutNotification
:
(
NSNotification
*
)
not
{
__weak
typeof
(
self
)
weakSelf
=
self
;
UIAlertController
*
alert
=
[
UIAlertController
alertControllerWithTitle
:
@"提示"
message
:
@"登陆超时,请重新登陆"
preferredStyle
:
UIAlertControllerStyleAlert
];
[
alert
addAction
:[
UIAlertAction
actionWithTitle
:
@"我知道了"
style
:
UIAlertActionStyleDestructive
handler
:
^
(
UIAlertAction
*
_Nonnull
action
)
{
[
weakSelf
dismissViewControllerAnimated
:
YES
completion
:
nil
];
[
Shoppersmanager
manager
].
currentCustomer
=
NO
;
[
Customermanager
manager
].
model
=
nil
;
UIStoryboard
*
storyboard
=
[
UIStoryboard
storyboardWithName
:
@"Main"
bundle
:
nil
];
LoginViewController
*
loginVC
=
[
storyboard
instantiateViewControllerWithIdentifier
:
@"Login"
];
[[
NSUserDefaults
standardUserDefaults
]
removeObjectForKey
:
USERNAME
];
[[
NSUserDefaults
standardUserDefaults
]
removeObjectForKey
:
PASSWORD
];
[
weakSelf
restoreRootViewController
:
loginVC
];
}]];
dispatch_async
(
dispatch_get_main_queue
(),
^
{
[
self
presentViewController
:
alert
animated
:
YES
completion
:
nil
];
});
}
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
#pragma mark -切换rootViewcontroller
// Dispose of any resources that can be recreated.
-
(
void
)
restoreRootViewController
:
(
UIViewController
*
)
rootViewController
{
typedef
void
(
^
Animation
)(
void
);
UIWindow
*
window
=
SHARED_APPDELEGATE
.
window
;
rootViewController
.
modalTransitionStyle
=
UIModalTransitionStyleCrossDissolve
;
Animation
animation
=
^
{
BOOL
oldState
=
[
UIView
areAnimationsEnabled
];
[
UIView
setAnimationsEnabled
:
NO
];
window
.
rootViewController
=
rootViewController
;
[
UIView
setAnimationsEnabled
:
oldState
];
};
[
UIView
transitionWithView
:
window
duration
:
0
.
5
f
options
:
UIViewAnimationOptionTransitionFlipFromBottom
animations
:
animation
completion
:
nil
];
}
}
#pragma mark -渐隐提示框回调
#pragma mark -渐隐提示框回调
-
(
void
)
SHOWPrompttext
:
(
NSString
*
)
Text
ComcpleteBlock
:
(
void
(
^
)())
completed
-
(
void
)
SHOWPrompttext
:
(
NSString
*
)
Text
ComcpleteBlock
:
(
void
(
^
)())
completed
{
{
...
@@ -497,7 +539,7 @@
...
@@ -497,7 +539,7 @@
-
(
void
)
dealloc
-
(
void
)
dealloc
{
{
NSLog
(
@"
%@"
,
self
.
title
);
NSLog
(
@"
释放%@控制器"
,
self
);
}
}
...
...
Lighting/Tools/NetworkRequestClassManager.m
View file @
e1af42d5
...
@@ -74,9 +74,12 @@ static NetworkRequestClassManager *manager = nil;
...
@@ -74,9 +74,12 @@ static NetworkRequestClassManager *manager = nil;
if
(
requestType
==
0
)
{
if
(
requestType
==
0
)
{
[
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
)])
{
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
LOGINTIMEOUT
object
:
nil
];
return
;
}
successBlock
(
responseObject
);
successBlock
(
responseObject
);
}
failure
:^
(
NSURLSessionDataTask
*
_Nullable
task
,
NSError
*
_Nonnull
error
)
{
}
failure
:^
(
NSURLSessionDataTask
*
_Nullable
task
,
NSError
*
_Nonnull
error
)
{
...
@@ -89,6 +92,10 @@ static NetworkRequestClassManager *manager = nil;
...
@@ -89,6 +92,10 @@ 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
)])
{
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
LOGINTIMEOUT
object
:
nil
];
return
;
}
successBlock
(
responseObject
);
successBlock
(
responseObject
);
}
failure
:^
(
NSURLSessionDataTask
*
_Nullable
task
,
NSError
*
_Nonnull
error
)
{
}
failure
:^
(
NSURLSessionDataTask
*
_Nullable
task
,
NSError
*
_Nonnull
error
)
{
...
...
Lighting/Tools/PrefixHeader.pch
View file @
e1af42d5
...
@@ -110,12 +110,17 @@
...
@@ -110,12 +110,17 @@
/**
/**
* 服务器开发地址
* 服务器开发地址
*/
*/
#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]
#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://dg
.opple.com/opple-web/app%@",URL]
/**
/**
* 搜索框输入通知
* 搜索框输入通知
...
@@ -174,7 +179,10 @@
...
@@ -174,7 +179,10 @@
*/
*/
#define kNoDataImage TCImage(@"圆角矩形-3-副本")
#define kNoDataImage TCImage(@"圆角矩形-3-副本")
/**
* 登陆超时通知
*/
#define LOGINTIMEOUT @"logintimeout"
...
...
Lighting/Tools/ShoppingBagViewController.m
View file @
e1af42d5
...
@@ -102,6 +102,8 @@
...
@@ -102,6 +102,8 @@
cell
.
model
=
[
self
.
datasArray
objectAtIndex_opple
:
indexPath
.
row
];
cell
.
model
=
[
self
.
datasArray
objectAtIndex_opple
:
indexPath
.
row
];
cell
.
delegate
=
self
;
cell
.
delegate
=
self
;
cell
.
cellindex
=
indexPath
.
row
;
cell
.
cellindex
=
indexPath
.
row
;
cell
.
clinchTextfield
.
userInteractionEnabled
=
NO
;
cell
.
ClinchPriceBackView
.
backgroundColor
=
cell
.
backgroundColor
;
//cell选中回调
//cell选中回调
__weak
typeof
(
self
)
weakSelf
=
self
;
__weak
typeof
(
self
)
weakSelf
=
self
;
[
cell
setReturnCellblock
:
^
(
NSInteger
index
)
{
[
cell
setReturnCellblock
:
^
(
NSInteger
index
)
{
...
@@ -277,18 +279,26 @@
...
@@ -277,18 +279,26 @@
}
}
#pragma mark -系统提示框
-
(
void
)
promptCustomerWithString
:
(
NSString
*
)
message
{
UIAlertController
*
alertVC
=
[
UIAlertController
alertControllerWithTitle
:
@"提示"
message
:
message
preferredStyle
:
UIAlertControllerStyleAlert
];
[
alertVC
addAction
:[
UIAlertAction
actionWithTitle
:
@"我知道了"
style
:
UIAlertActionStyleDefault
handler
:
^
(
UIAlertAction
*
_Nonnull
action
)
{
[
alertVC
dismissViewControllerAnimated
:
YES
completion
:
nil
];
}]];
[
self
presentViewController
:
alertVC
animated
:
YES
completion
:
nil
];
}
#pragma mark -改变商品数量
#pragma mark -改变商品数量
-
(
void
)
ChangeGoodsNumber
:
(
int
)
goodsNumber
WithcostPrice
:
(
CGFloat
)
costprice
Withcellindex
:
(
NSInteger
)
cellindex
-
(
void
)
ChangeGoodsNumber
:
(
int
)
goodsNumber
WithcostPrice
:
(
CGFloat
)
costprice
Withcellindex
:
(
NSInteger
)
cellindex
{
{
//保存商品数量
ShopcarModel
*
model
=
[
self
.
datasArray
objectAtIndex_opple
:
cellindex
];
ShopcarModel
*
model
=
[
self
.
datasArray
objectAtIndex_opple
:
cellindex
];
//保存商品数量
model
.
goodsNum
=
goodsNumber
;
model
.
goodsNum
=
goodsNumber
;
//保存成交价格
//保存成交价格
ShopcarModel
*
Newmodel
=
[
self
.
datasArray
objectAtIndex_opple
:
cellindex
];
model
.
costPrice
=
[
NSNumber
numberWithFloat
:
costprice
];
Newmodel
.
costPrice
=
[
NSNumber
numberWithFloat
:
costprice
];
[
self
CalculateSelectedGoodsAllprice
];
[
self
CalculateSelectedGoodsAllprice
];
}
}
...
@@ -313,6 +323,14 @@
...
@@ -313,6 +323,14 @@
}
}
#pragma mark -友好界面
#pragma mark -友好界面
-
(
UIImage
*
)
imageForEmptyDataSet
:
(
UIScrollView
*
)
scrollView
-
(
UIImage
*
)
imageForEmptyDataSet
:
(
UIScrollView
*
)
scrollView
{
{
...
...
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