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
34c4dbb7
Commit
34c4dbb7
authored
Jun 15, 2024
by
路少雄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
h5
parent
465a7167
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
69 additions
and
60 deletions
+69
-60
DJMHomeTY.xcworkspace/xcuserdata/lushaoxiong.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
+0
-16
DJMHomeTY/AppDelegate/AppDelegate.m
+1
-1
DJMHomeTY/Global/Base/Controller/XHCustomTabBarController.m
+6
-6
DJMHomeTY/Global/Base/View/XHTabBar.m
+2
-2
DJMHomeTY/Global/Define/XHURL.h
+2
-2
DJMHomeTY/Page/DeviceListPage/Controller/DXBannerVC.m
+45
-24
DJMHomeTY/Page/DeviceListPage/Controller/DXDeviceListVC.m
+13
-9
No files found.
DJMHomeTY.xcworkspace/xcuserdata/lushaoxiong.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
View file @
34c4dbb7
...
...
@@ -253,21 +253,5 @@
</Locations>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
uuid =
"E8A46705-16A4-4AC8-B81B-1F346A6F16C2"
shouldBeEnabled =
"Yes"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"DJMHomeTY/Page/DeviceListPage/Controller/DXBannerVC.m"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"64"
endingLineNumber =
"64"
landmarkName =
"-requestData"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
DJMHomeTY/AppDelegate/AppDelegate.m
View file @
34c4dbb7
...
...
@@ -186,7 +186,7 @@
[
weakSelf
setAppWindows
];
[
weakSelf
setRootViewController
];
});
//
[self requestGiftLink];
[
self
requestGiftLink
];
}
//
...
...
DJMHomeTY/Global/Base/Controller/XHCustomTabBarController.m
View file @
34c4dbb7
...
...
@@ -172,12 +172,12 @@
NSArray
*
selectItmes
;
NSArray
*
controllClass
;
if
([
XHDataManager
sharedManager
].
simparlanguage
==
0
)
{
//
normalItems = @[@"DR_Home_home-Normal",@"DR_gift_Normal",@"DR_Mine_Normal"];
//
selectItmes = @[@"DR_Home_home-sel",@"DR_gift_Sel",@"DR_Mine_Sel"];
//
controllClass = @[@"DXDeviceListVC",@"DXBannerVC",@"XHMineVC"];
normalItems
=
@[
@"DR_Home_home-Normal"
,
@"DR_Mine_Normal"
];
selectItmes
=
@[
@"DR_Home_home-sel"
,
@"DR_Mine_Sel"
];
controllClass
=
@[
@"DXDeviceListVC"
,
@"XHMineVC"
];
normalItems
=
@[
@"DR_Home_home-Normal"
,
@"DR_gift_Normal"
,
@"DR_Mine_Normal"
];
selectItmes
=
@[
@"DR_Home_home-sel"
,
@"DR_gift_Sel"
,
@"DR_Mine_Sel"
];
controllClass
=
@[
@"DXDeviceListVC"
,
@"DXBannerVC"
,
@"XHMineVC"
];
//
normalItems = @[@"DR_Home_home-Normal",@"DR_Mine_Normal"];
//
selectItmes = @[@"DR_Home_home-sel",@"DR_Mine_Sel"];
//
controllClass = @[@"DXDeviceListVC",@"XHMineVC"];
}
else
{
normalItems
=
@[
@"DR_Home_home-Normal"
,
@"DR_Mine_Normal"
];
selectItmes
=
@[
@"DR_Home_home-sel"
,
@"DR_Mine_Sel"
];
...
...
DJMHomeTY/Global/Base/View/XHTabBar.m
View file @
34c4dbb7
...
...
@@ -34,8 +34,8 @@
// 2.设置其它UITabBarButton的位置和尺寸//self.frame.size.width / 3;
CGFloat
tabbarButtonW
;
if
([
XHDataManager
sharedManager
].
simparlanguage
==
0
&&
TargetType
==
5
){
//
tabbarButtonW = HJScreenWidth / 3;
tabbarButtonW
=
HJScreenWidth
/
2
;
tabbarButtonW
=
HJScreenWidth
/
3
;
//
tabbarButtonW = HJScreenWidth / 2;
}
else
{
tabbarButtonW
=
HJScreenWidth
/
2
;
}
...
...
DJMHomeTY/Global/Define/XHURL.h
View file @
34c4dbb7
...
...
@@ -161,8 +161,8 @@
#define UpdateDeviceVersionURL [NSString stringWithFormat:@"%@%@",DRURL,@"/Facility/getUpdateMCUURL"]
/*海菲秀获取BANNER列表*/
//
#define HFXGetBannerList [NSString stringWithFormat:@"%@%@",DRURL,@"/hfx/banner"]
#define HFXGetBannerList [NSString stringWithFormat:@"%@%@",DRURL,@"/hfx/getBanner"]
#define HFXGetBannerList [NSString stringWithFormat:@"%@%@",DRURL,@"/hfx/banner"]
//
#define HFXGetBannerList [NSString stringWithFormat:@"%@%@",DRURL,@"/hfx/getBanner"]
/*海菲秀获取BANNER列表*/
#define HFXGetGiftLink [NSString stringWithFormat:@"%@%@",DRURL,@"/ldm/api/openurl/faceAgeH5"]
...
...
DJMHomeTY/Page/DeviceListPage/Controller/DXBannerVC.m
View file @
34c4dbb7
...
...
@@ -51,6 +51,25 @@
#pragma mark --初始化数据
-
(
void
)
initData
{
WKWebViewConfiguration
*
configuration
=
[[
WKWebViewConfiguration
alloc
]
init
];
configuration
.
selectionGranularity
=
WKSelectionGranularityDynamic
;
configuration
.
allowsInlineMediaPlayback
=
YES
;
WKPreferences
*
preferences
=
[
WKPreferences
new
];
//是否支持JavaScript
preferences
.
javaScriptEnabled
=
YES
;
//不通过用户交互,是否可以打开窗口
preferences
.
javaScriptCanOpenWindowsAutomatically
=
YES
;
configuration
.
preferences
=
preferences
;
// 初始化WKWebView
_webView
=
[[
WKWebView
alloc
]
initWithFrame
:[
UIScreen
mainScreen
].
bounds
configuration
:
configuration
];
// self.edgesForExtendedLayout = false;
// 有两种代理,UIDelegate负责界面弹窗,navigationDelegate负责加载、跳转等
_webView
.
UIDelegate
=
self
;
_webView
.
navigationDelegate
=
self
;
[
self
.
webView
addObserver
:
self
forKeyPath
:
@"title"
options
:
NSKeyValueObservingOptionNew
context
:
NULL
];
[
self
.
webView
addObserver
:
self
forKeyPath
:
@"URL"
options
:
NSKeyValueObservingOptionNew
context
:
nil
];
}
...
...
@@ -80,12 +99,14 @@
// url = @"https://www.baidu.com";
_url
=
url
;
NSURL
*
url1
=
[
NSURL
URLWithString
:
url
];
// 根据URL创建请求
NSMutableURLRequest
*
request
=
[
NSMutableURLRequest
requestWithURL
:
url1
];
[
request
setValue
:
@"no-cache"
forHTTPHeaderField
:
@"Cache-Control"
];
// NSURLRequest *request = [NSURLRequest requestWithURL:url1];
// WKWebView加载请求
[
self
.
webView
loadRequest
:
request
];
[
self
.
webView
reload
];
}
#pragma mark --委托代理
-
(
void
)
observeValueForKeyPath
:
(
NSString
*
)
keyPath
ofObject
:
(
id
)
object
change
:
(
NSDictionary
<
NSKeyValueChangeKey
,
id
>
*
)
change
context
:
(
void
*
)
context
{
...
...
@@ -184,30 +205,30 @@
#pragma mark --懒加载
-
(
WKWebView
*
)
webView
{
if
(
nil
==
_webView
)
{
// 可以做一些初始化配置定制
WKWebViewConfiguration
*
configuration
=
[[
WKWebViewConfiguration
alloc
]
init
];
configuration
.
selectionGranularity
=
WKSelectionGranularityDynamic
;
configuration
.
allowsInlineMediaPlayback
=
YES
;
WKPreferences
*
preferences
=
[
WKPreferences
new
];
//是否支持JavaScript
preferences
.
javaScriptEnabled
=
YES
;
//不通过用户交互,是否可以打开窗口
preferences
.
javaScriptCanOpenWindowsAutomatically
=
YES
;
configuration
.
preferences
=
preferences
;
// 初始化WKWebView
_webView
=
[[
WKWebView
alloc
]
initWithFrame
:[
UIScreen
mainScreen
].
bounds
configuration
:
configuration
];
// self.edgesForExtendedLayout = false;
// 有两种代理,UIDelegate负责界面弹窗,navigationDelegate负责加载、跳转等
_webView
.
UIDelegate
=
self
;
_webView
.
navigationDelegate
=
self
;
}
return
_webView
;
}
//
- (WKWebView *)webView
//
{
//
if (nil == _webView) {
//
// 可以做一些初始化配置定制
//
WKWebViewConfiguration *configuration = [[WKWebViewConfiguration alloc] init];
//
configuration.selectionGranularity = WKSelectionGranularityDynamic;
//
configuration.allowsInlineMediaPlayback = YES;
//
//
WKPreferences *preferences = [WKPreferences new];
//
//是否支持JavaScript
//
preferences.javaScriptEnabled = YES;
//
//不通过用户交互,是否可以打开窗口
//
preferences.javaScriptCanOpenWindowsAutomatically = YES;
//
configuration.preferences = preferences;
//
//
// 初始化WKWebView
//
_webView = [[WKWebView alloc] initWithFrame:[UIScreen mainScreen].bounds configuration:configuration];
//
//
self.edgesForExtendedLayout = false;
//
// 有两种代理,UIDelegate负责界面弹窗,navigationDelegate负责加载、跳转等
//
_webView.UIDelegate = self;
//
_webView.navigationDelegate = self;
//
}
//
return _webView;
//
}
-
(
void
)
startLocation
{
//判断定位功能是否打开
...
...
DJMHomeTY/Page/DeviceListPage/Controller/DXDeviceListVC.m
View file @
34c4dbb7
...
...
@@ -112,19 +112,23 @@ static NSString *dxmachineCell = @"DXDeviceListCell";
// _bannerView.layer.masksToBounds = YES;
// _bannerView.layer.cornerRadius = 13;
_bannerView
.
clickItemOperationBlock
=
^
(
NSInteger
index
)
{
DXAddBannerVC
*
banner
=
[
DXAddBannerVC
new
];
banner
.
url
=
weakSelf
.
linkArray
[
index
];
if
(
banner
.
url
&&
!
[
banner
.
url
isEqualToString
:
@""
]){
if
(
weakSelf
.
linkArray
[
index
]
&&
!
[
weakSelf
.
linkArray
[
index
]
isEqualToString
:
@""
]){
// [weakSelf.navigationController pushViewController:banner animated:YES];
if
([
weakSelf
.
linkArray
[
index
]
containsString
:
@"is_tab_true"
])
{
DXBannerVC
*
banner
=
[
DXBannerVC
new
];
banner
.
url
=
weakSelf
.
linkArray
[
index
];
banner
.
hidesBottomBarWhenPushed
=
YES
;
[
weakSelf
.
tabBarController
setSelectedIndex
:
1
];
}
else
{
DXAddBannerVC
*
banner
=
[
DXAddBannerVC
new
];
banner
.
url
=
weakSelf
.
linkArray
[
index
];
[
weakSelf
.
navigationController
pushViewController
:
banner
animated
:
YES
];
banner
.
hidesBottomBarWhenPushed
=
YES
;
// if ([banner.url containsString:@"http://djmfa.imoreme.com"]) {
// banner.hidesBottomBarWhenPushed = YES;
// [weakSelf.tabBarController setSelectedIndex:1];
// }else{
// [weakSelf.navigationController pushViewController:banner animated:YES];
// }
}
//
...
...
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