Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DrWater
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
路少雄
DrWater
Commits
720de45f
Commit
720de45f
authored
Jun 17, 2025
by
路少雄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.部分更新
parent
df583735
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
87 additions
and
49 deletions
+87
-49
DJMHomeTY.xcodeproj/project.pbxproj
+2
-2
DJMHomeTY.xcworkspace/xcuserdata/lushaoxiong.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
DJMHomeTY.xcworkspace/xcuserdata/lushaoxiong.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
+0
-0
DJMHomeTY/AppDelegate/AppDelegate.m
+23
-8
DJMHomeTY/Global/Base/Controller/XHCustomTabBarController.m
+17
-5
DJMHomeTY/Global/Define/XHURL.h
+2
-2
DJMHomeTY/Page/DeviceListPage/Controller/DXAddBannerVC.m
+3
-1
DJMHomeTY/Page/DeviceListPage/Controller/DXBannerVC.m
+40
-31
No files found.
DJMHomeTY.xcodeproj/project.pbxproj
View file @
720de45f
...
...
@@ -3197,7 +3197,7 @@
"$(inherited)"
,
"@executable_path/Frameworks"
,
);
MARKETING_VERSION
=
1.2.
4
;
MARKETING_VERSION
=
1.2.
7
;
PRODUCT_BUNDLE_IDENTIFIER
=
djm.imoreme.com.DJMDrWater
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
SUPPORTED_PLATFORMS
=
"iphoneos iphonesimulator"
;
...
...
@@ -3243,7 +3243,7 @@
"$(inherited)"
,
"@executable_path/Frameworks"
,
);
MARKETING_VERSION
=
1.2.
4
;
MARKETING_VERSION
=
1.2.
7
;
PRODUCT_BUNDLE_IDENTIFIER
=
djm.imoreme.com.DJMDrWater
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
SUPPORTED_PLATFORMS
=
"iphoneos iphonesimulator"
;
...
...
DJMHomeTY.xcworkspace/xcuserdata/lushaoxiong.xcuserdatad/UserInterfaceState.xcuserstate
View file @
720de45f
No preview for this file type
DJMHomeTY.xcworkspace/xcuserdata/lushaoxiong.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
View file @
720de45f
This diff is collapsed.
Click to expand it.
DJMHomeTY/AppDelegate/AppDelegate.m
View file @
720de45f
...
...
@@ -167,26 +167,41 @@
[
SVProgressHUD
dismiss
];
NSLog
(
@"responseObject:
\n
%@===%@"
,
responseObject
,
responseObject
[
@"msg"
]);
XHGetDataManager
.
giftLink
=
responseObject
[
@"data"
];
NSString
*
giftL
=
responseObject
[
@"data"
];
if
(
XHGetDataManager
.
token
)
{
XHGetDataManager
.
giftLink
=
[
NSString
stringWithFormat
:
@"%@?token=%@"
,
giftL
,
XHGetDataManager
.
token
];
}
// XHGetDataManager.giftLink = responseObject[@"data"];
dispatch_async
(
self
.
main_queue_t
,
^
{
[
weakSelf
setAppWindows
];
[
weakSelf
setRootViewController
];
});
}
fail
:^
(
id
failMessage
)
{
dispatch_async
(
self
.
main_queue_t
,
^
{
[
weakSelf
setAppWindows
];
[
weakSelf
setRootViewController
];
});
}
networkRequestsFail
:^
(
id
networkFail
)
{
dispatch_async
(
self
.
main_queue_t
,
^
{
[
weakSelf
setAppWindows
];
[
weakSelf
setRootViewController
];
});
}];
}
-
(
void
)
LoginSuccess
{
HJSelfWeak
;
dispatch_async
(
self
.
main_queue_t
,
^
{
[
weakSelf
setAppWindows
];
[
weakSelf
setRootViewController
];
});
[
self
requestGiftLink
];
if
([
XHDataManager
sharedManager
].
simparlanguage
==
0
)
{
[
self
requestGiftLink
];
}
else
{
dispatch_async
(
self
.
main_queue_t
,
^
{
[
weakSelf
setAppWindows
];
[
weakSelf
setRootViewController
];
});
}
}
//
...
...
DJMHomeTY/Global/Base/Controller/XHCustomTabBarController.m
View file @
720de45f
...
...
@@ -22,7 +22,7 @@
if
([
self
.
navigationController
respondsToSelector
:
@selector
(
interactivePopGestureRecognizer
)])
{
self
.
navigationController
.
interactivePopGestureRecognizer
.
enabled
=
NO
;
}
//
self.delegate = self;
self
.
delegate
=
self
;
XHTabBar
*
tabBar
=
[[
XHTabBar
alloc
]
init
];
tabBar
.
tabBarDelegate
=
self
;
[
self
setValue
:
tabBar
forKeyPath
:
@"tabBar"
];
...
...
@@ -279,15 +279,27 @@
{
// NSLog(@"%@%@",tabBar,item);
// XHUINavigationController *bannerNav = self.viewControllers[1];
//
// DXBannerVC *banner = bannerNav.viewControllers[0];
// banner.url = XHGetDataManager.giftLink;
// banner.hidesBottomBarWhenPushed = YES;
// [weakSelf.tabBarController setSelectedIndex:1];
}
-
(
BOOL
)
tabBarController
:
(
UITabBarController
*
)
tabBarController
shouldSelectViewController
:
(
UIViewController
*
)
viewController
{
if
([
XHDataManager
sharedManager
].
simparlanguage
==
0
)
{
if
(
viewController
==
tabBarController
.
viewControllers
[
1
])
{
XHUINavigationController
*
bannerNav
=
self
.
viewControllers
[
1
];
DXBannerVC
*
banner
=
bannerNav
.
viewControllers
[
0
];
banner
.
url
=
XHGetDataManager
.
giftLink
;
}
else
{
}
}
return
YES
;
}
...
...
DJMHomeTY/Global/Define/XHURL.h
View file @
720de45f
...
...
@@ -8,8 +8,8 @@
#ifndef XHURL_h
#define XHURL_h
#define DRURL @"https://testdjm.imoreme.com"//测试
//
#define DRURL @"https://djm.imoreme.com"//正式
//
#define DRURL @"https://testdjm.imoreme.com"//测试
#define DRURL @"https://djm.imoreme.com"//正式
//#define URL @"http://192.168.1.168:8080"//luocong
//#define URL @"http://192.168.1.66:9012"//luocong
...
...
DJMHomeTY/Page/DeviceListPage/Controller/DXAddBannerVC.m
View file @
720de45f
...
...
@@ -67,7 +67,8 @@
if
(
!
self
.
url
||
[
self
.
url
isEqualToString
:
@""
])
{
// self.url = XHGetDataManager.giftLink;
self
.
url
=
[
NSString
stringWithFormat
:
@"%@?token=%@"
,
XHGetDataManager
.
giftLink
,
XHGetDataManager
.
token
];
// self.url = [NSString stringWithFormat:@"%@?token=%@",XHGetDataManager.giftLink,XHGetDataManager.token];
self
.
url
=
[
NSString
stringWithFormat
:
@"%@"
,
XHGetDataManager
.
giftLink
];
self
.
navigationController
.
navigationBar
.
hidden
=
YES
;
}
else
{
self
.
navigationController
.
navigationBar
.
hidden
=
NO
;
...
...
@@ -86,6 +87,7 @@
-
(
void
)
setUrl
:
(
NSString
*
)
url
{
// url = @"https://www.baidu.com";
_url
=
url
;
NSURL
*
url1
=
[
NSURL
URLWithString
:
url
];
// 根据URL创建请求
NSMutableURLRequest
*
request
=
[
NSMutableURLRequest
requestWithURL
:
url1
];
...
...
DJMHomeTY/Page/DeviceListPage/Controller/DXBannerVC.m
View file @
720de45f
...
...
@@ -79,10 +79,11 @@
if
(
!
self
.
url
||
[
self
.
url
isEqualToString
:
@""
])
{
// self.url = XHGetDataManager.giftLink;
self
.
url
=
[
NSString
stringWithFormat
:
@"%@?token=%@"
,
XHGetDataManager
.
giftLink
,
XHGetDataManager
.
token
];
// self.url = [NSString stringWithFormat:@"%@?token=%@",XHGetDataManager.giftLink,XHGetDataManager.token];
self
.
url
=
[
NSString
stringWithFormat
:
@"%@"
,
XHGetDataManager
.
giftLink
];
self
.
navigationController
.
navigationBar
.
hidden
=
YES
;
}
else
{
self
.
navigationController
.
navigationBar
.
hidden
=
NO
;
self
.
navigationController
.
navigationBar
.
hidden
=
YES
;
}
//http://djmfa.imoreme.com/#/pages/goshop/goshop?token=
...
...
@@ -98,6 +99,11 @@
-
(
void
)
setUrl
:
(
NSString
*
)
url
{
// url = @"https://www.baidu.com";
_url
=
url
;
// if ([url isEqualToString:XHGetDataManager.giftLink]) {
// url = [NSString stringWithFormat:@"%@?token=%@",XHGetDataManager.giftLink,XHGetDataManager.token];
// }
NSURL
*
url1
=
[
NSURL
URLWithString
:
url
];
// 根据URL创建请求
...
...
@@ -106,7 +112,7 @@
// NSURLRequest *request = [NSURLRequest requestWithURL:url1];
// WKWebView加载请求
[
self
.
webView
loadRequest
:
request
];
[
self
.
webView
reload
];
//
[self.webView reload];
}
#pragma mark --委托代理
-
(
void
)
observeValueForKeyPath
:
(
NSString
*
)
keyPath
ofObject
:
(
id
)
object
change
:
(
NSDictionary
<
NSKeyValueChangeKey
,
id
>
*
)
change
context
:
(
void
*
)
context
{
...
...
@@ -118,36 +124,39 @@
NSURL
*
url
=
(
NSURL
*
)
change
[
NSKeyValueChangeNewKey
];
// https://map.qq.com/nav/drive#routes/page?eword=%E6%B5%8B&epointx=113.93041&epointy=22.53332&noback=&referer=groupActivity&ch=mc_h5marker
// dispatch_async(dispatch_get_main_queue(), ^{
if
([
url
.
absoluteString
rangeOfString
:
@"map.qq.com/m/mqq/nav/"
].
location
!=
NSNotFound
)
{
NSString
*
pattern
=
@"eword=([^&]+).*?epointx=([^&]+).*?epointy=([^&]+)"
;
NSRegularExpression
*
regex
=
[
NSRegularExpression
regularExpressionWithPattern
:
pattern
options
:
0
error
:
nil
];
// 在 URL 字符串中搜索匹配的内容
NSTextCheckingResult
*
result
=
[
regex
firstMatchInString
:
url
.
absoluteString
options
:
0
range
:
NSMakeRange
(
0
,
url
.
absoluteString
.
length
)];
// 如果找到匹配项,则提取相应的值
NSString
*
eword
=
[
url
.
absoluteString
substringWithRange
:[
result
rangeAtIndex
:
1
]];
NSString
*
epointx
=
[
url
.
absoluteString
substringWithRange
:[
result
rangeAtIndex
:
2
]];
NSString
*
epointy
=
[
url
.
absoluteString
substringWithRange
:[
result
rangeAtIndex
:
3
]];
// 打印提取到的值
NSLog
(
@"eword: %@"
,
eword
);
NSLog
(
@"epointx: %@"
,
epointx
);
NSLog
(
@"epointy: %@"
,
epointy
);
if
(
!
[
url
isKindOfClass
:[
NSNull
class
]])
{
if
([
url
.
absoluteString
rangeOfString
:
@"map.qq.com/m/mqq/nav/"
].
location
!=
NSNotFound
)
{
// 创建一个MKPlacemark对象,表示目标位置的地标
MKPlacemark
*
placemark
=
[[
MKPlacemark
alloc
]
initWithCoordinate
:
CLLocationCoordinate2DMake
([
epointy
doubleValue
],
[
epointx
doubleValue
])];
// 创建一个MKMapItem对象,表示要在地图中显示的位置
MKMapItem
*
mapItem
=
[[
MKMapItem
alloc
]
initWithPlacemark
:
placemark
];
[
mapItem
setName
:[
eword
stringByRemovingPercentEncoding
]];
// 设置地点的名称,可选
NSString
*
pattern
=
@"eword=([^&]+).*?epointx=([^&]+).*?epointy=([^&]+)"
;
NSRegularExpression
*
regex
=
[
NSRegularExpression
regularExpressionWithPattern
:
pattern
options
:
0
error
:
nil
];
// 在 URL 字符串中搜索匹配的内容
NSTextCheckingResult
*
result
=
[
regex
firstMatchInString
:
url
.
absoluteString
options
:
0
range
:
NSMakeRange
(
0
,
url
.
absoluteString
.
length
)];
// 如果找到匹配项,则提取相应的值
NSString
*
eword
=
[
url
.
absoluteString
substringWithRange
:[
result
rangeAtIndex
:
1
]];
NSString
*
epointx
=
[
url
.
absoluteString
substringWithRange
:[
result
rangeAtIndex
:
2
]];
NSString
*
epointy
=
[
url
.
absoluteString
substringWithRange
:[
result
rangeAtIndex
:
3
]];
// 打印提取到的值
NSLog
(
@"eword: %@"
,
eword
);
NSLog
(
@"epointx: %@"
,
epointx
);
NSLog
(
@"epointy: %@"
,
epointy
);
// 创建一个MKPlacemark对象,表示目标位置的地标
MKPlacemark
*
placemark
=
[[
MKPlacemark
alloc
]
initWithCoordinate
:
CLLocationCoordinate2DMake
([
epointy
doubleValue
],
[
epointx
doubleValue
])];
// 创建一个MKMapItem对象,表示要在地图中显示的位置
MKMapItem
*
mapItem
=
[[
MKMapItem
alloc
]
initWithPlacemark
:
placemark
];
[
mapItem
setName
:[
eword
stringByRemovingPercentEncoding
]];
// 设置地点的名称,可选
[
mapItem
openInMapsWithLaunchOptions
:@{
MKLaunchOptionsDirectionsModeKey
:
MKLaunchOptionsDirectionsModeDriving
,
MKLaunchOptionsShowsTrafficKey
:
[
NSNumber
numberWithBool
:
YES
]}];
// 使用mapItem打开苹果地图应用
// [mapItem openInMapsWithLaunchOptions:nil];
}
}
[
mapItem
openInMapsWithLaunchOptions
:@{
MKLaunchOptionsDirectionsModeKey
:
MKLaunchOptionsDirectionsModeDriving
,
MKLaunchOptionsShowsTrafficKey
:
[
NSNumber
numberWithBool
:
YES
]}];
// 使用mapItem打开苹果地图应用
// [mapItem openInMapsWithLaunchOptions:nil];
}
// });
...
...
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