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
efbbafcd
Commit
efbbafcd
authored
Jan 30, 2024
by
pete谢兆麟
1
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'xiezhaolin' into develop
parents
0edd4297
b3454de7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
132 additions
and
13 deletions
+132
-13
YHServiceCenterMainViewController.swift
...ntService(服务中心)/C/YHServiceCenterMainViewController.swift
+2
-2
YHMainApplicantInformationViewController.swift
...ormation/C/YHMainApplicantInformationViewController.swift
+1
-0
YHImagePickerView.swift
...ss(流程)/MainApplicantInformation/V/YHImagePickerView.swift
+123
-10
Info.plist
galaxy/galaxy/Res/Info.plist
+6
-1
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/C/YHServiceCenterMainViewController.swift
View file @
efbbafcd
...
@@ -141,8 +141,8 @@ extension YHServiceCenterMainViewController : UITableViewDelegate,UITableViewDat
...
@@ -141,8 +141,8 @@ extension YHServiceCenterMainViewController : UITableViewDelegate,UITableViewDat
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
tableView
.
deselectRow
(
at
:
indexPath
,
animated
:
true
)
tableView
.
deselectRow
(
at
:
indexPath
,
animated
:
true
)
printLog
(
"点击了 tableView Cell
\(
indexPath
.
row
)
"
)
printLog
(
"点击了 tableView Cell
\(
indexPath
.
row
)
"
)
//
let vc = YHServiceCenterSecondViewController()
let
vc
=
YHServiceCenterSecondViewController
()
let
vc
=
YHPersonInformMainViewController
()
//for test hjl
//
let vc = YHPersonInformMainViewController() //for test hjl
self
.
navigationController
?
.
pushViewController
(
vc
)
self
.
navigationController
?
.
pushViewController
(
vc
)
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation/C/YHMainApplicantInformationViewController.swift
View file @
efbbafcd
...
@@ -36,6 +36,7 @@ class YHMainApplicantInformationViewController: YHBaseViewController {
...
@@ -36,6 +36,7 @@ class YHMainApplicantInformationViewController: YHBaseViewController {
dataSource
=
viewModel
.
getDetailDataSource
()
dataSource
=
viewModel
.
getDetailDataSource
()
}
}
tableView
.
reloadData
()
tableView
.
reloadData
()
}
}
func
setView
()
{
func
setView
()
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation/V/YHImagePickerView.swift
View file @
efbbafcd
...
@@ -6,12 +6,25 @@
...
@@ -6,12 +6,25 @@
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
//
/*
let view = YHImagePickerView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight))
view.backImage = { [weak self] image in
guard let self = self else { return }
}
let window = UIApplication.shared.yhKeyWindow()
window?.addSubview(view)
*/
import
UIKit
import
UIKit
class
YHImagePickerView
:
UIView
{
class
YHImagePickerView
:
UIView
{
var
backImage
:
((
UIImage
)
->
Void
)?
var
centerView
:
UIView
!
var
centerView
:
UIView
!
var
titleLabel
:
UILabel
!
var
titleLabel
:
UILabel
!
var
closeButton
:
UIButton
!
var
closeButton
:
UIButton
!
var
takePhotoBtton
:
UIButton
!
var
selectPhotoButton
:
UIButton
!
var
cannalButton
:
UIButton
!
var
lineView
:
UIView
!
var
lineView
:
UIView
!
override
init
(
frame
:
CGRect
)
{
override
init
(
frame
:
CGRect
)
{
...
@@ -43,7 +56,7 @@ class YHImagePickerView: UIView {
...
@@ -43,7 +56,7 @@ class YHImagePickerView: UIView {
titleLabel
=
{
titleLabel
=
{
let
label
=
UILabel
()
let
label
=
UILabel
()
label
.
text
=
"
选择出生日期
"
label
.
text
=
"
请选择上传方式
"
label
.
font
=
kFont
(
size
:
17
)
label
.
font
=
kFont
(
size
:
17
)
label
.
textColor
=
UIColor
(
hex
:
0x222222
)
label
.
textColor
=
UIColor
(
hex
:
0x222222
)
label
.
textAlignment
=
.
left
label
.
textAlignment
=
.
left
...
@@ -69,17 +82,67 @@ class YHImagePickerView: UIView {
...
@@ -69,17 +82,67 @@ class YHImagePickerView: UIView {
make
.
top
.
equalTo
(
16
)
make
.
top
.
equalTo
(
16
)
}
}
lineView
=
{
takePhotoBtton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
titleLabel
?
.
font
=
kBoldFont
(
size
:
14
)
button
.
contentHorizontalAlignment
=
.
center
button
.
setTitle
(
"拍照上传"
,
for
:
.
normal
)
button
.
setTitleColor
(
UIColor
(
hex
:
0x222222
),
for
:
.
normal
)
button
.
addTarget
(
self
,
action
:
#selector(
takePhoto
)
,
for
:
.
touchUpInside
)
return
button
}()
centerView
.
addSubview
(
takePhotoBtton
)
takePhotoBtton
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalTo
(
-
21
)
make
.
height
.
equalTo
(
51
)
make
.
left
.
equalTo
(
21
)
make
.
top
.
equalTo
(
53
)
}
selectPhotoButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
titleLabel
?
.
font
=
kBoldFont
(
size
:
14
)
button
.
contentHorizontalAlignment
=
.
center
button
.
setTitle
(
"相册上传"
,
for
:
.
normal
)
button
.
setTitleColor
(
UIColor
(
hex
:
0x222222
),
for
:
.
normal
)
button
.
addTarget
(
self
,
action
:
#selector(
selectPhoto
)
,
for
:
.
touchUpInside
)
return
button
}()
centerView
.
addSubview
(
selectPhotoButton
)
selectPhotoButton
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalTo
(
-
21
)
make
.
height
.
equalTo
(
51
)
make
.
left
.
equalTo
(
21
)
make
.
top
.
equalTo
(
105
)
}
cannalButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
titleLabel
?
.
font
=
kBoldFont
(
size
:
14
)
button
.
contentHorizontalAlignment
=
.
center
button
.
setTitle
(
"取消"
,
for
:
.
normal
)
button
.
setTitleColor
(
UIColor
(
hex
:
0x909090
),
for
:
.
normal
)
button
.
addTarget
(
self
,
action
:
#selector(
dismiss
)
,
for
:
.
touchUpInside
)
return
button
}()
centerView
.
addSubview
(
cannalButton
)
cannalButton
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalTo
(
-
21
)
make
.
height
.
equalTo
(
51
)
make
.
left
.
equalTo
(
21
)
make
.
top
.
equalTo
(
156
)
}
for
i
in
0
..<
3
{
let
view
=
UIView
()
let
view
=
UIView
()
view
.
backgroundColor
=
UIColor
(
hex
:
0xf0f0f0
)
view
.
backgroundColor
=
UIColor
(
hex
:
0xf0f0f0
)
return
view
centerView
.
addSubview
(
view
)
}()
view
.
snp
.
makeConstraints
{
make
in
centerView
.
addSubview
(
lineView
)
make
.
left
.
equalTo
(
18
)
lineView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
52
+
52
*
i
)
make
.
left
.
equalTo
(
18
)
make
.
height
.
equalTo
(
1
)
make
.
top
.
equalTo
(
52
)
make
.
right
.
equalTo
(
-
18
)
make
.
height
.
equalTo
(
1
)
}
make
.
right
.
equalTo
(
-
18
)
}
}
}
}
...
@@ -92,6 +155,35 @@ class YHImagePickerView: UIView {
...
@@ -92,6 +155,35 @@ class YHImagePickerView: UIView {
removeFromSuperview
()
removeFromSuperview
()
}
}
@objc
func
takePhoto
()
{
if
UIImagePickerController
.
isSourceTypeAvailable
(
.
camera
){
//创建图片控制器
let
imagePicker
=
UIImagePickerController
()
//设置代理
imagePicker
.
delegate
=
self
//设置来源
imagePicker
.
sourceType
=
.
camera
//允许编辑
imagePicker
.
allowsEditing
=
true
//打开相机
UIViewController
.
current
?
.
present
(
imagePicker
,
animated
:
true
,
completion
:
{
()
->
Void
in
})
}
else
{
printLog
(
"找不到相机"
)
}
}
@objc
func
selectPhoto
()
{
if
UIImagePickerController
.
isSourceTypeAvailable
(
.
photoLibrary
){
let
imagePicker
=
UIImagePickerController
()
imagePicker
.
delegate
=
self
imagePicker
.
sourceType
=
.
photoLibrary
imagePicker
.
allowsEditing
=
true
// 这一句,开始调用图库
UIViewController
.
current
?
.
present
(
imagePicker
,
animated
:
true
)
}
}
}
}
extension
YHImagePickerView
:
UIGestureRecognizerDelegate
{
extension
YHImagePickerView
:
UIGestureRecognizerDelegate
{
...
@@ -103,3 +195,24 @@ extension YHImagePickerView: UIGestureRecognizerDelegate {
...
@@ -103,3 +195,24 @@ extension YHImagePickerView: UIGestureRecognizerDelegate {
}
}
}
}
extension
YHImagePickerView
:
UINavigationControllerDelegate
,
UIImagePickerControllerDelegate
{
func
imagePickerController
(
_
picker
:
UIImagePickerController
,
didFinishPickingMediaWithInfo
info
:
[
UIImagePickerController
.
InfoKey
:
Any
])
{
if
let
image
=
info
[
UIImagePickerController
.
InfoKey
.
originalImage
]
as?
UIImage
{
// 将图片显示给UIImageView
if
let
block
=
backImage
{
block
(
image
)
self
.
dismiss
()
}
}
else
{
printLog
(
"pick image wrong"
)
}
// 收回图库选择界面
picker
.
dismiss
(
animated
:
true
,
completion
:
nil
)
}
func
imagePickerControllerDidCancel
(
_
picker
:
UIImagePickerController
)
{
}
}
galaxy/galaxy/Res/Info.plist
View file @
efbbafcd
<
?xml
v
e
rsion="
1
.
0
"
e
n
c
o
d
ing="UT
F
-
8
"?
>
<
?xml
v
e
rsion="
1
.
0
"
e
n
c
o
d
ing="UT
F
-
8
"?
>
<
!
D
O
C
TYP
E
plist
PU
B
LI
C
"-//
A
ppl
e
//
D
T
D
PLIST
1
.
0
//
E
N"
"http://www.
a
ppl
e
.
c
om/
D
T
D
s/Prop
e
rtyList-
1
.
0
.
d
t
d
"
>
<
!
D
O
C
TYP
E
plist
PU
B
LI
C
"-//
A
ppl
e
//
D
T
D
PLIST
1
.
0
//
E
N"
"http://www.
a
ppl
e
.
c
om/
D
T
D
s/Prop
e
rtyList-
1
.
0
.
d
t
d
"
>
<
plist
v
e
rsion="
1
.
0
"
>
<
plist
v
e
rsion="
1
.
0
"
>
<
d
i
c
t/
>
<
d
i
c
t
>
<
k
e
y
>
NSCameraUsageDescription
<
/k
e
y
>
<
string
>
cameraDesciption
<
/string
>
<
k
e
y
>
NSPhotoLibraryUsageDescription
<
/k
e
y
>
<
string
>
photoLibraryDesciption
<
/string
>
<
/
d
i
c
t
>
<
/plist
>
<
/plist
>
David黄金龙
@david.hjl
mentioned in commit
5e494916
·
Jan 30, 2024
mentioned in commit
5e494916
mentioned in commit 5e4949163ad459eab889ca66eff006b47ca1b7ba
Toggle commit list
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