Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
galaxy-iOS
Project
Project
Details
Activity
Releases
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
mobile-group
galaxy-iOS
Commits
f420e0ce
Commit
f420e0ce
authored
Apr 11, 2024
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资讯跳转逻辑添加
parent
0188ada1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
28 deletions
+17
-28
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+3
-3
YHHomePageViewController.swift
...Classes/Modules/Home(首页)/C/YHHomePageViewController.swift
+1
-1
YHHomeWebViewController.swift
.../Classes/Modules/Home(首页)/C/YHHomeWebViewController.swift
+6
-2
YHServiceTableFootView.swift
...s/IntelligentService(服务中心)/V/YHServiceTableFootView.swift
+7
-22
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
f420e0ce
...
@@ -2904,7 +2904,7 @@
...
@@ -2904,7 +2904,7 @@
CODE_SIGN_IDENTITY
=
"Apple Development"
;
CODE_SIGN_IDENTITY
=
"Apple Development"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Developer"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Developer"
;
CODE_SIGN_STYLE
=
Manual
;
CODE_SIGN_STYLE
=
Manual
;
CURRENT_PROJECT_VERSION
=
9
;
CURRENT_PROJECT_VERSION
=
10
;
DEVELOPMENT_TEAM
=
""
;
DEVELOPMENT_TEAM
=
""
;
"DEVELOPMENT_TEAM[sdk=iphoneos*]"
=
RXHYW88XR7
;
"DEVELOPMENT_TEAM[sdk=iphoneos*]"
=
RXHYW88XR7
;
ENABLE_USER_SCRIPT_SANDBOXING
=
NO
;
ENABLE_USER_SCRIPT_SANDBOXING
=
NO
;
...
@@ -3105,7 +3105,7 @@
...
@@ -3105,7 +3105,7 @@
CODE_SIGN_IDENTITY
=
"Apple Development"
;
CODE_SIGN_IDENTITY
=
"Apple Development"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Developer"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Developer"
;
CODE_SIGN_STYLE
=
Manual
;
CODE_SIGN_STYLE
=
Manual
;
CURRENT_PROJECT_VERSION
=
9
;
CURRENT_PROJECT_VERSION
=
10
;
DEVELOPMENT_TEAM
=
""
;
DEVELOPMENT_TEAM
=
""
;
"DEVELOPMENT_TEAM[sdk=iphoneos*]"
=
RXHYW88XR7
;
"DEVELOPMENT_TEAM[sdk=iphoneos*]"
=
RXHYW88XR7
;
ENABLE_USER_SCRIPT_SANDBOXING
=
NO
;
ENABLE_USER_SCRIPT_SANDBOXING
=
NO
;
...
@@ -3147,7 +3147,7 @@
...
@@ -3147,7 +3147,7 @@
CODE_SIGN_IDENTITY
=
"Apple Development"
;
CODE_SIGN_IDENTITY
=
"Apple Development"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Developer"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Developer"
;
CODE_SIGN_STYLE
=
Manual
;
CODE_SIGN_STYLE
=
Manual
;
CURRENT_PROJECT_VERSION
=
9
;
CURRENT_PROJECT_VERSION
=
10
;
DEVELOPMENT_TEAM
=
""
;
DEVELOPMENT_TEAM
=
""
;
"DEVELOPMENT_TEAM[sdk=iphoneos*]"
=
RXHYW88XR7
;
"DEVELOPMENT_TEAM[sdk=iphoneos*]"
=
RXHYW88XR7
;
ENABLE_USER_SCRIPT_SANDBOXING
=
NO
;
ENABLE_USER_SCRIPT_SANDBOXING
=
NO
;
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHHomePageViewController.swift
View file @
f420e0ce
...
@@ -121,7 +121,7 @@ extension YHHomePageViewController: UICollectionViewDelegate, UICollectionViewDa
...
@@ -121,7 +121,7 @@ extension YHHomePageViewController: UICollectionViewDelegate, UICollectionViewDa
func
collectionView
(
_
collectionView
:
UICollectionView
,
didSelectItemAt
indexPath
:
IndexPath
)
{
func
collectionView
(
_
collectionView
:
UICollectionView
,
didSelectItemAt
indexPath
:
IndexPath
)
{
let
model
=
self
.
viewModel
.
arrHomeNewsData
[
indexPath
.
row
]
let
model
=
self
.
viewModel
.
arrHomeNewsData
[
indexPath
.
row
]
let
vc
=
YHHomeWebViewController
()
let
vc
=
YHHomeWebViewController
()
vc
.
url
=
"https://test-hkdiy-h5.galaxy-immi.com/articleDetail.html?id=
3000
"
vc
.
url
=
"https://test-hkdiy-h5.galaxy-immi.com/articleDetail.html?id=
\(
model
?
.
id
??
0
)
"
vc
.
id
=
model
?
.
id
??
0
vc
.
id
=
model
?
.
id
??
0
self
.
navigationController
?
.
pushViewController
(
vc
)
self
.
navigationController
?
.
pushViewController
(
vc
)
}
}
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHHomeWebViewController.swift
View file @
f420e0ce
...
@@ -26,7 +26,7 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
...
@@ -26,7 +26,7 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
let
statusHeight
=
k_Height_statusBar
()
let
statusHeight
=
k_Height_statusBar
()
// 创建wkwebview
// 创建wkwebview
webview
=
WKWebView
(
frame
:
CGRect
(
x
:
0
,
y
:
statusHeight
+
navHeight
!
,
width
:
self
.
view
.
frame
.
width
,
height
:
self
.
view
.
frame
.
height
))
webview
=
WKWebView
(
frame
:
CGRect
(
x
:
0
,
y
:
statusHeight
+
navHeight
!
,
width
:
self
.
view
.
frame
.
width
,
height
:
self
.
view
.
frame
.
height
-
statusHeight
-
navHeight
!
-
59
-
k_Height_safeAreaInsetsBottom
()
))
webview
.
navigationDelegate
=
self
webview
.
navigationDelegate
=
self
// 创建网址
// 创建网址
let
url
=
NSURL
(
string
:
url
)
let
url
=
NSURL
(
string
:
url
)
...
@@ -71,13 +71,17 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
...
@@ -71,13 +71,17 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
make
.
bottom
.
left
.
right
.
equalToSuperview
()
make
.
bottom
.
left
.
right
.
equalToSuperview
()
make
.
height
.
equalTo
(
59
+
k_Height_safeAreaInsetsBottom
())
make
.
height
.
equalTo
(
59
+
k_Height_safeAreaInsetsBottom
())
}
}
getData
()
}
}
deinit
{
deinit
{
webview
.
removeObserver
(
self
,
forKeyPath
:
"estimatedProgress"
)
webview
.
removeObserver
(
self
,
forKeyPath
:
"estimatedProgress"
)
}
}
func
getData
()
{
}
// MARK: - WKNavigationDelegate
// MARK: - WKNavigationDelegate
func
webView
(
_
webView
:
WKWebView
,
didFinish
navigation
:
WKNavigation
!
)
{
func
webView
(
_
webView
:
WKWebView
,
didFinish
navigation
:
WKNavigation
!
)
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/V/YHServiceTableFootView.swift
View file @
f420e0ce
...
@@ -53,25 +53,6 @@ class YHServiceTableFootView: UIView {
...
@@ -53,25 +53,6 @@ class YHServiceTableFootView: UIView {
// self.loadFakeData()
// self.loadFakeData()
// }
// }
}
}
func
getImageSize
(
_
url
:
String
?)
->
CGSize
{
guard
let
urlStr
=
url
,
urlStr
.
count
!=
0
else
{
return
CGSize
.
zero
}
let
tempUrl
=
URL
(
string
:
urlStr
)
let
imageSourceRef
=
CGImageSourceCreateWithURL
(
tempUrl
!
as
CFURL
,
nil
)
var
width
:
CGFloat
=
0
var
height
:
CGFloat
=
0
if
let
imageSRef
=
imageSourceRef
{
let
imageProperties
=
CGImageSourceCopyPropertiesAtIndex
(
imageSRef
,
0
,
nil
)
if
let
imageP
=
imageProperties
{
let
imageDict
=
imageP
as
Dictionary
width
=
imageDict
[
kCGImagePropertyPixelWidth
]
as!
CGFloat
height
=
imageDict
[
kCGImagePropertyPixelHeight
]
as!
CGFloat
}
}
return
CGSize
(
width
:
width
,
height
:
height
)
}
}
}
extension
YHServiceTableFootView
:
UICollectionViewDelegate
,
UICollectionViewDataSource
{
extension
YHServiceTableFootView
:
UICollectionViewDelegate
,
UICollectionViewDataSource
{
...
@@ -91,9 +72,13 @@ extension YHServiceTableFootView: UICollectionViewDelegate, UICollectionViewData
...
@@ -91,9 +72,13 @@ extension YHServiceTableFootView: UICollectionViewDelegate, UICollectionViewData
print
(
"index is
\(
indexPath
.
row
)
"
)
print
(
"index is
\(
indexPath
.
row
)
"
)
}
}
// func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
func
collectionView
(
_
collectionView
:
UICollectionView
,
didSelectItemAt
indexPath
:
IndexPath
)
{
//
let
model
=
items
[
indexPath
.
row
]
// }
let
vc
=
YHHomeWebViewController
()
vc
.
url
=
"https://test-hkdiy-h5.galaxy-immi.com/articleDetail.html?id=
\(
model
?
.
id
??
0
)
"
vc
.
id
=
model
?
.
id
??
0
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
}
}
}
extension
YHServiceTableFootView
:
CollectionViewWaterfallLayoutDelegate
{
extension
YHServiceTableFootView
:
CollectionViewWaterfallLayoutDelegate
{
...
...
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