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

体验中心购物袋修改

parent fbb0b125
......@@ -66,11 +66,9 @@
// Do any additional setup after loading the view.
[self uiConfigAction];
}
#pragma mark -UI
- (void)uiConfigAction
{
......@@ -105,8 +103,6 @@
//设置按钮时间
[self.begindateButton setTitle:[self dateAsString:[NSDate date]] forState:UIControlStateNormal];
[self.enddateButton setTitle:[self dateAsString:[NSDate date]] forState:UIControlStateNormal];
self.begindateButton.layer.masksToBounds = YES;
self.begindateButton.layer.cornerRadius = 10;
self.enddateButton.layer.masksToBounds = YES;
......
......@@ -1717,8 +1717,8 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "Brand Assets";
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: 云霄 曹 (WM8ZU7YY98)";
CODE_SIGN_IDENTITY = "iPhone Distribution: Shanghai Gomore Information Technology Co.,Ltd";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Shanghai Gomore Information Technology Co.,Ltd";
COMPRESS_PNG_FILES = NO;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
......@@ -1761,7 +1761,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.gomore.opple;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "e9bd3600-5e9c-4cd0-a0d5-b7d8b0882ca8";
PROVISIONING_PROFILE = "10361169-d429-4810-90f6-528335fe4062";
STRIP_PNG_TEXT = NO;
TARGETED_DEVICE_FAMILY = 2;
USER_HEADER_SEARCH_PATHS = "$(PODS_ROOT)/**";
......@@ -1775,8 +1775,8 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "Brand Assets";
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: 云霄 曹 (WM8ZU7YY98)";
CODE_SIGN_IDENTITY = "iPhone Distribution: Shanghai Gomore Information Technology Co.,Ltd";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Shanghai Gomore Information Technology Co.,Ltd";
COMPRESS_PNG_FILES = NO;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
......@@ -1819,7 +1819,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.gomore.opple;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "e9bd3600-5e9c-4cd0-a0d5-b7d8b0882ca8";
PROVISIONING_PROFILE = "10361169-d429-4810-90f6-528335fe4062";
STRIP_PNG_TEXT = NO;
TARGETED_DEVICE_FAMILY = 2;
USER_HEADER_SEARCH_PATHS = "$(PODS_ROOT)/**";
......
......@@ -1717,7 +1717,7 @@
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" id="uTf-41-q0k">
<rect key="frame" x="523" y="23" width="80" height="30"/>
<rect key="frame" x="523" y="25" width="80" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="5500" textAlignment="center" minimumFontSize="17" id="Q7k-hi-4Ks">
......
......@@ -7,7 +7,7 @@
//
#import "BaseViewController.h"
#import "LoginViewController.h"
@interface BaseViewController ()<UIPrintInteractionControllerDelegate,UIWebViewDelegate>
......@@ -70,13 +70,55 @@
// Do any additional setup after loading the view.
self.automaticallyAdjustsScrollViewInsets = NO;
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];
// Dispose of any resources that can be recreated.
#pragma mark -切换rootViewcontroller
- (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.5f
options:UIViewAnimationOptionTransitionFlipFromBottom
animations:animation
completion:nil];
}
#pragma mark -渐隐提示框回调
- (void)SHOWPrompttext:(NSString *)Text ComcpleteBlock:(void(^)())completed
{
......@@ -497,7 +539,7 @@
- (void)dealloc
{
NSLog(@"%@",self.title);
NSLog(@"释放%@控制器",self);
}
......
......@@ -74,9 +74,12 @@ static NetworkRequestClassManager *manager = nil;
if (requestType == 0) {
[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);
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
......@@ -89,6 +92,10 @@ static NetworkRequestClassManager *manager = nil;
[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);
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
......
......@@ -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 @@
*/
#define kNoDataImage TCImage(@"圆角矩形-3-副本")
/**
* 登陆超时通知
*/
#define LOGINTIMEOUT @"logintimeout"
......
......@@ -102,6 +102,8 @@
cell.model = [self.datasArray objectAtIndex_opple:indexPath.row];
cell.delegate = self;
cell.cellindex = indexPath.row;
cell.clinchTextfield.userInteractionEnabled = NO;
cell.ClinchPriceBackView.backgroundColor = cell.backgroundColor;
//cell选中回调
__weak typeof(self) weakSelf = self;
[cell setReturnCellblock:^(NSInteger index) {
......@@ -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 -改变商品数量
- (void)ChangeGoodsNumber:(int)goodsNumber WithcostPrice:(CGFloat)costprice Withcellindex:(NSInteger)cellindex
{
//保存商品数量
ShopcarModel *model = [self.datasArray objectAtIndex_opple:cellindex];
//保存商品数量
model.goodsNum = goodsNumber;
//保存成交价格
ShopcarModel *Newmodel = [self.datasArray objectAtIndex_opple:cellindex];
Newmodel.costPrice = [NSNumber numberWithFloat:costprice];
model.costPrice = [NSNumber numberWithFloat:costprice];
[self CalculateSelectedGoodsAllprice];
}
......@@ -313,6 +323,14 @@
}
#pragma mark -友好界面
- (UIImage *)imageForEmptyDataSet:(UIScrollView *)scrollView
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment