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
7edbff6c
Commit
7edbff6c
authored
Sep 30, 2025
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 名片
parent
55ceadf2
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
137 additions
and
40 deletions
+137
-40
YHInformationAuthorizationStepTwoViewController.swift
...)/C/YHInformationAuthorizationStepTwoViewController.swift
+13
-13
YHUserInformationModel.swift
...sses/Modules/Community(社区)/M/YHUserInformationModel.swift
+4
-1
YHSetExplainView.swift
...xy/Classes/Modules/Community(社区)/V/YHSetExplainView.swift
+11
-2
YHInformationAuthorizeViewModel.swift
...es/Community(社区)/VM/YHInformationAuthorizeViewModel.swift
+15
-8
YHSettingItem.swift
...xy/galaxy/Classes/Modules/Login(登录)/M/YHSettingItem.swift
+4
-2
YHAllowSettingTableViewCell.swift
...ses/Modules/Login(登录)/V/YHAllowSettingTableViewCell.swift
+45
-3
YHMyNewViewController.swift
...xy/Classes/Modules/Mine(我的)/C/YHMyNewViewController.swift
+20
-10
YHNewNameCardViewController.swift
...Mine(我的)/NameCard(名片)/C/YHNewNameCardViewController.swift
+25
-1
No files found.
galaxy/galaxy/Classes/Modules/Community(社区)/C/YHInformationAuthorizationStepTwoViewController.swift
View file @
7edbff6c
...
...
@@ -24,16 +24,16 @@ class YHInformationAuthorizationStepTwoViewController: YHBaseViewController {
}
func
getData
()
{
if
stepFlag
{
items
=
viewModel
.
getBaseSetDataSource
()
tableView
.
reloadData
()
}
else
{
//
if stepFlag {
//
items = viewModel.getBaseSetDataSource()
//
tableView.reloadData()
//
} else {
viewModel
.
requestUserAuthorization
{[
weak
self
]
_
,
_
in
guard
let
self
=
self
else
{
return
}
items
=
viewModel
.
getBaseSetDataSource
()
tableView
.
reloadData
()
}
}
//
}
}
func
setView
()
{
...
...
@@ -117,15 +117,15 @@ class YHInformationAuthorizationStepTwoViewController: YHBaseViewController {
@objc
func
nextStep
()
{
viewModel
.
requestAuthorizationSubmit
{[
weak
self
]
_
,
_
in
guard
let
self
=
self
else
{
return
}
if
self
.
stepFlag
{
self
.
navigationController
?
.
popToRootViewController
(
animated
:
true
)
let
view
=
YHPeopleSuccessView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
KScreenWidth
,
height
:
KScreenHeight
))
view
.
titleLabel
.
text
=
"Hi,
\(
self
.
name
)\n
您的人脉网络已激活"
let
window
=
UIApplication
.
shared
.
yhKeyWindow
()
window
?
.
addSubview
(
view
)
}
else
{
//
if self.stepFlag {
//
self.navigationController?.popToRootViewController(animated: true)
//
let view = YHPeopleSuccessView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight))
//
view.titleLabel.text = "Hi,\(self.name)\n您的人脉网络已激活"
//
let window = UIApplication.shared.yhKeyWindow()
//
window?.addSubview(view)
//
} else {
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
}
//
}
}
}
}
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/M/YHUserInformationModel.swift
View file @
7edbff6c
...
...
@@ -61,11 +61,14 @@ class YHMainUserInformationModel: SmartCodable {
}
class
YHMainUserInformationSetModel
:
SmartCodable
{
// 1: 关闭 2:开启
var
uid
:
String
=
""
var
information_to_card
:
Int
=
2
var
information_to_card
:
Int
=
2
// 弃用
var
authorization_basic_information
:
Int
=
2
var
public_education_experience
:
Int
=
2
var
public_work_experience
:
Int
=
2
var
friend_education_experience
:
Int
=
2
var
friend_work_experience
:
Int
=
2
var
isclick_card
:
Int
=
2
required
init
()
{
}
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/V/YHSetExplainView.swift
View file @
7edbff6c
...
...
@@ -26,14 +26,23 @@ class YHSetExplainView: UIView {
titleLabel
.
text
=
"授权AI人脉匹配"
messageLabel
.
text
=
"启动该功能后,您将能够使用AI人脉雷达来高效匹配新人脉,申请交换名片并成功成为好友后,双方可互相查看名片。信息准确度越高,匹配结果越精准"
topImageView
.
image
=
UIImage
(
named
:
"set_example_people"
)
case
.
school
:
case
.
school
ToFriend
:
titleLabel
.
text
=
"允许向好友公开您的教育经历"
messageLabel
.
text
=
"授权开启后,您的个人主页将展示最高学历信息,仅对好友人脉开放查看权限,保护您的隐私安全"
topImageView
.
image
=
UIImage
(
named
:
"set_example_school"
)
case
.
work
:
case
.
work
ToFriend
:
titleLabel
.
text
=
"允许向好友公开您的工作经历"
messageLabel
.
text
=
"授权开启后,您的个人主页将展示最新工作信息,仅对好友人脉开放查看权限,保护您的隐私安全"
topImageView
.
image
=
UIImage
(
named
:
"set_example_work"
)
case
.
schoolToStranger
:
titleLabel
.
text
=
"允许向陌生人公开您的教育经历"
messageLabel
.
text
=
"授权开启后,您的个人主页将展示最高学历信息,仅对非好友人脉开放查看权限,保护您的隐私安全"
topImageView
.
image
=
UIImage
(
named
:
"set_example_school"
)
case
.
workToStranger
:
titleLabel
.
text
=
"允许向陌生人公开您的工作经历"
messageLabel
.
text
=
"授权开启后,您的个人主页将展示最新工作信息,仅对非好友人脉开放查看权限,保护您的隐私安全"
topImageView
.
image
=
UIImage
(
named
:
"set_example_work"
)
}
}
}
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/VM/YHInformationAuthorizeViewModel.swift
View file @
7edbff6c
...
...
@@ -75,21 +75,26 @@ class YHInformationAuthorizeViewModel: YHBaseViewModel {
}
func
getBaseSetDataSource
()
->
[
YHSettingItem
]
{
let
item1
=
YHSettingItem
(
type
:
.
people
,
title
:
"授权AI人脉匹配"
,
subTitle
:
"开启后,您的信息将用于AI人脉匹配,为您构建高质量的人脉网络"
,
isSelect
:
setModel
.
authorization_basic_information
==
2
?
true
:
false
,
isShowAlert
:
true
)
let
item2
=
YHSettingItem
(
type
:
.
school
,
title
:
"允许向好友公开您的教育经历"
,
subTitle
:
"开启后,您的教育经历将在您的个人名片上对已交换名片的好友可见"
,
isSelect
:
setModel
.
public_education_experience
==
2
?
true
:
false
,
isShowAlert
:
true
)
let
item3
=
YHSettingItem
(
type
:
.
work
,
title
:
"允许向好友公开您的工作经历"
,
subTitle
:
"开启后,您的工作经历将在您的个人名片上对已交换名片的好友可见"
,
isSelect
:
setModel
.
public_work_experience
==
2
?
true
:
false
,
isShowAlert
:
true
)
return
[
item1
,
item2
,
item3
]
let
item1
=
YHSettingItem
(
type
:
.
people
,
title
:
"允许在公开人脉列表中展示"
,
subTitle
:
"开启后,您的信息将展示在人脉列表,开启您的人脉网络"
,
isSelect
:
setModel
.
authorization_basic_information
==
2
?
true
:
false
,
isShowAlert
:
true
)
let
item2
=
YHSettingItem
(
type
:
.
schoolToStranger
,
title
:
"允许向陌生人公开您的教育经历"
,
subTitle
:
"开启后,您的教育经历将在您的个人名片上对非好友可见"
,
isSelect
:
setModel
.
public_education_experience
==
2
?
true
:
false
,
isShowAlert
:
true
)
let
item3
=
YHSettingItem
(
type
:
.
workToStranger
,
title
:
"允许向陌生人公开您的工作经历"
,
subTitle
:
"开启后,您的工作经历将在您的个人名片上对非好友可见"
,
isSelect
:
setModel
.
public_work_experience
==
2
?
true
:
false
,
isShowAlert
:
true
)
let
item4
=
YHSettingItem
(
type
:
.
schoolToFriend
,
title
:
"允许向好友公开您的教育经历"
,
subTitle
:
"开启后,您的教育经历将在您的个人名片上对您的好友可见"
,
isSelect
:
setModel
.
friend_education_experience
==
2
?
true
:
false
,
isShowAlert
:
true
)
let
item5
=
YHSettingItem
(
type
:
.
workToFriend
,
title
:
"允许向好友公开您的工作经历"
,
subTitle
:
"开启后,您的工作经历将在您的个人名片上对您的好友可见"
,
isSelect
:
setModel
.
friend_work_experience
==
2
?
true
:
false
,
isShowAlert
:
true
)
return
[
item1
,
item2
,
item3
,
item4
,
item5
]
}
func
updateSetModel
(
_
item
:
YHSettingItem
)
{
switch
item
.
type
{
case
.
normal
:
break
case
.
people
:
setModel
.
authorization_basic_information
=
item
.
isSelect
?
2
:
1
case
.
school
:
case
.
schoolToFriend
:
setModel
.
friend_education_experience
=
item
.
isSelect
?
2
:
1
case
.
workToFriend
:
setModel
.
friend_work_experience
=
item
.
isSelect
?
2
:
1
case
.
schoolToStranger
:
setModel
.
public_education_experience
=
item
.
isSelect
?
2
:
1
case
.
work
:
case
.
work
ToStranger
:
setModel
.
public_work_experience
=
item
.
isSelect
?
2
:
1
}
}
...
...
@@ -190,7 +195,9 @@ class YHInformationAuthorizeViewModel: YHBaseViewModel {
func
requestAuthorizationSubmit
(
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
Void
)
{
let
params
:
[
String
:
Any
]
=
[
"authorization_basic_information"
:
setModel
.
authorization_basic_information
,
"public_education_experience"
:
setModel
.
public_education_experience
,
"public_work_experience"
:
setModel
.
public_work_experience
]
"public_work_experience"
:
setModel
.
public_work_experience
,
"friend_education_experience"
:
setModel
.
friend_education_experience
,
"friend_work_experience"
:
setModel
.
friend_work_experience
]
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
People
.
authorizationSubmit
_
=
YHNetRequest
.
postRequest
(
url
:
strUrl
,
params
:
params
)
{
[
weak
self
]
json
,
_
in
// 1. json字符串 转 对象
...
...
galaxy/galaxy/Classes/Modules/Login(登录)/M/YHSettingItem.swift
View file @
7edbff6c
...
...
@@ -11,8 +11,10 @@ import UIKit
enum
YHSettingType
:
Int
{
case
normal
case
people
case
school
case
work
case
schoolToStranger
case
workToStranger
case
schoolToFriend
case
workToFriend
}
class
YHSettingItem
:
NSObject
{
...
...
galaxy/galaxy/Classes/Modules/Login(登录)/V/YHAllowSettingTableViewCell.swift
View file @
7edbff6c
...
...
@@ -111,7 +111,7 @@ class YHAllowSettingTableViewCell: UITableViewCell {
}
case
.
people
:
if
!
detailSwitch
.
isOn
{
YHGrayCommonAlertView
.
show
(
""
,
"关闭后,您
将无法体验AI人脉匹配功能?
"
,
"仍然关闭"
,
"开启"
,
fullGuestureEnable
:
false
)
{
YHGrayCommonAlertView
.
show
(
""
,
"关闭后,您
的信息将不会被展示在公开的人脉列表中
"
,
"仍然关闭"
,
"开启"
,
fullGuestureEnable
:
false
)
{
self
.
detailSwitch
.
isOn
=
false
model
.
isSelect
=
self
.
detailSwitch
.
isOn
if
let
block
=
self
.
block
{
...
...
@@ -130,7 +130,7 @@ class YHAllowSettingTableViewCell: UITableViewCell {
block
(
model
)
}
}
case
.
school
:
case
.
school
ToFriend
:
if
!
detailSwitch
.
isOn
{
YHGrayCommonAlertView
.
show
(
""
,
"关闭后,您的好友将无法从您的名片中查看您的教育经历"
,
"仍然关闭"
,
"开启"
,
fullGuestureEnable
:
false
)
{
self
.
detailSwitch
.
isOn
=
false
...
...
@@ -151,7 +151,7 @@ class YHAllowSettingTableViewCell: UITableViewCell {
block
(
model
)
}
}
case
.
work
:
case
.
work
ToFriend
:
if
!
detailSwitch
.
isOn
{
YHGrayCommonAlertView
.
show
(
""
,
"关闭后,您的好友将无法从您的名片中查看您的工作经历"
,
"仍然关闭"
,
"开启"
,
fullGuestureEnable
:
false
)
{
self
.
detailSwitch
.
isOn
=
false
...
...
@@ -172,6 +172,48 @@ class YHAllowSettingTableViewCell: UITableViewCell {
block
(
model
)
}
}
case
.
schoolToStranger
:
if
!
detailSwitch
.
isOn
{
YHGrayCommonAlertView
.
show
(
""
,
"关闭后,非您的好友将无法从您的名片中查看您的教育经历"
,
"仍然关闭"
,
"开启"
,
fullGuestureEnable
:
false
)
{
self
.
detailSwitch
.
isOn
=
false
model
.
isSelect
=
self
.
detailSwitch
.
isOn
if
let
block
=
self
.
block
{
block
(
model
)
}
}
callBack
:
{
model
.
isSelect
=
self
.
detailSwitch
.
isOn
self
.
detailSwitch
.
isOn
=
true
if
let
block
=
self
.
block
{
block
(
model
)
}
}
}
else
{
model
.
isSelect
=
detailSwitch
.
isOn
if
let
block
=
block
{
block
(
model
)
}
}
case
.
workToStranger
:
if
!
detailSwitch
.
isOn
{
YHGrayCommonAlertView
.
show
(
""
,
"关闭后,非您的好友将无法从您的名片中查看您的工作经历"
,
"仍然关闭"
,
"开启"
,
fullGuestureEnable
:
false
)
{
self
.
detailSwitch
.
isOn
=
false
model
.
isSelect
=
self
.
detailSwitch
.
isOn
if
let
block
=
self
.
block
{
block
(
model
)
}
}
callBack
:
{
model
.
isSelect
=
self
.
detailSwitch
.
isOn
self
.
detailSwitch
.
isOn
=
true
if
let
block
=
self
.
block
{
block
(
model
)
}
}
}
else
{
model
.
isSelect
=
detailSwitch
.
isOn
if
let
block
=
block
{
block
(
model
)
}
}
}
}
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/C/YHMyNewViewController.swift
View file @
7edbff6c
...
...
@@ -58,15 +58,31 @@ class YHMyNewViewController: YHBaseViewController {
return
tableView
}()
func
enterNewNameCard
()
{
if
let
userId
=
YHLoginManager
.
shared
.
userModel
?
.
id
{
let
enterKey
=
"name_card_first_enter_"
+
userId
if
let
hasEnter
=
UserDefaults
.
standard
.
object
(
forKey
:
enterKey
)
as?
Bool
,
hasEnter
==
true
{
let
vc
=
YHNewNameCardViewController
()
vc
.
userId
=
userId
self
.
navigationController
?
.
pushViewController
(
vc
)
}
else
{
// 授权页面
UserDefaults
.
standard
.
set
(
true
,
forKey
:
enterKey
)
UserDefaults
.
standard
.
synchronize
()
let
vc
=
YHInformationAuthorizationStepOneViewController
()
self
.
navigationController
?
.
pushViewController
(
vc
)
}
}
}
lazy
var
userInfoView
:
YHMyUserInfoView
=
{
let
view
=
YHMyUserInfoView
.
createView
()
view
.
enterClick
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
if
!
checkLogin
()
{
return
}
enterMyNameCard
()
// enterUserInfoEditPage()
enterNewNameCard
()
}
view
.
avatarClickBlock
=
{
...
...
@@ -667,11 +683,7 @@ extension YHMyNewViewController {
switch
item
.
type
{
case
.
myCard
:
// 我的名片
let
vc
=
YHNewNameCardViewController
()
if
let
userId
=
YHLoginManager
.
shared
.
userModel
?
.
id
{
vc
.
userId
=
userId
}
self
.
navigationController
?
.
pushViewController
(
vc
)
enterNewNameCard
()
// enterMyNameCard()
case
.
myMessage
:
// 我的消息
printLog
(
"我的消息"
)
...
...
@@ -781,9 +793,7 @@ extension YHMyNewViewController {
let
vc
=
YHMyGoodFriendsVC
()
self
.
navigationController
?
.
pushViewController
(
vc
)
case
.
myEnterprise
:
let
vc
=
YHInformationAuthorizationStepOneViewController
()
// vc.stepFlag = false
self
.
navigationController
?
.
pushViewController
(
vc
)
print
(
""
)
default
:
printLog
(
"不需要响应"
)
}
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/NameCard(名片)/C/YHNewNameCardViewController.swift
View file @
7edbff6c
...
...
@@ -14,6 +14,8 @@ class YHNewNameCardViewController: YHBaseViewController {
var
userId
:
String
=
""
var
defaultIndex
=
0
let
viewModel
=
YHMatchUserViewModel
()
var
authorModel
:
YHInformationAuthorizeViewModel
=
YHInformationAuthorizeViewModel
()
var
headerHeight
:
CGFloat
=
300.0
let
containerCellHeight
=
KScreenHeight
-
k_Height_NavigationtBarAndStatuBar
-
k_Height_safeAreaInsetsBottom
()
-
88
...
...
@@ -295,6 +297,9 @@ class YHNewNameCardViewController: YHBaseViewController {
containerVC
.
userId
=
self
.
userId
createUI
()
if
self
.
isCurrentUser
{
requestAuthorization
()
}
}
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
...
...
@@ -302,6 +307,24 @@ class YHNewNameCardViewController: YHBaseViewController {
self
.
requestNameCardInfo
()
}
func
requestAuthorization
()
{
self
.
authorModel
.
requestUserAuthorization
{
_
,
_
in
if
self
.
authorModel
.
setModel
.
authorization_basic_information
!=
2
&&
self
.
authorModel
.
setModel
.
isclick_card
!=
2
{
YHGrayCommonAlertView
.
show
(
"温馨提示"
,
"是否授权信息在公开的人脉列表中展示"
,
"取消"
,
"确认"
,
fullGuestureEnable
:
false
)
{
self
.
authorModel
.
requestInformationToCardSubmit
(
agress
:
1
)
{
_
,
_
in
self
.
requestNameCardInfo
()
}
}
callBack
:
{
self
.
authorModel
.
requestInformationToCardSubmit
(
agress
:
2
)
{
_
,
_
in
self
.
authorModel
.
requestBusinessCardAuthorize
{
_
,
_
in
self
.
requestNameCardInfo
()
}
}
}
}
}
}
func
createUI
()
{
addObserver
()
self
.
editBtn
.
isHidden
=
!
self
.
isCurrentUser
...
...
@@ -379,7 +402,8 @@ class YHNewNameCardViewController: YHBaseViewController {
}
@objc
func
authorizeBtnClicked
()
{
let
vc
=
YHInformationAuthorizationStepTwoViewController
()
self
.
navigationController
?
.
pushViewController
(
vc
)
}
@objc
func
didBasciInfoBtnClicked
()
{
...
...
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