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
416e1ca1
Commit
416e1ca1
authored
May 21, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 我的服务红点显示逻辑
parent
78dd713e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
3 deletions
+72
-3
YHServiceOrderListViewController.swift
...entService(服务中心)/C/YHServiceOrderListViewController.swift
+28
-2
YHServiceOrderProgressTableViewCell.swift
...Service(服务中心)/V/YHServiceOrderProgressTableViewCell.swift
+44
-1
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/C/YHServiceOrderListViewController.swift
View file @
416e1ca1
...
@@ -137,22 +137,30 @@ extension YHServiceOrderListView : UITableViewDelegate,UITableViewDataSource {
...
@@ -137,22 +137,30 @@ extension YHServiceOrderListView : UITableViewDelegate,UITableViewDataSource {
let
vc
=
YHMineCertificateEntryViewController
()
let
vc
=
YHMineCertificateEntryViewController
()
vc
.
orderId
=
orderID
vc
.
orderId
=
orderID
navigationController
?
.
pushViewController
(
vc
)
navigationController
?
.
pushViewController
(
vc
)
}
else
if
model
.
type
==
2
{
}
else
if
model
.
type
==
2
{
let
vc
=
YHInformationPerfectListVC
()
let
vc
=
YHInformationPerfectListVC
()
vc
.
orderId
=
orderID
vc
.
orderId
=
orderID
navigationController
?
.
pushViewController
(
vc
)
navigationController
?
.
pushViewController
(
vc
)
}
else
if
model
.
type
==
3
{
}
else
if
model
.
type
==
3
{
// 评分
handleRedPointFor
(
key
:
kMyScoreRedPointInfoKey
,
model
:
model
)
let
vc
=
YHScoreDetailViewController
()
let
vc
=
YHScoreDetailViewController
()
vc
.
orderId
=
orderID
vc
.
orderId
=
orderID
// vc.model = serviceCenterMainReqVM.allInfoScoreModel
// vc.model = serviceCenterMainReqVM.allInfoScoreModel
navigationController
?
.
pushViewController
(
vc
)
navigationController
?
.
pushViewController
(
vc
)
}
else
if
model
.
type
==
4
{
}
else
if
model
.
type
==
4
{
// 方案
handleRedPointFor
(
key
:
kMyPlanRedPointInfoKey
,
model
:
model
)
let
vc
=
YHMineSchemeViewController
()
let
vc
=
YHMineSchemeViewController
()
navigationController
?
.
pushViewController
(
vc
)
navigationController
?
.
pushViewController
(
vc
)
}
else
if
model
.
type
==
5
{
}
else
if
model
.
type
==
5
{
let
vc
=
YHMySignatureListViewController
()
let
vc
=
YHMySignatureListViewController
()
vc
.
orderId
=
orderID
vc
.
orderId
=
orderID
navigationController
?
.
pushViewController
(
vc
)
navigationController
?
.
pushViewController
(
vc
)
}
else
if
model
.
type
==
6
{
}
else
if
model
.
type
==
6
{
let
vc
=
YHMyDocumentsListViewController
()
let
vc
=
YHMyDocumentsListViewController
()
vc
.
orderId
=
orderID
vc
.
orderId
=
orderID
...
@@ -161,6 +169,24 @@ extension YHServiceOrderListView : UITableViewDelegate,UITableViewDataSource {
...
@@ -161,6 +169,24 @@ extension YHServiceOrderListView : UITableViewDelegate,UITableViewDataSource {
}
}
}
}
}
}
func
handleRedPointFor
(
key
:
String
,
model
:
YHServiceCenterProgressModel
)
{
if
key
!=
kMyPlanRedPointInfoKey
&&
key
!=
kMyScoreRedPointInfoKey
{
return
}
if
model
.
type
!=
3
&&
model
.
type
!=
4
{
// 只有我的评分和我的方案进行红点处理
return
}
if
model
.
status
!=
3
{
// 只有已完成状态才进行红点处理
return
}
let
dict
:[
String
:
Any
]
=
[
kProVersionKey
:
model
.
pro_version
,
kClickKey
:
true
]
UserDefaults
.
standard
.
set
(
dict
,
forKey
:
key
)
UserDefaults
.
standard
.
synchronize
()
}
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/V/YHServiceOrderProgressTableViewCell.swift
View file @
416e1ca1
...
@@ -9,6 +9,17 @@
...
@@ -9,6 +9,17 @@
import
UIKit
import
UIKit
import
AttributedString
import
AttributedString
// 我的方案本地红点信息key
let
kMyPlanRedPointInfoKey
=
"kMyPlanRedPointInfoKey"
// 我的评分本地红点信息key
let
kMyScoreRedPointInfoKey
=
"kMyScoreRedPointInfoKey"
// 红点信息pro_version key
let
kProVersionKey
=
"pro_version"
// 红点信息是否点击 key
let
kClickKey
=
"click"
class
YHServiceOrderProgressTableViewCell
:
UITableViewCell
{
class
YHServiceOrderProgressTableViewCell
:
UITableViewCell
{
let
redPointWidth
=
6.0
let
redPointWidth
=
6.0
...
@@ -246,7 +257,16 @@ extension YHServiceOrderProgressTableViewCell {
...
@@ -246,7 +257,16 @@ extension YHServiceOrderProgressTableViewCell {
// 处理我的评分和我的方案红点相关显示逻辑
// 处理我的评分和我的方案红点相关显示逻辑
// 1 证件 2 信息完善 3 我的评分 4 我的方案 5 我的签字 6我的文书
// 1 证件 2 信息完善 3 我的评分 4 我的方案 5 我的签字 6我的文书
if
model
.
type
==
3
||
model
.
type
==
4
{
if
model
.
type
==
3
||
model
.
type
==
4
{
self
.
redPointView
.
isHidden
=
true
if
model
.
status
==
3
{
// 只有已完成状态才有红点显示逻辑处理 否则都隐藏
if
model
.
type
==
3
{
self
.
redPointView
.
isHidden
=
!
isNeedShowRedPointFor
(
key
:
kMyScoreRedPointInfoKey
,
proVersion
:
model
.
pro_version
)
}
else
if
model
.
type
==
4
{
self
.
redPointView
.
isHidden
=
!
isNeedShowRedPointFor
(
key
:
kMyPlanRedPointInfoKey
,
proVersion
:
model
.
pro_version
)
}
}
else
{
self
.
redPointView
.
isHidden
=
true
}
}
else
{
}
else
{
self
.
redPointView
.
isHidden
=
true
self
.
redPointView
.
isHidden
=
true
...
@@ -369,4 +389,27 @@ extension YHServiceOrderProgressTableViewCell {
...
@@ -369,4 +389,27 @@ extension YHServiceOrderProgressTableViewCell {
}
}
}
}
func
isNeedShowRedPointFor
(
key
:
String
,
proVersion
:
Int
)
->
Bool
{
if
key
!=
kMyPlanRedPointInfoKey
&&
key
!=
kMyScoreRedPointInfoKey
{
return
false
}
if
let
dict
=
UserDefaults
.
standard
.
object
(
forKey
:
key
)
as?
[
String
:
Any
]
{
if
!
dict
.
keys
.
contains
(
kProVersionKey
)
||
!
dict
.
keys
.
contains
(
kClickKey
)
{
return
false
}
if
let
version
=
dict
[
kProVersionKey
]
as?
Int
{
if
version
!=
proVersion
{
// 版本不一致一定显示红点
return
true
}
// 版本一致但是未点击显示红点
if
let
isClicked
=
dict
[
kClickKey
]
as?
Bool
,
isClicked
==
false
{
return
true
}
}
return
false
}
// 本地没有红点记录存储则必展示红点
return
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