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
d9e4e9d7
Commit
d9e4e9d7
authored
Apr 18, 2024
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit '
95525c33
' into xiezhaolin
parents
4a577b82
95525c33
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
88 additions
and
27 deletions
+88
-27
YHHomePageViewController.swift
...Classes/Modules/Home(首页)/C/YHHomePageViewController.swift
+1
-1
YHSearchInfomationVC.swift
...axy/Classes/Modules/Home(首页)/C/YHSearchInfomationVC.swift
+1
-4
YHHomeBannerView.swift
.../galaxy/Classes/Modules/Home(首页)/V/YHHomeBannerView.swift
+1
-1
YHSearchInfoCell.swift
.../galaxy/Classes/Modules/Home(首页)/V/YHSearchInfoCell.swift
+1
-1
YHLoginViewModel.swift
...alaxy/Classes/Modules/Login(登录)/VM/YHLoginViewModel.swift
+23
-0
YHMyNotifySettingVC.swift
...laxy/Classes/Modules/Mine(我的)/C/YHMyNotifySettingVC.swift
+1
-0
YHMyPermissionSettingVC.swift
.../Classes/Modules/Mine(我的)/C/YHMyPermissionSettingVC.swift
+1
-0
YHMySettingViewController.swift
...lasses/Modules/Mine(我的)/C/YHMySettingViewController.swift
+23
-7
YHMyViewController.swift
...alaxy/Classes/Modules/Mine(我的)/C/YHMyViewController.swift
+31
-9
UIColor+Extension.swift
...xy/galaxy/Classes/Tools/Extention/UIColor+Extension.swift
+2
-2
YHAllApiName.swift
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
+1
-0
Contents.json
...eCenter/主入口/service_center_no_data.imageset/Contents.json
+2
-2
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
更多内容敬请期待@2x.png
...enter/主入口/service_center_no_data.imageset/更多内容敬请期待@2x.png
+0
-0
更多内容敬请期待@3x.png
...enter/主入口/service_center_no_data.imageset/更多内容敬请期待@3x.png
+0
-0
No files found.
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHHomePageViewController.swift
View file @
d9e4e9d7
...
...
@@ -20,7 +20,7 @@ class YHHomePageViewController: YHBaseViewController {
// 设置布局方向
let
flowLayout
=
YHHomeCollectionLayout
()
flowLayout
.
minimumInteritemSpacing
=
7.0
flowLayout
.
minimumColumnSpacing
=
10
.0
flowLayout
.
minimumColumnSpacing
=
7
.0
flowLayout
.
sectionInset
=
UIEdgeInsets
(
top
:
0
,
left
:
20
,
bottom
:
0
,
right
:
20
)
let
collectinoView
=
UICollectionView
(
frame
:
.
zero
,
collectionViewLayout
:
flowLayout
)
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHSearchInfomationVC.swift
View file @
d9e4e9d7
...
...
@@ -75,10 +75,7 @@ class YHSearchInfomationVC: YHBaseViewController {
lazy
var
tableView
:
UITableView
=
{
let
tableView
=
UITableView
(
frame
:
.
zero
,
style
:
.
grouped
)
if
#available(iOS 11.0, *)
{
tableView
.
contentInsetAdjustmentBehavior
=
.
never
}
tableView
.
contentInsetAdjustmentBehavior
=
.
never
tableView
.
estimatedSectionHeaderHeight
=
0.1
tableView
.
estimatedSectionFooterHeight
=
20.0
tableView
.
showsVerticalScrollIndicator
=
false
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/V/YHHomeBannerView.swift
View file @
d9e4e9d7
...
...
@@ -32,7 +32,7 @@ class YHHomeBannerView: UIView {
let
view
=
FSPagerView
()
view
.
delegate
=
self
view
.
dataSource
=
self
view
.
automaticSlidingInterval
=
4
view
.
automaticSlidingInterval
=
3
view
.
register
(
YHHomeBannerCollectionViewCell
.
self
,
forCellWithReuseIdentifier
:
"cell"
)
view
.
itemSize
=
CGSizeMake
(
YHHomeBannerView
.
viewH
,
YHHomeBannerView
.
viewH
)
//FSPagerView.automaticSize
return
view
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/V/YHSearchInfoCell.swift
View file @
d9e4e9d7
...
...
@@ -39,7 +39,7 @@ class YHSearchInfoCell: UITableViewCell {
lazy
var
titleLabel
:
UILabel
=
{
var
label
=
UILabel
()
label
.
font
=
.
PFSC_R
(
ofSize
:
1
2
)
label
.
font
=
.
PFSC_R
(
ofSize
:
1
5
)
label
.
textAlignment
=
.
left
label
.
textColor
=
UIColor
(
hex
:
0x121A26
)
label
.
numberOfLines
=
2
...
...
galaxy/galaxy/Classes/Modules/Login(登录)/VM/YHLoginViewModel.swift
View file @
d9e4e9d7
...
...
@@ -81,4 +81,27 @@ extension YHLoginViewModel {
callBackBlock
(
false
,
err
)
}
}
func
logout
(
_
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Auth
.
logout
let
_
=
YHNetRequest
.
postRequest
(
url
:
strUrl
)
{
[
weak
self
]
json
,
code
in
//1. json字符串 转 对象
guard
let
self
=
self
else
{
return
}
printLog
(
json
)
let
dic
=
json
.
data
if
json
.
code
==
200
{
callBackBlock
(
true
,
nil
)
}
else
{
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
)
callBackBlock
(
false
,
error
)
}
}
failBlock
:
{
error
in
callBackBlock
(
false
,
error
)
}
}
}
galaxy/galaxy/Classes/Modules/Mine(我的)/C/YHMyNotifySettingVC.swift
View file @
d9e4e9d7
...
...
@@ -14,6 +14,7 @@ class YHMyNotifySettingVC: YHBaseViewController {
lazy
var
tableView
:
UITableView
=
{
let
tableView
=
UITableView
(
frame
:
.
zero
,
style
:
.
grouped
)
tableView
.
contentInsetAdjustmentBehavior
=
.
never
tableView
.
estimatedSectionFooterHeight
=
1.0
tableView
.
showsVerticalScrollIndicator
=
false
tableView
.
separatorStyle
=
.
none
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/C/YHMyPermissionSettingVC.swift
View file @
d9e4e9d7
...
...
@@ -38,6 +38,7 @@ class YHMyPermissionSettingVC: YHBaseViewController {
lazy
var
tableView
:
UITableView
=
{
let
tableView
=
UITableView
(
frame
:
.
zero
,
style
:
.
grouped
)
tableView
.
contentInsetAdjustmentBehavior
=
.
never
tableView
.
estimatedSectionFooterHeight
=
1.0
tableView
.
showsVerticalScrollIndicator
=
false
tableView
.
separatorStyle
=
.
none
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/C/YHMySettingViewController.swift
View file @
d9e4e9d7
...
...
@@ -11,11 +11,10 @@ import SnapKit
class
YHMySettingViewController
:
YHBaseViewController
,
ConstraintRelatableTarget
{
let
viewModel
:
YHLoginViewModel
=
YHLoginViewModel
()
lazy
var
tableView
:
UITableView
=
{
let
tableView
=
UITableView
(
frame
:
CGRect
.
zero
,
style
:
.
plain
)
if
#available(iOS 11.0, *)
{
tableView
.
contentInsetAdjustmentBehavior
=
.
never
}
tableView
.
contentInsetAdjustmentBehavior
=
.
never
tableView
.
backgroundColor
=
.
white
tableView
.
separatorStyle
=
.
none
tableView
.
register
(
YHMySettingCell
.
self
,
forCellReuseIdentifier
:
YHMySettingCell
.
cellReuseIdentifier
)
...
...
@@ -114,10 +113,27 @@ class YHMySettingViewController: YHBaseViewController, ConstraintRelatableTarget
}
@objc
func
logout
()
{
YHLoginManager
.
shared
.
clearUserInfo
()
NotificationCenter
.
default
.
post
(
name
:
YhConstant
.
YhNotification
.
didLogoutSuccessNotifiction
,
object
:
nil
)
YHHUD
.
flash
(
message
:
"退出成功"
)
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
YHHUD
.
show
(
.
progress
(
message
:
"退出登录中..."
))
self
.
viewModel
.
logout
()
{
[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
YHHUD
.
hide
()
if
success
{
DispatchQueue
.
main
.
async
{
YHHUD
.
flash
(
message
:
"退出成功"
)
YHLoginManager
.
shared
.
clearUserInfo
()
NotificationCenter
.
default
.
post
(
name
:
YhConstant
.
YhNotification
.
didLogoutSuccessNotifiction
,
object
:
nil
)
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
}
return
}
var
msg
=
"退出失败"
if
let
error
=
error
,
!
error
.
errorMsg
.
isEmpty
{
msg
=
error
.
errorMsg
}
YHHUD
.
flash
(
message
:
msg
)
}
}
}
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/C/YHMyViewController.swift
View file @
d9e4e9d7
...
...
@@ -45,12 +45,10 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
let
likeViewModel
:
YHMyLikeViewModel
=
YHMyLikeViewModel
()
let
msgViewModel
:
YHMsgViewModel
=
YHMsgViewModel
()
lazy
var
tableView
:
UITableView
=
{
let
tableView
=
UITableView
(
frame
:
CGRect
.
zero
,
style
:
.
grouped
)
if
#available(iOS 11.0, *)
{
tableView
.
contentInsetAdjustmentBehavior
=
.
never
}
tableView
.
contentInsetAdjustmentBehavior
=
.
never
tableView
.
estimatedSectionHeaderHeight
=
1.0
tableView
.
showsVerticalScrollIndicator
=
false
tableView
.
tableHeaderView
=
headerView
...
...
@@ -156,6 +154,7 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
gk_navigationBar
.
isHidden
=
true
view
.
addSubview
(
tableView
)
self
.
view
.
backgroundColor
=
.
white
updateUserUI
()
...
...
@@ -239,12 +238,17 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
var
token
:
String
=
param
//待h5端同学提供
var
url
=
"https:www.baidu.com"
#if DEBUG
var
url
=
"https://test-hkdiy-h5.galaxy-immi.com/superApp/integral"
#elseif TESTNEV
var
url
=
"https://test-hkdiy-h5.galaxy-immi.com/superApp/integral"
#else
var
url
=
"https://thkdiy-h5.galaxy-immi.com/superApp/integral"
#endif
let
addtionString
=
randomAlphanumericString
(
6
)
//随机6个字母或者数字
let
indexToInsert
=
token
.
index
(
token
.
startIndex
,
offsetBy
:
6
)
//插入位置,这里以第六个字符后面为例
token
.
insert
(
contentsOf
:
addtionString
,
at
:
indexToInsert
)
url
=
url
+
"?param="
+
token
YHHUD
.
flash
(
message
:
"还需要H5同学给URL"
)
printLog
(
url
)
...
...
@@ -270,14 +274,32 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
printLog
(
"不需要响应"
)
}
}
private
func
tableView
(
_
tableView
:
UITableView
,
viewForHeaderInSection
section
:
Int
)
->
CGFloat
{
return
1.0
}
private
func
tableView
(
_
tableView
:
UITableView
,
viewForFooterInSection
section
:
Int
)
->
CGFloat
{
return
1.0
}
func
tableView
(
_
tableView
:
UITableView
,
viewForFooterInSection
section
:
Int
)
->
UIView
?
{
return
UIView
()
}
func
tableView
(
_
tableView
:
UITableView
,
viewForHeaderInSection
section
:
Int
)
->
UIView
?
{
return
UIView
()
}
}
extension
YHMyViewController
{
func
randomAlphanumericString
(
_
length
:
Int
)
->
String
{
let
letters
=
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
let
randomString
=
(
0
..<
length
)
.
map
{
_
in
String
(
letters
.
randomElement
()
!
)
}
.
reduce
(
""
,
+
)
return
randomString
let
letters
=
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
let
randomString
=
(
0
..<
length
)
.
map
{
_
in
String
(
letters
.
randomElement
()
!
)
}
.
reduce
(
""
,
+
)
return
randomString
}
@objc
func
loginSuccess
()
{
...
...
galaxy/galaxy/Classes/Tools/Extention/UIColor+Extension.swift
View file @
d9e4e9d7
...
...
@@ -12,10 +12,10 @@ import UIKit
extension
UIColor
{
//品牌主色
static
let
brandMainColor
:
UIColor
=
UIColor
(
hexString
:
"#
2F7EF6
"
)
!
static
let
brandMainColor
:
UIColor
=
UIColor
(
hexString
:
"#
3570DC
"
)
!
//品牌渐变色
static
let
arrBrandGradaterColors
:
[
UIColor
]
=
[
UIColor
(
hexString
:
"#
2274EE
"
)
!
,
UIColor
(
hexString
:
"#3A85FC"
)
!
]
static
let
arrBrandGradaterColors
:
[
UIColor
]
=
[
UIColor
(
hexString
:
"#
3570DC
"
)
!
,
UIColor
(
hexString
:
"#3A85FC"
)
!
]
//品牌主色 16
static
let
brandMainColor16
:
UIColor
=
UIColor
(
hexString
:
"#2F7EF6"
,
transparency
:
0.16
)
!
...
...
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
View file @
d9e4e9d7
...
...
@@ -162,6 +162,7 @@ class YHAllApiName {
//登录
struct
Auth
{
static
let
login
=
"infoflow/auth/login"
static
let
logout
=
"infoflow/auth/logout"
}
//获取验证
...
...
galaxy/galaxy/Res/Assets.xcassets/ServiceCenter/主入口/service_center_no_data.imageset/Contents.json
View file @
d9e4e9d7
...
...
@@ -5,12 +5,12 @@
"scale"
:
"1x"
},
{
"filename"
:
"
更多内容敬请期待
@2x.png"
,
"filename"
:
"
Group 3098
@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"
更多内容敬请期待
@3x.png"
,
"filename"
:
"
Group 3098
@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
...
...
galaxy/galaxy/Res/Assets.xcassets/ServiceCenter/主入口/service_center_no_data.imageset/Group 3098@2x.png
0 → 100644
View file @
d9e4e9d7
20 KB
galaxy/galaxy/Res/Assets.xcassets/ServiceCenter/主入口/service_center_no_data.imageset/Group 3098@3x.png
0 → 100644
View file @
d9e4e9d7
40.3 KB
galaxy/galaxy/Res/Assets.xcassets/ServiceCenter/主入口/service_center_no_data.imageset/更多内容敬请期待@2x.png
deleted
100644 → 0
View file @
4a577b82
61.7 KB
galaxy/galaxy/Res/Assets.xcassets/ServiceCenter/主入口/service_center_no_data.imageset/更多内容敬请期待@3x.png
deleted
100644 → 0
View file @
4a577b82
130 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