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
746ed517
Commit
746ed517
authored
Jul 09, 2024
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
红点逻辑
parent
ae4756da
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
24 deletions
+38
-24
YHUserInformationModel.swift
...sses/Modules/Community(社区)/M/YHUserInformationModel.swift
+3
-1
YHMyInformationItemCell.swift
...ses/Modules/Community(社区)/V/YHMyInformationItemCell.swift
+19
-7
YHInformationAuthorizeViewModel.swift
...es/Community(社区)/VM/YHInformationAuthorizeViewModel.swift
+6
-6
YHEditViewModel.swift
...es/Modules/Mine(我的)/MyCard(我的名片)/VM/YHEditViewModel.swift
+10
-10
No files found.
galaxy/galaxy/Classes/Modules/Community(社区)/M/YHUserInformationModel.swift
View file @
746ed517
...
@@ -29,8 +29,9 @@ struct YHUserInformationModel {
...
@@ -29,8 +29,9 @@ struct YHUserInformationModel {
var
message
:
String
?
var
message
:
String
?
var
type
:
YHItemSelectType
?
var
type
:
YHItemSelectType
?
var
value
:
[
String
]?
var
value
:
[
String
]?
var
isNeed
:
Bool
?
init
(
id
:
YHUserInformationID
?
=
nil
,
title
:
String
?
=
nil
,
isUserKeyBoard
:
Bool
?
=
nil
,
prompts
:
String
?
=
nil
,
message
:
String
?
=
nil
,
type
:
YHItemSelectType
?
=
nil
,
value
:
[
String
]?
=
nil
)
{
init
(
id
:
YHUserInformationID
?
=
nil
,
title
:
String
?
=
nil
,
isUserKeyBoard
:
Bool
?
=
nil
,
prompts
:
String
?
=
nil
,
message
:
String
?
=
nil
,
type
:
YHItemSelectType
?
=
nil
,
value
:
[
String
]?
=
nil
,
isNeed
:
Bool
?
=
nil
)
{
self
.
id
=
id
self
.
id
=
id
self
.
title
=
title
self
.
title
=
title
self
.
isUserKeyBoard
=
isUserKeyBoard
self
.
isUserKeyBoard
=
isUserKeyBoard
...
@@ -38,6 +39,7 @@ struct YHUserInformationModel {
...
@@ -38,6 +39,7 @@ struct YHUserInformationModel {
self
.
message
=
message
self
.
message
=
message
self
.
type
=
type
self
.
type
=
type
self
.
value
=
value
self
.
value
=
value
self
.
isNeed
=
isNeed
}
}
}
}
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/V/YHMyInformationItemCell.swift
View file @
746ed517
...
@@ -107,13 +107,25 @@ class YHMyInformationItemCell: UITableViewCell {
...
@@ -107,13 +107,25 @@ class YHMyInformationItemCell: UITableViewCell {
func
updateAllViews
()
{
func
updateAllViews
()
{
guard
let
dataSource
=
dataSource
else
{
return
}
guard
let
dataSource
=
dataSource
else
{
return
}
let
str
=
dataSource
.
title
??
""
if
dataSource
.
isNeed
??
false
{
let
attributes
:
[
NSAttributedString
.
Key
:
Any
]
=
[
let
str
=
"*"
+
(
dataSource
.
title
??
""
)
.
font
:
UIFont
.
PFSC_R
(
ofSize
:
14
),
let
attributes
:
[
NSAttributedString
.
Key
:
Any
]
=
[
.
foregroundColor
:
UIColor
.
mainTextColor
.
font
:
UIFont
.
PFSC_R
(
ofSize
:
14
),
]
.
foregroundColor
:
UIColor
.
mainTextColor
let
questionAttrStr
=
NSMutableAttributedString
(
string
:
str
,
attributes
:
attributes
)
]
titleLabel
.
attributedText
=
questionAttrStr
let
questionAttrStr
=
NSMutableAttributedString
(
string
:
str
,
attributes
:
attributes
)
let
starRange
=
NSRange
(
location
:
0
,
length
:
1
)
questionAttrStr
.
addAttribute
(
NSAttributedString
.
Key
.
foregroundColor
,
value
:
UIColor
.
failColor
,
range
:
starRange
)
titleLabel
.
attributedText
=
questionAttrStr
}
else
{
let
str
=
dataSource
.
title
??
""
let
attributes
:
[
NSAttributedString
.
Key
:
Any
]
=
[
.
font
:
UIFont
.
PFSC_R
(
ofSize
:
14
),
.
foregroundColor
:
UIColor
.
mainTextColor
]
let
questionAttrStr
=
NSMutableAttributedString
(
string
:
str
,
attributes
:
attributes
)
titleLabel
.
attributedText
=
questionAttrStr
}
messageTextField
.
placeholder
=
dataSource
.
prompts
messageTextField
.
placeholder
=
dataSource
.
prompts
messageTextField
.
text
=
dataSource
.
message
messageTextField
.
text
=
dataSource
.
message
if
dataSource
.
isUserKeyBoard
??
false
{
if
dataSource
.
isUserKeyBoard
??
false
{
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/VM/YHInformationAuthorizeViewModel.swift
View file @
746ed517
...
@@ -16,17 +16,17 @@ class YHInformationAuthorizeViewModel: YHBaseViewModel {
...
@@ -16,17 +16,17 @@ class YHInformationAuthorizeViewModel: YHBaseViewModel {
}
}
func
getBaseDataSource
()
->
[
YHUserInformationModel
]
{
func
getBaseDataSource
()
->
[
YHUserInformationModel
]
{
let
item1
=
YHUserInformationModel
(
id
:
.
id1
,
title
:
"真实姓名"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入您的真实姓名"
,
message
:
model
.
username
)
let
item1
=
YHUserInformationModel
(
id
:
.
id1
,
title
:
"真实姓名"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入您的真实姓名"
,
message
:
model
.
username
,
isNeed
:
false
)
let
item2
=
YHUserInformationModel
(
id
:
.
id6
,
title
:
"所在地"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择您的所在地"
,
message
:
model
.
address
.
country
,
type
:
.
country
)
let
item2
=
YHUserInformationModel
(
id
:
.
id6
,
title
:
"所在地"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择您的所在地"
,
message
:
model
.
address
.
country
,
type
:
.
country
,
isNeed
:
false
)
var
string
=
""
var
string
=
""
if
model
.
address
.
province
.
count
!=
0
{
if
model
.
address
.
province
.
count
!=
0
{
string
=
model
.
address
.
province
+
"/"
+
model
.
address
.
city
string
=
model
.
address
.
province
+
"/"
+
model
.
address
.
city
}
}
let
item3
=
YHUserInformationModel
(
id
:
.
id2
,
title
:
"所在地-省市"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择您的所在地"
,
message
:
string
,
type
:
.
address
)
let
item3
=
YHUserInformationModel
(
id
:
.
id2
,
title
:
"所在地-省市"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择您的所在地"
,
message
:
string
,
type
:
.
address
,
isNeed
:
false
)
let
item4
=
YHUserInformationModel
(
id
:
.
id3
,
title
:
"毕业院校"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入您的毕业院校"
,
message
:
model
.
college
)
let
item4
=
YHUserInformationModel
(
id
:
.
id3
,
title
:
"毕业院校"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入您的毕业院校"
,
message
:
model
.
college
,
isNeed
:
false
)
let
item5
=
YHUserInformationModel
(
id
:
.
id4
,
title
:
"所属行业"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择您的所属行业"
,
message
:
model
.
industry
,
type
:
.
id
)
let
item5
=
YHUserInformationModel
(
id
:
.
id4
,
title
:
"所属行业"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择您的所属行业"
,
message
:
model
.
industry
,
type
:
.
id
,
isNeed
:
false
)
let
item6
=
YHUserInformationModel
(
id
:
.
id5
,
title
:
"职位"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入您的职位"
,
message
:
model
.
position
)
let
item6
=
YHUserInformationModel
(
id
:
.
id5
,
title
:
"职位"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入您的职位"
,
message
:
model
.
position
,
isNeed
:
false
)
if
model
.
address
.
country
.
contains
(
"中国"
)
{
if
model
.
address
.
country
.
contains
(
"中国"
)
{
return
[
item1
,
item2
,
item3
,
item4
,
item5
,
item6
]
return
[
item1
,
item2
,
item3
,
item4
,
item5
,
item6
]
}
}
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/MyCard(我的名片)/VM/YHEditViewModel.swift
View file @
746ed517
...
@@ -38,15 +38,15 @@ class YHEditViewModel: YHBaseViewModel {
...
@@ -38,15 +38,15 @@ class YHEditViewModel: YHBaseViewModel {
}
}
func
getBaseDataSource
()
->
[
YHUserInformationModel
]
{
func
getBaseDataSource
()
->
[
YHUserInformationModel
]
{
let
item1
=
YHUserInformationModel
(
id
:
.
id1
,
title
:
"真实姓名"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入您的真实姓名"
,
message
:
model
.
username
)
let
item1
=
YHUserInformationModel
(
id
:
.
id1
,
title
:
"真实姓名"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入您的真实姓名"
,
message
:
model
.
username
,
isNeed
:
true
)
let
item2
=
YHUserInformationModel
(
id
:
.
id6
,
title
:
"所在地"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择您的所在地"
,
message
:
model
.
address
.
country
,
type
:
.
country
)
let
item2
=
YHUserInformationModel
(
id
:
.
id6
,
title
:
"所在地"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择您的所在地"
,
message
:
model
.
address
.
country
,
type
:
.
country
,
isNeed
:
true
)
var
string
=
""
var
string
=
""
if
model
.
address
.
province
.
count
!=
0
{
if
model
.
address
.
province
.
count
!=
0
{
string
=
model
.
address
.
province
+
"/"
+
model
.
address
.
city
string
=
model
.
address
.
province
+
"/"
+
model
.
address
.
city
}
}
let
item3
=
YHUserInformationModel
(
id
:
.
id2
,
title
:
"所在地-省市"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择您的所在地"
,
message
:
string
,
type
:
.
address
)
let
item3
=
YHUserInformationModel
(
id
:
.
id2
,
title
:
"所在地-省市"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择您的所在地"
,
message
:
string
,
type
:
.
address
,
isNeed
:
true
)
let
item4
=
YHUserInformationModel
(
id
:
.
id7
,
title
:
"星座"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择您的星座"
,
message
:
model
.
zodiac
,
type
:
.
constellation
)
let
item4
=
YHUserInformationModel
(
id
:
.
id7
,
title
:
"星座"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择您的星座"
,
message
:
model
.
zodiac
,
type
:
.
constellation
,
isNeed
:
false
)
if
model
.
address
.
country
.
contains
(
"中国"
)
{
if
model
.
address
.
country
.
contains
(
"中国"
)
{
return
[
item1
,
item2
,
item3
,
item4
]
return
[
item1
,
item2
,
item3
,
item4
]
}
}
...
@@ -82,17 +82,17 @@ class YHEditViewModel: YHBaseViewModel {
...
@@ -82,17 +82,17 @@ class YHEditViewModel: YHBaseViewModel {
}
}
func
getBaseSchoolDataSource
()
->
[
YHUserInformationModel
]
{
func
getBaseSchoolDataSource
()
->
[
YHUserInformationModel
]
{
let
item1
=
YHUserInformationModel
(
id
:
.
id3
,
title
:
"毕业院校"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入您的毕业院校"
,
message
:
model
.
college
)
let
item1
=
YHUserInformationModel
(
id
:
.
id3
,
title
:
"毕业院校"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入您的毕业院校"
,
message
:
model
.
college
,
isNeed
:
true
)
let
item2
=
YHUserInformationModel
(
id
:
.
id8
,
title
:
"专业"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入您的专业"
,
message
:
model
.
major
)
let
item2
=
YHUserInformationModel
(
id
:
.
id8
,
title
:
"专业"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入您的专业"
,
message
:
model
.
major
,
isNeed
:
false
)
let
item3
=
YHUserInformationModel
(
id
:
.
id9
,
title
:
"学位"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择您的学位"
,
message
:
model
.
background
,
type
:
.
degree
)
let
item3
=
YHUserInformationModel
(
id
:
.
id9
,
title
:
"学位"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择您的学位"
,
message
:
model
.
background
,
type
:
.
degree
,
isNeed
:
false
)
return
[
item1
,
item2
,
item3
]
return
[
item1
,
item2
,
item3
]
}
}
func
getBaseWorkDataSource
()
->
[
YHUserInformationModel
]
{
func
getBaseWorkDataSource
()
->
[
YHUserInformationModel
]
{
let
item1
=
YHUserInformationModel
(
id
:
.
id10
,
title
:
"所在企业"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入您的所在企业"
,
message
:
model
.
companyName
)
let
item1
=
YHUserInformationModel
(
id
:
.
id10
,
title
:
"所在企业"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入您的所在企业"
,
message
:
model
.
companyName
,
isNeed
:
false
)
let
item2
=
YHUserInformationModel
(
id
:
.
id5
,
title
:
"职位"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入您的职位"
,
message
:
model
.
position
)
let
item2
=
YHUserInformationModel
(
id
:
.
id5
,
title
:
"职位"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入您的职位"
,
message
:
model
.
position
,
isNeed
:
true
)
let
item3
=
YHUserInformationModel
(
id
:
.
id4
,
title
:
"所在行业"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择您的所在行业"
,
message
:
model
.
industry
,
type
:
.
id
)
let
item3
=
YHUserInformationModel
(
id
:
.
id4
,
title
:
"所在行业"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择您的所在行业"
,
message
:
model
.
industry
,
type
:
.
id
,
isNeed
:
true
)
return
[
item1
,
item2
,
item3
]
return
[
item1
,
item2
,
item3
]
}
}
...
...
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