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
308e0f9a
Commit
308e0f9a
authored
Apr 08, 2025
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UI问题修复
parent
2c34284e
Changes
18
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
144 additions
and
37 deletions
+144
-37
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+10
-0
YHMakePlanViewController.swift
...odules/Plan(方案)/MakePlan/C/YHMakePlanViewController.swift
+2
-0
YHMakePlanBottomView.swift
...es/Modules/Plan(方案)/MakePlan/V/YHMakePlanBottomView.swift
+4
-2
YHMakePlanCardView.swift
...sses/Modules/Plan(方案)/MakePlan/V/YHMakePlanCardView.swift
+38
-7
YHMakePlanCell.swift
.../Classes/Modules/Plan(方案)/MakePlan/V/YHMakePlanCell.swift
+1
-0
YHMakePlanCusttomHeadView.swift
...dules/Plan(方案)/MakePlan/V/YHMakePlanCusttomHeadView.swift
+9
-1
YHMakePlanHeadView.swift
...sses/Modules/Plan(方案)/MakePlan/V/YHMakePlanHeadView.swift
+1
-0
YHMakePlanPriceAlertView.swift
...odules/Plan(方案)/MakePlan/V/YHMakePlanPriceAlertView.swift
+28
-4
YHMakePlanSelectAlertView.swift
...dules/Plan(方案)/MakePlan/V/YHMakePlanSelectAlertView.swift
+16
-8
YHMakePlanShareAlertView.swift
...odules/Plan(方案)/MakePlan/V/YHMakePlanShareAlertView.swift
+4
-1
YHMakePlanStateHeadView.swift
...Modules/Plan(方案)/MakePlan/V/YHMakePlanStateHeadView.swift
+4
-4
YHMakePlanTopView.swift
...asses/Modules/Plan(方案)/MakePlan/V/YHMakePlanTopView.swift
+3
-10
Contents.json
...ssets.xcassets/Plan/make_plan_left.imageset/Contents.json
+22
-0
make_plan_left@2x.png
...assets/Plan/make_plan_left.imageset/make_plan_left@2x.png
+0
-0
make_plan_left@3x.png
...assets/Plan/make_plan_left.imageset/make_plan_left@3x.png
+0
-0
D-DIN-PRO-500-Medium.otf
galaxy/galaxy/Res/Font/D-DIN-PRO-500-Medium.otf
+0
-0
D-DIN-PRO-700-Bold.otf
galaxy/galaxy/Res/Font/D-DIN-PRO-700-Bold.otf
+0
-0
Info.plist
galaxy/galaxy/Res/Info.plist
+2
-0
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
308e0f9a
...
...
@@ -1172,6 +1172,8 @@
0497C7532D9BD21500A3E32A
/* YHMakePlanViewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0497C7522D9BD21500A3E32A
/* YHMakePlanViewModel.swift */
;
};
0497C7552D9BD36700A3E32A
/* YHMakePlanModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0497C7542D9BD36700A3E32A
/* YHMakePlanModel.swift */
;
};
0497C7572D9D437B00A3E32A
/* YHMakePlanScoreModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0497C7562D9D437B00A3E32A
/* YHMakePlanScoreModel.swift */
;
};
0497C7592DA4CFF000A3E32A
/* D-DIN-PRO-500-Medium.otf in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0497C7582DA4CFEF00A3E32A
/* D-DIN-PRO-500-Medium.otf */
;
};
0497C75B2DA4CFFA00A3E32A
/* D-DIN-PRO-700-Bold.otf in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0497C75A2DA4CFFA00A3E32A
/* D-DIN-PRO-700-Bold.otf */
;
};
04A750D02D925FD400974E5F
/* YHCustomerInformationQuestionnaireVC.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04A750CF2D925FD400974E5F
/* YHCustomerInformationQuestionnaireVC.swift */
;
};
04A750D22D93ABCE00974E5F
/* YHSurveyTableViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04A750D12D93ABCE00974E5F
/* YHSurveyTableViewCell.swift */
;
};
04A750D42D93DFED00974E5F
/* YHSurveyQuestionType.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04A750D32D93DFED00974E5F
/* YHSurveyQuestionType.swift */
;
};
...
...
@@ -2477,6 +2479,9 @@
0497C7522D9BD21500A3E32A
/* YHMakePlanViewModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHMakePlanViewModel.swift
;
sourceTree
=
"<group>"
;
};
0497C7542D9BD36700A3E32A
/* YHMakePlanModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHMakePlanModel.swift
;
sourceTree
=
"<group>"
;
};
0497C7562D9D437B00A3E32A
/* YHMakePlanScoreModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHMakePlanScoreModel.swift
;
sourceTree
=
"<group>"
;
};
0497C7582DA4CFEF00A3E32A
/* D-DIN-PRO-500-Medium.otf */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file
;
path
=
"D-DIN-PRO-500-Medium.otf"
;
sourceTree
=
"<group>"
;
};
0497C75A2DA4CFFA00A3E32A
/* D-DIN-PRO-700-Bold.otf */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file
;
path
=
"D-DIN-PRO-700-Bold.otf"
;
sourceTree
=
"<group>"
;
};
0497C75C2DA4EE0600A3E32A
/* D-DIN-PRO-500-Medium.otf */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file
;
name
=
"D-DIN-PRO-500-Medium.otf"
;
path
=
"galaxy/Res/Font/D-DIN-PRO-500-Medium.otf"
;
sourceTree
=
"<group>"
;
};
04A750CF2D925FD400974E5F
/* YHCustomerInformationQuestionnaireVC.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCustomerInformationQuestionnaireVC.swift
;
sourceTree
=
"<group>"
;
};
04A750D12D93ABCE00974E5F
/* YHSurveyTableViewCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHSurveyTableViewCell.swift
;
sourceTree
=
"<group>"
;
};
04A750D32D93DFED00974E5F
/* YHSurveyQuestionType.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHSurveyQuestionType.swift
;
sourceTree
=
"<group>"
;
};
...
...
@@ -6203,7 +6208,9 @@
045C0F4C2D12CA5E00BD2DC0
/* Font */
=
{
isa
=
PBXGroup
;
children
=
(
0497C7582DA4CFEF00A3E32A
/* D-DIN-PRO-500-Medium.otf */
,
045C0F492D12CA5E00BD2DC0
/* AlibabaPuHuiTi-Bold.ttf */
,
0497C75A2DA4CFFA00A3E32A
/* D-DIN-PRO-700-Bold.otf */
,
045C0F4A2D12CA5E00BD2DC0
/* AlimamaShuHeiTi-Bold.ttf */
,
045C0F4B2D12CA5E00BD2DC0
/* DIN Alternate Bold.ttf */
,
);
...
...
@@ -6861,6 +6868,7 @@
A5573EC52B317BFF00D98EC0
=
{
isa
=
PBXGroup
;
children
=
(
0497C75C2DA4EE0600A3E32A
/* D-DIN-PRO-500-Medium.otf */
,
04FA8B2D2C084C7E00ABE43F
/* ATAuthSDK.bundle */
,
045C0F7E2D12CA5E00BD2DC0
/* galaxy */
,
A5573EE72B317C0100D98EC0
/* galaxyTests */
,
...
...
@@ -7011,10 +7019,12 @@
isa
=
PBXResourcesBuildPhase
;
buildActionMask
=
2147483647
;
files
=
(
0497C7592DA4CFF000A3E32A
/* D-DIN-PRO-500-Medium.otf in Resources */
,
04AE201A2D12D10200891D24
/* ATAuthSDK.bundle in Resources */
,
045C0F7F2D12CA5F00BD2DC0
/* submit_page_scroll.gif in Resources */
,
045C0F802D12CA5F00BD2DC0
/* Localizable.xcstrings in Resources */
,
045C0F812D12CA5F00BD2DC0
/* img_0.png in Resources */
,
0497C75B2DA4CFFA00A3E32A
/* D-DIN-PRO-700-Bold.otf in Resources */
,
045C0F822D12CA5F00BD2DC0
/* people_launch.json in Resources */
,
045C0F832D12CA5F00BD2DC0
/* loginBkg.mov in Resources */
,
045C0F842D12CA5F00BD2DC0
/* live.json in Resources */
,
...
...
galaxy/galaxy/Classes/Modules/Plan(方案)/MakePlan/C/YHMakePlanViewController.swift
View file @
308e0f9a
...
...
@@ -87,9 +87,11 @@ class YHMakePlanViewController: YHBaseViewController {
func
updataPrice
()
{
let
totalPrice
=
viewModel
.
makePlanModel
.
calculateTotalPrice
()
priceView
.
configure
(
price
:
totalPrice
,
actionText
:
"去办理"
)
{
if
totalPrice
.
double
()
??
0
>
0
{
YHMakePlanPriceAlertView
.
show
(
dataSource
:
self
.
viewModel
.
makePlanModel
)
{
_
in
self
.
addShopCard
()
}
}
}
nextHandler
:
{
self
.
addShopCard
()
}
...
...
galaxy/galaxy/Classes/Modules/Plan(方案)/MakePlan/V/YHMakePlanBottomView.swift
View file @
308e0f9a
...
...
@@ -41,8 +41,8 @@ class YHMakePlanBottomView: UIView {
var
price
:
String
=
""
{
didSet
{
let
a
:
ASAttributedString
=
.
init
(
"¥"
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
20
)),
.
foreground
(
UIColor
.
mainTextColor
))
let
b
:
ASAttributedString
=
.
init
(
"
\(
price
)
"
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
28
)),
.
foreground
(
UIColor
.
mainTextColor
))
let
a
:
ASAttributedString
=
.
init
(
"¥"
,
.
font
(
UIFont
(
name
:
"D-DIN-PRO-Bold"
,
size
:
20
)
??
UIFont
(
)),
.
foreground
(
UIColor
.
mainTextColor
))
let
b
:
ASAttributedString
=
.
init
(
"
\(
price
.
formattedPrice
()
)
"
,
.
font
(
UIFont
(
name
:
"D-DIN-PRO-Bold"
,
size
:
28
)
??
UIFont
(
)),
.
foreground
(
UIColor
.
mainTextColor
))
priceLabel
.
attributed
.
text
=
a
+
b
}
}
...
...
@@ -90,6 +90,8 @@ class YHMakePlanBottomView: UIView {
make
.
width
.
equalTo
(
120
)
make
.
height
.
equalTo
(
46
)
}
priceButton
.
YH_clickEdgeInsets
=
UIEdgeInsets
(
top
:
10
,
left
:
100
,
bottom
:
10
,
right
:
10
)
}
// MARK: - Action
...
...
galaxy/galaxy/Classes/Modules/Plan(方案)/MakePlan/V/YHMakePlanCardView.swift
View file @
308e0f9a
...
...
@@ -15,7 +15,7 @@ class YHMakePlanCardView: UIView {
// MARK: - UI Elements
var
data
:
YHMakePlanMainModel
?
private
lazy
var
containerView
:
UIButton
=
{
lazy
var
containerView
:
UIButton
=
{
let
view
=
UIButton
()
view
.
backgroundColor
=
.
white
view
.
addTarget
(
self
,
action
:
#selector(
gotoDetail
)
,
for
:
.
touchUpInside
)
...
...
@@ -45,7 +45,7 @@ class YHMakePlanCardView: UIView {
}()
private
lazy
var
storeButton
:
YHImageTextButton
=
{
let
button
=
YHImageTextButton
(
title
:
"星企航(7年)"
,
image
:
UIImage
(
named
:
"make_plan_
down
"
))
let
button
=
YHImageTextButton
(
title
:
"星企航(7年)"
,
image
:
UIImage
(
named
:
"make_plan_
left
"
))
button
.
layer
.
cornerRadius
=
2
button
.
backgroundColor
=
UIColor
(
hex
:
0xf5f6f8
)
button
.
addTarget
(
self
,
action
:
#selector(
selectAction
)
,
for
:
.
touchUpInside
)
...
...
@@ -54,8 +54,8 @@ class YHMakePlanCardView: UIView {
private
lazy
var
priceTagView
:
UILabel
=
{
let
label
=
UILabel
()
let
a
:
ASAttributedString
=
.
init
(
"¥"
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
14
)),
.
foreground
(
UIColor
.
mainTextColor
))
let
b
:
ASAttributedString
=
.
init
(
"58999.00"
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
20
)),
.
foreground
(
UIColor
.
mainTextColor
))
let
a
:
ASAttributedString
=
.
init
(
"¥"
,
.
font
(
UIFont
(
name
:
"D-DIN-PRO-Bold"
,
size
:
14
)
??
UIFont
(
)),
.
foreground
(
UIColor
.
mainTextColor
))
let
b
:
ASAttributedString
=
.
init
(
"58999.00"
,
.
font
(
UIFont
(
name
:
"D-DIN-PRO-Bold"
,
size
:
20
)
??
UIFont
(
)),
.
foreground
(
UIColor
.
mainTextColor
))
label
.
attributed
.
text
=
a
+
b
return
label
}()
...
...
@@ -152,9 +152,11 @@ class YHMakePlanCardView: UIView {
index
=
i
}
}
if
count
>
0
{
let
subModel
=
data
?
.
sub_product
[
index
]
id
=
subModel
?
.
product_id
??
0
}
}
var
url
=
YHBaseUrlManager
.
shared
.
curH5URL
()
+
"superAppBridge.html#/goods/sales-detail"
+
"?id=
\(
id
)
"
+
"&source=renewal_customize&hidelive=1"
...
...
@@ -209,9 +211,11 @@ class YHMakePlanCardView: UIView {
index
=
i
}
}
if
count
>
0
{
let
subModel
=
data
?
.
sub_product
[
index
]
product
=
subModel
?
.
product_id
??
0
}
}
self
.
actionHandler
?(
product
)
}
// MARK: - Configuration
...
...
@@ -220,7 +224,7 @@ class YHMakePlanCardView: UIView {
self
.
data
=
data
titleLabel
.
text
=
data
.
product_name
subtitleLabel
.
text
=
data
.
product_desc
priceTagView
.
text
=
data
.
price
var
price
=
data
.
price
if
data
.
price
==
""
{
storeButton
.
isHidden
=
false
let
count
=
self
.
data
?
.
sub_product
.
count
??
0
...
...
@@ -231,12 +235,19 @@ class YHMakePlanCardView: UIView {
index
=
i
}
}
if
count
>
0
{
let
subModel
=
data
.
sub_product
[
index
]
priceTagView
.
text
=
subModel
.
price
price
=
subModel
.
price
storeButton
.
setTitle
(
subModel
.
product_name
,
for
:
.
normal
)
}
}
else
{
storeButton
.
isHidden
=
true
}
let
a
:
ASAttributedString
=
.
init
(
"¥"
,
.
font
(
UIFont
(
name
:
"D-DIN-PRO-Bold"
,
size
:
14
)
??
UIFont
()),
.
foreground
(
UIColor
.
mainTextColor
))
let
b
:
ASAttributedString
=
.
init
(
"
\(
price
.
formattedPrice
()
)
"
,
.
font
(
UIFont
(
name
:
"D-DIN-PRO-Bold"
,
size
:
20
)
??
UIFont
()),
.
foreground
(
UIColor
.
mainTextColor
))
priceTagView
.
attributed
.
text
=
a
+
b
if
let
url
=
URL
(
string
:
data
.
cover_img
)
{
companyImageView
.
kf
.
setImage
(
with
:
url
,
placeholder
:
UIImage
(
named
:
"global_default_image"
))
}
...
...
@@ -253,7 +264,9 @@ class YHMakePlanCardView: UIView {
func
configureSub
(
with
data
:
YHMakePlanSubModel
)
{
titleLabel
.
text
=
data
.
product_name
subtitleLabel
.
text
=
data
.
product_desc
priceTagView
.
text
=
"¥
\(
data
.
price
)
"
let
a
:
ASAttributedString
=
.
init
(
"¥"
,
.
font
(
UIFont
(
name
:
"D-DIN-PRO-Bold"
,
size
:
14
)
??
UIFont
()),
.
foreground
(
UIColor
.
mainTextColor
))
let
b
:
ASAttributedString
=
.
init
(
"
\(
data
.
price
.
formattedPrice
()
)
"
,
.
font
(
UIFont
(
name
:
"D-DIN-PRO-Bold"
,
size
:
20
)
??
UIFont
()),
.
foreground
(
UIColor
.
mainTextColor
))
priceTagView
.
attributed
.
text
=
a
+
b
selectButton
.
isHidden
=
true
storeButton
.
isHidden
=
true
if
let
url
=
URL
(
string
:
data
.
cover_img
)
{
...
...
@@ -335,3 +348,21 @@ class YHImageTextButton: UIButton {
setNeedsLayout
()
}
}
extension
String
{
func
formattedPrice
()
->
String
{
// 检查是否包含小数点
guard
let
number
=
Double
(
self
)
else
{
return
self
}
// 2. 检查小数点后两位是否为 0
let
isInteger
=
(
number
*
100
)
.
truncatingRemainder
(
dividingBy
:
100
)
==
0
// 3. 使用 NumberFormatter 控制显示格式
let
formatter
=
NumberFormatter
()
formatter
.
numberStyle
=
.
decimal
formatter
.
minimumFractionDigits
=
isInteger
?
0
:
2
// 整数部分不显示小数,否则保留 2 位
formatter
.
maximumFractionDigits
=
2
return
formatter
.
string
(
from
:
NSNumber
(
value
:
number
))
??
self
}
}
galaxy/galaxy/Classes/Modules/Plan(方案)/MakePlan/V/YHMakePlanCell.swift
View file @
308e0f9a
...
...
@@ -38,6 +38,7 @@ class YHMakePlanCell: UITableViewCell {
let
view
=
UIView
()
view
.
backgroundColor
=
.
white
view
.
layer
.
cornerRadius
=
kCornerRadius6
view
.
layer
.
masksToBounds
=
true
return
view
}()
contentView
.
addSubview
(
centerView
)
...
...
galaxy/galaxy/Classes/Modules/Plan(方案)/MakePlan/V/YHMakePlanCusttomHeadView.swift
View file @
308e0f9a
...
...
@@ -50,7 +50,11 @@ class YHMakePlanCusttomHeadView: UIView {
tabs
.
enumerated
()
.
forEach
{
index
,
title
in
let
button
=
UIButton
(
type
:
.
system
)
button
.
setTitle
(
title
,
for
:
.
normal
)
button
.
titleLabel
?
.
font
=
UIFont
.
systemFont
(
ofSize
:
14
)
if
index
==
0
{
button
.
titleLabel
?
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
16
)
}
else
{
button
.
titleLabel
?
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
16
)
}
button
.
setTitleColor
(
index
==
0
?
UIColor
.
mainTextColor
:
UIColor
(
hex
:
0x6a7586
),
for
:
.
normal
)
button
.
tag
=
index
button
.
addTarget
(
self
,
action
:
#selector(
tabTapped(_:)
)
,
for
:
.
touchUpInside
)
...
...
@@ -84,6 +88,8 @@ class YHMakePlanCusttomHeadView: UIView {
// Update colors
buttons
[
selectedIndex
]
.
setTitleColor
(
UIColor
(
hex
:
0x6a7586
),
for
:
.
normal
)
buttons
[
selectedIndex
]
.
titleLabel
?
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
16
)
buttons
[
newIndex
]
.
titleLabel
?
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
16
)
buttons
[
newIndex
]
.
setTitleColor
(
UIColor
.
mainTextColor
,
for
:
.
normal
)
// Animate underline
...
...
@@ -107,6 +113,8 @@ class YHMakePlanCusttomHeadView: UIView {
// Update colors
buttons
[
selectedIndex
]
.
setTitleColor
(
UIColor
(
hex
:
0x6a7586
),
for
:
.
normal
)
buttons
[
selectedIndex
]
.
titleLabel
?
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
16
)
buttons
[
newIndex
]
.
titleLabel
?
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
16
)
buttons
[
newIndex
]
.
setTitleColor
(
UIColor
.
mainTextColor
,
for
:
.
normal
)
// Animate underline
...
...
galaxy/galaxy/Classes/Modules/Plan(方案)/MakePlan/V/YHMakePlanHeadView.swift
View file @
308e0f9a
...
...
@@ -33,6 +33,7 @@ class YHMakePlanHeadView: UIView {
lazy
var
custtomView
:
YHMakePlanCusttomHeadView
=
{
let
view
=
YHMakePlanCusttomHeadView
()
view
.
backgroundColor
=
.
clear
view
.
block
=
{
tag
in
self
.
block
?(
tag
)
}
...
...
galaxy/galaxy/Classes/Modules/Plan(方案)/MakePlan/V/YHMakePlanPriceAlertView.swift
View file @
308e0f9a
...
...
@@ -75,7 +75,7 @@ class YHMakePlanPriceAlertView: UIView {
centerView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
.
white
view
.
layer
.
cornerRadius
=
kCornerRadius
3
view
.
layer
.
cornerRadius
=
kCornerRadius
6
return
view
}()
addSubview
(
centerView
)
...
...
@@ -205,10 +205,33 @@ extension YHMakePlanPriceAlertView: UITableViewDelegate, UITableViewDataSource {
data
=
dataSource
.
invest
}
cell
.
dataSource
=
data
let
filteredModel
=
data
.
filteredByCartStatus
()
if
filteredModel
.
count
==
0
{
cell
.
isHidden
=
true
}
else
{
cell
.
isHidden
=
false
}
if
indexPath
.
row
==
3
{
cell
.
lineView
.
isHidden
=
true
}
return
cell
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
var
data
:
[
YHMakePlanMainModel
]
=
[]
if
indexPath
.
row
==
0
{
data
=
dataSource
.
basic
}
else
if
indexPath
.
row
==
1
{
data
=
dataSource
.
work
}
else
if
indexPath
.
row
==
2
{
data
=
dataSource
.
live
}
else
if
indexPath
.
row
==
3
{
data
=
dataSource
.
invest
}
let
filteredModel
=
data
.
filteredByCartStatus
()
if
filteredModel
.
count
==
0
{
return
0
}
return
UITableView
.
automaticDimension
}
...
...
@@ -242,6 +265,7 @@ class YHMakePlanLabelCell: UITableViewCell {
var
titleLabel
:
UILabel
!
var
mainItemView
:
UIView
!
var
country
:
String
=
""
var
lineView
:
UIView
!
var
dataSource
:
[
YHMakePlanMainModel
]?
{
didSet
{
updateAllViews
()
...
...
@@ -278,7 +302,7 @@ class YHMakePlanLabelCell: UITableViewCell {
titleLabel
=
{
let
label
=
UILabel
()
label
.
font
=
UIFont
.
PFSC_
M
(
ofSize
:
14
)
label
.
font
=
UIFont
.
PFSC_
R
(
ofSize
:
14
)
label
.
textColor
=
UIColor
(
hex
:
0x8993a2
)
label
.
text
=
"价格明细"
return
label
...
...
@@ -305,7 +329,7 @@ class YHMakePlanLabelCell: UITableViewCell {
make
.
right
.
equalTo
(
-
18
)
}
l
et
l
ineView
=
{
lineView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
UIColor
.
separatorColor
return
view
...
...
@@ -339,7 +363,7 @@ class YHMakePlanLabelCell: UITableViewCell {
valueLabel
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
14
)
valueLabel
.
textColor
=
UIColor
.
mainTextColor
valueLabel
.
textAlignment
=
.
right
valueLabel
.
text
=
"¥"
+
price
valueLabel
.
text
=
"¥"
+
price
.
formattedPrice
()
mainItemView
.
addSubview
(
valueLabel
)
titleLabel
.
snp
.
makeConstraints
{
make
in
...
...
galaxy/galaxy/Classes/Modules/Plan(方案)/MakePlan/V/YHMakePlanSelectAlertView.swift
View file @
308e0f9a
...
...
@@ -7,6 +7,7 @@
//
import
UIKit
import
AttributedString
class
YHMakePlanSelectAlertView
:
UIView
{
typealias
Block
=
(
Int
)
->
Void
...
...
@@ -35,10 +36,12 @@ class YHMakePlanSelectAlertView: UIView {
tableView
.
separatorStyle
=
.
none
tableView
.
delegate
=
self
tableView
.
dataSource
=
self
let
view
=
UIView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
KScreenWidth
,
height
:
44
))
let
view
=
UIView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
KScreenWidth
,
height
:
20
))
let
label
=
UILabel
()
label
.
text
=
"产品类型"
label
.
frame
=
CGRect
(
x
:
20
,
y
:
24
,
width
:
KScreenWidth
,
height
:
20
)
label
.
textColor
=
UIColor
(
hex
:
0x8993a2
)
label
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
15
)
label
.
frame
=
CGRect
(
x
:
20
,
y
:
0
,
width
:
KScreenWidth
,
height
:
20
)
view
.
addSubview
(
label
)
tableView
.
tableHeaderView
=
view
tableView
.
register
(
cellWithClass
:
YHMakePlanCardCell
.
self
)
...
...
@@ -140,7 +143,7 @@ class YHMakePlanSelectAlertView: UIView {
hasSelectLabel
=
{
let
label
=
UILabel
()
label
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
15
)
label
.
textColor
=
UIColor
.
mainTextColor
label
.
textColor
=
UIColor
(
hex
:
0x8993a2
)
label
.
text
=
"已选产品"
return
label
}()
...
...
@@ -154,12 +157,13 @@ class YHMakePlanSelectAlertView: UIView {
cardView
=
{
let
label
=
YHMakePlanCardView
()
label
.
containerView
.
backgroundColor
=
.
clear
return
label
}()
centerView
.
addSubview
(
cardView
)
cardView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalToSuperview
()
make
.
top
.
equalTo
(
92
)
make
.
bottom
.
equalTo
(
bottomLineView
.
snp
.
top
)
.
offset
(
-
6.5
)
make
.
height
.
equalTo
(
121
)
}
...
...
@@ -183,7 +187,7 @@ class YHMakePlanSelectAlertView: UIView {
centerView
.
addSubview
(
tableView
)
tableView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalToSuperview
()
make
.
top
.
equalTo
(
215
)
make
.
top
.
equalTo
(
bottomLineView
.
snp
.
bottom
)
.
offset
(
24
)
make
.
bottom
.
equalTo
(
-
96
)
}
}
...
...
@@ -195,7 +199,9 @@ class YHMakePlanSelectAlertView: UIView {
selectIndex
=
i
}
}
if
data
.
sub_product
.
count
>
0
{
cardView
.
configureSub
(
with
:
data
.
sub_product
[
selectIndex
])
}
tableView
.
reloadData
()
}
...
...
@@ -300,7 +306,7 @@ class YHMakePlanCardCell: UITableViewCell {
private
let
titleLabel
:
UILabel
=
{
let
label
=
UILabel
()
label
.
text
=
"星企航6年服务"
label
.
font
=
UIFont
.
PFSC_
R
(
ofSize
:
14
)
label
.
font
=
UIFont
.
PFSC_
M
(
ofSize
:
14
)
label
.
textColor
=
.
mainTextColor
return
label
}()
...
...
@@ -365,11 +371,13 @@ class YHMakePlanCardCell: UITableViewCell {
// MARK: - Configuration
func
configure
(
with
service
:
YHMakePlanSubModel
)
{
titleLabel
.
text
=
service
.
product_name
priceLabel
.
text
=
service
.
price
priceLabel
.
text
=
"¥"
+
service
.
price
.
formattedPrice
()
if
service
.
is_add_cart
{
containerView
.
layer
.
borderWidth
=
1
containerView
.
layer
.
borderColor
=
UIColor
.
mainTextColor
.
cgColor
}
else
{
containerView
.
layer
.
borderWidth
=
0
containerView
.
layer
.
borderWidth
=
1
containerView
.
layer
.
borderColor
=
UIColor
(
hex
:
0xe9ecf0
)
.
cgColor
}
if
let
url
=
URL
(
string
:
service
.
cover_img
)
{
bgImageView
.
kf
.
setImage
(
with
:
url
,
placeholder
:
UIImage
(
named
:
"global_default_image"
))
...
...
galaxy/galaxy/Classes/Modules/Plan(方案)/MakePlan/V/YHMakePlanShareAlertView.swift
View file @
308e0f9a
...
...
@@ -42,7 +42,7 @@ class YHMakePlanShareAlertView: UIView {
centerView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
.
white
view
.
layer
.
cornerRadius
=
kCornerRadius
3
view
.
layer
.
cornerRadius
=
kCornerRadius
6
return
view
}()
addSubview
(
centerView
)
...
...
@@ -71,6 +71,7 @@ class YHMakePlanShareAlertView: UIView {
leftButton
=
{
let
button
=
YHShareButton
()
button
.
setContent
(
"invitation_with_gifts_share_center"
,
"微信好友"
)
button
.
bottomTitleLabel
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
13
)
button
.
addTarget
(
self
,
action
:
#selector(
peopleClick
)
,
for
:
.
touchUpInside
)
return
button
}()
...
...
@@ -85,6 +86,7 @@ class YHMakePlanShareAlertView: UIView {
rightButton
=
{
let
button
=
YHShareButton
()
button
.
setContent
(
"invitation_with_gifts_share_link"
,
"复制链接"
)
button
.
bottomTitleLabel
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
13
)
button
.
addTarget
(
self
,
action
:
#selector(
wxClick
)
,
for
:
.
touchUpInside
)
return
button
}()
...
...
@@ -100,6 +102,7 @@ class YHMakePlanShareAlertView: UIView {
@objc
func
wxClick
()
{
if
let
url
=
URL
(
string
:
url
)
{
UIPasteboard
.
general
.
url
=
url
YHHUD
.
flash
(
message
:
"复制成功"
)
}
}
...
...
galaxy/galaxy/Classes/Modules/Plan(方案)/MakePlan/V/YHMakePlanStateHeadView.swift
View file @
308e0f9a
...
...
@@ -20,7 +20,7 @@ class YHMakePlanStateHeadView: UIView {
private
let
yearsLabel
:
UILabel
=
{
let
label
=
UILabel
()
label
.
text
=
"5"
label
.
font
=
UIFont
.
PFSC_M
(
ofS
ize
:
32
)
label
.
font
=
UIFont
(
name
:
"D-DIN-PRO-Bold"
,
s
ize
:
32
)
label
.
textColor
=
.
mainTextColor
label
.
textAlignment
=
.
center
return
label
...
...
@@ -29,7 +29,7 @@ class YHMakePlanStateHeadView: UIView {
private
let
yearsDescriptionLabel
:
UILabel
=
{
let
label
=
UILabel
()
label
.
text
=
"预计可续期(年)"
label
.
font
=
UIFont
.
PFSC_
M
(
ofSize
:
14
)
label
.
font
=
UIFont
.
PFSC_
R
(
ofSize
:
14
)
label
.
textColor
=
UIColor
(
hex
:
0x8893a2
)
label
.
textAlignment
=
.
center
return
label
...
...
@@ -38,7 +38,7 @@ class YHMakePlanStateHeadView: UIView {
private
let
percentageLabel
:
UILabel
=
{
let
label
=
UILabel
()
label
.
text
=
"90%"
label
.
font
=
UIFont
.
PFSC_M
(
ofS
ize
:
32
)
label
.
font
=
UIFont
(
name
:
"D-DIN-PRO-Bold"
,
s
ize
:
32
)
label
.
textColor
=
.
mainTextColor
label
.
textAlignment
=
.
center
return
label
...
...
@@ -47,7 +47,7 @@ class YHMakePlanStateHeadView: UIView {
private
let
progressDescriptionLabel
:
UILabel
=
{
let
label
=
UILabel
()
label
.
text
=
"续签综合通过率"
label
.
font
=
UIFont
.
PFSC_
M
(
ofSize
:
14
)
label
.
font
=
UIFont
.
PFSC_
R
(
ofSize
:
14
)
label
.
textColor
=
UIColor
(
hex
:
0x8893a2
)
label
.
textAlignment
=
.
center
return
label
...
...
galaxy/galaxy/Classes/Modules/Plan(方案)/MakePlan/V/YHMakePlanTopView.swift
View file @
308e0f9a
...
...
@@ -16,10 +16,10 @@ class YHMakePlanTopView: UIView {
didSet
{
let
year
=
dataSource
?
.
year
??
0
let
rate
=
dataSource
?
.
pass_rate
??
""
let
a
:
ASAttributedString
=
.
init
(
"预计可续期(年) "
,
.
font
(
UIFont
.
PFSC_
M
(
ofSize
:
14
)),
.
foreground
(
UIColor
(
hex
:
0x6a7586
)))
let
a
:
ASAttributedString
=
.
init
(
"预计可续期(年) "
,
.
font
(
UIFont
.
PFSC_
R
(
ofSize
:
14
)),
.
foreground
(
UIColor
(
hex
:
0x6a7586
)))
let
b
:
ASAttributedString
=
.
init
(
"
\(
year
)
"
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
24
)),
.
foreground
(
UIColor
.
mainTextColor
))
yearsLabel
.
attributed
.
text
=
a
+
b
let
aa
:
ASAttributedString
=
.
init
(
"续签综合通过率 "
,
.
font
(
UIFont
.
PFSC_
M
(
ofSize
:
14
)),
.
foreground
(
UIColor
(
hex
:
0x6a7586
)))
let
aa
:
ASAttributedString
=
.
init
(
"续签综合通过率 "
,
.
font
(
UIFont
.
PFSC_
R
(
ofSize
:
14
)),
.
foreground
(
UIColor
(
hex
:
0x6a7586
)))
let
bb
:
ASAttributedString
=
.
init
(
"
\(
rate
)
"
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
24
)),
.
foreground
(
UIColor
.
mainTextColor
))
// let c: ASAttributedString = .init("%", .font(UIFont.PFSC_M(ofSize: 16)), .foreground(UIColor.mainTextColor))
percentageLabel
.
attributed
.
text
=
aa
+
bb
...
...
@@ -28,18 +28,11 @@ 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
}()
...
...
@@ -75,7 +68,7 @@ class YHMakePlanTopView: UIView {
bgView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
18
)
make
.
right
.
equalTo
(
-
35
)
make
.
right
.
equalTo
(
-
18
)
make
.
height
.
equalTo
(
42
)
make
.
top
.
equalTo
(
9
)
}
...
...
galaxy/galaxy/Res/Assets.xcassets/Plan/make_plan_left.imageset/Contents.json
0 → 100644
View file @
308e0f9a
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"make_plan_left@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"make_plan_left@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/Plan/make_plan_left.imageset/make_plan_left@2x.png
0 → 100644
View file @
308e0f9a
350 Bytes
galaxy/galaxy/Res/Assets.xcassets/Plan/make_plan_left.imageset/make_plan_left@3x.png
0 → 100644
View file @
308e0f9a
479 Bytes
galaxy/galaxy/Res/Font/D-DIN-PRO-500-Medium.otf
0 → 100644
View file @
308e0f9a
File added
galaxy/galaxy/Res/Font/D-DIN-PRO-700-Bold.otf
0 → 100644
View file @
308e0f9a
File added
galaxy/galaxy/Res/Info.plist
View file @
308e0f9a
...
...
@@ -118,6 +118,8 @@
<
string
>
DIN
Alternate
Bold
<
/string
>
<
string
>
AlimamaShuHeiTi-Bold.ttf
<
/string
>
<
string
>
AlibabaPuHuiTi-Bold.ttf
<
/string
>
<
string
>
D-DIN-PRO-500-Medium.otf
<
/string
>
<
string
>
D-DIN-PRO-700-Bold.otf
<
/string
>
<
/
a
rr
a
y
>
<
k
e
y
>
UIBackgroundModes
<
/k
e
y
>
<
a
rr
a
y
>
...
...
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