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
b22fcea8
Commit
b22fcea8
authored
Mar 05, 2024
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
相片裁剪 识别逻辑UI
parent
ab689462
Changes
16
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
439 additions
and
62 deletions
+439
-62
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+20
-0
YHImagePickerView.swift
...ainApplicantInformation(主申请人信息)/V/YHImagePickerView.swift
+1
-4
YHImageClipperViewController.swift
...s(流程)/WorkExperience/C/YHImageClipperViewController.swift
+149
-0
YHImageResultViewController.swift
...ss(流程)/WorkExperience/C/YHImageResultViewController.swift
+86
-0
YHWorkExperienceViewController.swift
...流程)/WorkExperience/C/YHWorkExperienceViewController.swift
+12
-38
YHWorkIntroductionViewController.swift
...)/WorkExperience/C/YHWorkIntroductionViewController.swift
+6
-19
YHClipperButton.swift
...ServiceProcess(流程)/WorkExperience/V/YHClipperButton.swift
+62
-0
YHClipperView.swift
...)/ServiceProcess(流程)/WorkExperience/V/YHClipperView.swift
+0
-0
YHResultBottomView.swift
...viceProcess(流程)/WorkExperience/V/YHResultBottomView.swift
+59
-0
YHWorkResponsibilitiesTableViewCell.swift
...orkExperience/V/YHWorkResponsibilitiesTableViewCell.swift
+0
-1
Contents.json
...viceCenter/工作经验/image_clipper_back.imageset/Contents.json
+22
-0
image_clipper_back@2x.png
...作经验/image_clipper_back.imageset/image_clipper_back@2x.png
+0
-0
image_clipper_back@3x.png
...作经验/image_clipper_back.imageset/image_clipper_back@3x.png
+0
-0
Contents.json
...ceCenter/工作经验/image_clipper_cannal.imageset/Contents.json
+22
-0
image_clipper_cannal@2x.png
...image_clipper_cannal.imageset/image_clipper_cannal@2x.png
+0
-0
image_clipper_cannal@3x.png
...image_clipper_cannal.imageset/image_clipper_cannal@3x.png
+0
-0
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
b22fcea8
...
...
@@ -74,6 +74,11 @@
0468D47E2B68CEA200CFB916
/* YHImagePickerView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0468D47D2B68CEA200CFB916
/* YHImagePickerView.swift */
;
};
0468D4802B6914E600CFB916
/* YHSelectCountryViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0468D47F2B6914E600CFB916
/* YHSelectCountryViewController.swift */
;
};
0468D4822B6A2A8500CFB916
/* YHSelectCountryViewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0468D4812B6A2A8500CFB916
/* YHSelectCountryViewModel.swift */
;
};
0469750E2B96C0B900A0CB66
/* YHImageClipperViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0469750D2B96C0B900A0CB66
/* YHImageClipperViewController.swift */
;
};
046975102B96C13700A0CB66
/* YHClipperView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0469750F2B96C13700A0CB66
/* YHClipperView.swift */
;
};
046975122B96C77000A0CB66
/* YHClipperButton.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
046975112B96C77000A0CB66
/* YHClipperButton.swift */
;
};
046975162B96EB2200A0CB66
/* YHImageResultViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
046975152B96EB2200A0CB66
/* YHImageResultViewController.swift */
;
};
046975182B96EEB200A0CB66
/* YHResultBottomView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
046975172B96EEB200A0CB66
/* YHResultBottomView.swift */
;
};
04808C062B4686510056D53C
/* ATAuthSDK.bundle in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04808C042B4686510056D53C
/* ATAuthSDK.bundle */
;
};
04808C082B4686C10056D53C
/* ATAuthSDK_D.framework in Embed Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04808C032B4686510056D53C
/* ATAuthSDK_D.framework */
;
settings
=
{
ATTRIBUTES
=
(
CodeSignOnCopy
,
RemoveHeadersOnCopy
,
);
};
};
049A48A82B49417300D0C641
/* YHAboutUsViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
049A48A72B49417300D0C641
/* YHAboutUsViewController.swift */
;
};
...
...
@@ -377,6 +382,11 @@
0468D47D2B68CEA200CFB916
/* YHImagePickerView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHImagePickerView.swift
;
sourceTree
=
"<group>"
;
};
0468D47F2B6914E600CFB916
/* YHSelectCountryViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHSelectCountryViewController.swift
;
sourceTree
=
"<group>"
;
};
0468D4812B6A2A8500CFB916
/* YHSelectCountryViewModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHSelectCountryViewModel.swift
;
sourceTree
=
"<group>"
;
};
0469750D2B96C0B900A0CB66
/* YHImageClipperViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHImageClipperViewController.swift
;
sourceTree
=
"<group>"
;
};
0469750F2B96C13700A0CB66
/* YHClipperView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHClipperView.swift
;
sourceTree
=
"<group>"
;
};
046975112B96C77000A0CB66
/* YHClipperButton.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHClipperButton.swift
;
sourceTree
=
"<group>"
;
};
046975152B96EB2200A0CB66
/* YHImageResultViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHImageResultViewController.swift
;
sourceTree
=
"<group>"
;
};
046975172B96EEB200A0CB66
/* YHResultBottomView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHResultBottomView.swift
;
sourceTree
=
"<group>"
;
};
04808C032B4686510056D53C
/* ATAuthSDK_D.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
path
=
ATAuthSDK_D.framework
;
sourceTree
=
"<group>"
;
};
04808C042B4686510056D53C
/* ATAuthSDK.bundle */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
"wrapper.plug-in"
;
path
=
ATAuthSDK.bundle
;
sourceTree
=
"<group>"
;
};
049A48A72B49417300D0C641
/* YHAboutUsViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHAboutUsViewController.swift
;
sourceTree
=
"<group>"
;
};
...
...
@@ -918,6 +928,8 @@
04E86E562B848D5A00A35F4B
/* YHWorkIntroductionViewController.swift */
,
04E86E582B84AD6200A35F4B
/* YHWorkExampleViewController.swift */
,
04E86E692B87352600A35F4B
/* YHCompanySelectViewController.swift */
,
0469750D2B96C0B900A0CB66
/* YHImageClipperViewController.swift */
,
046975152B96EB2200A0CB66
/* YHImageResultViewController.swift */
,
);
path
=
C
;
sourceTree
=
"<group>"
;
...
...
@@ -942,6 +954,9 @@
04E86E3D2B834FC100A35F4B
/* YHWorkExperienceTextItemView.swift */
,
04E86E5A2B84BF2000A35F4B
/* YHWorkExampleTypeView.swift */
,
04E86E5C2B84CC9700A35F4B
/* YHWorkExampleMessageView.swift */
,
0469750F2B96C13700A0CB66
/* YHClipperView.swift */
,
046975112B96C77000A0CB66
/* YHClipperButton.swift */
,
046975172B96EEB200A0CB66
/* YHResultBottomView.swift */
,
);
path
=
V
;
sourceTree
=
"<group>"
;
...
...
@@ -1832,12 +1847,14 @@
A5FD63C52B637EE000D1D9DA
/* YHSubmitAllInfoCheckView.swift in Sources */
,
A5ACE9442B4564F7002C94D2
/* Array+Extension.swift in Sources */
,
0468D4282B50D4AF00CFB916
/* YHPrivacyAlertView.swift in Sources */
,
046975102B96C13700A0CB66
/* YHClipperView.swift in Sources */
,
A58556C22B6C8412003746B2
/* YHScoreResultModel.swift in Sources */
,
0468D47A2B68A08600CFB916
/* YHAddressPickViewTableViewCell.swift in Sources */
,
0468D4342B56587B00CFB916
/* YHOSSManager.swift in Sources */
,
A596C3A42B84D9100067BBB8
/* YHOtherInfoSessionView.swift in Sources */
,
A5234E372B70802400A33433
/* YHBasicInfoCellModel.swift in Sources */
,
A5C382D12B5FAAB300C5E65C
/* YHContactItemModel.swift in Sources */
,
046975182B96EEB200A0CB66
/* YHResultBottomView.swift in Sources */
,
A5FD63EF2B68902400D1D9DA
/* YHPreviewInfoNameAndSubNameItemView.swift in Sources */
,
A5ACE9522B4564F7002C94D2
/* YHServiceCenterMainViewController.swift in Sources */
,
A5C5B2FD2B55361700A7C5D1
/* YHBannerModel.swift in Sources */
,
...
...
@@ -1861,6 +1878,8 @@
04E86E322B81EA1000A35F4B
/* YHWorkItemAddView.swift in Sources */
,
A5C5B2FB2B5535DF00A7C5D1
/* YHHomeBannerView.swift in Sources */
,
A5F78C822B68F39600EEA170
/* YHPreviewInfoCell.swift in Sources */
,
046975122B96C77000A0CB66
/* YHClipperButton.swift in Sources */
,
0469750E2B96C0B900A0CB66
/* YHImageClipperViewController.swift in Sources */
,
A5ACE94B2B4564F7002C94D2
/* YHHUDRotatingImageView.swift in Sources */
,
041B52DD2B60A889007EBCEB
/* YHTest.swift in Sources */
,
04E86E0F2B70DE9400A35F4B
/* YHSpouseInfoContainerVC.swift in Sources */
,
...
...
@@ -1896,6 +1915,7 @@
04E86E2F2B81EA1000A35F4B
/* YHWorkExperienceListViewController.swift in Sources */
,
042F88932B84AEF0008B60BD
/* YHQuestionInfo.swift in Sources */
,
A5ACE93F2B4564F7002C94D2
/* UIViewController+Extension.swift in Sources */
,
046975162B96EB2200A0CB66
/* YHImageResultViewController.swift in Sources */
,
042FBBD62B67BDD500F9DE23
/* YHBrotherInfoVC.swift in Sources */
,
A5ACE9472B4564F7002C94D2
/* YHHUD.swift in Sources */
,
A5ACE9412B4564F7002C94D2
/* Dictionary+Extension.swift in Sources */
,
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation(主申请人信息)/V/YHImagePickerView.swift
View file @
b22fcea8
...
...
@@ -173,8 +173,6 @@ class YHImagePickerView: UIView {
imagePicker
.
delegate
=
self
//设置来源
imagePicker
.
sourceType
=
.
camera
//允许编辑
imagePicker
.
allowsEditing
=
true
//打开相机
UIViewController
.
current
?
.
present
(
imagePicker
,
animated
:
true
,
completion
:
{
()
->
Void
in
...
...
@@ -190,7 +188,6 @@ class YHImagePickerView: UIView {
let
imagePicker
=
UIImagePickerController
()
imagePicker
.
delegate
=
self
imagePicker
.
sourceType
=
.
photoLibrary
imagePicker
.
allowsEditing
=
true
// 这一句,开始调用图库
UIViewController
.
current
?
.
present
(
imagePicker
,
animated
:
true
)
}
...
...
@@ -304,7 +301,7 @@ extension YHImagePickerView: UINavigationControllerDelegate, UIImagePickerContro
"businessCode"
:
"4001001"
]
// 创建MultipartFormData对象
var
multipartFormData
=
MultipartFormData
()
let
multipartFormData
=
MultipartFormData
()
// 将图片添加到multipartFormData中
multipartFormData
.
append
(
imageData
,
withName
:
"file"
,
fileName
:
"image.jpg"
,
mimeType
:
"image/jpeg"
)
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/WorkExperience/C/YHImageClipperViewController.swift
0 → 100644
View file @
b22fcea8
//
// YHImageClipperViewController.swift
// galaxy
//
// Created by EDY on 2024/3/5.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
/*
let clipperVC = YHImageClipperViewController()
clipperVC.setBaseImg(image, resultImgSize: clippedImgSize!, type: clipperType)
clipperVC.cancelClippedHandler = {
}
clipperVC.successClippedHandler = {[weak self]img in
if self?.clippedImageHandler != nil{
self?.clippedImageHandler!(img)
}
}
self.pushViewController(clipperVC, animated: true)
*/
import
UIKit
class
YHImageClipperViewController
:
YHBaseViewController
{
typealias
CancelClippedHandlerBlock
=
()
->
Void
typealias
SuccessClippedHandlerBlock
=
(
_
content
:
String
)
->
Void
//MARK Public
public
var
cancelClippedHandler
:
CancelClippedHandlerBlock
?
public
var
successClippedHandler
:
SuccessClippedHandlerBlock
?
public
func
setBaseImg
(
_
baseImg
:
UIImage
,
resultImgSize
:
CGSize
,
type
:
YHClipperType
)
{
clipperView
=
YHClipperView
(
frame
:
CGRect
(
x
:
0
,
y
:
(
isIphoneX
()
?
88
:
64
),
width
:
KScreenWidth
,
height
:
KScreenHeight
-
k_Height_safeAreaInsetsBottom
()
-
54
-
(
isIphoneX
()
?
88
:
64
)))
clipperView
?
.
resultImgSize
=
resultImgSize
clipperView
?
.
baseImg
=
baseImg
clipperView
?
.
type
=
type
self
.
view
.
addSubview
(
clipperView
!
)
}
//MARK Private
private
var
clipperView
:
YHClipperView
?
private
var
cannalButton
:
YHClipperButton
!
private
var
backImageButton
:
YHClipperButton
!
private
var
sureButton
:
UIButton
!
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
view
.
backgroundColor
=
.
black
self
.
hidesBottomBarWhenPushed
=
true
if
#available(iOS 11.0, *)
{
}
else
{
self
.
automaticallyAdjustsScrollViewInsets
=
false
}
// Do any additional setup after loading the view.
setView
()
}
func
setView
()
{
sureButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
titleLabel
?
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
15
)
button
.
backgroundColor
=
UIColor
(
hex
:
0x2274ee
)
button
.
contentHorizontalAlignment
=
.
center
button
.
setTitle
(
"确认"
,
for
:
.
normal
)
button
.
setTitleColor
(
UIColor
(
hex
:
0xffffff
),
for
:
.
normal
)
button
.
layer
.
cornerRadius
=
kCornerRadius6
button
.
clipsToBounds
=
true
button
.
addTarget
(
self
,
action
:
#selector(
sureBtnClick
)
,
for
:
.
touchUpInside
)
return
button
}()
view
.
addSubview
(
sureButton
)
sureButton
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalTo
(
-
16
)
make
.
bottom
.
equalTo
(
-
10
-
k_Height_safeAreaInsetsBottom
())
make
.
height
.
equalTo
(
44
)
make
.
width
.
equalTo
(
93
)
}
cannalButton
=
{
let
button
=
YHClipperButton
()
button
.
setContent
(
"image_clipper_cannal"
,
"取消"
)
button
.
addTarget
(
self
,
action
:
#selector(
cannalBtnClick
)
,
for
:
.
touchUpInside
)
return
button
}()
view
.
addSubview
(
cannalButton
)
cannalButton
.
snp
.
makeConstraints
{
make
in
make
.
centerY
.
equalTo
(
sureButton
.
snp
.
centerY
)
make
.
left
.
equalTo
(
30
)
make
.
height
.
equalTo
(
44
)
make
.
width
.
equalTo
(
30
)
}
backImageButton
=
{
let
button
=
YHClipperButton
()
button
.
setContent
(
"image_clipper_back"
,
"复原"
)
button
.
addTarget
(
self
,
action
:
#selector(
backImageBtnClick
)
,
for
:
.
touchUpInside
)
return
button
}()
view
.
addSubview
(
backImageButton
)
backImageButton
.
snp
.
makeConstraints
{
make
in
make
.
centerY
.
equalTo
(
sureButton
.
snp
.
centerY
)
make
.
left
.
equalTo
(
80
)
make
.
height
.
equalTo
(
44
)
make
.
width
.
equalTo
(
30
)
}
}
@objc
private
func
cannalBtnClick
()
{
if
cancelClippedHandler
!=
nil
{
cancelClippedHandler
!
()
}
self
.
navigationController
?
.
popViewController
()
}
@objc
private
func
backImageBtnClick
()
{
// if cancelClippedHandler != nil {
// cancelClippedHandler!()
// }
}
@objc
private
func
sureBtnClick
()
{
let
clippedImg
=
self
.
clipperView
?
.
clipImg
()
let
vc
=
YHImageResultViewController
()
vc
.
img
=
clippedImg
vc
.
successHandlerBlock
=
{
[
weak
self
]
result
in
guard
let
self
=
self
else
{
return
}
if
successClippedHandler
!=
nil
{
successClippedHandler
!
(
result
)
}
}
self
.
navigationController
?
.
pushViewController
(
vc
)
}
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
super
.
viewWillAppear
(
animated
)
navigationController
?
.
isNavigationBarHidden
=
false
}
override
func
didReceiveMemoryWarning
()
{
super
.
didReceiveMemoryWarning
()
// Dispose of any resources that can be recreated.
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/WorkExperience/C/YHImageResultViewController.swift
0 → 100644
View file @
b22fcea8
//
// YHImageResultViewController.swift
// galaxy
//
// Created by EDY on 2024/3/5.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHImageResultViewController
:
YHBaseViewController
{
typealias
SuccessHandlerBlock
=
(
_
relult
:
String
)
->
Void
var
successHandlerBlock
:
SuccessHandlerBlock
?
var
resultView
:
UIImageView
!
var
bottomView
:
YHResultBottomView
!
var
img
:
UIImage
!
var
viewModel
:
YHWorkExperienceViewModel
!
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
viewModel
=
YHWorkExperienceViewModel
()
gk_navTitle
=
"照片"
setView
()
// Do any additional setup after loading the view.
}
func
setView
()
{
resultView
=
{
let
step
=
UIImageView
()
step
.
contentMode
=
.
scaleAspectFit
step
.
image
=
img
return
step
}()
view
.
addSubview
(
resultView
)
resultView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
k_Height_NavigationtBarAndStatuBar
)
make
.
left
.
right
.
equalTo
(
view
)
make
.
bottom
.
equalTo
(
-
k_Height_safeAreaInsetsBottom
()
-
54
)
}
bottomView
=
{
let
bottom
=
YHResultBottomView
()
bottom
.
nextblock
=
{[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
YHHUD
.
show
(
.
progress
(
message
:
""
))
self
.
viewModel
.
uploadImage
(
self
.
img
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
guard
let
url
=
success
else
{
return
}
self
.
viewModel
.
getPublicImageUrl
(
url
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
guard
let
url
=
success
else
{
return
}
self
.
viewModel
.
requestFileMessage
(
url
)
{[
weak
self
]
success
,
model
,
error
in
guard
let
self
=
self
else
{
return
}
if
success
{
YHHUD
.
hide
()
if
let
block
=
self
.
successHandlerBlock
{
block
(
model
?
.
content
??
""
)
let
mineVC
=
YHWorkExperienceViewController
()
var
targetVC
:
UIViewController
!
for
controller
in
self
.
navigationController
!.
viewControllers
{
if
controller
.
isKind
(
of
:
mineVC
.
classForCoder
)
{
targetVC
=
controller
}
}
if
targetVC
!=
nil
{
self
.
navigationController
?
.
popToViewController
(
targetVC
,
animated
:
true
)
}
}
}
else
{
YHHUD
.
hide
()
YHHUD
.
flash
(
message
:
error
?
.
errorMsg
??
""
)
}
}
}
}
}
return
bottom
}()
view
.
addSubview
(
bottomView
)
bottomView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
bottom
.
equalTo
(
view
)
make
.
height
.
equalTo
(
k_Height_safeAreaInsetsBottom
()
+
64
)
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/WorkExperience/C/YHWorkExperienceViewController.swift
View file @
b22fcea8
...
...
@@ -238,27 +238,14 @@ extension YHWorkExperienceViewController: UITableViewDelegate, UITableViewDataSo
guard
let
self
=
self
else
{
return
}
YHImagePickerView
.
show
()
{[
weak
self
]
image
in
guard
let
self
=
self
else
{
return
}
YHHUD
.
show
(
.
progress
(
message
:
""
))
self
.
viewModel
.
uploadImage
(
image
)
{[
weak
self
]
success
,
error
in
let
clipperVC
=
YHImageClipperViewController
()
clipperVC
.
setBaseImg
(
image
,
resultImgSize
:
CGSize
(
width
:
300
,
height
:
300
),
type
:
.
Stay
)
clipperVC
.
successClippedHandler
=
{[
weak
self
]
result
in
guard
let
self
=
self
else
{
return
}
guard
let
url
=
success
else
{
return
}
self
.
viewModel
.
getPublicImageUrl
(
url
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
guard
let
url
=
success
else
{
return
}
self
.
viewModel
.
requestFileMessage
(
url
)
{[
weak
self
]
success
,
model
,
error
in
guard
let
self
=
self
else
{
return
}
if
success
{
YHHUD
.
hide
()
self
.
viewModel
.
mainModel
.
wduty
=
model
?
.
content
??
""
cell
.
dataSource
=
viewModel
.
mainModel
.
wduty
}
else
{
YHHUD
.
hide
()
YHHUD
.
flash
(
message
:
error
?
.
errorMsg
??
""
)
}
}
}
self
.
viewModel
.
mainModel
.
wduty
=
result
cell
.
dataSource
=
viewModel
.
mainModel
.
wduty
}
self
.
navigationController
?
.
pushViewController
(
clipperVC
,
animated
:
true
)
}
}
return
cell
...
...
@@ -294,27 +281,14 @@ extension YHWorkExperienceViewController: UITableViewDelegate, UITableViewDataSo
guard
let
self
=
self
else
{
return
}
YHImagePickerView
.
show
()
{[
weak
self
]
image
in
guard
let
self
=
self
else
{
return
}
YHHUD
.
show
(
.
progress
(
message
:
""
))
self
.
viewModel
.
uploadImage
(
image
)
{[
weak
self
]
success
,
error
in
let
clipperVC
=
YHImageClipperViewController
()
clipperVC
.
setBaseImg
(
image
,
resultImgSize
:
CGSize
(
width
:
300
,
height
:
300
),
type
:
.
Stay
)
clipperVC
.
successClippedHandler
=
{[
weak
self
]
result
in
guard
let
self
=
self
else
{
return
}
guard
let
url
=
success
else
{
return
}
self
.
viewModel
.
getPublicImageUrl
(
url
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
guard
let
url
=
success
else
{
return
}
self
.
viewModel
.
requestFileMessage
(
url
)
{[
weak
self
]
success
,
model
,
error
in
guard
let
self
=
self
else
{
return
}
if
success
{
YHHUD
.
hide
()
self
.
viewModel
.
mainModel
.
highlights
=
model
?
.
content
??
""
cell
.
dataSource
=
viewModel
.
mainModel
.
highlights
}
else
{
YHHUD
.
hide
()
YHHUD
.
flash
(
message
:
error
?
.
errorMsg
??
""
)
}
}
}
self
.
viewModel
.
mainModel
.
highlights
=
result
cell
.
dataSource
=
viewModel
.
mainModel
.
highlights
}
self
.
navigationController
?
.
pushViewController
(
clipperVC
,
animated
:
true
)
}
}
return
cell
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/WorkExperience/C/YHWorkIntroductionViewController.swift
View file @
b22fcea8
...
...
@@ -205,27 +205,14 @@ class YHWorkIntroductionViewController: YHBaseViewController {
guard
let
self
=
self
else
{
return
}
YHImagePickerView
.
show
()
{[
weak
self
]
image
in
guard
let
self
=
self
else
{
return
}
YHHUD
.
show
(
.
progress
(
message
:
"加载中"
))
self
.
viewModel
.
uploadImage
(
image
)
{[
weak
self
]
success
,
error
in
let
clipperVC
=
YHImageClipperViewController
()
clipperVC
.
setBaseImg
(
image
,
resultImgSize
:
CGSize
(
width
:
300
,
height
:
300
),
type
:
.
Stay
)
clipperVC
.
successClippedHandler
=
{[
weak
self
]
result
in
guard
let
self
=
self
else
{
return
}
guard
let
url
=
success
else
{
return
}
self
.
viewModel
.
getPublicImageUrl
(
url
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
guard
let
url
=
success
else
{
return
}
self
.
viewModel
.
requestFileMessage
(
url
)
{[
weak
self
]
success
,
model
,
error
in
guard
let
self
=
self
else
{
return
}
if
success
{
YHHUD
.
hide
()
self
.
dataSource
.
project_highlights
=
model
?
.
content
self
.
messageTextField
.
text
=
model
?
.
content
}
else
{
YHHUD
.
hide
()
YHHUD
.
flash
(
message
:
error
?
.
errorMsg
??
""
)
}
}
}
self
.
dataSource
.
project_highlights
=
result
self
.
messageTextField
.
text
=
result
}
self
.
navigationController
?
.
pushViewController
(
clipperVC
,
animated
:
true
)
}
}
return
view
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/WorkExperience/V/YHClipperButton.swift
0 → 100644
View file @
b22fcea8
//
// YHClipperButton.swift
// galaxy
//
// Created by EDY on 2024/3/5.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHClipperButton
:
UIButton
{
var
topImageView
:
UIImageView
!
var
bottomTitleLabel
:
UILabel
!
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
setView
()
}
required
init
?(
coder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
}
func
setView
()
{
topImageView
=
{
let
view
=
UIImageView
()
return
view
}()
addSubview
(
topImageView
)
topImageView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
centerX
.
equalToSuperview
()
make
.
width
.
height
.
equalTo
(
21
)
}
bottomTitleLabel
=
{
let
label
=
UILabel
()
label
.
font
=
UIFont
.
PFSC_B
(
ofSize
:
11
)
label
.
textAlignment
=
.
center
label
.
textColor
=
UIColor
.
white
return
label
}()
addSubview
(
bottomTitleLabel
)
bottomTitleLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
bottom
.
equalToSuperview
()
make
.
height
.
equalTo
(
15
)
}
}
func
setContent
(
_
image
:
String
,
_
title
:
String
)
{
bottomTitleLabel
.
text
=
title
topImageView
.
image
=
UIImage
(
named
:
image
)
}
/*
// Only override draw() if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
override func draw(_ rect: CGRect) {
// Drawing code
}
*/
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/WorkExperience/V/YHClipperView.swift
0 → 100644
View file @
b22fcea8
This diff is collapsed.
Click to expand it.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/WorkExperience/V/YHResultBottomView.swift
0 → 100644
View file @
b22fcea8
//
// YHResultBottomView.swift
// galaxy
//
// Created by EDY on 2024/3/5.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHResultBottomView
:
UIView
{
typealias
Block
=
()
->
()
var
nextblock
:
Block
?
var
nextButton
:
UIButton
!
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
backgroundColor
=
.
white
setUpView
()
}
required
init
?(
coder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
}
func
setUpView
()
{
nextButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
titleLabel
?
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
15
)
button
.
backgroundColor
=
UIColor
(
hex
:
0x2274ee
)
button
.
contentHorizontalAlignment
=
.
center
button
.
setTitle
(
"开始识别"
,
for
:
.
normal
)
button
.
setTitleColor
(
UIColor
(
hex
:
0xffffff
),
for
:
.
normal
)
button
.
layer
.
cornerRadius
=
kCornerRadius6
button
.
clipsToBounds
=
true
button
.
addTarget
(
self
,
action
:
#selector(
goNext
)
,
for
:
.
touchUpInside
)
return
button
}()
addSubview
(
nextButton
)
nextButton
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalTo
(
-
16
)
make
.
top
.
equalTo
(
10
)
make
.
height
.
equalTo
(
44
)
make
.
left
.
equalTo
(
16
)
}
// nextButton.layoutIfNeeded()
// nextButton.backgroundGradient()
// nextButton.addYinHeGradualLayer()
}
@objc
func
goNext
()
{
if
let
block
=
nextblock
{
block
()
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/WorkExperience/V/YHWorkResponsibilitiesTableViewCell.swift
View file @
b22fcea8
...
...
@@ -187,7 +187,6 @@ extension YHWorkResponsibilitiesTableViewCell: UITextViewDelegate {
func
textView
(
_
textView
:
UITextView
,
shouldChangeTextIn
range
:
NSRange
,
replacementText
text
:
String
)
->
Bool
{
let
newLength
=
(
textView
.
text
as
NSString
)
.
length
+
text
.
count
-
range
.
length
return
newLength
<=
2000
}
}
galaxy/galaxy/Res/Assets.xcassets/ServiceCenter/工作经验/image_clipper_back.imageset/Contents.json
0 → 100644
View file @
b22fcea8
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"image_clipper_back@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"image_clipper_back@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/ServiceCenter/工作经验/image_clipper_back.imageset/image_clipper_back@2x.png
0 → 100644
View file @
b22fcea8
1.04 KB
galaxy/galaxy/Res/Assets.xcassets/ServiceCenter/工作经验/image_clipper_back.imageset/image_clipper_back@3x.png
0 → 100644
View file @
b22fcea8
1.65 KB
galaxy/galaxy/Res/Assets.xcassets/ServiceCenter/工作经验/image_clipper_cannal.imageset/Contents.json
0 → 100644
View file @
b22fcea8
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"image_clipper_cannal@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"image_clipper_cannal@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/ServiceCenter/工作经验/image_clipper_cannal.imageset/image_clipper_cannal@2x.png
0 → 100644
View file @
b22fcea8
566 Bytes
galaxy/galaxy/Res/Assets.xcassets/ServiceCenter/工作经验/image_clipper_cannal.imageset/image_clipper_cannal@3x.png
0 → 100644
View file @
b22fcea8
899 Bytes
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