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
dc38e614
Commit
dc38e614
authored
Mar 17, 2025
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码修改
parent
87fa4d4a
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
46 additions
and
41 deletions
+46
-41
YHMessageListVC.swift
...alaxy/Classes/Modules/Message(消息)/C/YHMessageListVC.swift
+1
-2
YHListViewModel.swift
...Classes/Modules/Mine(我的)/AboutYH/VM/YHListViewModel.swift
+1
-1
YHAboutGalaxyViewController.swift
...sses/Modules/Mine(我的)/C/YHAboutGalaxyViewController.swift
+1
-1
YHAboutUsViewController.swift
.../Classes/Modules/Mine(我的)/C/YHAboutUsViewController.swift
+3
-1
YHMyNewViewController.swift
...xy/Classes/Modules/Mine(我的)/C/YHMyNewViewController.swift
+2
-3
YHMyNotifySettingVC.swift
...laxy/Classes/Modules/Mine(我的)/C/YHMyNotifySettingVC.swift
+2
-1
YHMyPermissionSettingVC.swift
.../Classes/Modules/Mine(我的)/C/YHMyPermissionSettingVC.swift
+2
-2
YHMySettingViewController.swift
...lasses/Modules/Mine(我的)/C/YHMySettingViewController.swift
+2
-1
YHMyViewController.swift
...alaxy/Classes/Modules/Mine(我的)/C/YHMyViewController.swift
+2
-1
YHVipLevelRightViewController.swift
...es/Modules/Mine(我的)/C/YHVipLevelRightViewController.swift
+3
-3
YHEditInterestViewController.swift
...ine(我的)/MyCard(我的名片)/C/YHEditInterestViewController.swift
+4
-3
YHMyFunctionGroup2Cell.swift
...y/Classes/Modules/Mine(我的)/V/YHMyFunctionGroup2Cell.swift
+1
-2
YHMySectionGroupCell.swift
...axy/Classes/Modules/Mine(我的)/V/YHMySectionGroupCell.swift
+1
-2
YHVipLevelRightHeaderView.swift
...lasses/Modules/Mine(我的)/V/YHVipLevelRightHeaderView.swift
+1
-1
YHVipLevelRightInfoCell.swift
.../Classes/Modules/Mine(我的)/V/YHVipLevelRightInfoCell.swift
+4
-4
YHMyLikeViewModel.swift
...lasses/Modules/Mine(我的)/ViewModel/YHMyLikeViewModel.swift
+2
-2
UIDevice+Extension.swift
...y/galaxy/Classes/Tools/Extention/UIDevice+Extension.swift
+0
-2
UITextField+Extension.swift
...alaxy/Classes/Tools/Extention/UITextField+Extension.swift
+9
-4
YhConstant.swift
galaxy/galaxy/Classes/Tools/Helper/YhConstant.swift
+3
-3
YHRangeDatePickerView.swift
...Classes/Tools/RangeDatePicker/YHRangeDatePickerView.swift
+1
-1
YHOSSManager.swift
galaxy/galaxy/Classes/Tools/Upload/YHOSSManager.swift
+1
-1
No files found.
galaxy/galaxy/Classes/Modules/Message(消息)/C/YHMessageListVC.swift
View file @
dc38e614
...
...
@@ -423,8 +423,7 @@ extension YHMessageListVC: UITableViewDelegate, UITableViewDataSource {
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMessageSessionCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHMessageSessionCell
guard
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMessageSessionCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as?
YHMessageSessionCell
else
{
return
UITableViewCell
()
}
if
0
<=
indexPath
.
row
&&
indexPath
.
row
<
msgArr
.
count
{
let
model
=
msgArr
[
indexPath
.
row
]
cell
.
updateModel
(
model
)
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/AboutYH/VM/YHListViewModel.swift
View file @
dc38e614
...
...
@@ -23,7 +23,7 @@ class YHListViewModel: YHBaseViewModel {
callBackBlock
(
false
,
nil
)
return
}
self
.
model
=
(
result
as
!
[
YHHKEventModel
])
self
.
model
=
(
result
as
?
[
YHHKEventModel
]
??
[
])
callBackBlock
(
true
,
nil
)
}
else
{
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
)
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/C/YHAboutGalaxyViewController.swift
View file @
dc38e614
...
...
@@ -139,7 +139,7 @@ extension YHAboutGalaxyViewController: UITableViewDelegate, UITableViewDataSourc
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHAboutUsCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHAboutUsCell
guard
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHAboutUsCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as?
YHAboutUsCell
else
{
return
UITableViewCell
()
}
let
item
=
items
[
indexPath
.
row
]
cell
.
item
=
item
return
cell
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/C/YHAboutUsViewController.swift
View file @
dc38e614
...
...
@@ -150,7 +150,9 @@ extension YHAboutUsViewController: UICollectionViewDelegateFlowLayout, UICollect
}
func
collectionView
(
_
collectionView
:
UICollectionView
,
cellForItemAt
indexPath
:
IndexPath
)
->
UICollectionViewCell
{
let
cell
=
collectionView
.
dequeueReusableCell
(
withReuseIdentifier
:
YHAboutUsAdvantageCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHAboutUsAdvantageCell
guard
let
cell
=
collectionView
.
dequeueReusableCell
(
withReuseIdentifier
:
YHAboutUsAdvantageCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as?
YHAboutUsAdvantageCell
else
{
return
UICollectionViewCell
()
}
cell
.
advantateItem
=
items
[
indexPath
.
row
]
return
cell
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/C/YHMyNewViewController.swift
View file @
dc38e614
...
...
@@ -307,12 +307,11 @@ extension YHMyNewViewController: UITableViewDelegate, UITableViewDataSource {
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMySectionGroupCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHMySectionGroupCell
guard
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMySectionGroupCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as?
YHMySectionGroupCell
else
{
return
UITableViewCell
()
}
if
0
<=
indexPath
.
row
,
indexPath
.
row
<
functionGroupArr
.
count
{
let
group
:
YHFunctionGroupInfo
=
functionGroupArr
[
indexPath
.
row
]
if
group
.
type
==
.
score
{
let
cell2
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMyFunctionGroup2Cell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHMyFunctionGroup2Cell
guard
let
cell2
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMyFunctionGroup2Cell
.
cellReuseIdentifier
,
for
:
indexPath
)
as?
YHMyFunctionGroup2Cell
else
{
return
UITableViewCell
()
}
cell2
.
updateGroup
(
group
)
cell2
.
clickItem
=
{
[
weak
self
]
item
in
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/C/YHMyNotifySettingVC.swift
View file @
dc38e614
...
...
@@ -97,7 +97,8 @@ extension YHMyNotifySettingVC: UITableViewDelegate, UITableViewDataSource {
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMyPermissionCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHMyPermissionCell
guard
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMyPermissionCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as?
YHMyPermissionCell
else
{
return
UITableViewCell
()
}
if
0
<=
indexPath
.
row
&&
indexPath
.
row
<
items
.
count
{
let
item
=
items
[
indexPath
.
row
]
cell
.
updateModel
(
item
)
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/C/YHMyPermissionSettingVC.swift
View file @
dc38e614
...
...
@@ -180,8 +180,8 @@ extension YHMyPermissionSettingVC: UITableViewDelegate, UITableViewDataSource {
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMyPermissionCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHMyPermissionCell
guard
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMyPermissionCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as?
YHMyPermissionCell
else
{
return
UITableViewCell
()
}
if
0
<=
indexPath
.
row
&&
indexPath
.
row
<
items
.
count
{
let
item
=
items
[
indexPath
.
row
]
cell
.
updateModel
(
item
)
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/C/YHMySettingViewController.swift
View file @
dc38e614
...
...
@@ -228,7 +228,8 @@ extension YHMySettingViewController: UITableViewDelegate, UITableViewDataSource
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMySettingCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHMySettingCell
guard
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMySettingCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as?
YHMySettingCell
else
{
return
UITableViewCell
()
}
if
0
<=
indexPath
.
row
&&
indexPath
.
row
<
items
.
count
{
let
item
:
PersonalModuleItem
=
items
[
indexPath
.
row
]
cell
.
titleLabel
.
text
=
item
.
title
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/C/YHMyViewController.swift
View file @
dc38e614
...
...
@@ -376,7 +376,8 @@ extension YHMyViewController: UITableViewDelegate, UITableViewDataSource {
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHPersonalCenterCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHPersonalCenterCell
guard
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHPersonalCenterCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as?
YHPersonalCenterCell
else
{
return
UITableViewCell
()
}
let
item
:
PersonalModuleItem
=
items
[
indexPath
.
row
]
cell
.
updateItem
(
item
:
item
)
return
cell
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/C/YHVipLevelRightViewController.swift
View file @
dc38e614
...
...
@@ -159,7 +159,7 @@ extension YHVipLevelRightViewController {
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
if
tableView
.
tag
==
titleListTag
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHVipLevelRightTitleCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHVipLevelRightTitleCell
guard
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHVipLevelRightTitleCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as?
YHVipLevelRightTitleCell
else
{
return
UITableViewCell
()
}
if
0
<=
indexPath
.
section
,
indexPath
.
section
<
arr
.
count
{
let
a
=
arr
[
indexPath
.
section
]
if
0
<=
indexPath
.
row
,
indexPath
.
row
<
a
.
count
{
...
...
@@ -170,8 +170,8 @@ extension YHVipLevelRightViewController {
}
return
cell
}
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHVipLevelRightInfoCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHVipLevelRightInfoCell
guard
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHVipLevelRightInfoCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as?
YHVipLevelRightInfoCell
else
{
return
UITableViewCell
()
}
if
0
<=
indexPath
.
section
,
indexPath
.
section
<
arr
.
count
{
let
a
=
arr
[
indexPath
.
section
]
if
0
<=
indexPath
.
row
,
indexPath
.
row
<
a
.
count
{
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/MyCard(我的名片)/C/YHEditInterestViewController.swift
View file @
dc38e614
...
...
@@ -258,7 +258,7 @@ extension YHEditInterestViewController: UICollectionViewDelegate, UICollectionVi
let
size
=
self
.
getwith
(
font
:
UIFont
.
systemFont
(
ofSize
:
12
),
height
:
24
,
string
:
model
.
name
)
var
width
=
size
.
width
+
12*2.0
if
!
model
.
isNormal
&&
!
model
.
isSelect
{
width
=
width
+
22
width
+=
22
}
if
width
>
226.0
{
width
=
226.0
...
...
@@ -268,7 +268,7 @@ extension YHEditInterestViewController: UICollectionViewDelegate, UICollectionVi
// 返回自定义单元格
func
collectionView
(
_
collectionView
:
UICollectionView
,
cellForItemAt
indexPath
:
IndexPath
)
->
UICollectionViewCell
{
let
cell
=
collectionView
.
dequeueReusableCell
(
withReuseIdentifier
:
YHSearchInfoHistoryCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHEditInterestViewCell
guard
let
cell
=
collectionView
.
dequeueReusableCell
(
withReuseIdentifier
:
YHSearchInfoHistoryCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as?
YHEditInterestViewCell
else
{
return
UICollectionViewCell
()
}
if
indexPath
.
section
==
0
{
cell
.
dataSource
=
normalItems
[
indexPath
.
item
]
}
else
{
...
...
@@ -307,7 +307,8 @@ extension YHEditInterestViewController: UICollectionViewDelegate, UICollectionVi
func
collectionView
(
_
collectionView
:
UICollectionView
,
viewForSupplementaryElementOfKind
kind
:
String
,
at
indexPath
:
IndexPath
)
->
UICollectionReusableView
{
if
kind
==
UICollectionView
.
elementKindSectionHeader
{
let
headerView
=
collectionView
.
dequeueReusableSupplementaryView
(
ofKind
:
kind
,
withReuseIdentifier
:
"YHEditInterestViewHeaderView"
,
for
:
indexPath
)
as!
YHEditInterestViewHeaderView
guard
let
headerView
=
collectionView
.
dequeueReusableSupplementaryView
(
ofKind
:
kind
,
withReuseIdentifier
:
"YHEditInterestViewHeaderView"
,
for
:
indexPath
)
as?
YHEditInterestViewHeaderView
else
{
return
UICollectionReusableView
()
}
if
indexPath
.
section
==
0
{
headerView
.
label
.
text
=
"话题标签"
}
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/V/YHMyFunctionGroup2Cell.swift
View file @
dc38e614
...
...
@@ -98,8 +98,7 @@ extension YHMyFunctionGroup2Cell: UICollectionViewDelegate, UICollectionViewData
// 返回自定义单元格
func
collectionView
(
_
collectionView
:
UICollectionView
,
cellForItemAt
indexPath
:
IndexPath
)
->
UICollectionViewCell
{
let
cell
=
collectionView
.
dequeueReusableCell
(
withReuseIdentifier
:
YHMyFunctionGroupItem2Cell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHMyFunctionGroupItem2Cell
guard
let
cell
=
collectionView
.
dequeueReusableCell
(
withReuseIdentifier
:
YHMyFunctionGroupItem2Cell
.
cellReuseIdentifier
,
for
:
indexPath
)
as?
YHMyFunctionGroupItem2Cell
else
{
return
UICollectionViewCell
()}
if
0
<=
indexPath
.
item
&&
indexPath
.
item
<
groupArr
.
count
{
let
item
:
PersonalModuleItem
=
groupArr
[
indexPath
.
item
]
cell
.
updateItem
(
item
)
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/V/YHMySectionGroupCell.swift
View file @
dc38e614
...
...
@@ -126,8 +126,7 @@ extension YHMySectionGroupCell: UICollectionViewDelegate, UICollectionViewDataSo
// 返回自定义单元格
func
collectionView
(
_
collectionView
:
UICollectionView
,
cellForItemAt
indexPath
:
IndexPath
)
->
UICollectionViewCell
{
let
cell
=
collectionView
.
dequeueReusableCell
(
withReuseIdentifier
:
YHMyFunctionGroupItemCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHMyFunctionGroupItemCell
guard
let
cell
=
collectionView
.
dequeueReusableCell
(
withReuseIdentifier
:
YHMyFunctionGroupItemCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as?
YHMyFunctionGroupItemCell
else
{
return
UICollectionViewCell
()
}
if
0
<=
indexPath
.
item
&&
indexPath
.
item
<
groupArr
.
count
{
let
item
:
PersonalModuleItem
=
groupArr
[
indexPath
.
item
]
cell
.
updateItem
(
item
)
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/V/YHVipLevelRightHeaderView.swift
View file @
dc38e614
...
...
@@ -37,7 +37,7 @@ class YHVipLevelRightHeaderView: UIView, UIScrollViewDelegate {
max
=
3
}
for
index
in
0
...
3
{
let
itemV
=
self
.
scrollView
.
viewWithTag
(
self
.
baseTag
+
index
)
as!
YHVipLevelRightHeaderItemView
guard
let
itemV
=
self
.
scrollView
.
viewWithTag
(
self
.
baseTag
+
index
)
as?
YHVipLevelRightHeaderItemView
else
{
return
}
itemV
.
lockImgV
.
isHidden
=
index
<=
max
}
}
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/V/YHVipLevelRightInfoCell.swift
View file @
dc38e614
...
...
@@ -108,10 +108,10 @@ class YHVipLevelRightInfoCell: UITableViewCell {
func
updateModel
(
_
model
:
YHVipLevelRightInfoModel
)
{
let
v0
=
self
.
contentView
.
viewWithTag
(
Self
.
baseTag
+
0
)
as!
YHVipLevelRightInfoView
let
v1
=
self
.
contentView
.
viewWithTag
(
Self
.
baseTag
+
1
)
as!
YHVipLevelRightInfoView
let
v2
=
self
.
contentView
.
viewWithTag
(
Self
.
baseTag
+
2
)
as!
YHVipLevelRightInfoView
let
v3
=
self
.
contentView
.
viewWithTag
(
Self
.
baseTag
+
3
)
as!
YHVipLevelRightInfoView
guard
let
v0
=
self
.
contentView
.
viewWithTag
(
Self
.
baseTag
+
0
)
as?
YHVipLevelRightInfoView
else
{
return
}
guard
let
v1
=
self
.
contentView
.
viewWithTag
(
Self
.
baseTag
+
1
)
as?
YHVipLevelRightInfoView
else
{
return
}
guard
let
v2
=
self
.
contentView
.
viewWithTag
(
Self
.
baseTag
+
2
)
as?
YHVipLevelRightInfoView
else
{
return
}
guard
let
v3
=
self
.
contentView
.
viewWithTag
(
Self
.
baseTag
+
3
)
as?
YHVipLevelRightInfoView
else
{
return
}
v0
.
clear
()
v1
.
clear
()
v2
.
clear
()
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/ViewModel/YHMyLikeViewModel.swift
View file @
dc38e614
...
...
@@ -53,7 +53,7 @@ extension YHMyLikeViewModel {
self
.
arrHomeNewsData
=
result
.
data
}
else
{
self
.
arrHomeNewsData
?
.
append
(
contentsOf
:
result
.
data
)
curPageIndex
=
curPageIndex
+
1
curPageIndex
+=
1
}
if
let
count
=
self
.
arrHomeNewsData
?
.
count
{
...
...
@@ -107,7 +107,7 @@ extension YHMyLikeViewModel {
self
.
arrHomeNewsData
=
result
.
data
}
else
{
self
.
arrHomeNewsData
?
.
append
(
contentsOf
:
result
.
data
)
curPageIndex
=
curPageIndex
+
1
curPageIndex
+=
1
}
if
let
count
=
self
.
arrHomeNewsData
?
.
count
{
...
...
galaxy/galaxy/Classes/Tools/Extention/UIDevice+Extension.swift
View file @
dc38e614
...
...
@@ -151,8 +151,6 @@ extension UIDevice {
name
=
"iPhoneXR"
}
else
if
device
==
.
iPhoneXS
{
name
=
"iPhoneXS"
}
else
if
device
==
.
iPhoneXS
{
name
=
"iPhoneXS"
}
else
if
device
==
.
iPhoneSE2
{
name
=
"iPhoneSE2"
}
else
if
device
==
.
iPhoneSE3
{
...
...
galaxy/galaxy/Classes/Tools/Extention/UITextField+Extension.swift
View file @
dc38e614
...
...
@@ -40,9 +40,14 @@ extension String {
// 使用正则表达式替换
func
regularReplace
(
pattern
:
String
,
with
:
String
,
options
:
NSRegularExpression
.
Options
=
[])
->
String
{
let
regex
=
try!
NSRegularExpression
(
pattern
:
pattern
,
options
:
options
)
return
regex
.
stringByReplacingMatches
(
in
:
self
,
options
:
[],
range
:
NSRange
(
location
:
0
,
length
:
self
.
count
),
withTemplate
:
with
)
do
{
let
regex
=
try
NSRegularExpression
(
pattern
:
pattern
,
options
:
options
)
return
regex
.
stringByReplacingMatches
(
in
:
self
,
options
:
[],
range
:
NSRange
(
location
:
0
,
length
:
self
.
count
),
withTemplate
:
with
)
}
catch
{
return
""
}
}
}
galaxy/galaxy/Classes/Tools/Helper/YhConstant.swift
View file @
dc38e614
...
...
@@ -13,7 +13,7 @@ import ESTabBarController_swift
let
picMaxSize
:
Int
=
2
*
1024
*
1024
// MARK: - 工程中的 常量定义
let
APP_NAME
=
Bundle
.
main
.
infoDictionary
!
[
"CFBundleName"
]
as
!
String
let
APP_NAME
=
Bundle
.
main
.
infoDictionary
!
[
"CFBundleName"
]
as
?
String
??
""
/// 打印
///
...
...
@@ -127,7 +127,7 @@ func isIphoneX() -> Bool {
return
k_Height_safeAreaInsetsBottom
()
>
0.0
// 底部安全区 > 0 时,
}
enum
t
abBarPageType
:
Int
{
enum
T
abBarPageType
:
Int
{
case
home
// 首页
case
service
// 服务
// case message //消息
...
...
@@ -136,7 +136,7 @@ enum tabBarPageType: Int {
case
AI
// 港小宝
}
func
goTabBarBy
(
tabType
:
t
abBarPageType
)
{
func
goTabBarBy
(
tabType
:
T
abBarPageType
)
{
var
tabIndex
:
Int
=
0
switch
tabType
{
...
...
galaxy/galaxy/Classes/Tools/RangeDatePicker/YHRangeDatePickerView.swift
View file @
dc38e614
...
...
@@ -129,7 +129,7 @@ extension YHRangeDatePickerView {
}
func
calendar
(
_
calendar
:
FSCalendar
,
cellFor
date
:
Date
,
at
monthPosition
:
FSCalendarMonthPosition
)
->
FSCalendarCell
{
let
cell
:
YHRangeDatePickerCell
=
calendar
.
dequeueReusableCell
(
withIdentifier
:
YHRangeDatePickerCell
.
cellReuseIdentifier
,
for
:
date
,
at
:
monthPosition
)
as!
YHRangeDatePickerCell
guard
let
cell
:
YHRangeDatePickerCell
=
calendar
.
dequeueReusableCell
(
withIdentifier
:
YHRangeDatePickerCell
.
cellReuseIdentifier
,
for
:
date
,
at
:
monthPosition
)
as?
YHRangeDatePickerCell
else
{
return
FSCalendarCell
()
}
return
cell
}
...
...
galaxy/galaxy/Classes/Tools/Upload/YHOSSManager.swift
View file @
dc38e614
...
...
@@ -237,7 +237,7 @@ class YHOSSManager: NSObject, URLSessionDelegate {
_
=
error
.
description
callBackBlock
(
nil
,
YHErrorModel
())
}
else
{
let
string
=
result
.
result
as!
String
guard
let
string
=
result
.
result
as?
String
else
{
return
}
callBackBlock
(
string
,
YHErrorModel
())
}
return
...
...
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