Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
FastService
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AppWaiBao
FastService
Commits
f70a0a84
Commit
f70a0a84
authored
Mar 01, 2024
by
xuning
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
百度地图配置
parent
3bf1397e
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
205 additions
and
23 deletions
+205
-23
project.pbxproj
FastService.xcodeproj/project.pbxproj
+6
-0
UserInterfaceState.xcuserstate
...serdata/xuning.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
AppDelegate+ThirdParty.h
FastService/AppDelegate+ThirdParty.h
+17
-0
AppDelegate+ThirdParty.m
FastService/AppDelegate+ThirdParty.m
+72
-0
AppDelegate.h
FastService/AppDelegate.h
+4
-1
AppDelegate.m
FastService/AppDelegate.m
+6
-15
Info.plist
FastService/Info.plist
+12
-0
XVNewOrderAlter.h
FastService/Main/View/OrderAlter/XVNewOrderAlter.h
+1
-1
XVNewOrderAlter.m
FastService/Main/View/OrderAlter/XVNewOrderAlter.m
+75
-6
PrefixHeader.pch
FastService/PrefixHeader.pch
+12
-0
No files found.
FastService.xcodeproj/project.pbxproj
View file @
f70a0a84
...
...
@@ -52,6 +52,7 @@
79DC8B902B8DABF900DBD8EA
/* XVNewOrderAlter.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
79DC8B8F2B8DABF800DBD8EA
/* XVNewOrderAlter.m */
;
};
79DC8B962B8DB05900DBD8EA
/* XVGetOrderAlterButtonView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
79DC8B952B8DB05900DBD8EA
/* XVGetOrderAlterButtonView.m */
;
};
79DC8B992B8DB07A00DBD8EA
/* XVGetOrderAlterSliderView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
79DC8B982B8DB07A00DBD8EA
/* XVGetOrderAlterSliderView.m */
;
};
79DC8B9D2B90813F00DBD8EA
/* AppDelegate+ThirdParty.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
79DC8B9C2B90813E00DBD8EA
/* AppDelegate+ThirdParty.m */
;
};
FA5E55D5A48FDC04BA4CCD08
/* Pods_fastservice.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
08D109EE60B32403F3655A70
/* Pods_fastservice.framework */
;
};
/* End PBXBuildFile section */
...
...
@@ -149,6 +150,8 @@
79DC8B952B8DB05900DBD8EA
/* XVGetOrderAlterButtonView.m */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
XVGetOrderAlterButtonView.m
;
sourceTree
=
"<group>"
;
};
79DC8B972B8DB07A00DBD8EA
/* XVGetOrderAlterSliderView.h */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
XVGetOrderAlterSliderView.h
;
sourceTree
=
"<group>"
;
};
79DC8B982B8DB07A00DBD8EA
/* XVGetOrderAlterSliderView.m */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
XVGetOrderAlterSliderView.m
;
sourceTree
=
"<group>"
;
};
79DC8B9B2B90813E00DBD8EA
/* AppDelegate+ThirdParty.h */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
"AppDelegate+ThirdParty.h"
;
sourceTree
=
"<group>"
;
};
79DC8B9C2B90813E00DBD8EA
/* AppDelegate+ThirdParty.m */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
"AppDelegate+ThirdParty.m"
;
sourceTree
=
"<group>"
;
};
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
...
...
@@ -314,6 +317,8 @@
children
=
(
799DF0C42B6BD8AF00680907
/* AppDelegate.h */
,
799DF0C52B6BD8AF00680907
/* AppDelegate.m */
,
79DC8B9B2B90813E00DBD8EA
/* AppDelegate+ThirdParty.h */
,
79DC8B9C2B90813E00DBD8EA
/* AppDelegate+ThirdParty.m */
,
799DF0D02B6BD8B100680907
/* Assets.xcassets */
,
799DF0D22B6BD8B100680907
/* LaunchScreen.storyboard */
,
799DF0D52B6BD8B100680907
/* Info.plist */
,
...
...
@@ -592,6 +597,7 @@
79DC8B962B8DB05900DBD8EA
/* XVGetOrderAlterButtonView.m in Sources */
,
79DC8B872B8CD5F000DBD8EA
/* XVOrderSettingView.m in Sources */
,
7981EAB72B6E669000F357E7
/* UIScrollView+XVAdd.m in Sources */
,
79DC8B9D2B90813F00DBD8EA
/* AppDelegate+ThirdParty.m in Sources */
,
7981EACF2B6F63CF00F357E7
/* XVMainJobViewController.m in Sources */
,
799DF1042B6D220300680907
/* XVBaseViewController.m in Sources */
,
79DC8B8A2B8D818000DBD8EA
/* XVVerticalButton.m in Sources */
,
...
...
FastService.xcworkspace/xcuserdata/xuning.xcuserdatad/UserInterfaceState.xcuserstate
View file @
f70a0a84
No preview for this file type
FastService/AppDelegate+ThirdParty.h
0 → 100644
View file @
f70a0a84
//
// AppDelegate+ThirdParty.h
// fastservice
//
// Created by xuning on 2/29/24.
// Copyright © 2024 FastService. All rights reserved.
//
#import "AppDelegate.h"
NS_ASSUME_NONNULL_BEGIN
@interface
AppDelegate
(
ThirdParty
)
-
(
void
)
thirdPartyConfig
:(
UIApplication
*
)
application
WithOption
:(
NSDictionary
*
)
launchOptions
;
@end
NS_ASSUME_NONNULL_END
FastService/AppDelegate+ThirdParty.m
0 → 100644
View file @
f70a0a84
//
// AppDelegate+ThirdParty.m
// fastservice
//
// Created by xuning on 2/29/24.
// Copyright © 2024 FastService. All rights reserved.
//
#import "AppDelegate+ThirdParty.h"
#import <IQKeyboardManager/IQKeyboardManager.h>
@interface
AppDelegate
(
ThirdParty
)
<
BMKGeneralDelegate
,
BMKLocationAuthDelegate
>
@end
@implementation
AppDelegate
(
ThirdParty
)
-
(
void
)
thirdPartyConfig
:(
UIApplication
*
)
application
WithOption
:(
NSDictionary
*
)
launchOptions
{
[
self
setupIQKeyboard
];
[
self
setupMapConfig
];
}
-
(
void
)
setupIQKeyboard
{
// 禁用IQKeyboardManager的自动工具条
[
IQKeyboardManager
sharedManager
].
enableAutoToolbar
=
NO
;
//键盘和上面的占位提示框之间又一点间距,会很难看
[[
IQKeyboardManager
sharedManager
]
setKeyboardDistanceFromTextField
:
0
];
[
IQKeyboardManager
sharedManager
].
shouldResignOnTouchOutside
=
YES
;
}
-
(
void
)
setupMapConfig
{
// 地图
_mapManager
=
[[
BMKMapManager
alloc
]
init
];
BOOL
ret
=
[
_mapManager
start
:
BAIDU_APPKEY
generalDelegate
:
self
];
if
(
!
ret
){
Log
(
@"哎呦,百度地图没有注册成功哦~"
);
}
// 定位
[[
BMKLocationAuth
sharedInstance
]
checkPermisionWithKey
:
BAIDU_APPKEY
authDelegate
:
self
];
// 导航
[
BNaviService_Instance
initNaviService
:
nil
success
:
^
{
[
BNaviService_Instance
authorizeNaviAppKey
:
BAIDU_APPKEY
completion
:
^
(
BOOL
suc
)
{
Log
(
@"authorizeNaviAppKey ret = %d"
,
suc
);
}];
}
fail
:^
{
Log
(
@"哎呦,百度地图导航没有注册成功哦~"
);
}];
}
-
(
void
)
onGetNetworkState
:
(
int
)
iError
{
if
(
0
==
iError
)
{
Log
(
@"联网成功"
);
}
else
{
Log
(
@"onGetNetworkState %d"
,
iError
);
}
}
-
(
void
)
onGetPermissionState
:
(
int
)
iError
{
if
(
0
==
iError
)
{
Log
(
@"授权成功"
);
}
else
{
Log
(
@"onGetPermissionState %d"
,
iError
);
}
}
@end
FastService/AppDelegate.h
View file @
f70a0a84
...
...
@@ -7,7 +7,10 @@
#import <UIKit/UIKit.h>
@interface
AppDelegate
:
UIResponder
<
UIApplicationDelegate
>
@interface
AppDelegate
:
UIResponder
<
UIApplicationDelegate
>
{
BMKMapManager
*
_mapManager
;
}
@property
(
strong
,
nonatomic
)
UIWindow
*
window
;
@end
FastService/AppDelegate.m
View file @
f70a0a84
...
...
@@ -7,11 +7,11 @@
#import "AppDelegate.h"
#import <AvoidCrash.h>
#import <IQKeyboardManager/IQKeyboardManager.h>
#import "XVLoginViewController.h"
#import "XVNaviViewController.h"
#import "XVMainJobViewController.h"
#import "XVNewOrderAlter.h"
#import "AppDelegate+ThirdParty.h"
@interface
AppDelegate
()
...
...
@@ -36,29 +36,20 @@
XVNaviViewController
*
navi
=
[[
XVNaviViewController
alloc
]
initWithRootViewController
:
vc
];
self
.
window
.
rootViewController
=
navi
;
self
.
window
.
backgroundColor
=
[
UIColor
whiteColor
];
[
self
.
window
makeKeyAndVisible
];
[
self
setupIQKeyboard
];
[
self
thirdPartyConfig
:
application
WithOption
:
launchOptions
];
[
XVNewOrderAlter
show
];
return
YES
;
}
-
(
void
)
setupIQKeyboard
{
// 禁用IQKeyboardManager的自动工具条
[
IQKeyboardManager
sharedManager
].
enableAutoToolbar
=
NO
;
//键盘和上面的占位提示框之间又一点间距,会很难看
[[
IQKeyboardManager
sharedManager
]
setKeyboardDistanceFromTextField
:
0
];
[
IQKeyboardManager
sharedManager
].
shouldResignOnTouchOutside
=
YES
;
}
@end
FastService/Info.plist
View file @
f70a0a84
...
...
@@ -9,5 +9,17 @@
<
/
d
i
c
t
>
<
k
e
y
>
UIFileSharingEnabled
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
NSLocationAlwaysAndWhenInUseUsageDescription
<
/k
e
y
>
<
string
>
我们需要通过您的地理位置信息获取您附近的商家信息,以便获取更多订单
<
/string
>
<
k
e
y
>
NSLocationAlwaysUsageDescription
<
/k
e
y
>
<
string
>
我们需要通过您的地理位置信息获取您附近的商家信息,以便获取更多订单
<
/string
>
<
k
e
y
>
NSLocationWhenInUseUsageDescription
<
/k
e
y
>
<
string
>
我们需要通过您的地理位置信息获取您附近的商家信息,以便获取更多订单
<
/string
>
<
k
e
y
>
UIBackgroundModes
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
fetch
<
/string
>
<
string
>
location
<
/string
>
<
string
>
remote-notification
<
/string
>
<
/
a
rr
a
y
>
<
/
d
i
c
t
>
<
/plist
>
FastService/Main/View/OrderAlter/XVNewOrderAlter.h
View file @
f70a0a84
...
...
@@ -11,7 +11,7 @@
NS_ASSUME_NONNULL_BEGIN
@interface
XVNewOrderAlter
:
UIView
+
(
void
)
show
;
@end
NS_ASSUME_NONNULL_END
FastService/Main/View/OrderAlter/XVNewOrderAlter.m
View file @
f70a0a84
...
...
@@ -8,14 +8,83 @@
#import "XVNewOrderAlter.h"
@interface
XVNewOrderAlter
()
<
BMKMapViewDelegate
>
@property
(
nonatomic
,
strong
)
UIView
*
bottomView
;
@property
(
nonatomic
,
strong
)
BMKMapView
*
mapView
;
@end
@implementation
XVNewOrderAlter
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
+
(
void
)
show
{
XVNewOrderAlter
*
view
=
[[
XVNewOrderAlter
alloc
]
init
];
// 计算alter的高度
UIView
*
bgView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
SCREEN_WIDTH
-
16
,
SCREEN_HEIGHT
)];
bgView
.
backgroundColor
=
[
UIColor
whiteColor
];
[
bgView
addSubview
:
view
];
[
view
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
left
.
right
.
top
.
mas_equalTo
(
bgView
);
}];
[
bgView
layoutIfNeeded
];
bgView
.
height
=
view
.
height
;
[
LEEAlert
alert
].
config
.
LeeCustomView
(
bgView
)
.
LeeMaxWidth
(
SCREEN_WIDTH
-
16
)
.
LeeMaxHeight
(
SCREEN_HEIGHT
)
.
LeeHeaderInsets
(
UIEdgeInsetsMake
(
0
,
0
,
0
,
0
))
.
LeeItemInsets
(
UIEdgeInsetsMake
(
0
,
0
,
0
,
0
))
.
LeeClickBackgroundClose
(
NO
)
.
LeeCornerRadius
(
20
.
f
)
.
LeeShow
();
}
-
(
void
)
dealloc
{
Log
(
@"XVNewOrderAlter dealloc"
);
if
(
_mapView
)
{
_mapView
.
delegate
=
nil
;
_mapView
=
nil
;
}
}
*/
-
(
instancetype
)
initWithFrame
:
(
CGRect
)
frame
{
if
(
self
=
[
super
initWithFrame
:
frame
])
{
[
self
setupUI
];
}
return
self
;
}
-
(
void
)
setupUI
{
self
.
backgroundColor
=
[
UIColor
redColor
];
[
self
addSubview
:
self
.
mapView
];
self
.
mapView
.
zoomLevel
=
17
;
[
self
addSubview
:
self
.
bottomView
];
[
self
.
bottomView
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
left
.
right
.
bottom
.
mas_equalTo
(
self
);
make
.
top
.
mas_equalTo
(
self
.
mapView
.
mas_bottom
);
make
.
height
.
mas_equalTo
(
318
);
}];
kViewBorderRadius
(
self
.
bottomView
,
20
,
0
,
[
UIColor
whiteColor
]);
}
-
(
UIView
*
)
bottomView
{
if
(
_bottomView
==
nil
)
{
_bottomView
=
[[
UIView
alloc
]
init
];
_bottomView
.
backgroundColor
=
[
UIColor
whiteColor
];
}
return
_bottomView
;
}
-
(
BMKMapView
*
)
mapView
{
if
(
_mapView
==
nil
)
{
_mapView
=
[[
BMKMapView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
kScreenWidth
-
16
,
166
)];
_mapView
.
delegate
=
self
;
}
return
_mapView
;
}
@end
FastService/PrefixHeader.pch
View file @
f70a0a84
...
...
@@ -22,11 +22,23 @@
#import "UINavigation+SXFixSpace.h"
#import "UIBarButtonItem+SXCreate.h"
#import<BaiduMapAPI_Base/BMKBaseComponent.h>
#import<BMKLocationKit/BMKLocationComponent.h>
#import<BaiduMapAPI_Map/BMKMapComponent.h>
#import<BaiduMapAPI_Search/BMKSearchComponent.h>
#import<BaiduMapAPI_Utils/BMKUtilsComponent.h>
#import <BaiduMapAPI_WalkNavi/BMKWalkNaviComponent.h>
#import <BaiduNaviKit-All/BNaviService.h>
#import<BaiduMapAPI_Map/BMKMapView.h>
#import "UIScrollView+XVAdd.h"
#import "UIView+XVAdd.h"
#import "NSString+XVAdd.h"
#endif
// 百度地图
#define BAIDU_APPKEY @"9fzRTgXAOSma0WLs5ko09vSuw4I6L7Oz"
#ifdef DEBUG
#define Log(FORMAT, ...) fprintf(stderr,"[%s:%d行] %s\n",[[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], __LINE__, [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment