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
d29e230c
Commit
d29e230c
authored
Apr 01, 2025
by
Steven杜宇
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'plan' of
http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS
into plan
parents
8e2b46ff
38d25f0d
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
245 additions
and
38 deletions
+245
-38
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+12
-14
YHMakePlanViewController.swift
...odules/Plan(方案)/MakePlan/C/YHMakePlanViewController.swift
+57
-3
YHMakePlanModel.swift
...Classes/Modules/Plan(方案)/MakePlan/M/YHMakePlanModel.swift
+36
-0
YHMakePlanHeadView.swift
...sses/Modules/Plan(方案)/MakePlan/V/YHMakePlanHeadView.swift
+0
-1
YHMakePlanPriceAlertView.swift
...odules/Plan(方案)/MakePlan/V/YHMakePlanPriceAlertView.swift
+8
-6
YHMakePlanSelectAlertView.swift
...dules/Plan(方案)/MakePlan/V/YHMakePlanSelectAlertView.swift
+15
-14
YHMakePlanTopView.swift
...asses/Modules/Plan(方案)/MakePlan/V/YHMakePlanTopView.swift
+80
-0
YHMakePlanViewModel.swift
...es/Modules/Plan(方案)/MakePlan/VM/YHMakePlanViewModel.swift
+36
-0
YHAllApiName.swift
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
+1
-0
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
d29e230c
This diff is collapsed.
Click to expand it.
galaxy/galaxy/Classes/Modules/Plan(方案)/MakePlan/C/YHMakePlanViewController.swift
View file @
d29e230c
...
...
@@ -11,7 +11,10 @@ import UIKit
class
YHMakePlanViewController
:
YHBaseViewController
{
var
items
:
[[
Int
]]
=
[]
let
viewModel
=
YHSchemeViewModel
()
private
var
lastContentOffset
:
CGFloat
=
0
private
let
scrollThreshold
:
CGFloat
=
100
// 滑动100点显示导航栏
private
var
isNavigationBarHidden
=
false
lazy
var
tableView
:
UITableView
=
{
let
tableView
=
UITableView
(
frame
:
.
zero
,
style
:
.
grouped
)
...
...
@@ -33,6 +36,12 @@ class YHMakePlanViewController: YHBaseViewController {
return
view
}()
lazy
var
topView
:
YHMakePlanTopView
=
{
let
view
=
YHMakePlanTopView
()
view
.
isHidden
=
true
return
view
}()
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
...
...
@@ -41,7 +50,7 @@ class YHMakePlanViewController: YHBaseViewController {
gk_navBarAlpha
=
1
// gk_navBackgroundImage = UIImage(named: "my_scheme_nav")
gk_backImage
=
UIImage
(
named
:
"back_icon_white"
)
addRightItems
()
// Create and add to your view
view
.
addSubview
(
priceView
)
priceView
.
snp
.
makeConstraints
{
make
in
...
...
@@ -52,7 +61,7 @@ class YHMakePlanViewController: YHBaseViewController {
// Configure with data
priceView
.
configure
(
price
:
"489800"
)
{
print
(
"Action button tapped!"
)
YHMakePlan
Shar
eAlertView
.
show
{
_
in
YHMakePlan
Pric
eAlertView
.
show
{
_
in
}
}
...
...
@@ -62,9 +71,27 @@ class YHMakePlanViewController: YHBaseViewController {
make
.
top
.
left
.
right
.
equalToSuperview
()
make
.
bottom
.
equalTo
(
-
98
)
}
view
.
addSubview
(
topView
)
topView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalToSuperview
()
make
.
top
.
equalTo
(
k_Height_NavigationtBarAndStatuBar
)
make
.
height
.
equalTo
(
104
)
}
requestData
()
}
func
addRightItems
()
{
let
rightButtonItem
=
UIBarButtonItem
(
image
:
UIImage
(
named
:
"share_item"
)?
.
withRenderingMode
(
.
alwaysOriginal
),
style
:
.
plain
,
target
:
self
,
action
:
#selector(
share
)
)
gk_navRightBarButtonItem
=
rightButtonItem
gk_navItemRightSpace
=
16
}
@objc
func
share
()
{
}
func
requestData
()
{
tableView
.
reloadData
()
}
...
...
@@ -115,4 +142,31 @@ extension YHMakePlanViewController: UITableViewDelegate, UITableViewDataSource {
return
0.01
}
func
scrollViewDidScroll
(
_
scrollView
:
UIScrollView
)
{
let
offsetY
=
scrollView
.
contentOffset
.
y
+
scrollView
.
contentInset
.
top
if
offsetY
>
0
{
var
alpha
=
offsetY
/
k_Height_NavigationtBarAndStatuBar
if
alpha
>
1.0
{
alpha
=
1.0
}
gk_navBarAlpha
=
alpha
gk_navBackgroundColor
=
.
white
gk_navTitle
=
"续签至永居方案私人订制"
gk_navTitleColor
=
.
black
gk_backImage
=
UIImage
(
named
:
"nav_black_24"
)
gk_navRightBarButtonItem
?
.
image
=
UIImage
(
named
:
"share_item"
)
addRightItems
()
}
else
{
gk_navBarAlpha
=
0.0
gk_navBackgroundColor
=
.
clear
gk_navTitle
=
nil
gk_backImage
=
UIImage
(
named
:
"back_icon_white"
)
addRightItems
()
}
if
offsetY
>
333
.
fix
-
k_Height_NavigationtBarAndStatuBar
-
44
-
scrollView
.
contentInset
.
top
{
topView
.
isHidden
=
false
}
else
{
topView
.
isHidden
=
true
}
}
}
galaxy/galaxy/Classes/Modules/Plan(方案)/MakePlan/M/YHMakePlanModel.swift
0 → 100644
View file @
d29e230c
//
// YHMakePlanModel.swift
// galaxy
//
// Created by EDY on 2025/4/1.
// Copyright © 2025 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
import
SmartCodable
struct
YHMakePlanModel
:
SmartCodable
{
var
basic
:
[
YHMakePlanMainModel
]
=
[]
var
work
:
[
YHMakePlanMainModel
]
=
[]
var
live
:
[
YHMakePlanMainModel
]
=
[]
var
invest
:
[
YHMakePlanMainModel
]
=
[]
}
struct
YHMakePlanMainModel
:
SmartCodable
{
var
product_id
:
Int
=
-
1
var
cover_img
:
String
=
""
var
product_name
:
String
=
""
var
product_desc
:
String
=
""
var
price
:
String
=
""
var
is_add_cart
:
Bool
=
true
var
sub_product
:
[
YHMakePlanSubModel
]
=
[]
}
struct
YHMakePlanSubModel
:
SmartCodable
{
var
product_id
:
Int
=
-
1
var
cover_img
:
String
=
""
var
product_name
:
String
=
""
var
product_desc
:
String
=
""
var
price
:
String
=
""
var
is_add_cart
:
Bool
=
true
}
galaxy/galaxy/Classes/Modules/Plan(方案)/MakePlan/V/YHMakePlanHeadView.swift
View file @
d29e230c
...
...
@@ -36,7 +36,6 @@ class YHMakePlanHeadView: UIView {
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
backgroundColor
=
UIColor
(
hex
:
0x070E33
)
setUpView
()
}
...
...
galaxy/galaxy/Classes/Modules/Plan(方案)/MakePlan/V/YHMakePlanPriceAlertView.swift
View file @
d29e230c
...
...
@@ -70,7 +70,7 @@ class YHMakePlanPriceAlertView: UIView {
titleLabel
=
{
let
label
=
UILabel
()
label
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
1
5
)
label
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
1
7
)
label
.
textColor
=
UIColor
.
mainTextColor
label
.
textAlignment
=
.
center
label
.
text
=
"价格明细"
...
...
@@ -248,8 +248,8 @@ class YHMakePlanLabelCell: UITableViewCell {
titleLabel
=
{
let
label
=
UILabel
()
label
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
1
5
)
label
.
textColor
=
UIColor
.
mainTextColor
label
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
1
4
)
label
.
textColor
=
UIColor
(
hex
:
0x8993a2
)
label
.
text
=
"价格明细"
return
label
}()
...
...
@@ -269,8 +269,10 @@ class YHMakePlanLabelCell: UITableViewCell {
}()
centerView
.
addSubview
(
mainItemView
)
mainItemView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
bottom
.
equalToSuperview
()
make
.
bottom
.
equalToSuperview
()
make
.
top
.
equalTo
(
36
)
make
.
left
.
equalTo
(
18
)
make
.
right
.
equalTo
(
-
18
)
}
let
lineView
=
{
...
...
@@ -297,7 +299,7 @@ class YHMakePlanLabelCell: UITableViewCell {
var
h
=
20
let
titleLabel
=
{
let
label
=
UILabel
()
label
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
1
5
)
label
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
1
4
)
label
.
textColor
=
UIColor
.
mainTextColor
label
.
text
=
"香港身份申请至永居"
return
label
...
...
@@ -311,7 +313,7 @@ class YHMakePlanLabelCell: UITableViewCell {
let
valueLabel
=
{
let
label
=
UILabel
()
label
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
1
5
)
label
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
1
4
)
label
.
textColor
=
UIColor
.
mainTextColor
label
.
textAlignment
=
.
right
label
.
text
=
"¥58999"
...
...
galaxy/galaxy/Classes/Modules/Plan(方案)/MakePlan/V/YHMakePlanSelectAlertView.swift
View file @
d29e230c
...
...
@@ -75,7 +75,7 @@ class YHMakePlanSelectAlertView: UIView {
titleLabel
=
{
let
label
=
UILabel
()
label
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
1
5
)
label
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
1
7
)
label
.
textColor
=
UIColor
.
mainTextColor
label
.
textAlignment
=
.
center
label
.
text
=
"公司经营套餐选择"
...
...
@@ -152,19 +152,22 @@ class YHMakePlanSelectAlertView: UIView {
centerView
.
addSubview
(
cardView
)
cardView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalToSuperview
()
make
.
top
.
equalTo
(
104
)
make
.
height
.
equalTo
(
86
)
make
.
top
.
equalTo
(
92
)
make
.
height
.
equalTo
(
121
)
}
sureButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
backgroundColor
=
.
black
button
.
setTitleColor
(
UIColor
(
hex
:
0xffffff
),
for
:
.
normal
)
button
.
setTitle
(
"确认"
,
for
:
.
normal
)
button
.
layer
.
cornerRadius
=
4
button
.
addTarget
(
self
,
action
:
#selector(
dismiss
)
,
for
:
.
touchUpInside
)
return
button
}()
centerView
.
addSubview
(
sureButton
)
sureButton
.
snp
.
makeConstraints
{
make
in
make
.
bottom
.
equalTo
(
-
54
)
make
.
bottom
.
equalTo
(
-
42
)
make
.
left
.
equalTo
(
20
)
make
.
right
.
equalTo
(
-
20
)
make
.
height
.
equalTo
(
46
)
...
...
@@ -258,9 +261,8 @@ class YHMakePlanCardCell: UITableViewCell {
private
let
containerView
:
UIView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
.
white
view
.
layer
.
cornerRadius
=
8
view
.
layer
.
borderWidth
=
1
view
.
layer
.
borderColor
=
UIColor
.
lightGray
.
cgColor
view
.
layer
.
borderColor
=
UIColor
.
mainTextColor
.
cgColor
return
view
}()
...
...
@@ -274,16 +276,16 @@ class YHMakePlanCardCell: UITableViewCell {
private
let
titleLabel
:
UILabel
=
{
let
label
=
UILabel
()
label
.
text
=
"星企航6年服务"
label
.
font
=
UIFont
.
systemFont
(
ofSize
:
16
,
weight
:
.
medium
)
label
.
textColor
=
.
darkGray
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
label
.
textColor
=
.
mainTextColor
return
label
}()
private
let
priceLabel
:
UILabel
=
{
let
label
=
UILabel
()
label
.
text
=
"¥129980"
label
.
font
=
UIFont
.
systemFont
(
ofSize
:
24
,
weight
:
.
bold
)
label
.
textColor
=
.
black
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
label
.
textColor
=
.
mainTextColor
return
label
}()
...
...
@@ -320,20 +322,19 @@ class YHMakePlanCardCell: UITableViewCell {
bgImageView
.
snp
.
makeConstraints
{
make
in
make
.
height
.
width
.
equalTo
(
46
)
make
.
left
.
equalToSuperview
()
.
offset
(
16
)
make
.
centerY
.
equalToSuperview
()
.
offset
(
-
16
)
make
.
centerY
.
equalToSuperview
()
}
titleLabel
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalToSuperview
()
.
offset
(
1
6
)
make
.
top
.
equalToSuperview
()
.
offset
(
1
2
)
make
.
left
.
equalToSuperview
()
.
offset
(
72
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
16
)
}
priceLabel
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
titleLabel
.
snp
.
bottom
)
.
offset
(
8
)
make
.
left
.
equalToSuperview
()
.
offset
(
72
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
16
)
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
1
6
)
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
1
2
)
}
}
...
...
galaxy/galaxy/Classes/Modules/Plan(方案)/MakePlan/V/YHMakePlanTopView.swift
0 → 100644
View file @
d29e230c
//
// YHMakePlanTopView.swift
// galaxy
//
// Created by EDY on 2025/3/31.
// Copyright © 2025 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
import
AttributedString
class
YHMakePlanTopView
:
UIView
{
private
let
yearsLabel
:
UILabel
=
{
let
label
=
UILabel
()
let
a
:
ASAttributedString
=
.
init
(
"预计可续期(年) "
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
14
)),
.
foreground
(
UIColor
(
hex
:
0x6a7586
)))
let
b
:
ASAttributedString
=
.
init
(
"5"
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
24
)),
.
foreground
(
UIColor
.
mainTextColor
))
label
.
attributed
.
text
=
a
+
b
return
label
}()
private
let
percentageLabel
:
UILabel
=
{
let
label
=
UILabel
()
let
a
:
ASAttributedString
=
.
init
(
"续签综合通过率 "
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
14
)),
.
foreground
(
UIColor
(
hex
:
0x6a7586
)))
let
b
:
ASAttributedString
=
.
init
(
"90"
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
24
)),
.
foreground
(
UIColor
.
mainTextColor
))
let
c
:
ASAttributedString
=
.
init
(
"%"
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
16
)),
.
foreground
(
UIColor
.
mainTextColor
))
label
.
attributed
.
text
=
a
+
b
+
c
return
label
}()
private
lazy
var
custtomView
:
YHMakePlanCusttomHeadView
=
{
let
view
=
YHMakePlanCusttomHeadView
()
return
view
}()
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
setUpView
()
}
required
init
?(
coder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
}
private
func
setUpView
()
{
backgroundColor
=
.
white
let
bgView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
UIColor
(
hex
:
0xf8f9fb
)
view
.
layer
.
cornerRadius
=
6
return
view
}()
addSubview
(
bgView
)
addSubview
(
yearsLabel
)
addSubview
(
percentageLabel
)
addSubview
(
custtomView
)
bgView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
18
)
make
.
right
.
equalTo
(
-
35
)
make
.
height
.
equalTo
(
42
)
make
.
top
.
equalTo
(
9
)
}
yearsLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
34
)
make
.
height
.
equalTo
(
24
)
make
.
top
.
equalTo
(
18
)
}
percentageLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
self
.
snp
.
centerX
)
make
.
height
.
equalTo
(
24
)
make
.
top
.
equalTo
(
18
)
}
custtomView
.
snp
.
makeConstraints
{
make
in
make
.
bottom
.
left
.
right
.
equalToSuperview
()
make
.
height
.
equalTo
(
44
)
}
}
}
galaxy/galaxy/Classes/Modules/Plan(方案)/MakePlan/VM/YHMakePlanViewModel.swift
0 → 100644
View file @
d29e230c
//
// YHMakePlanViewModel.swift
// galaxy
//
// Created by EDY on 2025/4/1.
// Copyright © 2025 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHMakePlanViewModel
:
YHBaseViewModel
{
var
makePlanModel
:
YHMakePlanModel
=
YHMakePlanModel
()
// 请求产品列表
func
getProductList
(
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
Void
)
{
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
ResignPlan
.
productListApi
_
=
YHNetRequest
.
getRequest
(
url
:
strUrl
)
{
[
weak
self
]
json
,
_
in
// 1. json字符串 转 对象
guard
self
!=
nil
else
{
return
}
if
json
.
code
==
200
{
guard
let
dic
=
json
.
data
?
.
peel
as?
[
String
:
Any
],
let
data
=
dic
[
"Data"
]
as?
[
String
:
Any
],
let
result
=
YHMakePlanModel
.
deserialize
(
from
:
data
)
else
{
callBackBlock
(
false
,
nil
)
return
}
self
?
.
makePlanModel
=
result
callBackBlock
(
true
,
nil
)
}
else
{
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
.
count
>
0
?
json
.
msg
:
"数据错误"
)
callBackBlock
(
false
,
error
)
}
}
failBlock
:
{
err
in
callBackBlock
(
false
,
err
)
}
}
}
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
View file @
d29e230c
...
...
@@ -755,6 +755,7 @@ class YHAllApiName {
// 续签方案
struct
ResignPlan
{
static
let
planlistApi
=
"super-app/renewal/advice/get-renewal-plan"
static
let
productListApi
=
"super-app/renewal/advice/get-renewal-product-list"
}
// 问卷
...
...
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