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
a9c0423c
Commit
a9c0423c
authored
Jan 22, 2024
by
David黄金龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
服务中心 入口UI
parent
80b26797
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
229 additions
and
66 deletions
+229
-66
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+4
-0
AppDelegate.swift
galaxy/galaxy/AppDelegate.swift
+1
-1
YHBaseViewController.swift
galaxy/galaxy/Classes/Base/C/YHBaseViewController.swift
+1
-1
YHIntelligentServiceViewController.swift
...tService(服务中心)/C/YHIntelligentServiceViewController.swift
+42
-64
YHLoginTipsView.swift
.../Modules/IntelligentService(服务中心)/V/YHLoginTipsView.swift
+100
-0
Contents.json
...xy/galaxy/Res/Assets.xcassets/ServiceCenter/Contents.json
+6
-0
Contents.json
...alaxy/Res/Assets.xcassets/ServiceCenter/主入口/Contents.json
+6
-0
Contents.json
...s/ServiceCenter/主入口/login_tip_icon.imageset/Contents.json
+23
-0
Group 3119.png
.../ServiceCenter/主入口/login_tip_icon.imageset/Group 3119.png
+0
-0
Group 3119@2x.png
...rviceCenter/主入口/login_tip_icon.imageset/Group 3119@2x.png
+0
-0
Group 3119@3x.png
...rviceCenter/主入口/login_tip_icon.imageset/Group 3119@3x.png
+0
-0
Contents.json
...Center/主入口/service_center_head_bkg.imageset/Contents.json
+23
-0
Rectangle 2419.png
...r/主入口/service_center_head_bkg.imageset/Rectangle 2419.png
+0
-0
Rectangle 2419@2x.png
...入口/service_center_head_bkg.imageset/Rectangle 2419@2x.png
+0
-0
Rectangle 2419@3x.png
...入口/service_center_head_bkg.imageset/Rectangle 2419@3x.png
+0
-0
Contents.json
...eCenter/主入口/service_center_no_data.imageset/Contents.json
+23
-0
Group 3098.png
...Center/主入口/service_center_no_data.imageset/Group 3098.png
+0
-0
Group 3098@2x.png
...ter/主入口/service_center_no_data.imageset/Group 3098@2x.png
+0
-0
Group 3098@3x.png
...ter/主入口/service_center_no_data.imageset/Group 3098@3x.png
+0
-0
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
a9c0423c
...
...
@@ -84,6 +84,7 @@
A5ACE9572B4564F7002C94D2
/* YHBasicContentView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5ACE9252B4564F7002C94D2
/* YHBasicContentView.swift */
;
};
A5ACE9582B4564F7002C94D2
/* YHNoDataTipView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5ACE9262B4564F7002C94D2
/* YHNoDataTipView.swift */
;
};
A5ACE95E2B4571BF002C94D2
/* YHHomeViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5ACE95D2B4571BF002C94D2
/* YHHomeViewController.swift */
;
};
A5C382CA2B5E1F4C00C5E65C
/* YHLoginTipsView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5C382C92B5E1F4C00C5E65C
/* YHLoginTipsView.swift */
;
};
A5C5B2E62B4EC0BF00A7C5D1
/* YHDavidTestViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5C5B2E52B4EC0BF00A7C5D1
/* YHDavidTestViewController.swift */
;
};
A5C5B2E82B4EC95600A7C5D1
/* YHDavidTestCollectionViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5C5B2E72B4EC95600A7C5D1
/* YHDavidTestCollectionViewCell.swift */
;
};
A5C5B2EA2B4ECA4D00A7C5D1
/* YHDavidModel0.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5C5B2E92B4ECA4D00A7C5D1
/* YHDavidModel0.swift */
;
};
...
...
@@ -218,6 +219,7 @@
A5ACE9252B4564F7002C94D2
/* YHBasicContentView.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHBasicContentView.swift
;
sourceTree
=
"<group>"
;
};
A5ACE9262B4564F7002C94D2
/* YHNoDataTipView.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHNoDataTipView.swift
;
sourceTree
=
"<group>"
;
};
A5ACE95D2B4571BF002C94D2
/* YHHomeViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHHomeViewController.swift
;
sourceTree
=
"<group>"
;
};
A5C382C92B5E1F4C00C5E65C
/* YHLoginTipsView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHLoginTipsView.swift
;
sourceTree
=
"<group>"
;
};
A5C5B2E52B4EC0BF00A7C5D1
/* YHDavidTestViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHDavidTestViewController.swift
;
sourceTree
=
"<group>"
;
};
A5C5B2E72B4EC95600A7C5D1
/* YHDavidTestCollectionViewCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHDavidTestCollectionViewCell.swift
;
sourceTree
=
"<group>"
;
};
A5C5B2E92B4ECA4D00A7C5D1
/* YHDavidModel0.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHDavidModel0.swift
;
sourceTree
=
"<group>"
;
};
...
...
@@ -601,6 +603,7 @@
A5ACE91A2B4564F7002C94D2
/* V */
=
{
isa
=
PBXGroup
;
children
=
(
A5C382C92B5E1F4C00C5E65C
/* YHLoginTipsView.swift */
,
);
path
=
V
;
sourceTree
=
"<group>"
;
...
...
@@ -922,6 +925,7 @@
A5ACE9462B4564F7002C94D2
/* BsHUDSquareBaseView.swift in Sources */
,
A5551FFE2B4C26CE00510980
/* YHBaseViewModel.swift in Sources */
,
A5C5B2F92B5515CE00A7C5D1
/* YHPageContentView.swift in Sources */
,
A5C382CA2B5E1F4C00C5E65C
/* YHLoginTipsView.swift in Sources */
,
A5C5B3232B57BF8F00A7C5D1
/* YHDavidCell1.swift in Sources */
,
A5C5B2FB2B5535DF00A7C5D1
/* YHHomeBannerView.swift in Sources */
,
A5ACE94B2B4564F7002C94D2
/* BsHUDRotatingImageView.swift in Sources */
,
...
...
galaxy/galaxy/AppDelegate.swift
View file @
a9c0423c
...
...
@@ -143,7 +143,7 @@ extension AppDelegate {
let
v2
=
YHNavigationController
(
rootVC
:
YHMyViewController
())
v0
.
tabBarItem
=
ESTabBarItem
.
init
(
YHBasicContentView
(),
title
:
"首页"
,
image
:
UIImage
(
named
:
"photo"
),
selectedImage
:
UIImage
(
named
:
"photo_1"
))
v1
.
tabBarItem
=
ESTabBarItem
.
init
(
YHBasicContentView
(),
title
:
"
智慧服务
"
,
image
:
UIImage
(
named
:
"home"
),
selectedImage
:
UIImage
(
named
:
"home_1"
))
v1
.
tabBarItem
=
ESTabBarItem
.
init
(
YHBasicContentView
(),
title
:
"
服务中心
"
,
image
:
UIImage
(
named
:
"home"
),
selectedImage
:
UIImage
(
named
:
"home_1"
))
v2
.
tabBarItem
=
ESTabBarItem
.
init
(
YHBasicContentView
(),
title
:
"我的"
,
image
:
UIImage
(
named
:
"find"
),
selectedImage
:
UIImage
(
named
:
"find_1"
))
tabBarController
.
viewControllers
=
[
v0
,
v1
,
v2
]
tabBarController
.
tabBar
.
backgroundColor
=
.
white
...
...
galaxy/galaxy/Classes/Base/C/YHBaseViewController.swift
View file @
a9c0423c
...
...
@@ -12,7 +12,7 @@ import GKNavigationBarSwift
class
YHBaseViewController
:
UIViewController
{
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
view
.
backgroundColor
=
UIColor
(
hex
:
0x
E9E9E9
)
view
.
backgroundColor
=
UIColor
(
hex
:
0x
f8f8f8
)
gk_navBackgroundColor
=
.
clear
gk_navLineHidden
=
true
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/C/YHIntelligentServiceViewController.swift
View file @
a9c0423c
...
...
@@ -8,81 +8,59 @@
import
UIKit
import
SmartCodable
//
智慧服务
//
服务中心
class
YHIntelligentServiceViewController
:
YHBaseViewController
{
private
lazy
var
topBkg
:
UIView
=
{
let
imagV
=
UIImageView
()
imagV
.
image
=
UIImage
(
named
:
"service_center_head_bkg"
)
imagV
.
contentMode
=
.
scaleAspectFill
return
imagV
}()
private
let
loginTipsView
:
YHLoginTipsView
=
{
let
view
=
YHLoginTipsView
()
view
.
viewType
=
0
view
.
isHidden
=
true
return
view
}()
private
let
noDataView
:
YHLoginTipsView
=
{
let
view
=
YHLoginTipsView
()
view
.
viewType
=
1
view
.
isHidden
=
true
return
view
}()
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
initView
()
// testModelParse()
}
func
initView
()
{
navigationItem
.
title
=
"智慧服务"
view
.
backgroundColor
=
UIColor
(
hex
:
0xE9E9E9
)
}
func
testModelParse
()
{
gk_navTitle
=
"服务中心"
gk_navBarAlpha
=
1.0
SmartConfig
.
debugMode
=
.
verbose
let
json
=
"""
{
"
data
": "
balabala
Team
",
"
code
": 0,
"
msg
": "
操作成功
",
"
test
": {
"
test1
": "
test1
-
value
",
"
test2
": "
test2
-
value
",
"
test333
": "
test3
-
value
",
},
"
testArr
":[
{
"
test1
": "
test1
-
value
",
"
test2
": "
test2
-
value
",
"
test333
": "
test3
-
value
",
},
{
"
test1
": "
test1
-
value
",
"
test2
": "
test2
-
value
",
"
test333
": "
test3
-
value
",
},
{
"
test1
": "
test1
-
value
",
"
test2
": "
test2
-
value
",
"
test333
": "
test3
-
value
",
}
]
view
.
addSubview
(
topBkg
)
topBkg
.
snp
.
makeConstraints
{
make
in
make
.
top
.
left
.
right
.
equalToSuperview
()
make
.
height
.
equalTo
(
216
)
}
"""
//1. json字符串 转 对象
guard
let
model
=
NetBaseModel
.
deserialize
(
json
:
json
)
else
{
return
}
print
(
"model 是 ==>"
,
model
)
print
(
model
)
//2. 对象 转 dictionary
let
dic
=
model
.
toDictionary
()
print
(
"dic 是 ==>"
,
dic
as
Any
)
//3. dictionary 转 string
let
jsonString
=
dic
?
.
jsonString
()
print
(
"jsonString 是 ==>"
,
jsonString
??
""
)
//4.model 转 string
let
jsonString2
=
model
.
toJSONString
()
print
(
"jsonString2 是 ==>"
,
jsonString2
??
""
)
view
.
addSubview
(
loginTipsView
)
loginTipsView
.
snp
.
makeConstraints
{
make
in
make
.
centerX
.
equalToSuperview
()
make
.
centerY
.
equalToSuperview
()
.
offset
(
-
64
)
make
.
width
.
equalTo
(
KScreenWidth
)
}
//5. dic 转 model
guard
let
model1
=
NetBaseModel
.
deserialize
(
dict
:
dic
)
else
{
return
}
print
(
"model1 是 ==>"
,
model1
)
view
.
addSubview
(
noDataView
)
noDataView
.
snp
.
makeConstraints
{
make
in
make
.
centerX
.
equalToSuperview
()
make
.
centerY
.
equalToSuperview
()
.
offset
(
-
64
)
make
.
width
.
equalTo
(
KScreenWidth
)
}
noDataView
.
isHidden
=
false
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/V/YHLoginTipsView.swift
0 → 100644
View file @
a9c0423c
//
// YHLoginTipsView.swift
// galaxy
//
// Created by davidhuangA on 2024/1/22.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHLoginTipsView
:
UIView
{
public
var
clickLoginBtnCallBackBlock
:
(()
->
())?
public
var
viewType
:
Int
=
0
{
// 0 - 有登录按钮 1- 无登录按钮,仅数据提示
didSet
{
if
viewType
==
0
{
iconImgV
.
image
=
UIImage
(
named
:
"login_tip_icon"
)
tipsLab
.
text
=
"登录后可以查看"
loginBtn
.
isHidden
=
false
}
else
if
viewType
==
1
{
iconImgV
.
image
=
UIImage
(
named
:
"service_center_no_data"
)
tipsLab
.
text
=
"更多内容敬请期待"
loginBtn
.
isHidden
=
true
}
else
{
iconImgV
.
image
=
UIImage
(
named
:
"login_tip_icon"
)
tipsLab
.
text
=
"登录后可以查看"
loginBtn
.
isHidden
=
false
}
}
}
private
lazy
var
iconImgV
:
UIImageView
=
{
let
imagV
=
UIImageView
()
imagV
.
image
=
UIImage
(
named
:
"login_tip_icon"
)
imagV
.
contentMode
=
.
scaleAspectFill
return
imagV
}()
private
lazy
var
tipsLab
:
UILabel
=
{
let
lable
=
UILabel
()
lable
.
textColor
=
UIColor
(
red
:
0.533
,
green
:
0.561
,
blue
:
0.596
,
alpha
:
1
)
lable
.
font
=
kFont
(
size
:
14
)
lable
.
textAlignment
=
.
center
lable
.
text
=
"登录后可以查看"
return
lable
}()
private
lazy
var
loginBtn
:
UIButton
=
{
let
btn
=
UIButton
(
type
:
.
custom
)
btn
.
setTitle
(
"去登录"
,
for
:
.
normal
)
btn
.
setBackgroundImage
(
UIImage
.
from
(
color
:
UIColor
(
hex
:
0x4D9FF8
,
alpha
:
1.0
),
rect
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
10
,
height
:
10
)),
for
:
.
normal
)
btn
.
layer
.
cornerRadius
=
8
btn
.
clipsToBounds
=
true
btn
.
titleLabel
?
.
font
=
kFont
(
size
:
12
)
return
btn
}()
public
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
initView
()
}
private
func
initView
()
{
addSubview
(
iconImgV
)
iconImgV
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalToSuperview
()
make
.
centerX
.
equalToSuperview
()
make
.
height
.
equalTo
(
93
)
make
.
width
.
equalTo
(
93
)
}
addSubview
(
tipsLab
)
tipsLab
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
iconImgV
.
snp
.
bottom
)
.
offset
(
12
)
make
.
centerX
.
equalToSuperview
()
make
.
left
.
right
.
equalToSuperview
()
}
addSubview
(
loginBtn
)
loginBtn
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
tipsLab
.
snp
.
bottom
)
.
offset
(
21
)
make
.
centerX
.
equalToSuperview
()
make
.
height
.
equalTo
(
36
)
make
.
width
.
equalTo
(
86
)
make
.
bottom
.
equalToSuperview
()
}
loginBtn
.
addTarget
(
self
,
action
:
#selector(
clickLoginBtn
)
,
for
:
.
touchUpInside
)
}
required
init
?(
coder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
}
@objc
func
clickLoginBtn
()
{
self
.
clickLoginBtnCallBackBlock
?()
}
}
galaxy/galaxy/Res/Assets.xcassets/ServiceCenter/Contents.json
0 → 100644
View file @
a9c0423c
{
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/ServiceCenter/主入口/Contents.json
0 → 100644
View file @
a9c0423c
{
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/ServiceCenter/主入口/login_tip_icon.imageset/Contents.json
0 → 100644
View file @
a9c0423c
{
"images"
:
[
{
"filename"
:
"Group 3119.png"
,
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"Group 3119@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"Group 3119@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/ServiceCenter/主入口/login_tip_icon.imageset/Group 3119.png
0 → 100644
View file @
a9c0423c
16.4 KB
galaxy/galaxy/Res/Assets.xcassets/ServiceCenter/主入口/login_tip_icon.imageset/Group 3119@2x.png
0 → 100644
View file @
a9c0423c
55.9 KB
galaxy/galaxy/Res/Assets.xcassets/ServiceCenter/主入口/login_tip_icon.imageset/Group 3119@3x.png
0 → 100644
View file @
a9c0423c
117 KB
galaxy/galaxy/Res/Assets.xcassets/ServiceCenter/主入口/service_center_head_bkg.imageset/Contents.json
0 → 100644
View file @
a9c0423c
{
"images"
:
[
{
"filename"
:
"Rectangle 2419.png"
,
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"Rectangle 2419@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"Rectangle 2419@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/ServiceCenter/主入口/service_center_head_bkg.imageset/Rectangle 2419.png
0 → 100644
View file @
a9c0423c
246 KB
galaxy/galaxy/Res/Assets.xcassets/ServiceCenter/主入口/service_center_head_bkg.imageset/Rectangle 2419@2x.png
0 → 100644
View file @
a9c0423c
954 KB
galaxy/galaxy/Res/Assets.xcassets/ServiceCenter/主入口/service_center_head_bkg.imageset/Rectangle 2419@3x.png
0 → 100644
View file @
a9c0423c
This diff is collapsed.
Click to expand it.
galaxy/galaxy/Res/Assets.xcassets/ServiceCenter/主入口/service_center_no_data.imageset/Contents.json
0 → 100644
View file @
a9c0423c
{
"images"
:
[
{
"filename"
:
"Group 3098.png"
,
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"Group 3098@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"Group 3098@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/ServiceCenter/主入口/service_center_no_data.imageset/Group 3098.png
0 → 100644
View file @
a9c0423c
16.3 KB
galaxy/galaxy/Res/Assets.xcassets/ServiceCenter/主入口/service_center_no_data.imageset/Group 3098@2x.png
0 → 100644
View file @
a9c0423c
55.2 KB
galaxy/galaxy/Res/Assets.xcassets/ServiceCenter/主入口/service_center_no_data.imageset/Group 3098@3x.png
0 → 100644
View file @
a9c0423c
116 KB
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