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
9589b1b9
Commit
9589b1b9
authored
Jan 06, 2024
by
David黄金龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、日志输出
2、首页添加相应资源
parent
fc65b59e
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
106 additions
and
67 deletions
+106
-67
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+1
-1
AppDelegate.swift
galaxy/galaxy/AppDelegate.swift
+0
-4
YHBaseViewController.swift
galaxy/galaxy/Classes/Base/C/YHBaseViewController.swift
+3
-1
YHHomeViewController.swift
...axy/Classes/Modules/Home(首页)/C/YHHomeViewController.swift
+18
-1
YHHomePageViewModel.swift
...axy/Classes/Modules/Home(首页)/VM/YHHomePageViewModel.swift
+1
-1
String+Extension.swift
galaxy/galaxy/Classes/Tools/Extention/String+Extension.swift
+1
-12
YhConstant.swift
galaxy/galaxy/Classes/Tools/Helper/YhConstant.swift
+50
-44
YHNetRequest.swift
galaxy/galaxy/Classes/Tools/NetWork/YHNetRequest.swift
+3
-3
Contents.json
galaxy/galaxy/Res/Assets.xcassets/Home/Contents.json
+6
-0
Contents.json
...Assets.xcassets/Home/home_head_bkg.imageset/Contents.json
+23
-0
Rectangle 8235.png
...s.xcassets/Home/home_head_bkg.imageset/Rectangle 8235.png
+0
-0
Rectangle 8235@2x.png
...cassets/Home/home_head_bkg.imageset/Rectangle 8235@2x.png
+0
-0
Rectangle 8235@3x.png
...cassets/Home/home_head_bkg.imageset/Rectangle 8235@3x.png
+0
-0
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
9589b1b9
...
@@ -287,9 +287,9 @@
...
@@ -287,9 +287,9 @@
A5ACE8D72B4564F7002C94D2
/* Classes */
=
{
A5ACE8D72B4564F7002C94D2
/* Classes */
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
A5ACE91B2B4564F7002C94D2
/* Modules */
,
A5ACE91E2B4564F7002C94D2
/* Base */
,
A5ACE91E2B4564F7002C94D2
/* Base */
,
A5ACE8EE2B4564F7002C94D2
/* Tools */
,
A5ACE8EE2B4564F7002C94D2
/* Tools */
,
A5ACE91B2B4564F7002C94D2
/* Modules */
,
);
);
path
=
Classes
;
path
=
Classes
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
...
galaxy/galaxy/AppDelegate.swift
View file @
9589b1b9
...
@@ -107,10 +107,6 @@ extension AppDelegate {
...
@@ -107,10 +107,6 @@ extension AppDelegate {
}
}
YHNetworkStatusManager
.
shared
.
listenNetWorkStatus
()
YHNetworkStatusManager
.
shared
.
listenNetWorkStatus
()
}
}
//1.设置主窗口
//1.设置主窗口
...
...
galaxy/galaxy/Classes/Base/C/YHBaseViewController.swift
View file @
9589b1b9
...
@@ -37,7 +37,9 @@ class YHBaseViewController: UIViewController {
...
@@ -37,7 +37,9 @@ class YHBaseViewController: UIViewController {
}
}
deinit
{
deinit
{
#if DEBUG
#if DEBUG
print
(
#function
)
// print(type(of: self))
// print("执行了方法:",terminator: "\t")
printLog
(
#function
)
#endif
#endif
}
}
}
}
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHHomeViewController.swift
View file @
9589b1b9
...
@@ -17,6 +17,13 @@ class YHHomeViewController: YHBaseViewController {
...
@@ -17,6 +17,13 @@ class YHHomeViewController: YHBaseViewController {
return
YHHomePageViewModel
()
return
YHHomePageViewModel
()
}()
}()
lazy
var
headBkgImagV
:
UIImageView
=
{
let
imagV
=
UIImageView
()
imagV
.
image
=
UIImage
(
named
:
"home_head_bkg"
)
imagV
.
contentMode
=
.
scaleAspectFill
return
imagV
}()
override
func
viewDidLoad
()
{
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
super
.
viewDidLoad
()
...
@@ -52,8 +59,18 @@ class YHHomeViewController: YHBaseViewController {
...
@@ -52,8 +59,18 @@ class YHHomeViewController: YHBaseViewController {
}
}
private
func
initView
()
->
Void
{
private
func
initView
()
->
Void
{
navigationItem
.
title
=
"
首页
"
navigationItem
.
title
=
""
view
.
backgroundColor
=
UIColor
(
hex
:
0xE9E9E9
)
view
.
backgroundColor
=
UIColor
(
hex
:
0xE9E9E9
)
view
.
addSubview
(
headBkgImagV
)
headBkgImagV
.
snp
.
makeConstraints
{
make
in
make
.
top
.
left
.
right
.
equalToSuperview
()
make
.
height
.
equalTo
(
307
)
}
}
}
}
}
galaxy/galaxy/Classes/Modules/Home(首页)/VM/YHHomePageViewModel.swift
View file @
9589b1b9
...
@@ -30,7 +30,7 @@ extension YHHomePageViewModel {
...
@@ -30,7 +30,7 @@ extension YHHomePageViewModel {
return
return
}
}
self
.
subject
.
onNext
(
YHHomeCofigMode
())
self
.
subject
.
onNext
(
YHHomeCofigMode
())
print
(
"model 是 ==>"
,
model
)
print
Log
(
"model 是 ==>
\(
model
)
"
)
}
failBlock
:
{
err
in
}
failBlock
:
{
err
in
print
(
err
)
print
(
err
)
}
}
...
...
galaxy/galaxy/Classes/Tools/Extention/String+Extension.swift
View file @
9589b1b9
...
@@ -187,14 +187,3 @@ extension String {
...
@@ -187,14 +187,3 @@ extension String {
}
}
}
}
/// 打印
///
/// - Parameters:
/// - message: 打印内容
/// - file: 所在文件
/// - method: 所在方法
/// - line: 所在行
public
func
printLog
<
T
>
(
_
message
:
T
,
file
:
String
=
#file
,
method
:
String
=
#function
,
line
:
Int
=
#line
)
{
print
(
"
\n
[文件]:
\(
(
file
as
NSString
)
.
lastPathComponent
)
[所在行]:
\(
line
)
,[方法名称]:
\(
method
)
,[具体信息]:
\(
message
)
"
)
}
galaxy/galaxy/Classes/Tools/Helper/YhConstant.swift
View file @
9589b1b9
...
@@ -12,14 +12,20 @@ import UIKit
...
@@ -12,14 +12,20 @@ import UIKit
let
APP_NAME
=
Bundle
.
main
.
infoDictionary
!
[
"CFBundleName"
]
as!
String
let
APP_NAME
=
Bundle
.
main
.
infoDictionary
!
[
"CFBundleName"
]
as!
String
func
YHLOG
<
T
>
(
message
:
T
,
file
:
String
=
#file
,
funcName
:
String
=
#function
,
lineName
:
Int
=
#line
){
/// 打印
//这个DEBUG 是一个debug时候的一个flag需要自己去xcode设置项设置。
///
/// - Parameters:
/// - message: 打印内容
/// - file: 所在文件
/// - method: 所在方法
/// - line: 所在行
public
func
printLog
<
T
>
(
_
message
:
T
,
file
:
String
=
#file
,
method
:
String
=
#function
,
line
:
Int
=
#line
)
{
#if DEBUG
#if DEBUG
let
flieName
=
(
file
as
NSString
)
.
lastPathComponent
print
(
"
\n
开始一段日志输出=========>
\n
[文件]:
\(
(
file
as
NSString
)
.
lastPathComponent
)\n
[所在行]:
\(
line
)\n
[方法名称]:
\(
method
)\n
[打印信息]:
\(
message
)\n
结束该段日志输出<=========
\n\n\n
"
)
print
(
"
\(
APP_NAME
)
/
\(
flieName
)
/
\(
funcName
)
/
\(
lineName
)
:
\(
message
)
"
)
#endif
#endif
}
}
///屏幕宽度
///屏幕宽度
let
KScreenWidth
=
UIScreen
.
main
.
bounds
.
size
.
width
let
KScreenWidth
=
UIScreen
.
main
.
bounds
.
size
.
width
///屏幕高度
///屏幕高度
...
...
galaxy/galaxy/Classes/Tools/NetWork/YHNetRequest.swift
View file @
9589b1b9
...
@@ -106,7 +106,7 @@ class YHNetRequest: NSObject {
...
@@ -106,7 +106,7 @@ class YHNetRequest: NSObject {
httpRequest
?
.
responseString
(
completionHandler
:
{
string
in
httpRequest
?
.
responseString
(
completionHandler
:
{
string
in
#if DEBUG
#if DEBUG
print
(
"
\n
网络请求已返回 string=
\(
string
)
"
)
print
Log
(
"
\n
网络请求已返回 string=
\(
string
)
"
)
#endif
#endif
self
.
completeHandle
(
string
:
string
)
self
.
completeHandle
(
string
:
string
)
})
})
...
@@ -207,12 +207,12 @@ class YHNetRequest: NSObject {
...
@@ -207,12 +207,12 @@ class YHNetRequest: NSObject {
extension
YHNetRequest
{
extension
YHNetRequest
{
class
func
getRequest
(
url
:
String
,
params
:[
String
:
Any
]
=
[:],
successBlock
:
SuccessHandlerType
!
,
failBlock
:
FailureHandlerType
!
)
->
Request
?
{
class
func
getRequest
(
url
:
String
,
params
:[
String
:
Any
]
=
[:],
successBlock
:
SuccessHandlerType
!
,
failBlock
:
FailureHandlerType
!
)
->
Request
?
{
YHLOG
(
message
:
"
\n
发起请求的URL是===> url =
\(
url
)
"
)
printLog
(
"
\n
发起请求的URL是===> url =
\(
url
)
"
)
return
YHNetRequest
()
.
url
(
url
)
.
requestType
(
.
get
)
.
success
(
successBlock
)
.
failed
(
failBlock
)
.
startRequest
()
return
YHNetRequest
()
.
url
(
url
)
.
requestType
(
.
get
)
.
success
(
successBlock
)
.
failed
(
failBlock
)
.
startRequest
()
}
}
class
func
postRequest
(
url
:
String
,
params
:[
String
:
Any
]
=
[:],
successBlock
:
SuccessHandlerType
!
,
failBlock
:
FailureHandlerType
!
)
->
Request
?
{
class
func
postRequest
(
url
:
String
,
params
:[
String
:
Any
]
=
[:],
successBlock
:
SuccessHandlerType
!
,
failBlock
:
FailureHandlerType
!
)
->
Request
?
{
YHLOG
(
message
:
"
\n
发起请求的URL是===> url =
\(
url
)
"
)
printLog
(
"
\n
发起请求的URL是===> url =
\(
url
)
"
)
return
YHNetRequest
()
.
url
(
url
)
.
requestType
(
.
post
)
.
success
(
successBlock
)
.
failed
(
failBlock
)
.
startRequest
()
return
YHNetRequest
()
.
url
(
url
)
.
requestType
(
.
post
)
.
success
(
successBlock
)
.
failed
(
failBlock
)
.
startRequest
()
}
}
}
}
...
...
galaxy/galaxy/Res/Assets.xcassets/Home/Contents.json
0 → 100644
View file @
9589b1b9
{
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/Home/home_head_bkg.imageset/Contents.json
0 → 100644
View file @
9589b1b9
{
"images"
:
[
{
"filename"
:
"Rectangle 8235.png"
,
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"Rectangle 8235@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"Rectangle 8235@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/Home/home_head_bkg.imageset/Rectangle 8235.png
0 → 100644
View file @
9589b1b9
140 KB
galaxy/galaxy/Res/Assets.xcassets/Home/home_head_bkg.imageset/Rectangle 8235@2x.png
0 → 100644
View file @
9589b1b9
302 KB
galaxy/galaxy/Res/Assets.xcassets/Home/home_head_bkg.imageset/Rectangle 8235@3x.png
0 → 100644
View file @
9589b1b9
497 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