Commit 0cf0f7f8 authored by 曹云霄's avatar 曹云霄

完善客户信息开发

parent 0430be6c
......@@ -65,6 +65,7 @@
[super viewDidLoad];
[self uiConfigAction];
[self setUpRefresh];
}
- (void)viewDidAppear:(BOOL)animated
......@@ -116,6 +117,11 @@
[Notification addObserver:self selector:@selector(SetupCurrentCustomer:) name:@"SETUPCURRENTCUSTOMER" object:nil];
//清空当前客户数据
[Notification addObserver:self selector:@selector(changeCustomerName:) name:@"EMPTYCUSTOMERNAME" object:nil];
}
#pragma mark -设置刷新
- (void)setUpRefresh
{
WS(weakSelf);
//下拉刷新
MjRefreshHeaderCustom *headerRefresh = [MjRefreshHeaderCustom headerWithRefreshingBlock:^{
......@@ -140,13 +146,6 @@
}
}];
self.informationTableview.mj_footer.automaticallyHidden = YES;
// //是否需要完善客户信息
// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
// if (![Shoppersmanager manager].Shoppers.employee.isComplete) {
// [self perfectGuideInformation];
// }
// });
}
#pragma mark -获取导购关联客户
......
......@@ -97,13 +97,13 @@
- (void)uiConfigAction
{
self.searchCustomerOrder.delegate = self;
self.view.backgroundColor = kTCColor(238, 238, 238);
self.view.backgroundColor = RGB(238, 238, 238,1);
self.customerOrderTableView.dataSource = self;
self.customerOrderTableView.delegate = self;
self.customerOrderTableView.backgroundColor = [UIColor clearColor];
self.styleButton = [ScreeningButton buttonWithType:UIButtonTypeCustom];
self.styleButton.frame = CGRectMake(ScreenWidth-250, 20, 150, 30);
self.styleButton.backgroundColor = kTCColor(131, 131, 131);
self.styleButton.backgroundColor = RGB(131, 131, 131,1);
[self.styleButton setTitle:@"订单状态" forState:UIControlStateNormal];
[self.styleButton addTarget:self action:@selector(OrderStateButtonClick:) forControlEvents:UIControlEventTouchUpInside];
[self.styleButton setImage:TCImage(@"down_arr") forState:UIControlStateNormal];
......
......@@ -155,7 +155,7 @@ static NSString * const reuseIdentifier = @"Cell";
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
FullScreenViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:reuseIdentifier forIndexPath:indexPath];
cell.backgroundColor = kTCColor(251, 248, 241);
cell.backgroundColor = RGB(251, 248, 241,1);
if (self.isProductLibrary) {
[cell.imageView sd_setImageWithURL:[NSURL URLWithString:[self.datasArray objectAtIndex_opple:indexPath.item]] placeholderImage:REPLACEIMAGE];
return cell;
......
......@@ -133,6 +133,13 @@
self.postTitleLabel.text = self.topicDetail.title;
self.contentLabel.text = self.topicDetail.content;
self.issuerNameAndDateLabel.text = [NSString stringWithFormat:@"%@: %@ %@",self.topicDetail.posterPosition,self.topicDetail.posterRealName,self.topicDetail.postTime];
NSString *headerurl = [Shoppersmanager manager].Shoppers.employee.picture;
[self.issuerImageView sd_setImageWithURL:[NSURL URLWithString:headerurl] placeholderImage:ReplaceImage];
if (self.topicDetail.backEnd) {
self.issuerImageView.image = TCImage(@"Icon-83.5");
}else {
[self.issuerImageView sd_setImageWithURL:[NSURL URLWithString:self.topicDetail.posterPicture] placeholderImage:ReplaceImage];
}
//图片
PostPhotoManagerViewController *photoManager = [[[self class] getLearningCenterStoryboardClass] instantiateViewControllerWithIdentifier:@"PostPhotoManagerViewController"];
[self addChildViewController:photoManager];
......
......@@ -89,6 +89,7 @@
#pragma mark - UI
- (void)uiConfigAction
{
self.classificationListTableView.backgroundColor = RGB(237, 238, 239, 1);
self.classifyTitleLabel.text = self.category.name;
[self.classifyImageView sd_setImageWithURL:[NSURL URLWithString:self.category.attachment.fileUrl] placeholderImage:REPLACEIMAGE];
}
......
......@@ -35,8 +35,12 @@
self.imageBackView.imageArray = _topicEntity.attachments;
}
self.imageBackView.indexPath = self.indexPath;
NSString *headerurl = [Shoppersmanager manager].Shoppers.employee.picture;
[self.headerImageView sd_setImageWithURL:[NSURL URLWithString:headerurl] placeholderImage:ReplaceImage];
if (topicEntity.backEnd) {
self.headerImageView.image = TCImage(@"Icon-83.5");
}else {
[self.headerImageView sd_setImageWithURL:[NSURL URLWithString:topicEntity.posterPicture] placeholderImage:ReplaceImage];
}
}
}
......
......@@ -10,6 +10,7 @@
#import "OnlineLearningViewController.h"
#import "ForumViewController.h"
#import "EmigratedMainViewController.h"
#import "PerfectInformationViewController.h"
@interface LearningCenterMainViewController ()
......@@ -60,7 +61,13 @@
#pragma mark -UI
- (void)uiConfigAction
{
self.guideNameLabel.text = [NSString stringWithFormat:@"用户名:%@",[Shoppersmanager manager].Shoppers.employee.realName];
self.guideNameLabel.text = [NSString stringWithFormat:@"用户名: %@",[Shoppersmanager manager].Shoppers.employee.realName];
//是否需要完善客户信息
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
if (![Shoppersmanager manager].Shoppers.employee.isComplete) {
[self perfectGuideInformation];
}
});
}
#pragma mark - 添加点击
......@@ -104,9 +111,16 @@
self.currentScoreLabel.text = [NSString stringWithFormat:@"%.0lf",entity.currentScore];
self.yearRankingLabel.text = [NSString stringWithFormat:@"%ld",(long)entity.annualRanking];
[self.guideHeadImageView sd_setImageWithURL:[NSURL URLWithString:[Shoppersmanager manager].Shoppers.employee.picture] placeholderImage:ReplaceImage];
[self.guideHeadImageView addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(guideHeaderViewClick:)]];
self.quarterRankingLabel.text = [NSString stringWithFormat:@"%ld",(long)entity.quarterlyRanking];
}
#pragma mark -导购头像点击事件
- (void)guideHeaderViewClick:(UITapGestureRecognizer *)tap
{
[self perfectGuideInformation];
}
#pragma mark - 综合讨论
- (void)comprehensiveDiscussionViewClickAction:(UITapGestureRecognizer *)sender
{
......
......@@ -109,7 +109,7 @@
[XBLoadingView hideHUDViewWithDefault];
if (RESULT(returnValue)) {
TONoticeEntity *entity = weakSelf.messageArray[indexPath.row];
entity.state = @"0";
entity.readed = YES;
[weakSelf cornerMarkIsShow];
[weakSelf configCell:[weakSelf.meesageTableView cellForRowAtIndexPath:indexPath] withIndexPath:indexPath];
[weakSelf.meesageTableView reloadData];
......
......@@ -581,7 +581,7 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
// 我知道了
}else if (indexPath.row == 0)
{
[Notification postNotificationName:OPENCONTROLLER object:@(3)];
[SHARED_APPDELEGATE.tabBarController switchSelectedIndex:3];
}
}];
success.preferredContentSize = CGSizeMake(315, 320);
......@@ -656,7 +656,7 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
}
//横线
UIView *lineView = [[UIView alloc]initWithFrame:CGRectMake(0, 59, ScreenWidth, 1)];
lineView.backgroundColor = kTCColor(193, 193, 193);
lineView.backgroundColor = RGB(193, 193, 193,1);
[headerView addSubview:lineView];
self.orderDetailsTableview.tableHeaderView = headerView;
}
......
......@@ -146,7 +146,7 @@
self.perfectInformationTableView.tableFooterView = [UIView new];
self.title = @"个人资料";
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"完成" style:UIBarButtonItemStyleDone target:self action:@selector(modifyshoppersInformation)];
self.navigationItem.rightBarButtonItem.enabled = NO;
self.navigationItem.rightBarButtonItem.enabled = [Shoppersmanager manager].Shoppers.employee.isComplete;
}
#pragma mark -判断输入是否完成
......@@ -163,6 +163,9 @@
#pragma mark -完成修改导购个人信息
- (void)modifyshoppersInformation
{
if ([Shoppersmanager manager].Shoppers.employee.isComplete) {
[self dismissViewControllerAnimated:YES completion:nil];return;
}
WS(weakSelf);
[XBLoadingView showHUDViewWithDefault];
RsEmployeeRequest *employ = [[RsEmployeeRequest alloc]init];
......@@ -193,7 +196,6 @@
{
if (!_informationArray) {
LoginResult *guide = [Shoppersmanager manager].Shoppers;
NSMutableArray *mutableArray1 = [NSMutableArray arrayWithObjects:[self disposeNil:guide.employee.userName],[self disposeNil:guide.employee.region],[self disposeNil:guide.employee.office],[self disposeNil:guide.employee.reseller],[self disposeNil:guide.employee.store], nil];
NSMutableArray *mutableArray2 = [NSMutableArray arrayWithObjects:[self disposeNil:guide.employee.realName],[self disposeNil:guide.employee.gender],[self disposeNil:guide.employee.birthday],[self disposeNil:guide.employee.mobilePhone], nil];
_informationArray = [NSMutableArray arrayWithObjects:mutableArray1,mutableArray2, nil];
......
......@@ -310,7 +310,7 @@
UIImageView *imageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, size.width, size.height)];
imageView.backgroundColor = kTCColor(252, 248, 239);
imageView.backgroundColor = RGB(252, 248, 239,1);
imageView.image = image;
imageView.center = point;
......
......@@ -442,7 +442,7 @@
CGPoint controlPoint = CGPointMake(endPoint.x, startPoint.x);
UIImageView *imageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, size.width, size.height)];
imageView.backgroundColor = kTCColor(252, 248, 239);
imageView.backgroundColor = RGB(252, 248, 239,1);
imageView.image = image;
imageView.center = point;
[self.view.window.layer addSublayer:imageView.layer];
......
......@@ -21,7 +21,7 @@
[self setImage:TCImage(@"down_arr") forState:UIControlStateNormal];
self.layer.masksToBounds = YES;
self.layer.cornerRadius = 10;
self.backgroundColor = kTCColor(131, 131, 131);
self.backgroundColor = RGB(131, 131, 131,1);
}
return self;
......
......@@ -288,7 +288,7 @@
pop.sourceView = self.payController.view;
pop.sourceRect = [self.view convertRect:CGRectMake(sender.mj_x, sender.mj_y-30, sender.mj_w, sender.mj_h) toView:self.view.window];
self.payController.dealersName.text = weichat?@"微信支付":@"支付宝支付";
self.payController.dealersName.textColor = weichat?kTCColor(30, 198, 34):kTCColor(88, 172, 220);
self.payController.dealersName.textColor = weichat?RGB(30, 198, 34,1):RGB(88, 172, 220,1);
[self.payController.dealersImageView sd_setImageWithURL:[NSURL URLWithString:weichat?self.weiXinLabe:self.zhiFubaoLabe] placeholderImage:REPLACEIMAGE];
self.payController.payTypeBackimageView.image = weichat?TCImage(@"weixinpay"):TCImage(@"zhifubaopay");
[self presentViewController:self.payController animated:NO completion:nil];
......@@ -527,7 +527,7 @@
#pragma mark - 价格疑问
- (IBAction)priceQuestionButtonClickAction:(UIButton *)sender {
ShowAlertView(self, nil, self.totalAmountSource, nil, @"我知道了", UIAlertControllerStyleActionSheet, nil, nil);
ShowAlertView(self, nil, self.totalAmountSource, @"我知道了", nil, UIAlertControllerStyleActionSheet, nil, nil);
}
......
......@@ -179,12 +179,12 @@
[cell.addAddressButton addTarget:self action:@selector(AddAddressButtonClick) forControlEvents:UIControlEventTouchUpInside];
[cell.changeButton addTarget:self action:@selector(ChangeButtonClick) forControlEvents:UIControlEventTouchUpInside];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.backgroundColor = kTCColor(242, 242, 242);
cell.backgroundColor = RGB(242, 242, 242,1);
return cell;
}
GenerateOrdersTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"consigneecell" forIndexPath:indexPath];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.backgroundColor = kTCColor(242, 242, 242);
cell.backgroundColor = RGB(242, 242, 242,1);
cell.indexNumber = indexPath.row;
//回调
__weak typeof(self) weakSelf = self;
......@@ -298,7 +298,7 @@
//横线
UIView *lineView = [[UIView alloc]initWithFrame:CGRectMake(0, 43, ScreenWidth, 1)];
lineView.backgroundColor = kTCColor(242, 242, 242);
lineView.backgroundColor = RGB(242, 242, 242,1);
[view addSubview:lineView];
return view;
}
......
......@@ -90,7 +90,7 @@
{
self.settlementButton.layer.masksToBounds = YES;
self.settlementButton.layer.cornerRadius = kCornerRadius;
self.view.backgroundColor = kTCColor(238, 238, 238);
self.view.backgroundColor = RGB(238, 238, 238,1);
self.shoppingTableview.dataSource = self;
self.shoppingTableview.delegate = self;
self.shoppingTableview.backgroundColor = [UIColor clearColor];
......
......@@ -33,7 +33,10 @@ typedef NS_ENUM(NSInteger,TabBarItemTag){
@interface CustomTabbarController : UITabBarController<UITabBarControllerDelegate>
/**
切换tabbar selectedIndex
*/
- (void)switchSelectedIndex:(NSInteger)selectedIndex;
......
......@@ -335,6 +335,13 @@
}
}
#pragma mark - 切换tabbar selectedIndex
- (void)switchSelectedIndex:(NSInteger)selectedIndex
{
[self.toolview switchLineViewOrigin:selectedIndex];
self.selectedIndex = selectedIndex;
}
#pragma mark -推出体验中心控制器
- (void)showFollowHeart:(NSNotification *)objc
{
......
......@@ -40,4 +40,28 @@
*/
@property (nonatomic,strong) UITextField *inputField;
/**
按钮
*/
@property (nonatomic,strong) NSMutableArray *buttonArray;
/**
切换tabbar 指示线view
@param selectedIndex tabbar 选中
*/
- (void)switchLineViewOrigin:(NSInteger)selectedIndex;
@end
......@@ -22,7 +22,7 @@
{
if (self = [super initWithFrame:frame]) {
self.backgroundColor = kTCColor(255, 255, 255);
self.backgroundColor = RGB(255, 255, 255,1);
[self uiConfigAction];
[self addNSNotificationCenter];
}
......@@ -44,11 +44,11 @@
//输入框背景
UIView *backView = [[UIView alloc]initWithFrame:CGRectMake(200, (NavigationHeight-35)/2, 220, 35)];
backView.backgroundColor = kTCColor(242, 242, 242);
backView.backgroundColor = RGB(242, 242, 242,1);
backView.layer.masksToBounds = YES;;
backView.layer.cornerRadius = kCornerRadius;
backView.layer.borderWidth = 1;
backView.layer.borderColor = kTCColor(209, 209, 209).CGColor;
backView.layer.borderColor = RGB(209, 209, 209,1).CGColor;
[self addSubview:backView];
//搜索图标
......@@ -56,7 +56,6 @@
imageview.image = TCImage(@"search");
[backView addSubview:imageview];
//输入框
self.inputField = [[UITextField alloc]initWithFrame:CGRectMake(45, 0, 170, 35)];
self.inputField.borderStyle = UITextBorderStyleNone;
......@@ -98,12 +97,13 @@
if (i == 2) {
button.instructionsNumber = [Shoppersmanager manager].Shoppers.hasNotReadNotice;
}
[self.buttonArray addObject:button];
}
//创建下划线
CustomButton *Newbutton = (CustomButton *)[self viewWithTag:104];
self.underlineView = [[UIView alloc]initWithFrame:CGRectMake(Newbutton.frame.origin.x+(ButtonWIDTH-50)/2, ButtonRIGHT+8, 50, 2)];
SHARED_APPDELEGATE.lineView = self.underlineView;
_underlineView.backgroundColor = kMainBlueColor;
self.underlineView.backgroundColor = kMainBlueColor;
[self addSubview:self.underlineView];
}
......@@ -217,10 +217,19 @@
#pragma mark -按钮事件响应
- (void)buttonClick:(UIButton *)button
{
[self switchLineViewOrigin:button.tag-100];
if ([self.delegate respondsToSelector:@selector(buttonClickAction:withButton:)]) {
[self.delegate buttonClickAction:button.tag withButton:button];
}
}
#pragma mark -切换lingView位置
- (void)switchLineViewOrigin:(NSInteger)selectedIndex
{
UIButton *button = self.buttonArray[selectedIndex];
if (button.tag != 100) {
if (!(button.tag == 105 && ![Shoppersmanager manager].currentCustomer)) {
self.underlineView.hidden = NO;
//下划线动画
[UIView animateWithDuration:0.2 delay:0 options:UIViewAnimationOptionCurveEaseOut animations:^{
CGRect frame = self.underlineView.frame;
frame.origin.x = button.frame.origin.x+(ButtonWIDTH-50)/2;
......@@ -228,11 +237,16 @@
} completion:nil];
}
}
//点击代理
if ([self.delegate respondsToSelector:@selector(buttonClickAction:withButton:)]) {
[self.delegate buttonClickAction:button.tag withButton:button];
}
}
#pragma mark -lazy
- (NSMutableArray *)buttonArray
{
if (!_buttonArray) {
_buttonArray = [NSMutableArray array];
}
return _buttonArray;
}
@end
......@@ -229,7 +229,7 @@
}else
{
[weakSelf promptCustomerWithString:@"切换用户失败"];
ShowAlertView(self, nil, @"切换用户失败", nil, @"我知道了", UIAlertControllerStyleActionSheet, nil, nil);
}
} withFailureBlock:^(id error) {
[XBLoadingView hideHUDViewWithDefault];
......
......@@ -3161,7 +3161,7 @@
PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE_SPECIFIER = "";
STRIP_PNG_TEXT = NO;
TARGETED_DEVICE_FAMILY = "1,2";
TARGETED_DEVICE_FAMILY = 2;
USER_HEADER_SEARCH_PATHS = "$(PODS_ROOT)/**";
};
name = Debug;
......@@ -3222,7 +3222,7 @@
PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE_SPECIFIER = "";
STRIP_PNG_TEXT = NO;
TARGETED_DEVICE_FAMILY = "1,2";
TARGETED_DEVICE_FAMILY = 2;
USER_HEADER_SEARCH_PATHS = "$(PODS_ROOT)/**";
};
name = Release;
......
......@@ -47,7 +47,6 @@
*/
@property (nonatomic,strong) NSArray *allControllerArray;
/**
* 指示横线
*/
......
......@@ -67,11 +67,6 @@
advertisingIdentifier:nil];
[JPUSHService resetBadge];
[JPUSHService registrationIDCompletionHandler:^(int resCode, NSString *registrationID) {
NSLog(@"resCode : %d,registrationID: %@",resCode,registrationID);
}];
}
- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(nullable UIWindow *)window
......
{
"images" : [
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "1x"
"idiom" : "iphone",
"filename" : "opple2iPhoneNotification_20pt@2x.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "opple2iPhoneNotification_20pt@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "opple2iPhoneSpootlight5_29pt@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "opple2iPhoneSpootlight5_29pt@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "opple2iPhoneSpootlight7_40pt@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "opple2iPhoneSpootlight7_40pt@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "opple2iPhoneApp_60pt@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "opple2iPhoneApp_60pt@3x.png",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "opple2iPadNotifications_20pt.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "opple2iPadNotifications_20pt@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-29.0@1x.png",
"filename" : "opple2iPadSpootlight5_29pt.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-29.0@2x.png",
"filename" : "opple2iPadSpootlight5_29pt@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-40.0@1x.png",
"filename" : "opple2iPadSpootlight7_40pt.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-40.0@2x.png",
"filename" : "opple2iPadSpootlight7_40pt@2x.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-76.0@1x.png",
"filename" : "opple2iPadApp_76pt.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-76.0@2x.png",
"filename" : "opple2iPadApp_76pt@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "Icon-83.5@2x.png",
"filename" : "opple2iPadProApp_83.5pt@2x.png",
"scale" : "2x"
}
],
......
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
This diff is collapsed.
......@@ -61,16 +61,20 @@ void ShowDefaultAlertView(UIViewController *viewController,NSString *title,NSStr
void ShowAlertView(UIViewController *viewController,NSString *title,NSString *message,NSString *cancelTitle,NSString *DefaultTitle,UIAlertControllerStyle style,void(^completed)(),void(^canceled)()) {
UIAlertController *alert = BaseAlert(title, message, style);
[alert addAction:[UIAlertAction actionWithTitle:cancelTitle style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
if (canceled) {
canceled();
}
}]];
[alert addAction:[UIAlertAction actionWithTitle:DefaultTitle style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
if (completed) {
completed();
};
}]];
if (cancelTitle) {
[alert addAction:[UIAlertAction actionWithTitle:cancelTitle style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
if (canceled) {
canceled();
}
}]];
}
if (DefaultTitle) {
[alert addAction:[UIAlertAction actionWithTitle:DefaultTitle style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
if (completed) {
completed();
};
}]];
}
[viewController presentViewController:alert animated:YES completion:nil];
}
......
......@@ -72,7 +72,6 @@
*/
+ (id)returnOrderStateTitleWithStateCode:(NSInteger)ordercode withPoint:(CGPoint)point WithCode:(NSInteger)code;
/**
* 查询购物车数量
*/
......@@ -83,17 +82,6 @@
*/
- (void)queryShoppingCarGoods;
/**
* 系统提示框
*/
- (void)promptCustomerWithString:(NSString *)message;
/**
* 友好化时间
*/
+ (NSString *) compareCurrentTime:(NSString *)str;
/**
* 获取版本号
*/
......@@ -119,7 +107,6 @@
*/
+ (id)returnPrizeBillStateTitleColor:(NSString *)stateCode;
#pragma mark - 设置提现状态
/**
提现申请状态
......
......@@ -76,17 +76,14 @@
#pragma mark -完善导购个人信息
- (void)perfectGuideInformation
{
if (![Shoppersmanager manager].Shoppers.employee.isComplete) {
PerfectInformationViewController *perfectInformation = [[[self class] getMainStoryboardClass] instantiateViewControllerWithIdentifier:@"PerfectInformationViewController"];
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:perfectInformation];
nav.preferredContentSize = CGSizeMake(ScreenHeight-300, ScreenHeight-300);
nav.modalPresentationStyle = UIModalPresentationFormSheet;
UIPopoverPresentationController *pop = nav.popoverPresentationController;
pop.permittedArrowDirections = UIPopoverArrowDirectionAny;
pop.sourceView = nav.view;
[self presentViewController:nav animated:YES completion:nil];
}
PerfectInformationViewController *perfectInformation = [[[self class] getMainStoryboardClass] instantiateViewControllerWithIdentifier:@"PerfectInformationViewController"];
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:perfectInformation];
nav.preferredContentSize = CGSizeMake(ScreenHeight-300, ScreenHeight-300);
nav.modalPresentationStyle = UIModalPresentationFormSheet;
UIPopoverPresentationController *pop = nav.popoverPresentationController;
pop.permittedArrowDirections = UIPopoverArrowDirectionAny;
pop.sourceView = nav.view;
[self presentViewController:nav animated:YES completion:nil];
}
#pragma mark -登陆超时回调
......@@ -318,17 +315,6 @@
}
#pragma mark - 提示框
- (void)promptCustomerTitle:(NSString *)title withMessage:(NSString *)message finish:(void (^)())complete
{
UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:nil message:message preferredStyle:UIAlertControllerStyleAlert];
[alertVC addAction:[UIAlertAction actionWithTitle:title style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
if (complete) {
complete();
}
}]];
[self presentViewController:alertVC animated:YES completion:nil];
}
#pragma mark -传入订单状态,返回当前状态图片
+ (UIImage *)returnOrderStateImageWithStateCode:(NSInteger)ordercode
......@@ -366,7 +352,7 @@
case 001://未付款
{
if (code) {
return kTCColor(241, 81, 83);
return RGB(241, 81, 83,1);
}
return @"待支付";
}
......@@ -375,7 +361,7 @@
{
if (code) {
return kTCColor(126, 191, 53);
return RGB(126, 191, 53,1);
}
return @"已支付";
}
......@@ -384,7 +370,7 @@
{
if (code) {
return kTCColor(240, 180, 51);
return RGB(240, 180, 51,1);
}
return @"已发货";
}
......@@ -393,7 +379,7 @@
{
if (code) {
return kTCColor(153, 153, 153);
return RGB(153, 153, 153,1);
}
return @"已退货";
}
......@@ -402,7 +388,7 @@
{
if (code) {
return kTCColor(153, 153, 153);
return RGB(153, 153, 153,1);
}
return @"已撤销";
}
......@@ -411,7 +397,7 @@
{
if (code) {
return kTCColor(89, 172, 220);
return RGB(89, 172, 220,1);
}
return @"已完成";
}
......@@ -444,59 +430,6 @@
[Notification postNotificationName:SHOPPINGCARGOODS object:nil];
}
#pragma mark -系统提示框
- (void)promptCustomerWithString:(NSString *)message
{
UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:@"提示" message:message preferredStyle:UIAlertControllerStyleAlert];
[alertVC addAction:[UIAlertAction actionWithTitle:@"我知道了" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
[self dismissViewControllerAnimated:YES completion:nil];
}]];
dispatch_async(dispatch_get_main_queue(), ^{
[self presentViewController:alertVC animated:YES completion:nil];
});
}
#pragma mark -友好化时间
+ (NSString *) compareCurrentTime:(NSString *)str
{
//把字符串转为NSdate
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss.SSS"];
NSDate *timeDate = [dateFormatter dateFromString:str];
//得到与当前时间差
NSTimeInterval timeInterval = [timeDate timeIntervalSinceNow];
timeInterval = -timeInterval;
//标准时间和北京时间差8个小时
timeInterval = timeInterval - 8*60*60;
long temp = 0;
NSString *result;
if (timeInterval < 60) {
result = [NSString stringWithFormat:@"刚刚"];
}
else if((temp = timeInterval/60) <60){
result = [NSString stringWithFormat:@"%ld分钟前",temp];
}
else if((temp = temp/60) <24){
result = [NSString stringWithFormat:@"%ld小时前",temp];
}
else if((temp = temp/24) <30){
result = [NSString stringWithFormat:@"%ld天前",temp];
}
else if((temp = temp/30) <12){
result = [NSString stringWithFormat:@"%ld月前",temp];
}
else{
temp = temp/12;
result = [NSString stringWithFormat:@"%ld年前",temp];
}
return result;
}
#pragma mark - 获取版本号
- (NSString*)getAppVersion
......
......@@ -8,6 +8,98 @@
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "MBProgressHUD.h"
#import "MJRefresh.h"
#import "MMDrawerController.h"
#import "RightViewController.h"
#import "IQKeyboardManager.h"
#import "AFNetworking.h"
#import "NetworkRequestClassManager.h"
#import "NSArray+Objectwithindex.h"
#import "ShoppingViewController.h"
#import "ClientViewController.h"
#import "Masonry.h"
#import "PopoverViewController.h"
#import "opple_objc_json_client.h"
#import "HENLENSONG.h"
#import "JSONModel.h"
#import "Shoppersmanager.h"
#import "UIImageView+WebCache.h"
#import "Customermanager.h"
#import "AppDelegate.h"
#import "PromptinformationView.h"
#import "BaseViewController.h"
#import "MjRefreshHeaderCustom.h"
#import "UIScrollView+EmptyDataSet.h"
#import "NSDictionary+category.h"
#import "UINavigationController+FDFullscreenPopGesture.h"
#import "UIView+cornerRadius.h"
#import "XLPlainFlowLayout.h"
#import "MDScratchImageView.h"
#import "WYPopoverController.h"
#import "CustomBorderLabel.h"
#import "PNCircleChart.h"
#import "CustomStudyEntity.h"
#import "XBLoadingView.h"
#import "CustomTOStudyTopicOptionEntity.h"
#import "CountDownLabel.h"
#import "CustomTOStudyTopicEntity.h"
#import "CustomTOPassLevelTopicEntity.h"
#import "CustomTOPassLevelTopicOptionEntity.h"
#import "CustomImageBackView.h"
#import "NSDate+Formatting.h"
#import "CustomTOForumTopicEntity.h"
#import "CustomTOForumReplyEntity.h"
#import "SAMKeychain.h"
#import "PNCircleChart.h"
#import "NSString+Category.h"
#import "CustomTOAfficheEntity.h"
#import "ICRPlaceholderTextView.h"
#import "YXAlertController.h"
/**
闯关结果
- NotThrough: 未通过
- Through: 已通过
- Audit: 待审核
*/
typedef NS_ENUM(NSInteger,RESULT_STATE){
NotThrough = 0,
Through,
Audit
};
/**
点赞或评论
- Comment: 评论
- Praise: 点赞
*/
typedef NS_ENUM(NSInteger,COMMENT_PRAISE) {
Comment = 0,
Praise
};
/**
* 服务器开发地址
*///http://139.196.195.30:8090
#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.opple.com/opple-web/app%@",URL]
/*****************************************接口地址*****************************************/
/**
......@@ -480,10 +572,6 @@ extern NSString *const CHECK;
*/
extern NSString *const SHOPPINGCARGOODS;
/**
* 通知打开响应的控制器
*/
extern NSString *const OPENCONTROLLER;
/**
* 打开体验中心
......@@ -641,6 +729,74 @@ extern NSString *const NSNOTIFICATION_MESSAGE;
*/
extern NSString *const SHAREINVITATION;
/**
* 一键分享显示文本
*/
extern NSString *const ShareTitle;
/**
* 登陆超时通知
*/
extern NSString *const LOGINTIMEOUT;
/**
* 更新版本通知
*/
extern NSString *const UPLOADVERSION;
/**
* 网络断开
*/
extern NSString *const NETWORK;
/**
* 搜索框输入通知
*/
extern NSString *const SEARCHSTRING;
/**
* 搜索框返回根视图
*/
extern NSString *const POPROOTCONTROLLER;
/**
* 储存本地的搜索历史文件名
*/
extern NSString *const SEARCHHISTORY;
/**
* 保存用户名key
*/
extern NSString *const USERNAME;
/**
* 保存密码key
*/
extern NSString *const PASSWORD;
/**
* 网络请求返回个数
*/
extern NSInteger const KROWS;
/**
保存账号密码serviceName
*/
extern NSString *const SERVICENAME;
/**
保存账号key
*/
extern NSString *const SAVEACCOUNT;
/**
保存密码key
*/
extern NSString *const SAVEPASSWORD;
......@@ -8,6 +8,9 @@
#import "CYConstManager.h"
/*****************************************接口地址*****************************************/
/**
* 登陆
......@@ -482,11 +485,6 @@ NSString *const USED = @"used";
*/
NSString *const SHOPPINGCARGOODS = @"shoppingCar";
/**
* 通知打开响应的控制器
*/
NSString *const OPENCONTROLLER = @"openController";
/**
* 打开体验中心
*/
......@@ -639,6 +637,69 @@ NSString *const MESSAGE_COUNT = @"MESSAGE_COUNT";
*/
NSString *const NSNOTIFICATION_MESSAGE = @"NSNotificationCenter";
/**
* 一键分享显示文本
*/
NSString *const ShareTitle = @"欧立方体验中心一键分享";
/**
* 登陆超时通知
*/
NSString *const LOGINTIMEOUT = @"logintimeout";
/**
* 更新版本通知
*/
NSString *const UPLOADVERSION = @"uploadVersion";
/**
* 网络断开
*/
NSString *const NETWORK = @"网络已断开";
/**
* 搜索框输入通知
*/
NSString *const SEARCHSTRING = @"SEARCHINPUTSTRING";
/**
* 搜索框返回根视图
*/
NSString *const POPROOTCONTROLLER = @"POPROOTCONTROLLER";
/**
* 储存本地的搜索历史文件名
*/
NSString *const SEARCHHISTORY = @"searchhistory";
/**
* 保存用户名key
*/
NSString *const USERNAME = @"username";
/**
* 保存密码key
*/
NSString *const PASSWORD = @"password";
/**
* 网络请求返回个数
*/
NSInteger const KROWS = 12;
/**
保存账号密码serviceName
*/
NSString *const SERVICENAME = @"Lighting";
/**
保存账号key
*/
NSString *const SAVEACCOUNT = @"account";
/**
保存密码key
*/
NSString *const SAVEPASSWORD = @"passWord";
......@@ -14,15 +14,6 @@
@implementation CustomButton
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/
- (instancetype)initWithFrame:(CGRect)frame
{
......@@ -47,7 +38,7 @@
break;
}
}
if (_instructionsNumber) {
if (_instructionsNumber > 0) {
instructionsLabe *labe = [[instructionsLabe alloc]initWithFrame:CGRectMake(WIDTH-25, 0, 13, 13)];
labe.instructionsNumber = _instructionsNumber;
[self addSubview:labe];
......
......@@ -8,96 +8,34 @@
#ifndef PrefixHeader_pch
#define PrefixHeader_pch
#import "MBProgressHUD.h"
#import "MJRefresh.h"
#import "MMDrawerController.h"
#import "RightViewController.h"
#import "IQKeyboardManager.h"
#import "AFNetworking.h"
#import "NetworkRequestClassManager.h"
#import "NSArray+Objectwithindex.h"
#import "ShoppingViewController.h"
#import "ClientViewController.h"
#import "Masonry.h"
#import "PopoverViewController.h"
#import "opple_objc_json_client.h"
#import "HENLENSONG.h"
#import "JSONModel.h"
#import "Shoppersmanager.h"
#import "UIImageView+WebCache.h"
#import "Customermanager.h"
#import "AppDelegate.h"
#import "PromptinformationView.h"
#import "BaseViewController.h"
#import "MjRefreshHeaderCustom.h"
#import "UIScrollView+EmptyDataSet.h"
#import "NSDictionary+category.h"
#import "CYConstManager.h"
#import "UINavigationController+FDFullscreenPopGesture.h"
#import "UIView+cornerRadius.h"
#import "XLPlainFlowLayout.h"
#import "MDScratchImageView.h"
#import "WYPopoverController.h"
#import "CustomBorderLabel.h"
#import "PNCircleChart.h"
#import "CustomStudyEntity.h"
#import "XBLoadingView.h"
#import "CustomTOStudyTopicOptionEntity.h"
#import "CountDownLabel.h"
#import "CustomTOStudyTopicEntity.h"
#import "CustomTOPassLevelTopicEntity.h"
#import "CustomTOPassLevelTopicOptionEntity.h"
#import "CustomImageBackView.h"
#import "NSDate+Formatting.h"
#import "CustomTOForumTopicEntity.h"
#import "CustomTOForumReplyEntity.h"
#import "SAMKeychain.h"
#import "PNCircleChart.h"
#import "NSString+Category.h"
#import "CustomTOAfficheEntity.h"
#import "ICRPlaceholderTextView.h"
#import "YXAlertController.h"
//判断请求是否成功
#define RESULT(response) [returnValue[@"code"] isEqualToNumber:@0]
//网络请求
#define HTTP [NetworkRequestClassManager manager]
//本地存储
#define UserDefault [NSUserDefaults standardUserDefaults]
//通知
#define Notification [NSNotificationCenter defaultCenter]
/**
保存账号密码serviceName
*/
#define SERVICENAME @"Lighting"
/**
保存账号key
* 判断请求是否成功
*/
#define SAVEACCOUNT @"account"
#define RESULT(response) [returnValue[@"code"] isEqualToNumber:@0]
/**
保存密码key
* 网络请求
*/
#define SAVEPASSWORD @"passWord"
#define HTTP [NetworkRequestClassManager manager]
/**
* AppDelegate代理
* 本地存储
*/
#define SHARED_APPDELEGATE ((AppDelegate *)([UIApplication sharedApplication].delegate))
#define UserDefault [NSUserDefaults standardUserDefaults]
/**
* 导航栏高度
* 通知
*/
#define NavigationHeight 64
#define Notification [NSNotificationCenter defaultCenter]
/**
* 默认显示头像
* AppDelegate代理
*/
#define ReplaceImage [UIImage imageNamed:@"矢量智能对象"]
#define SHARED_APPDELEGATE ((AppDelegate *)([UIApplication sharedApplication].delegate))
/**
* 屏幕的物理高度
......@@ -114,16 +52,14 @@
*/
#define TCImage(imageName) [UIImage imageNamed:[NSString stringWithFormat:@"%@",imageName]]
/**
* 获取RGB颜色
*/
#define kTCColor(r, g, b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0]
/**
* 右侧菜单宽度
*/
#define RightWidth 200
/**
* 导航栏高度
*/
#define NavigationHeight 64
#define ZERO 0
#define ONE 1
......@@ -158,115 +94,32 @@
*/
#define kSelectedCornerRadius 25
/**
* 服务器开发地址
*///http://139.196.195.30:8090
#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.opple.com/opple-web/app%@",URL]
/**
* 搜索框输入通知
* RGB颜色
*/
#define SEARCHSTRING @"SEARCHINPUTSTRING"
/**
* 搜索框返回根视图
*/
#define POPROOTCONTROLLER @"POPROOTCONTROLLER"
#define RGB(A, B, C, D) [UIColor colorWithRed:(A)/255.0 green:(B)/255.0 blue:(C)/255.0 alpha:(D)]
/**
* 储存本地的搜索历史文件名
* 无数据友好图片
*/
#define SEARCHHISTORY @"searchhistory"
#define kNoDataImage TCImage(@"圆角矩形-3-副本")
/**
* 默认图
*/
#define REPLACEIMAGE [UIImage imageNamed:@"bg-img 副本"]
/**
* 保存用户名key
*/
#define USERNAME @"username"
/**
* 保存密码key
*/
#define PASSWORD @"password"
/**
* 网络请求返回个数
*/
#define KROWS 12
#define RGB(A, B, C, D) [UIColor colorWithRed:(A)/255.0 green:(B)/255.0 blue:(C)/255.0 alpha:(D)]
/**
* 一键分享显示文本
*/
#define ShareTitle @"欧立方体验中心一键分享"
/**
* 无数据友好图片
*/
#define kNoDataImage TCImage(@"圆角矩形-3-副本")
/**
* 登陆超时通知
* 默认显示头像
*/
#define LOGINTIMEOUT @"logintimeout"
#define ReplaceImage [UIImage imageNamed:@"矢量智能对象"]
/**
* 弱引用
*/
#define WS(weakSelf) __weak __typeof(&*self)weakSelf = self
/**
* 更新版本通知
*/
#define UPLOADVERSION @"uploadVersion"
/**
* 网络断开
*/
#define NETWORK @"网络已断开"
/**
闯关结果
- NotThrough: 未通过
- Through: 已通过
- Audit: 待审核
*/
typedef NS_ENUM(NSInteger,RESULT_STATE){
NotThrough = 0,
Through,
Audit
};
/**
点赞或评论
- Comment: 评论
- Praise: 点赞
*/
typedef NS_ENUM(NSInteger,COMMENT_PRAISE) {
Comment = 0,
Praise
};
......
......@@ -25,21 +25,21 @@
self.sectionButton = [UIButton buttonWithType:UIButtonTypeCustom];
self.sectionButton.frame = CGRectMake(0, 0, 100, 55);
[self.sectionButton setTitleColor:kTCColor(170, 170, 170) forState:UIControlStateNormal];
[self.sectionButton setTitleColor:RGB(170, 170, 170,1) forState:UIControlStateNormal];
self.sectionButton.titleLabel.font = [UIFont systemFontOfSize:13];
[self.sectionButton setTitleColor:kMainBlueColor forState:UIControlStateSelected];
[self.sectionButton setBackgroundColor:kTCColor(255, 255, 255)];
[self.sectionButton setBackgroundColor:RGB(255, 255, 255,1)];
[self addSubview:self.sectionButton];
//横线
UIView *lineView = [[UIView alloc]initWithFrame:CGRectMake(0, 54, 100, 1)];
lineView.backgroundColor = kTCColor(221, 221, 221);
lineView.backgroundColor = RGB(221, 221, 221,1);
[self addSubview:lineView];
//横线
UIView *newLineView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 100, 1)];
newLineView.backgroundColor = kTCColor(221, 221, 221);
newLineView.backgroundColor = RGB(221, 221, 221,1);
[self addSubview:newLineView];
}
return self;
......
......@@ -561,7 +561,7 @@
{
[self CancelTableviewSectionState];
ScreeningTableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
cell.screeningLabe.backgroundColor = kTCColor(221, 221, 221);
cell.screeningLabe.backgroundColor = RGB(221, 221, 221,1);
cell.screeningLabe.textColor = kMainBlueColor;
GoodsCategoryModel *model = [[self.productScreeningDatasArray objectAtIndex_opple:self.rightSelectedIndex] objectAtIndex_opple:indexPath.section];
self.goodsModel.categoryEquals = [[model.children objectAtIndex_opple:indexPath.row] fid];
......@@ -608,7 +608,7 @@
[self CancelTableviewSectionState];
if (self.rightSelectedIndex !=2 ) {
button.selected = YES;
button.backgroundColor = kTCColor(221, 221, 221);
button.backgroundColor = RGB(221, 221, 221,1);
}
[self emptyModel];
switch (self.rightSelectedIndex) {
......
......@@ -1922,6 +1922,12 @@ extern NSString * const GRADEMETHOD_MANUL;
*
*/
@property (nonatomic, copy) NSString *updateDate;
/**
* (no documentation provided)
*
*
*/
@property (nonatomic, copy) NSString *posterPicture;
/**
* 方法: 取得所属部门
*
......
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