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
df304e72
Commit
df304e72
authored
Apr 11, 2024
by
David黄金龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、添加首页配置
parent
f420e0ce
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
92 additions
and
18 deletions
+92
-18
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+8
-0
AppDelegate.swift
galaxy/galaxy/AppDelegate.swift
+18
-1
YHConfigManager.swift
...y/galaxy/Classes/Modules/Home(首页)/C/YHConfigManager.swift
+40
-0
YHHomeViewController.swift
...axy/Classes/Modules/Home(首页)/C/YHHomeViewController.swift
+1
-11
YHConfigModel.swift
galaxy/galaxy/Classes/Modules/Home(首页)/M/YHConfigModel.swift
+20
-0
YHHomePageViewModel.swift
...axy/Classes/Modules/Home(首页)/VM/YHHomePageViewModel.swift
+4
-3
YHAllApiName.swift
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
+1
-3
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
df304e72
...
...
@@ -320,6 +320,8 @@
A592FE932BA6CFFC0062FACA
/* YHCertificateEntryBottomView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A592FE922BA6CFFC0062FACA
/* YHCertificateEntryBottomView.swift */
;
};
A592FE952BA6D23C0062FACA
/* YHCertificateEntryCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A592FE942BA6D23C0062FACA
/* YHCertificateEntryCell.swift */
;
};
A592FE972BA6DB340062FACA
/* YHCertificateViewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A592FE962BA6DB340062FACA
/* YHCertificateViewModel.swift */
;
};
A5A4FD632BC79901001EF9F7
/* YHConfigManager.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5A4FD622BC79901001EF9F7
/* YHConfigManager.swift */
;
};
A5A4FD652BC799A9001EF9F7
/* YHConfigModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5A4FD642BC799A9001EF9F7
/* YHConfigModel.swift */
;
};
A5ACE9272B4564F7002C94D2
/* YHLoginViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5ACE8DB2B4564F7002C94D2
/* YHLoginViewController.swift */
;
};
A5ACE9282B4564F7002C94D2
/* YHSmsCodeView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5ACE8DE2B4564F7002C94D2
/* YHSmsCodeView.swift */
;
};
A5ACE9292B4564F7002C94D2
/* YHSmsCodeInputView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5ACE8E02B4564F7002C94D2
/* YHSmsCodeInputView.swift */
;
};
...
...
@@ -761,6 +763,8 @@
A592FE922BA6CFFC0062FACA
/* YHCertificateEntryBottomView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCertificateEntryBottomView.swift
;
sourceTree
=
"<group>"
;
};
A592FE942BA6D23C0062FACA
/* YHCertificateEntryCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCertificateEntryCell.swift
;
sourceTree
=
"<group>"
;
};
A592FE962BA6DB340062FACA
/* YHCertificateViewModel.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCertificateViewModel.swift
;
sourceTree
=
"<group>"
;
};
A5A4FD622BC79901001EF9F7
/* YHConfigManager.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHConfigManager.swift
;
sourceTree
=
"<group>"
;
};
A5A4FD642BC799A9001EF9F7
/* YHConfigModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHConfigModel.swift
;
sourceTree
=
"<group>"
;
};
A5ACE8DB2B4564F7002C94D2
/* YHLoginViewController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHLoginViewController.swift
;
sourceTree
=
"<group>"
;
};
A5ACE8DE2B4564F7002C94D2
/* YHSmsCodeView.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHSmsCodeView.swift
;
sourceTree
=
"<group>"
;
};
A5ACE8E02B4564F7002C94D2
/* YHSmsCodeInputView.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHSmsCodeInputView.swift
;
sourceTree
=
"<group>"
;
};
...
...
@@ -2148,6 +2152,7 @@
A53F42B82BC3DCA9009CAC70
/* YHHomeKingKongBlockModel.swift */
,
049AC4CB2BC6615500F857F4
/* YHHomeListModel.swift */
,
049AC4CD2BC674A700F857F4
/* YHHomeClassifyModel.swift */
,
A5A4FD642BC799A9001EF9F7
/* YHConfigModel.swift */
,
);
path
=
M
;
sourceTree
=
"<group>"
;
...
...
@@ -2193,6 +2198,7 @@
A53D381F2BC243F1006AE6F7
/* YHStartPageViewController.swift */
,
A5173D672BC399B9007D4E74
/* YHHomePageViewController.swift */
,
044E1E802BC3BBC200A3B4AF
/* YHSearchInfomationVC.swift */
,
A5A4FD622BC79901001EF9F7
/* YHConfigManager.swift */
,
);
path
=
C
;
sourceTree
=
"<group>"
;
...
...
@@ -2453,6 +2459,7 @@
045EEF112B9F171A0022A143
/* YHMainInformationModel.swift in Sources */
,
A58AC09D2BABD59600A30FA9
/* YHFileListModel.swift in Sources */
,
045EEEFF2B9F171A0022A143
/* YHSaveAndSubmitView.swift in Sources */
,
A5A4FD632BC79901001EF9F7
/* YHConfigManager.swift in Sources */
,
A5173D682BC399B9007D4E74
/* YHHomePageViewController.swift in Sources */
,
045EEF0E2B9F171A0022A143
/* YHBasicInfoFillView.swift in Sources */
,
045EEEA12B9F171A0022A143
/* YHWorkExperienceDetailModel.swift in Sources */
,
...
...
@@ -2617,6 +2624,7 @@
045EEE942B9F171A0022A143
/* YHPreviewInfoQuestionAndAnswerItemView.swift in Sources */
,
045EEED32B9F171A0022A143
/* YHScoreItemCell.swift in Sources */
,
045EEEEE2B9F171A0022A143
/* YHCertificateUploadVC.swift in Sources */
,
A5A4FD652BC799A9001EF9F7
/* YHConfigModel.swift in Sources */
,
A510441A2B495DD0006B60BB
/* UIView+Extension.swift in Sources */
,
A5ACE93E2B4564F7002C94D2
/* UIImage+Extension.swift in Sources */
,
A587F7C02BBADBE1002D9781
/* YHHKPlanItemView.swift in Sources */
,
...
...
galaxy/galaxy/AppDelegate.swift
View file @
df304e72
...
...
@@ -15,7 +15,6 @@ import DeviceKit
@main
class
AppDelegate
:
UIResponder
,
UIApplicationDelegate
{
var
window
:
UIWindow
?
func
application
(
_
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
UIApplication
.
LaunchOptionsKey
:
Any
]?)
->
Bool
{
// JPush服务注册
...
...
@@ -37,6 +36,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
//4.本地用户信息加载
YHLoginManager
.
shared
.
loadLocalUserInfoData
()
YHConfigManager
.
shared
.
loadConfigData
()
// YHAnalytics.analyticsStart(launchOptions: launchOptions)
...
...
@@ -150,6 +151,22 @@ extension AppDelegate {
window
?
.
makeKeyAndVisible
()
}
// private func requestData() {
// self.homeReqVM.getHomeConfig { flag, error in
// if flag == true {
// //1. 调用model 刷新界面
// YHHUD.flash(message: "数据已更新")
// } else {
// //2. 给出 错误提示
// if let error = error {
// YHHUD.flash(message: error.errorMsg)
// }
// }
// }
// }
}
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHConfigManager.swift
0 → 100644
View file @
df304e72
//
// YHConfigManager.swift
// galaxy
//
// Created by davidhuangA on 2024/4/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHConfigManager
:
NSObject
{
static
let
shared
=
YHConfigManager
()
lazy
var
reqVM
:
YHHomePageViewModel
=
{
let
vm
=
YHHomePageViewModel
()
return
vm
}()
private
var
loadNewDataFlag
:
Bool
=
false
private
override
init
()
{
super
.
init
()
// loadConfigData()
}
var
h5Url
:
String
{
return
reqVM
.
configModel
?
.
h5_url
??
""
}
}
extension
YHConfigManager
{
func
loadConfigData
()
{
reqVM
.
getHomeConfig
{
flag
,
error
in
if
flag
{
self
.
loadNewDataFlag
=
true
}
}
}
}
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHHomeViewController.swift
View file @
df304e72
...
...
@@ -223,17 +223,7 @@ extension YHHomeViewController {
}
private
func
requestData
()
{
self
.
homeReqVM
.
getHomeConfig
{
flag
,
error
in
if
flag
==
true
{
//1. 调用model 刷新界面
YHHUD
.
flash
(
message
:
"数据已更新"
)
}
else
{
//2. 给出 错误提示
if
let
error
=
error
{
YHHUD
.
flash
(
message
:
error
.
errorMsg
)
}
}
}
}
private
func
initView
()
->
Void
{
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/M/YHConfigModel.swift
0 → 100644
View file @
df304e72
//
// YHConfigModel.swift
// galaxy
//
// Created by davidhuangA on 2024/4/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
import
SmartCodable
class
YHConfigModel
:
SmartCodable
{
var
min_version_num
:
Int
=
0
var
oss_server
:
Int
=
0
var
countdown
:
Int
=
0
var
h5_url
:
String
=
""
required
init
()
{
}
}
galaxy/galaxy/Classes/Modules/Home(首页)/VM/YHHomePageViewModel.swift
View file @
df304e72
...
...
@@ -10,7 +10,8 @@ import UIKit
class
YHHomePageViewModel
:
YHBaseViewModel
{
//数据源
var
configModel
:
YHHomeCofigMode
?
var
configModel
:
YHConfigModel
?
var
arrHomeNewsData
:
[
YHHomeListModel
?]
=
[]
var
banners
:
[
YHBannerModel
]?
var
classify
:
[
YHHomeClassifyModel
]?
...
...
@@ -18,14 +19,14 @@ class YHHomePageViewModel : YHBaseViewModel {
//接口
extension
YHHomePageViewModel
{
//请求
首页的
配置
//请求配置
func
getHomeConfig
(
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Common
.
homeConfigApi
let
_
=
YHNetRequest
.
getRequest
(
url
:
strUrl
)
{
[
weak
self
]
json
,
code
in
//1. json字符串 转 对象
guard
let
self
=
self
else
{
return
}
let
dic
=
json
.
data
guard
let
resultModel
=
YH
HomeCofigMode
.
deserialize
(
dict
:
dic
as?
[
AnyHashable
:
Any
])
else
{
guard
let
resultModel
=
YH
ConfigModel
.
deserialize
(
dict
:
dic
as?
[
AnyHashable
:
Any
])
else
{
callBackBlock
(
false
,
nil
)
return
}
...
...
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
View file @
df304e72
...
...
@@ -10,10 +10,8 @@
class
YHAllApiName
{
//接口 模块名 Common
struct
Common
{
//具体的业务接口
//首页配置接口
static
let
homeConfigApi
=
"
common/homepage-config/index
"
static
let
homeConfigApi
=
"
infoflow/app/config
"
//获取首页展示的资讯
static
let
consult
=
"infoflow/home/consult"
//获取首页展示的banner
...
...
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