Commit f3faef41 by xuning

个人中心重构

parent b652a1df
......@@ -9,6 +9,7 @@
/* Begin PBXBuildFile section */
79267A9C2DBA8E0F000D2180 /* WMDragView.m in Sources */ = {isa = PBXBuildFile; fileRef = 79267A9A2DBA8E0F000D2180 /* WMDragView.m */; };
79267AA02DBBCEE2000D2180 /* XVOrderSearchView.m in Sources */ = {isa = PBXBuildFile; fileRef = 79267A9F2DBBCEE2000D2180 /* XVOrderSearchView.m */; };
79267AA32DBD1BFF000D2180 /* XVPersonalHeaderItemView.m in Sources */ = {isa = PBXBuildFile; fileRef = 79267AA22DBD1BFF000D2180 /* XVPersonalHeaderItemView.m */; };
798136512DB7AD84004BC05B /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 798136502DB7AD84004BC05B /* CoreGraphics.framework */; };
798136532DB7AD90004BC05B /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 798136522DB7AD90004BC05B /* CoreLocation.framework */; };
798136572DB7ADB6004BC05B /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 798136562DB7ADB6004BC05B /* OpenGLES.framework */; };
......@@ -74,6 +75,8 @@
79267A9A2DBA8E0F000D2180 /* WMDragView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WMDragView.m; sourceTree = "<group>"; };
79267A9E2DBBCEE2000D2180 /* XVOrderSearchView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XVOrderSearchView.h; sourceTree = "<group>"; };
79267A9F2DBBCEE2000D2180 /* XVOrderSearchView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XVOrderSearchView.m; sourceTree = "<group>"; };
79267AA12DBD1BFF000D2180 /* XVPersonalHeaderItemView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XVPersonalHeaderItemView.h; sourceTree = "<group>"; };
79267AA22DBD1BFF000D2180 /* XVPersonalHeaderItemView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XVPersonalHeaderItemView.m; sourceTree = "<group>"; };
798136262DB7AD09004BC05B /* BaiduMapAPI_Map.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = BaiduMapAPI_Map.framework; path = "Pods/BaiduNaviKit-All/BaiduNaviKit-All/MapSDK/BaiduMapAPI_Map.framework"; sourceTree = "<group>"; };
798136272DB7AD09004BC05B /* BaiduMapAPI_WalkNavi.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = BaiduMapAPI_WalkNavi.framework; path = "Pods/BaiduNaviKit-All/BaiduNaviKit-All/MapSDK/BaiduMapAPI_WalkNavi.framework"; sourceTree = "<group>"; };
798136282DB7AD09004BC05B /* BaiduMapAPI_Base.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = BaiduMapAPI_Base.framework; path = "Pods/BaiduNaviKit-All/BaiduNaviKit-All/MapSDK/BaiduMapAPI_Base.framework"; sourceTree = "<group>"; };
......@@ -406,6 +409,8 @@
79DC8B832B8CD5DF00DBD8EA /* XVOrderSettiingTitleView.m */,
79DC8B852B8CD5F000DBD8EA /* XVOrderSettingView.h */,
79DC8B862B8CD5F000DBD8EA /* XVOrderSettingView.m */,
79267AA12DBD1BFF000D2180 /* XVPersonalHeaderItemView.h */,
79267AA22DBD1BFF000D2180 /* XVPersonalHeaderItemView.m */,
);
path = View;
sourceTree = "<group>";
......@@ -748,6 +753,7 @@
7981EAF02B6FC07800F357E7 /* XVCategoryTitleCellModel.m in Sources */,
799DF0F82B6BDA1400680907 /* NSString+Unicode.m in Sources */,
7981EAFF2B712CC700F357E7 /* HBLockSliderView.m in Sources */,
79267AA32DBD1BFF000D2180 /* XVPersonalHeaderItemView.m in Sources */,
7981EAF92B71205A00F357E7 /* XVJobStatusToolView.m in Sources */,
799DF0D72B6BD8B100680907 /* main.m in Sources */,
79DC8B902B8DABF900DBD8EA /* XVNewOrderAlter.m in Sources */,
......
......@@ -7,7 +7,7 @@
<key>fastservice.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>18</integer>
<integer>19</integer>
</dict>
</dict>
</dict>
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "iconPark-checklist@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "iconPark-clipboard@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "iconPark-mark@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "iconPark-ranking@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "stLine-slider-l@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "ze-pending-payment@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
......@@ -5,11 +5,11 @@
"scale" : "1x"
},
{
"filename" : "iconPark-camera-five@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "if-simple-right 1 Copy 3@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
{
{
{
"images" : [
{
"filename" : "tongpai3x.png",
"idiom" : "universal",
"scale" : "1x"
},
......@@ -10,6 +9,7 @@
"scale" : "2x"
},
{
"filename" : "tongpai3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
{
{
{
"images" : [
{
"filename" : "qishi-head.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "qishi-head.png",
"idiom" : "universal",
"scale" : "2x"
},
......
......@@ -148,7 +148,8 @@
WS(weakSelf);
[_barView.centerButton addBlockForControlEvents:UIControlEventTouchUpInside block:^(id _Nonnull sender) {
XVPersonalViewController *vc = [[XVPersonalViewController alloc]init];
[weakSelf cw_showDrawerViewController:vc animationType:CWDrawerAnimationTypeMask configuration:nil];
CWLateralSlideConfiguration *config = [CWLateralSlideConfiguration configurationWithDistance:kCWSCREENWIDTH * 0.8 maskAlpha:0.4 scaleY:1.0 direction:CWDrawerTransitionFromLeft backImage:nil];
[weakSelf cw_showDrawerViewController:vc animationType:CWDrawerAnimationTypeMask configuration:config];
}];
}
......
......@@ -42,15 +42,16 @@
- (void)viewDidLoad {
[super viewDidLoad];
self.navigationItem.title = @"接单设置";
[self setupUI];
}
- (void)setupUI {
XVDispatchOrderAlter *view = [[XVDispatchOrderAlter alloc]init];
[self.view addSubview:view];
[view mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.mas_equalTo(self.view);
}];
return;
// XVDispatchOrderAlter *view = [[XVDispatchOrderAlter alloc]init];
// [self.view addSubview:view];
// [view mas_makeConstraints:^(MASConstraintMaker *make) {
// make.left.right.top.mas_equalTo(self.view);
// }];
// return;
[self.view addSubview:self.scrollView];
[self.scrollView addSubview:self.title1View];
......@@ -225,7 +226,7 @@
- (XVOrderSettiingTitleView *)title2View {
if(_title2View == nil) {
_title2View = [[XVOrderSettiingTitleView alloc]initWithTitle:@"抢单设置"];
_title2View = [[XVOrderSettiingTitleView alloc]initWithTitle:@"接单偏好"];
}
return _title2View;
}
......@@ -248,7 +249,7 @@
}
- (XVOrderSettiingTitleView *)title3View {
if(_title3View == nil) {
_title3View = [[XVOrderSettiingTitleView alloc]initWithTitle:@"抢单设置"];
_title3View = [[XVOrderSettiingTitleView alloc]initWithTitle:@"检测工具"];
}
return _title3View;
}
......@@ -268,7 +269,7 @@
_orderTestButton.imageIsRound = NO;
_orderTestButton.imageViewMaxSize = CGSizeMake(24, 24);
_orderTestButton.imageTextSpace = 3;
[_orderTestButton setImage:IMG(@"iconPark-checklist") forState:(UIControlStateNormal)];
[_orderTestButton setImage:IMG(@"ceshi") forState:(UIControlStateNormal)];
[_orderTestButton setTitle:@"接单检测" forState:UIControlStateNormal];
[_orderTestButton setTitleColor:F_606060_COLOR forState:UIControlStateNormal];
_orderTestButton.titleLabel.font = [UIFont systemFontOfSize:12];
......@@ -281,7 +282,7 @@
_pushTestButton.imageIsRound = NO;
_pushTestButton.imageViewMaxSize = CGSizeMake(24, 24);
_pushTestButton.imageTextSpace = 3;
[_pushTestButton setImage:IMG(@"iconPark-camera-five") forState:(UIControlStateNormal)];
[_pushTestButton setImage:IMG(@"ceshi") forState:(UIControlStateNormal)];
[_pushTestButton setTitle:@"推送测试" forState:UIControlStateNormal];
[_pushTestButton setTitleColor:F_606060_COLOR forState:UIControlStateNormal];
_pushTestButton.titleLabel.font = [UIFont systemFontOfSize:12];
......
......@@ -10,6 +10,9 @@
#import "XVPersonalViewCell.h"
#import "XVPersonalHeaderView.h"
#import "XVPersonalFooterView.h"
#import <SDCycleScrollView/SDCycleScrollView.h>
#import "XVVerticalButton.h"
@interface XVPersonalViewController ()
......@@ -17,15 +20,43 @@
@property (nonatomic, strong) UILabel *nameLabel;
@property (nonatomic, strong) UIImageView *levelImageView;
@property (nonatomic, strong) UIButton *settingButton;
@property (nonatomic, strong) UILabel *phoneLabel;
@property (nonatomic, strong) UIButton *eyeButton;
// 健康证
@property (nonatomic, strong) UIButton *healthButton;
@property (nonatomic, strong) UIButton *idButton;
@property (nonatomic, strong) UIScrollView *scrollView;
@property (nonatomic, strong) XVPersonalHeaderView *headerView;
@property (nonatomic, strong) XVPersonalFooterView *footerView;
@property (nonatomic, strong) SDCycleScrollView *cycleScrollView;
@property (nonatomic, strong) UIView *jobView;
@property (nonatomic, strong) UILabel *jobLabel;
@property (nonatomic, strong) NSArray *dataArray;
@property (nonatomic, strong) UITableView *tableView;
@property (nonatomic, strong) UIView *moreView;
@property (nonatomic, strong) UILabel *moreLabel;
@property (nonatomic, strong) NSArray *moreArray;
@property (nonatomic,assign) CGFloat w;
@property (nonatomic, strong) UIButton *serviceButton;
@end
......@@ -33,7 +64,7 @@
- (void)viewDidLoad {
[super viewDidLoad];
self.w = SCREEN_WIDTH * 0.8 - 12;
[self setupUI];
}
- (void)setupUI {
......@@ -42,56 +73,168 @@
[self.view addSubview:self.userImageView];
[self.userImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.view).mas_offset(KSTATUSBAR_HEIGHT + 15);
make.left.mas_equalTo(self.view).mas_offset(12);
make.size.mas_equalTo(CGSizeMake(62, 62));
make.left.mas_equalTo(self.view).mas_offset(13);
make.size.mas_equalTo(CGSizeMake(66, 66));
}];
[self.view addSubview:self.nameLabel];
[self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.userImageView.mas_right).mas_offset(26);
make.left.mas_equalTo(self.userImageView.mas_right).mas_offset(13);
make.top.mas_equalTo(self.userImageView);
}];
[self.view addSubview:self.levelImageView];
[self.levelImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(self.nameLabel);
make.size.mas_equalTo(CGSizeMake(84, 24));
make.left.mas_equalTo(self.nameLabel.mas_right).mas_offset(4);
}];
[self.view addSubview:self.settingButton];
[self.settingButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(36, 36));
make.centerY.mas_equalTo(self.nameLabel);
make.right.mas_equalTo(self.view).mas_offset(-15);
}];
self.settingButton.hitWidthScale = 2;
[self.view addSubview:self.phoneLabel];
[self.phoneLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.userImageView.mas_right).mas_offset(26);
make.left.mas_equalTo(self.userImageView.mas_right).mas_offset(13);
make.top.mas_equalTo(self.nameLabel.mas_bottom).mas_offset(7);
}];
[self.view addSubview:self.tableView];
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.mas_equalTo(self.view);
make.top.mas_equalTo(self.phoneLabel.mas_bottom).mas_offset(13);
make.bottom.mas_equalTo(self.view.mas_safeAreaLayoutGuideBottom).mas_offset(0);
[self.view addSubview:self.eyeButton];
[self.eyeButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(17, 17));
make.centerY.mas_equalTo(self.phoneLabel);
make.left.mas_equalTo(self.phoneLabel.mas_right).mas_offset(4);
}];
}
[self.view addSubview:self.healthButton];
[self.healthButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(20, 20));
make.centerY.mas_equalTo(self.phoneLabel);
make.left.mas_equalTo(self.eyeButton.mas_right).mas_offset(4);
}];
[self.view addSubview:self.idButton];
[self.idButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(20, 20));
make.centerY.mas_equalTo(self.phoneLabel);
make.left.mas_equalTo(self.healthButton.mas_right).mas_offset(4);
}];
#pragma mark - TableViewDelegate & Datasource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
return self.dataArray.count;
}
[self.view addSubview:self.serviceButton];
[self.serviceButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.view).mas_offset(13);
make.right.mas_equalTo(self.view).mas_offset(-13);
make.height.mas_equalTo(44);
make.bottom.mas_equalTo(self.view).mas_offset(-KiPhoneXSafeAreaDValue - 18);
}];
kViewBorderRadius(self.serviceButton, 4, 0, [UIColor whiteColor]);
[self.view addSubview:self.scrollView];
[self.scrollView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.mas_equalTo(self.view);
make.top.mas_equalTo(self.userImageView.mas_bottom).mas_offset(19);
make.bottom.mas_equalTo(self.serviceButton.mas_top).mas_offset(-5);
}];
[self.scrollView addSubview:self.headerView];
- (UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
kViewBorderRadius(self.headerView, 12, 0, [UIColor whiteColor]);
XVPersonalViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"XVPersonalViewCell"];
cell.item = self.dataArray[indexPath.row];
return cell;
}
[self.scrollView addSubview:self.cycleScrollView];
kViewBorderRadius(self.cycleScrollView, 12, 0, [UIColor whiteColor]);
[self.scrollView addSubview:self.jobView];
[self.jobView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.view).mas_offset(6);
make.right.mas_equalTo(self.view).mas_offset(-6);
make.top.mas_equalTo(self.cycleScrollView.mas_bottom).mas_offset(9);
make.height.mas_equalTo(190);
}];
kViewBorderRadius(self.jobView, 12, 0, [UIColor whiteColor]);
[self.jobView addSubview:self.jobLabel];
self.jobLabel.frame = CGRectMake(7, 14, 70, 17);
[self.scrollView addSubview:self.moreView];
[self.moreView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.view).mas_offset(6);
make.right.mas_equalTo(self.view).mas_offset(-6);
make.top.mas_equalTo(self.jobView.mas_bottom).mas_offset(9);
make.height.mas_equalTo(114);
make.bottom.mas_equalTo(self.scrollView);
}];
kViewBorderRadius(self.moreView, 12, 0, [UIColor whiteColor]);
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
[self.moreView addSubview:self.moreLabel];
self.moreLabel.frame = CGRectMake(7, 14, 70, 17);
for (int i=0; i<self.dataArray.count; i++) {
NSArray *array = self.dataArray[i];
for (int j = 0; j< array.count; j++) {
CGFloat x = self.w / 4 * j;
CGFloat y = i * 76 + (14+17);
NSDictionary *dict = array[j];
XVVerticalButton *button = [[XVVerticalButton alloc]initWithFrame:CGRectMake(x, y, self.w / 4, 76)];
button.imageIsRound = NO;
button.imageViewMaxSize = CGSizeMake(24, 24);
button.imageTextSpace = 11;
[button setImage:IMG(dict[@"imageName"]) forState:(UIControlStateNormal)];
[button setTitle:dict[@"title"] forState:UIControlStateNormal];
[button setTitleColor:F_606060_COLOR forState:UIControlStateNormal];
button.titleLabel.font = [UIFont systemFontOfSize:12];
[self.jobView addSubview:button];
}
}
for (int i=0; i<self.moreArray.count; i++) {
NSArray *array = self.dataArray[i];
for (int j = 0; j< array.count; j++) {
CGFloat x = self.w / 4 * j;
CGFloat y = i * 76 + (14+17);
NSDictionary *dict = array[j];
XVVerticalButton *button = [[XVVerticalButton alloc]initWithFrame:CGRectMake(x, y, self.w / 4, 76)];
button.imageIsRound = NO;
button.imageViewMaxSize = CGSizeMake(24, 24);
button.imageTextSpace = 11;
[button setImage:IMG(dict[@"imageName"]) forState:(UIControlStateNormal)];
[button setTitle:dict[@"title"] forState:UIControlStateNormal];
[button setTitleColor:F_606060_COLOR forState:UIControlStateNormal];
button.titleLabel.font = [UIFont systemFontOfSize:12];
[self.moreView addSubview:button];
}
}
}
- (BOOL)fd_prefersNavigationBarHidden {
return NO;
}
- (UIImageView *)userImageView {
if(_userImageView == nil) {
_userImageView = [[UIImageView alloc]initWithImageName:@"fas fa-user-circle"];
_userImageView = [[UIImageView alloc]initWithImageName:@"qishi-head"];
}
return _userImageView;
}
......@@ -109,51 +252,131 @@
}
return _phoneLabel;
}
- (UIButton *)eyeButton {
if (_eyeButton == nil) {
_eyeButton = [[UIButton alloc]initWithNormalImageName:@"closeeyes" selectedImgName:@"openeyes"];
}
return _eyeButton;
}
- (UIButton *)healthButton {
if (_healthButton == nil) {
_healthButton = [[UIButton alloc]initWithNormalImageName:@"fa5-address-card-fas 1 Copy 1" selectedImgName:@"fa5-address-card-fas 1"];
}
return _healthButton;
}
- (UIButton *)idButton {
if (_idButton == nil) {
_idButton = [[UIButton alloc]initWithNormalImageName:@"riFill-shield-user-fill 1 Copy 1" selectedImgName:@"riFill-shield-user-fill 1"];
}
return _idButton;
}
- (UIImageView *)levelImageView {
if (_levelImageView == nil) {
_levelImageView = [[UIImageView alloc]initWithImageName:@"tongpai3x"];
}
return _levelImageView;
}
- (UIButton *)settingButton {
if (_settingButton == nil) {
_settingButton = [[UIButton alloc]initWithNormalImageName:@"riLine-settings-line 1" selectedImgName:@"riLine-settings-line 1"];
}
return _settingButton;
}
- (UIScrollView *)scrollView {
if(_scrollView == nil) {
_scrollView = [[UIScrollView alloc]init];
_scrollView.backgroundColor = DEFAULT_BACKGROUND_COLOR;
_scrollView.alwaysBounceVertical = YES;
}
return _scrollView;
}
- (XVPersonalHeaderView *)headerView {
if(_headerView == nil) {
_headerView = [[XVPersonalHeaderView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH * 0.75, 124)];
_headerView = [[XVPersonalHeaderView alloc]initWithFrame:CGRectMake(6, 0, self.w, 99)];
_headerView.backgroundColor = [UIColor whiteColor];
}
return _headerView;
}
- (XVPersonalFooterView *)footerView {
if(_footerView == nil) {
_footerView = [[XVPersonalFooterView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH * 0.75, 124)];
_footerView.backgroundColor = [UIColor whiteColor];
- (SDCycleScrollView *)cycleScrollView {
if (_cycleScrollView == nil) {
_cycleScrollView = [[SDCycleScrollView alloc]initWithFrame:CGRectMake(6, 99+9, self.w, 74)];
}
return _footerView;
return _cycleScrollView;
}
- (NSArray *)dataArray {
if(_dataArray == nil) {
_dataArray = @[@{@"title":@"我的账户",@"imageName":@"ze-pending-payment",@"className":@""},
@{@"title":@"我的保险",@"imageName":@"antOutline-insurance",@"className":@""},
@{@"title":@"骑手排行榜",@"imageName":@"iconPark-ranking",@"className":@""},
@{@"title":@"接单设置",@"imageName":@"stLine-slider-l",@"className":@""},
@{@"title":@"活动中心",@"imageName":@"iconPark-mark",@"className":@""},
@{@"title":@"服务宝典",@"imageName":@"antOutline-read",@"className":@""},
@{@"title":@"通知公告",@"imageName":@"iconPark-clipboard",@"className":@""},];
- (UIView *)jobView {
if (_jobView == nil) {
_jobView = [[UIView alloc]init];
_jobView.backgroundColor = [UIColor whiteColor];
}
return _dataArray;
return _jobView;
}
- (UITableView *)tableView {
if (_tableView == nil) {
_tableView = [[UITableView alloc]initWithFrame:CGRectZero style:UITableViewStyleGrouped];
_tableView.delegate = self;
_tableView.dataSource = self;
- (UILabel *)jobLabel {
if (_jobLabel == nil) {
_jobLabel = [[UILabel alloc]initWithText:@"工作必备" textColor:F_101010_COLOR textAlignment:(NSTextAlignmentLeft) fontSize:12];
}
return _jobLabel;
}
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
[_tableView registerClass:[XVPersonalViewCell class] forCellReuseIdentifier:@"XVPersonalViewCell"];
_tableView.backgroundColor = DEFAULT_BACKGROUND_COLOR;
_tableView.rowHeight = 64;
_tableView.tableHeaderView = self.headerView;
_tableView.tableFooterView = self.footerView;
- (UIView *)moreView {
if (_moreView == nil) {
_moreView = [[UIView alloc]init];
_moreView.backgroundColor = [UIColor whiteColor];
}
return _moreView;
}
- (UILabel *)moreLabel {
if (_moreLabel == nil) {
_moreLabel = [[UILabel alloc]initWithText:@"更多功能" textColor:F_101010_COLOR textAlignment:(NSTextAlignmentLeft) fontSize:12];
}
return _moreLabel;
}
- (NSArray *)dataArray {
if(_dataArray == nil) {
_dataArray = @[
@[@{@"title":@"我的保障",@"imageName":@"antOutline-insurance J9bTxqJ Copy 1",@"className":@""},
@{@"title":@"服务宝典",@"imageName":@"antOutline-read wT8SVT4",@"className":@""},
@{@"title":@"接单排行",@"imageName":@"iconPark-ranking m7fyuQM",@"className":@""},
@{@"title":@"福利任务",@"imageName":@"iconPark-mark QpyYz9F",@"className":@""},],
@[
@{@"title":@"奖惩规则",@"imageName":@"iconPark-editor 1",@"className":@""},
@{@"title":@"常见问题",@"imageName":@"stLine-write-l 1",@"className":@""},
@{@"title":@"培训教程",@"imageName":@"antOutline-usergroup-delete 1",@"className":@""},
@{@"title":@"邀请有礼",@"imageName":@"antOutline-user-add 1",@"className":@""}]
];
}
return _tableView;
return _dataArray;
}
- (NSArray *)moreArray {
if (_moreArray == nil) {
_moreArray = @[
@[@{@"title":@"推送测试",@"imageName":@"ceshi",@"className":@""},
@{@"title":@"录单",@"imageName":@"图标 19",@"className":@""},
@{@"title":@"服务评价",@"imageName":@"riLine-star-line 1",@"className":@""},
]
];
}
return _moreArray;
}
- (UIButton *)serviceButton {
if (_serviceButton == nil) {
_serviceButton = [[UIButton alloc]initWithTitle:@"联系客服" fontSize:14 titleColor:[UIColor whiteColor] bgColor:kHexRGB(0xA4ADB3)];
}
return _serviceButton;
}
@end
//
// XVPersonalHeaderItemView.h
// fastservice
//
// Created by xuning on 4/26/25.
// Copyright © 2025 FastService. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface XVPersonalHeaderItemView : UIView
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UILabel *numberLabel;
@property (nonatomic, strong) UIButton *button;
@end
NS_ASSUME_NONNULL_END
//
// XVPersonalHeaderItemView.m
// fastservice
//
// Created by xuning on 4/26/25.
// Copyright © 2025 FastService. All rights reserved.
//
#import "XVPersonalHeaderItemView.h"
@interface XVPersonalHeaderItemView()
@end
@implementation XVPersonalHeaderItemView
- (instancetype)initWithFrame:(CGRect)frame {
if (self = [super initWithFrame:frame]) {
[self setupUI];
}
return self;
}
- (void)setupUI {
[self addSubview:self.titleLabel];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self).mas_offset(16);
make.centerX.mas_equalTo(self);
}];
[self addSubview:self.numberLabel];
[self.numberLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self);
make.top.mas_equalTo(self.titleLabel.mas_bottom).mas_offset(6);
}];
[self addSubview:self.button];
[self.button mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self);
make.bottom.mas_equalTo(self).mas_offset(-10);
}];
[self.button setForceRightToLeft:1 forState:(UIControlStateNormal)];
}
- (UILabel *)titleLabel {
if(_titleLabel == nil) {
_titleLabel = [[UILabel alloc]initWithText:@"标题" textColor:F_101010_COLOR textAlignment:(NSTextAlignmentCenter) fontSize:12];
}
return _titleLabel;
}
- (UILabel *)numberLabel {
if(_numberLabel == nil) {
_numberLabel = [[UILabel alloc]initWithText:@"0" textColor:F_101010_COLOR textAlignment:(NSTextAlignmentCenter) fontSize:20];
_numberLabel.font = [UIFont boldSystemFontOfSize:20];
}
return _numberLabel;
}
- (UIButton *)button {
if (_button == nil) {
_button = [[UIButton alloc]initWithTitle:@"" fontSize:12 titleColor:F_101010_COLOR normalImageName:@"if-simple-right" selectedImgName:@"if-simple-right" backgroundColor:[UIColor whiteColor]];
}
return _button;
}
@end
......@@ -7,26 +7,27 @@
//
#import "XVPersonalHeaderView.h"
#import "XVPersonalHeaderItemView.h"
@interface XVPersonalHeaderView()
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) XVPersonalHeaderItemView *orderView;
@property (nonatomic, strong) UIButton *moreButton;
@property (nonatomic, strong) XVPersonalHeaderItemView *moneyView;
@property (nonatomic, strong) UILabel *orderTitleLabel;
@property (nonatomic, strong) UILabel *priceTitleLabel;
@property (nonatomic, strong) UILabel *orderLabel;
@property (nonatomic, strong) UILabel *priceLabel;
@property (nonatomic, strong) UIView *lineView;
@property (nonatomic, strong) XVPersonalHeaderItemView *scoreView;
@end
@implementation XVPersonalHeaderView
- (instancetype)init {
if (self = [super init]) {
[self setupUI];
}
return self;
}
- (instancetype)initWithFrame:(CGRect)frame {
if(self = [super initWithFrame:frame]) {
[self setupUI];
......@@ -35,102 +36,44 @@
}
- (void)setupUI {
[self addSubview:self.titleLabel];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self).mas_offset(12);
make.left.mas_equalTo(self).mas_offset(14);
}];
[self addSubview:self.moreButton];
[self.moreButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(self.titleLabel);
make.right.mas_equalTo(self).mas_offset(-18);
}];
[self addSubview:self.orderTitleLabel];
[self.orderTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self).mas_offset(-self.width / 4);
make.top.mas_equalTo(self.titleLabel.mas_bottom).mas_offset(17);
}];
[self addSubview:self.priceTitleLabel];
[self.priceTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self).mas_offset(self.width / 4);
make.top.mas_equalTo(self.titleLabel.mas_bottom).mas_offset(17);
}];
[self addSubview:self.orderLabel];
[self.orderLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self).mas_offset(-self.width / 4);
make.top.mas_equalTo(self.orderTitleLabel.mas_bottom).mas_offset(8);
}];
[self addSubview:self.priceLabel];
[self.priceLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self).mas_offset(self.width / 4);
make.top.mas_equalTo(self.orderTitleLabel.mas_bottom).mas_offset(8);
}];
[self addSubview:self.lineView];
[self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.bottom.mas_equalTo(self);
make.height.mas_equalTo(1);
}];
[self addSubview:self.orderView];
[self addSubview:self.moneyView];
[self addSubview:self.scoreView];
}
- (UILabel *)titleLabel {
if(_titleLabel == nil) {
_titleLabel = [[UILabel alloc]initWithText:@"接单统计" textColor:F_101010_COLOR textAlignment:(NSTextAlignmentLeft) fontSize:18];
}
return _titleLabel;
}
- (UIButton *)moreButton {
if(_moreButton == nil) {
_moreButton = [[UIButton alloc]initWithTitle:@"查看更多" fontSize:14 titleColor:F_101010_COLOR bgColor:[UIColor whiteColor]];
}
return _moreButton;
}
- (UILabel *)orderTitleLabel {
if(_orderTitleLabel == nil) {
_orderTitleLabel = [[UILabel alloc]initWithText:@"今日完成(单)" textColor:F_101010_COLOR textAlignment:(NSTextAlignmentCenter) fontSize:14];
- (XVPersonalHeaderItemView *)orderView {
if (_orderView == nil) {
_orderView = [[XVPersonalHeaderItemView alloc]initWithFrame:CGRectMake(0, 0, self.width/3, self.height)];
_orderView.titleLabel.text = @"今日完成(单)";
_orderView.numberLabel.text = @"0";
[_orderView.button setTitle:@"接单统计" forState:(UIControlStateNormal)];
}
return _orderTitleLabel;
return _orderView;
}
- (UILabel *)priceTitleLabel {
if(_priceTitleLabel == nil) {
_priceTitleLabel = [[UILabel alloc]initWithText:@"今日收入(元)" textColor:F_101010_COLOR textAlignment:(NSTextAlignmentCenter) fontSize:14];
- (XVPersonalHeaderItemView *)moneyView {
if (_moneyView == nil) {
_moneyView = [[XVPersonalHeaderItemView alloc]initWithFrame:CGRectMake(self.width/3, 0, self.width/3, self.height)];
_moneyView.titleLabel.text = @"今日收入(元)";
_moneyView.numberLabel.text = @"0";
[_moneyView.button setTitle:@"我的钱包" forState:(UIControlStateNormal)];
}
return _priceTitleLabel;
return _moneyView;
}
- (UILabel *)priceLabel {
if(_priceLabel == nil) {
_priceLabel = [[UILabel alloc]initWithText:@"0" textColor:F_101010_COLOR textAlignment:(NSTextAlignmentCenter) fontSize:26];
- (XVPersonalHeaderItemView *)scoreView {
if (_scoreView == nil) {
_scoreView = [[XVPersonalHeaderItemView alloc]initWithFrame:CGRectMake(self.width/3*2, 0, self.width/3, self.height)];
_scoreView.titleLabel.text = @"服务分";
_scoreView.numberLabel.text = @"0";
[_scoreView.button setTitle:@"接单排行" forState:(UIControlStateNormal)];
}
return _priceLabel;
return _scoreView;
}
- (UILabel *)orderLabel {
if(_orderLabel == nil) {
_orderLabel = [[UILabel alloc]initWithText:@"0" textColor:F_101010_COLOR textAlignment:(NSTextAlignmentCenter) fontSize:26];
}
return _orderLabel;
}
- (UIView *)lineView {
if(_lineView == nil) {
_lineView = [[UIView alloc]init];
_lineView.backgroundColor = DEFAULT_BACKGROUND_COLOR;
}
return _lineView;
}
@end
......@@ -21,6 +21,8 @@ target 'fastservice' do
pod 'MJExtension'
pod 'SDWebImage'
pod 'SAMKeychain'
pod 'SDCycleScrollView'
pod 'MBProgressHUD'
pod 'LEEAlert'
......
......@@ -38,6 +38,8 @@ PODS:
- MJExtension (3.4.1)
- MJRefresh (3.7.5)
- SAMKeychain (1.5.3)
- SDCycleScrollView (1.82):
- SDWebImage (>= 5.0.0)
- SDWebImage (5.15.2):
- SDWebImage/Core (= 5.15.2)
- SDWebImage/Core (5.15.2)
......@@ -61,6 +63,7 @@ DEPENDENCIES:
- MJExtension
- MJRefresh
- SAMKeychain
- SDCycleScrollView
- SDWebImage
- TXScrollLabelView
- YYKit
......@@ -81,6 +84,7 @@ SPEC REPOS:
- MJExtension
- MJRefresh
- SAMKeychain
- SDCycleScrollView
- SDWebImage
- TXScrollLabelView
- YYKit
......@@ -100,10 +104,11 @@ SPEC CHECKSUMS:
MJExtension: 21c5f6f8c4d5d8844b7ae8fbae08fed0b501f961
MJRefresh: fdf5e979eb406a0341468932d1dfc8b7f9fce961
SAMKeychain: 483e1c9f32984d50ca961e26818a534283b4cd5c
SDCycleScrollView: a0d74c3384caa72bdfc81470bdbc8c14b3e1fbcf
SDWebImage: 8ab87d4b3e5cc4927bd47f78db6ceb0b94442577
TXScrollLabelView: 0e1650caf61198bf5dc0938ea6493254aeb80f90
YYKit: 7cda43304a8dc3696c449041e2cb3107b4e236e7
PODFILE CHECKSUM: 1ccacdc7739911b47feda2664cf720c410e4a9fb
PODFILE CHECKSUM: c7adb24e1766e2a88ca10141694f2ba79f8557d6
COCOAPODS: 1.11.3
{
"buildCommand" : {
"command" : "build",
"skipDependencies" : false,
"style" : "buildOnly"
},
"configuredTargets" : [
],
"continueBuildingAfterErrors" : false,
"dependencyScope" : "workspace",
"enableIndexBuildArena" : false,
"hideShellScriptEnvironment" : false,
"parameters" : {
"action" : "build",
"overrides" : {
}
},
"qos" : "utility",
"schemeCommand" : "launch",
"showNonLoggedProgress" : true,
"useDryRun" : false,
"useImplicitDependencies" : false,
"useLegacyBuildLocations" : false,
"useParallelTargets" : true
}
\ No newline at end of file
{"client":{"name":"basic","version":0,"file-system":"device-agnostic","perform-ownership-analysis":"no"},"targets":{"":["<all>"]},"commands":{"<all>":{"tool":"phony","inputs":["<WorkspaceHeaderMapVFSFilesWritten>"],"outputs":["<all>"]},"P0:::Gate WorkspaceHeaderMapVFSFilesWritten":{"tool":"phony","inputs":[],"outputs":["<WorkspaceHeaderMapVFSFilesWritten>"]}}}
\ No newline at end of file
Target dependency graph (0 target)
\ No newline at end of file
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