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
5e6d6c62
Commit
5e6d6c62
authored
Dec 27, 2023
by
David黄金龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除不使用的文件
parent
573ba0c1
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
12 additions
and
299 deletions
+12
-299
Podfile
galaxy/Podfile
+0
-7
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+8
-18
BsBaseModel.swift
galaxy/galaxy/Classes/Base/M/BsBaseModel.swift
+0
-22
BsOverlayView.swift
galaxy/galaxy/Classes/Tools/Extention/BsOverlayView.swift
+1
-1
Date-Extension.swift
galaxy/galaxy/Classes/Tools/Extention/Date-Extension.swift
+0
-23
UIApplication-Extension.swift
...axy/Classes/Tools/Extention/UIApplication-Extension.swift
+1
-1
YhCacheTool.swift
galaxy/galaxy/Classes/Tools/Extention/YhCacheTool.swift
+1
-1
BSJsonUtil.swift
galaxy/galaxy/Classes/Tools/Helper/BSJsonUtil.swift
+0
-114
BsConstant.swift
galaxy/galaxy/Classes/Tools/Helper/BsConstant.swift
+0
-110
YHBaseUrlManager.swift
galaxy/galaxy/Classes/Tools/NetWork/YHBaseUrlManager.swift
+1
-1
YHMyViewController.swift
galaxy/galaxy/Modules/Mine(我的)/C/YHMyViewController.swift
+0
-1
No files found.
galaxy/Podfile
View file @
5e6d6c62
...
...
@@ -54,11 +54,4 @@ target 'galaxy' do
pod
'DeviceKit'
,
'5.1.0'
#骨架图
pod
'SkeletonView'
,
'1.30.4'
# #数据模型转换
pod
'HandyJSON'
,
'5.0.2'
end
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
5e6d6c62
This diff is collapsed.
Click to expand it.
galaxy/galaxy/Classes/Base/M/BsBaseModel.swift
deleted
100755 → 0
View file @
573ba0c1
//
// BaseModel.swift
// DouYuUI
//
// Created by davidhuang on 2022/8/15.
// Copyright © 2022 davidhuang. All rights reserved.
//
import
UIKit
import
HandyJSON
// MARK: - JSon解析模型的基类
class
BsBaseModel
:
HandyJSON
{
var
data
:
Any
?
var
errorCode
:
Int
=
-
1
var
errorMessage
:
String
=
""
var
success
:
Bool
=
false
// MARK: - 使用 HandyJSON 进行解析
required
init
()
{}
}
galaxy/galaxy/Classes/Tools/Extention/BsOverlayView.swift
View file @
5e6d6c62
...
...
@@ -30,7 +30,7 @@ class BsOverlayView: UIView {
private
func
setupOverlayView
()
{
// 1 获取window
if
(
keyWindow
==
nil
)
{
self
.
keyWindow
=
UIApplication
.
shared
.
bs
KeyWindow
()
self
.
keyWindow
=
UIApplication
.
shared
.
yh
KeyWindow
()
}
// 2.遮罩view
overlayView
=
UIControl
.
init
(
frame
:
UIScreen
.
main
.
bounds
)
...
...
galaxy/galaxy/Classes/Tools/Extention/Date-Extension.swift
deleted
100755 → 0
View file @
573ba0c1
//
// Date-Extension.swift
// DouYuUI
//
// Created by davidhuang on 2022/8/11.
// Copyright © 2022 davidhuang. All rights reserved.
//
import
UIKit
extension
Date
{
static
func
getCurrentDate
()
->
String
{
let
now
=
Int
(
Date
.
timeIntervalSinceReferenceDate
)
return
"
\(
now
)
"
}
init
(
_
dateString
:
String
,
dateFormat
:
String
=
"yyyy-MM-dd"
)
{
let
df
=
DateFormatter
()
df
.
dateFormat
=
dateFormat
let
date
=
df
.
date
(
from
:
dateString
)
!
self
.
init
(
timeInterval
:
0
,
since
:
date
)
}
}
galaxy/galaxy/Classes/Tools/Extention/UIApplication-Extension.swift
View file @
5e6d6c62
...
...
@@ -10,7 +10,7 @@ import UIKit
extension
UIApplication
{
func
bs
KeyWindow
()
->
UIWindow
?
{
func
yh
KeyWindow
()
->
UIWindow
?
{
var
originalKeyWindow
:
UIWindow
?
#if swift(>=5.1)
if
#available(iOS 13, *)
{
...
...
galaxy/galaxy/Classes/Tools/Extention/
Bs
CacheTool.swift
→
galaxy/galaxy/Classes/Tools/Extention/
Yh
CacheTool.swift
View file @
5e6d6c62
...
...
@@ -8,7 +8,7 @@
import
Foundation
open
class
BsCacheTool
:
NSObject
{
open
class
YhCacheTool
{
/// 计算缓存大小
public
static
var
cacheSize
:
String
{
...
...
galaxy/galaxy/Classes/Tools/Helper/BSJsonUtil.swift
deleted
100755 → 0
View file @
573ba0c1
//
// BSjsonUtil.swift
// BaiSiSMApp
//
// Created by davidhuang on 2022/11/18.
// Copyright © 2022 www.davidhuang.com. All rights reserved.
//
import
UIKit
import
HandyJSON
class
BSJsonUtil
:
NSObject
{
/**
* Json转对象
*/
static
func
jsonToModel
(
_
jsonStr
:
String
,
_
modelType
:
HandyJSON
.
Type
)
->
BsBaseModel
{
if
jsonStr
==
""
||
jsonStr
.
count
==
0
{
#if DEBUG
print
(
"jsonoModel:字符串为空"
)
#endif
return
BsBaseModel
()
}
return
modelType
.
deserialize
(
from
:
jsonStr
)
as!
BsBaseModel
}
/**
* Json转数组对象
*/
static
func
jsonArrayToModel
(
_
jsonArrayStr
:
String
,
_
modelType
:
HandyJSON
.
Type
)
->
[
BsBaseModel
]
{
if
jsonArrayStr
==
""
||
jsonArrayStr
.
count
==
0
{
#if DEBUG
print
(
"jsonToModelArray:字符串为空"
)
#endif
return
[]
}
var
modelArray
:[
BsBaseModel
]
=
[]
let
data
=
jsonArrayStr
.
data
(
using
:
String
.
Encoding
.
utf8
)
let
peoplesArray
=
try!
JSONSerialization
.
jsonObject
(
with
:
data
!
,
options
:
JSONSerialization
.
ReadingOptions
())
as?
[
AnyObject
]
for
people
in
peoplesArray
!
{
modelArray
.
append
(
dictionaryToModel
(
people
as!
[
String
:
Any
],
modelType
))
}
return
modelArray
}
/**
* 字典转对象
*/
static
func
dictionaryToModel
(
_
dictionStr
:[
String
:
Any
],
_
modelType
:
HandyJSON
.
Type
)
->
BsBaseModel
{
if
dictionStr
.
count
==
0
{
#if DEBUG
print
(
"dictionaryToModel:字符串为空"
)
#endif
return
BsBaseModel
()
}
return
modelType
.
deserialize
(
from
:
dictionStr
)
as!
BsBaseModel
}
/**
* 对象转JSON
*/
static
func
modelToJson
(
_
model
:
BsBaseModel
?)
->
String
{
if
model
==
nil
{
#if DEBUG
print
(
"modelToJson:model为空"
)
#endif
return
""
}
return
(
model
?
.
toJSONString
())
!
}
/**
* 对象转字典
*/
static
func
modelToDictionary
(
_
model
:
BsBaseModel
?)
->
[
String
:
Any
]
{
if
model
==
nil
{
#if DEBUG
print
(
"modelToJson:model为空"
)
#endif
return
[:]
}
return
(
model
?
.
toJSON
())
!
}
//数组转json
static
func
arrayToJson
(
_
array
:
NSArray
)
->
String
{
if
(
!
JSONSerialization
.
isValidJSONObject
(
array
))
{
print
(
"无法解析出JSONString"
)
return
""
}
let
data
:
NSData
!
=
try
?
JSONSerialization
.
data
(
withJSONObject
:
array
,
options
:
[])
as
NSData
let
JSONString
=
NSString
(
data
:
data
as
Data
,
encoding
:
String
.
Encoding
.
utf8
.
rawValue
)
return
JSONString
!
as
String
}
/**
* 字典转JSON
*/
static
func
dictionaryToJson
(
_
dictionary
:
NSDictionary
)
->
String
{
if
(
!
JSONSerialization
.
isValidJSONObject
(
dictionary
))
{
print
(
"无法解析出JSONString"
)
return
""
}
let
data
:
NSData
!
=
try
?
JSONSerialization
.
data
(
withJSONObject
:
dictionary
,
options
:
[])
as
NSData
let
JSONString
=
NSString
(
data
:
data
as
Data
,
encoding
:
String
.
Encoding
.
utf8
.
rawValue
)
return
JSONString
!
as
String
}
}
galaxy/galaxy/Classes/Tools/Helper/BsConstant.swift
View file @
5e6d6c62
...
...
@@ -10,116 +10,6 @@ import UIKit
// MARK: - 工程中的 常量定义
class
BsConstant
{
// MARK: - 个人信息基本类型
enum
UserBaseInfoType
:
Int
{
case
unknow
//未知
case
sex
//性别
case
birthday
//生日
case
height
//身高
case
weight
//体重
case
education
//学历
case
profession
//职务
case
work_domain
//从事行业
case
income
//收入
func
title
()
->
String
{
switch
self
{
case
.
sex
:
return
"性别"
case
.
birthday
:
return
"生日"
case
.
height
:
return
"身高"
case
.
weight
:
return
"体重"
case
.
education
:
return
"学历"
case
.
profession
:
return
"职务"
case
.
work_domain
:
return
"从事行业"
case
.
income
:
return
"收入"
default
:
return
"--"
}
}
func
titleForSelectView
()
->
String
{
switch
self
{
case
.
sex
:
return
"性别"
case
.
birthday
:
return
"生日"
case
.
height
:
return
"身高(单位:cm)"
case
.
weight
:
return
"体重(单位:kg)"
case
.
education
:
return
"学历"
case
.
profession
:
return
"职务"
case
.
work_domain
:
return
"从事行业"
case
.
income
:
return
"收入(单位:k)"
default
:
return
"--"
}
}
/*
var id : String = ""//用户ID
var user_type : String = ""//用户类型 1:普通用户2.明星用户3.管理员
var sex : String = ""//性别 0其他, 1:男, 2女
var real_name : String = "" //真实姓名
var nick_name : String = "" //昵称
var avatar : String = ""//头像
var birthday : String = ""//生日
var status : String = ""//用户状态1:正常,0:已注销
var height : String = ""//身高
var weight : String = ""//体重
var user_name : String = ""//用户名
var phone : String = ""//手机号码
var marital_status : String = ""//婚姻情况
var profession : String = ""//职业ID
var profession_name : String = ""//职业名称
var education : String = ""//文化程度ID
var education_name : String = ""//文化程度名称
var work_domain : String = ""//行业领域ID
var work_domain_name : String = ""//行业领域名称
*/
func
key
()
->
String
{
switch
self
{
case
.
sex
:
return
"sex"
case
.
birthday
:
return
"birthday"
case
.
height
:
return
"height"
case
.
weight
:
return
"weight"
case
.
education
:
return
"education"
case
.
profession
:
return
"profession"
case
.
work_domain
:
return
"work_domain"
case
.
income
:
return
"monthly_income"
default
:
return
""
}
}
}
// MARK: - URL 相关
struct
URL
{
...
...
galaxy/galaxy/Classes/Tools/NetWork/YHBaseUrlManager.swift
View file @
5e6d6c62
...
...
@@ -37,7 +37,7 @@ class YHBaseUrlManager {
#if DEBUG
return
urlForEditing
??
YHBaseUrlManager
.
baseUrlDev
#else
return
urlForEditing
??
YHBaseUrlManager
.
baseUrlRelease
return
YHBaseUrlManager
.
baseUrlRelease
#endif
}
...
...
galaxy/galaxy/Modules/Mine(我的)/C/YHMyViewController.swift
View file @
5e6d6c62
...
...
@@ -7,7 +7,6 @@
import
UIKit
import
SnapKit
import
PDFKit
struct
PersonalModuleItem
{
var
icon
:
String
...
...
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