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
91e5b0aa
Commit
91e5b0aa
authored
Jun 25, 2024
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
细节调整
parent
06b601d7
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
93 additions
and
3 deletions
+93
-3
YHInformationAuthorizeViewModel.swift
...es/Community(社区)/VM/YHInformationAuthorizeViewModel.swift
+6
-1
YHAllowUseMyInfoViewController.swift
.../Modules/Login(登录)/C/YHAllowUseMyInfoViewController.swift
+1
-0
YHUserInfoSettingViewController.swift
...Modules/Login(登录)/C/YHUserInfoSettingViewController.swift
+6
-1
YHEditBaseUserInfoViewController.swift
...我的)/MyCard(我的名片)/C/YHEditBaseUserInfoViewController.swift
+14
-0
YHEditInterestViewController.swift
...ine(我的)/MyCard(我的名片)/C/YHEditInterestViewController.swift
+3
-0
YHEditSchoolViewController.swift
.../Mine(我的)/MyCard(我的名片)/C/YHEditSchoolViewController.swift
+14
-0
YHEditWorkViewController.swift
...es/Mine(我的)/MyCard(我的名片)/C/YHEditWorkViewController.swift
+14
-0
YHEditViewModel.swift
...es/Modules/Mine(我的)/MyCard(我的名片)/VM/YHEditViewModel.swift
+35
-1
No files found.
galaxy/galaxy/Classes/Modules/Community(社区)/VM/YHInformationAuthorizeViewModel.swift
View file @
91e5b0aa
...
@@ -139,11 +139,16 @@ class YHInformationAuthorizeViewModel: YHBaseViewModel {
...
@@ -139,11 +139,16 @@ class YHInformationAuthorizeViewModel: YHBaseViewModel {
}
}
func
requestSaveUserInfo
(
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
func
requestSaveUserInfo
(
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
let
username
=
model
.
username
.
trimmingCharacters
(
in
:
.
whitespaces
)
if
username
.
count
==
0
{
YHHUD
.
flash
(
message
:
"名字不合法"
)
return
}
let
address
:
[
String
:
Any
]
=
[
"country"
:
model
.
address
.
country
,
let
address
:
[
String
:
Any
]
=
[
"country"
:
model
.
address
.
country
,
"province"
:
model
.
address
.
province
,
"province"
:
model
.
address
.
province
,
"city"
:
model
.
address
.
city
]
"city"
:
model
.
address
.
city
]
let
params
:
[
String
:
Any
]
=
[
"avatar"
:
model
.
avatar
,
let
params
:
[
String
:
Any
]
=
[
"avatar"
:
model
.
avatar
,
"username"
:
model
.
username
,
"username"
:
username
,
"college"
:
model
.
college
,
"college"
:
model
.
college
,
"industry"
:
model
.
industry
,
"industry"
:
model
.
industry
,
"position"
:
model
.
position
,
"position"
:
model
.
position
,
...
...
galaxy/galaxy/Classes/Modules/Login(登录)/C/YHAllowUseMyInfoViewController.swift
View file @
91e5b0aa
...
@@ -76,6 +76,7 @@ class YHAllowUseMyInfoViewController: YHBaseViewController {
...
@@ -76,6 +76,7 @@ class YHAllowUseMyInfoViewController: YHBaseViewController {
viewModel
.
requestBusinessCardAuthorize
{[
weak
self
]
success
,
error
in
viewModel
.
requestBusinessCardAuthorize
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
self
.
dismiss
(
animated
:
true
)
self
.
dismiss
(
animated
:
true
)
}
}
}
}
}
}
...
...
galaxy/galaxy/Classes/Modules/Login(登录)/C/YHUserInfoSettingViewController.swift
View file @
91e5b0aa
...
@@ -151,8 +151,13 @@ class YHUserInfoSettingViewController: YHBaseViewController {
...
@@ -151,8 +151,13 @@ class YHUserInfoSettingViewController: YHBaseViewController {
return
return
}
}
self
.
name
=
nameTextField
.
text
??
""
self
.
name
=
nameTextField
.
text
??
""
let
username
=
name
.
trimmingCharacters
(
in
:
.
whitespaces
)
if
username
.
count
==
0
{
YHHUD
.
flash
(
message
:
"名字不合法"
)
return
}
// 请求接口逻辑
// 请求接口逻辑
viewModel
.
requestSaveUserInfo
(
head
:
headUrl
,
name
:
name
)
{[
weak
self
]
success
,
error
in
viewModel
.
requestSaveUserInfo
(
head
:
headUrl
,
name
:
user
name
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
let
vc
=
YHAllowUseMyInfoViewController
()
let
vc
=
YHAllowUseMyInfoViewController
()
self
.
navigationController
?
.
pushViewController
(
vc
)
self
.
navigationController
?
.
pushViewController
(
vc
)
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/MyCard(我的名片)/C/YHEditBaseUserInfoViewController.swift
View file @
91e5b0aa
...
@@ -32,6 +32,13 @@ class YHEditBaseUserInfoViewController: YHBaseViewController {
...
@@ -32,6 +32,13 @@ class YHEditBaseUserInfoViewController: YHBaseViewController {
photoImageView
.
kf
.
setImage
(
with
:
url
)
photoImageView
.
kf
.
setImage
(
with
:
url
)
footView
.
dataSource
=
self
.
viewModel
.
model
.
signature
footView
.
dataSource
=
self
.
viewModel
.
model
.
signature
tableView
.
reloadData
()
tableView
.
reloadData
()
if
self
.
viewModel
.
isCanNext
(
step
:
1
)
{
nextButton
.
isEnabled
=
true
nextButton
.
backgroundColor
=
UIColor
.
brandMainColor
}
else
{
nextButton
.
isEnabled
=
false
nextButton
.
backgroundColor
=
UIColor
.
brandMainColor
.
withAlphaComponent
(
0.4
)
}
}
}
func
setView
()
{
func
setView
()
{
...
@@ -173,6 +180,13 @@ extension YHEditBaseUserInfoViewController: UITableViewDelegate, UITableViewData
...
@@ -173,6 +180,13 @@ extension YHEditBaseUserInfoViewController: UITableViewDelegate, UITableViewData
if
model
.
id
!=
.
id1
{
if
model
.
id
!=
.
id1
{
self
.
getData
()
self
.
getData
()
}
}
if
self
.
viewModel
.
isCanNext
(
step
:
1
)
{
nextButton
.
isEnabled
=
true
nextButton
.
backgroundColor
=
UIColor
.
brandMainColor
}
else
{
nextButton
.
isEnabled
=
false
nextButton
.
backgroundColor
=
UIColor
.
brandMainColor
.
withAlphaComponent
(
0.4
)
}
}
}
return
cell
return
cell
}
}
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/MyCard(我的名片)/C/YHEditInterestViewController.swift
View file @
91e5b0aa
...
@@ -196,6 +196,9 @@ extension YHEditInterestViewController: UICollectionViewDelegate, UICollectionVi
...
@@ -196,6 +196,9 @@ extension YHEditInterestViewController: UICollectionViewDelegate, UICollectionVi
if
section
==
0
{
if
section
==
0
{
return
normalItems
.
count
return
normalItems
.
count
}
else
{
}
else
{
if
likeItems
.
count
>
20
{
return
20
}
return
likeItems
.
count
return
likeItems
.
count
}
}
}
}
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/MyCard(我的名片)/C/YHEditSchoolViewController.swift
View file @
91e5b0aa
...
@@ -25,6 +25,13 @@ class YHEditSchoolViewController: YHBaseViewController {
...
@@ -25,6 +25,13 @@ class YHEditSchoolViewController: YHBaseViewController {
viewModel
.
model
=
model
viewModel
.
model
=
model
items
=
viewModel
.
getBaseSchoolDataSource
()
items
=
viewModel
.
getBaseSchoolDataSource
()
tableView
.
reloadData
()
tableView
.
reloadData
()
if
self
.
viewModel
.
isCanNext
(
step
:
3
)
{
nextButton
.
isEnabled
=
true
nextButton
.
backgroundColor
=
UIColor
.
brandMainColor
}
else
{
nextButton
.
isEnabled
=
false
nextButton
.
backgroundColor
=
UIColor
.
brandMainColor
.
withAlphaComponent
(
0.4
)
}
}
}
func
setView
()
{
func
setView
()
{
...
@@ -96,6 +103,13 @@ extension YHEditSchoolViewController: UITableViewDelegate, UITableViewDataSource
...
@@ -96,6 +103,13 @@ extension YHEditSchoolViewController: UITableViewDelegate, UITableViewDataSource
if
model
.
id
!=
.
id8
{
if
model
.
id
!=
.
id8
{
self
.
getData
()
self
.
getData
()
}
}
if
self
.
viewModel
.
isCanNext
(
step
:
3
)
{
nextButton
.
isEnabled
=
true
nextButton
.
backgroundColor
=
UIColor
.
brandMainColor
}
else
{
nextButton
.
isEnabled
=
false
nextButton
.
backgroundColor
=
UIColor
.
brandMainColor
.
withAlphaComponent
(
0.4
)
}
}
}
return
cell
return
cell
}
}
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/MyCard(我的名片)/C/YHEditWorkViewController.swift
View file @
91e5b0aa
...
@@ -25,6 +25,13 @@ class YHEditWorkViewController: YHBaseViewController {
...
@@ -25,6 +25,13 @@ class YHEditWorkViewController: YHBaseViewController {
viewModel
.
model
=
model
viewModel
.
model
=
model
items
=
viewModel
.
getBaseWorkDataSource
()
items
=
viewModel
.
getBaseWorkDataSource
()
tableView
.
reloadData
()
tableView
.
reloadData
()
if
self
.
viewModel
.
isCanNext
(
step
:
4
)
{
nextButton
.
isEnabled
=
true
nextButton
.
backgroundColor
=
UIColor
.
brandMainColor
}
else
{
nextButton
.
isEnabled
=
false
nextButton
.
backgroundColor
=
UIColor
.
brandMainColor
.
withAlphaComponent
(
0.4
)
}
}
}
func
setView
()
{
func
setView
()
{
...
@@ -96,6 +103,13 @@ extension YHEditWorkViewController: UITableViewDelegate, UITableViewDataSource {
...
@@ -96,6 +103,13 @@ extension YHEditWorkViewController: UITableViewDelegate, UITableViewDataSource {
if
model
.
id
!=
.
id5
||
model
.
id
!=
.
id10
{
if
model
.
id
!=
.
id5
||
model
.
id
!=
.
id10
{
self
.
getData
()
self
.
getData
()
}
}
if
self
.
viewModel
.
isCanNext
(
step
:
4
)
{
nextButton
.
isEnabled
=
true
nextButton
.
backgroundColor
=
UIColor
.
brandMainColor
}
else
{
nextButton
.
isEnabled
=
false
nextButton
.
backgroundColor
=
UIColor
.
brandMainColor
.
withAlphaComponent
(
0.4
)
}
}
}
return
cell
return
cell
}
}
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/MyCard(我的名片)/VM/YHEditViewModel.swift
View file @
91e5b0aa
...
@@ -96,11 +96,16 @@ class YHEditViewModel: YHBaseViewModel {
...
@@ -96,11 +96,16 @@ class YHEditViewModel: YHBaseViewModel {
}
}
func
requestSaveUserInfo
(
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
func
requestSaveUserInfo
(
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
let
username
=
model
.
username
.
trimmingCharacters
(
in
:
.
whitespaces
)
if
username
.
count
==
0
{
YHHUD
.
flash
(
message
:
"名字不合法"
)
return
}
let
address
:
[
String
:
Any
]
=
[
"country"
:
model
.
address
.
country
,
let
address
:
[
String
:
Any
]
=
[
"country"
:
model
.
address
.
country
,
"province"
:
model
.
address
.
province
,
"province"
:
model
.
address
.
province
,
"city"
:
model
.
address
.
city
]
"city"
:
model
.
address
.
city
]
let
basic
:
[
String
:
Any
]
=
[
"avatar"
:
model
.
avatar
,
let
basic
:
[
String
:
Any
]
=
[
"avatar"
:
model
.
avatar
,
"username"
:
model
.
username
,
"username"
:
username
,
"zodiac"
:
model
.
zodiac
,
"zodiac"
:
model
.
zodiac
,
"address"
:
address
,
"address"
:
address
,
"signature"
:
model
.
signature
,
"signature"
:
model
.
signature
,
...
@@ -216,4 +221,33 @@ class YHEditViewModel: YHBaseViewModel {
...
@@ -216,4 +221,33 @@ class YHEditViewModel: YHBaseViewModel {
callBackBlock
(
false
,
err
)
callBackBlock
(
false
,
err
)
}
}
}
}
func
isCanNext
(
step
:
Int
=
1
)
->
Bool
{
if
step
==
1
{
let
avatar
=
model
.
avatar
let
username
=
model
.
username
let
country
=
model
.
address
.
country
let
provice
=
model
.
address
.
province
let
city
=
model
.
address
.
city
guard
avatar
.
count
>
0
else
{
return
false
}
guard
country
.
count
>
0
else
{
return
false
}
guard
username
.
count
>
0
else
{
return
false
}
if
country
.
contains
(
"中国"
)
{
guard
provice
.
count
>
0
else
{
return
false
}
guard
city
.
count
>
0
else
{
return
false
}
}
}
if
step
==
3
{
let
college
=
model
.
college
guard
college
.
count
>
0
else
{
return
false
}
}
if
step
==
4
{
let
position
=
model
.
position
let
industry
=
model
.
industry
guard
position
.
count
>
0
else
{
return
false
}
guard
industry
.
count
>
0
else
{
return
false
}
}
return
true
}
}
}
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