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
38ffa336
Commit
38ffa336
authored
Mar 12, 2024
by
David黄金龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、删除测试代码
2、优化个人信息中的滚动逻辑
parent
3a8e243c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
47 deletions
+51
-47
YHHomeViewController.swift
...axy/Classes/Modules/Home(首页)/C/YHHomeViewController.swift
+8
-8
YHPreviewBaseViewController.swift
...ersonInfoList(个人信息预览)/C/YHPreviewBaseViewController.swift
+20
-21
YHPreviewMainViewController.swift
...ersonInfoList(个人信息预览)/C/YHPreviewMainViewController.swift
+23
-18
No files found.
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHHomeViewController.swift
View file @
38ffa336
...
...
@@ -308,12 +308,12 @@ extension YHHomeViewController : UITableViewDelegate,UITableViewDataSource {
}
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
//
if section == 0 {
//
return 6
//
}
//
return 1//for test hjl
if
section
==
0
{
return
6
}
return
1
//for test hjl
return
0
//for test hjl
//
return 0 //for test hjl
}
...
...
@@ -403,9 +403,9 @@ extension YHHomeViewController : UITableViewDelegate,UITableViewDataSource {
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
tableView
.
deselectRow
(
at
:
indexPath
,
animated
:
true
)
printLog
(
"点击了 tableView Cell
\(
indexPath
.
row
)
"
)
let
vc
=
YHNewWebViewController
()
vc
.
url
=
"https://cloudapi.qiyuesuo.cn/contract/share/3203196638675878889?openPageToken=1c9e8a62-eeb5-4651-9a13-adf335ae3dbe"
self
.
navigationController
?
.
pushViewController
(
vc
)
//
let vc = YHNewWebViewController()
//
vc.url = "https://cloudapi.qiyuesuo.cn/contract/share/3203196638675878889?openPageToken=1c9e8a62-eeb5-4651-9a13-adf335ae3dbe"
//
self.navigationController?.pushViewController(vc)
// https://cloudapi.qiyuesuo.cn/contract/share/3202449385770287813?openPageToken=d004e5af-aab9-43e4-b813-c5a6a8c16497
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/PersonInfoList(个人信息预览)/C/YHPreviewBaseViewController.swift
View file @
38ffa336
...
...
@@ -40,27 +40,6 @@ class YHPreviewBaseViewController: YHBaseViewController {
}
}
// MARK: - 滑动使用
extension
YHPreviewBaseViewController
:
UIScrollViewDelegate
{
//控制滑动交互
func
scrollViewDidScroll
(
_
scrollView
:
UIScrollView
)
{
let
scrollViewSet
:
CGFloat
=
scrollView
.
contentOffset
.
y
if
vcCanScroll
==
false
{
//不能滚动时
scrollView
.
contentOffset
=
CGPoint
(
x
:
0
,
y
:
0
)
}
else
{
if
(
scrollViewSet
<=
0
)
{
scrollView
.
contentOffset
=
CGPoint
(
x
:
0
,
y
:
0
)
vcCanScroll
=
false
NotificationCenter
.
default
.
post
(
name
:
Notification
.
Name
(
rawValue
:
"leaveTop0"
),
object
:
nil
)
}
else
{
scrollView
.
contentOffset
=
CGPoint
(
x
:
0
,
y
:
scrollViewSet
)
}
}
}
}
// MARK: - JXSegmentedListContainerViewListDelegate
extension
YHPreviewBaseViewController
:
JXSegmentedListContainerViewListDelegate
{
func
listView
()
->
UIView
{
...
...
@@ -102,3 +81,23 @@ extension YHPreviewBaseViewController : UITableViewDelegate,UITableViewDataSourc
}
}
// MARK: - 滑动使用
extension
YHPreviewBaseViewController
:
UIScrollViewDelegate
{
//控制滑动交互
func
scrollViewDidScroll
(
_
scrollView
:
UIScrollView
)
{
let
scrollViewSet
:
CGFloat
=
scrollView
.
contentOffset
.
y
if
vcCanScroll
==
false
{
//不能滚动时
scrollView
.
contentOffset
=
CGPoint
(
x
:
0
,
y
:
0
)
}
else
{
if
(
scrollViewSet
<=
0
)
{
scrollView
.
contentOffset
=
CGPoint
(
x
:
0
,
y
:
0
)
vcCanScroll
=
false
NotificationCenter
.
default
.
post
(
name
:
Notification
.
Name
(
rawValue
:
"leaveTop0"
),
object
:
nil
)
}
else
{
scrollView
.
contentOffset
=
CGPoint
(
x
:
0
,
y
:
scrollViewSet
)
}
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/PersonInfoList(个人信息预览)/C/YHPreviewMainViewController.swift
View file @
38ffa336
...
...
@@ -104,21 +104,6 @@ class YHPreviewMainViewController: YHBaseViewController {
// MARK: - 私有方法
extension
YHPreviewMainViewController
{
@objc
func
leaveTopOp
()
{
canScroll
=
true
}
@objc
func
beginDragging
()
{
homeTableView
.
isScrollEnabled
=
false
canScroll
=
false
}
@objc
func
endDragging
()
{
homeTableView
.
isScrollEnabled
=
true
canScroll
=
true
}
func
loadData
()
{
if
let
orderID
=
UserDefaults
.
standard
.
value
(
forKey
:
"orderIdForPreview"
)
{
previewVM
.
getPreviewForMainApplicationInfo
(
params
:
[
"order_id"
:
orderID
])
{
success
,
error
in
...
...
@@ -279,10 +264,14 @@ extension YHPreviewMainViewController: UIScrollViewDelegate {
if
(
scrollView
.
contentOffset
.
y
>=
bottomCellOffset
)
{
scrollView
.
contentOffset
=
CGPointMake
(
0
,
bottomCellOffset
)
if
canScroll
==
true
{
canScroll
=
false
//传递参数到 子VC
cellView
.
canScroll
=
true
//
canScroll = false
//
//传递参数到 子VC
//
cellView.canScroll = true
}
canScroll
=
false
//传递参数到 子VC
cellView
.
canScroll
=
true
}
else
{
if
canScroll
==
false
{
scrollView
.
contentOffset
=
CGPoint
(
x
:
0
,
y
:
bottomCellOffset
)
...
...
@@ -291,3 +280,19 @@ extension YHPreviewMainViewController: UIScrollViewDelegate {
self
.
homeTableView
.
showsVerticalScrollIndicator
=
false
}
}
extension
YHPreviewMainViewController
{
@objc
func
leaveTopOp
()
{
canScroll
=
true
}
@objc
func
beginDragging
()
{
homeTableView
.
isScrollEnabled
=
false
canScroll
=
false
}
@objc
func
endDragging
()
{
homeTableView
.
isScrollEnabled
=
true
canScroll
=
true
}
}
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