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];
......
//
// 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