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
9709ff9d
Commit
9709ff9d
authored
Sep 20, 2024
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
案例分享逻辑修改
parent
4d0cad51
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
64 additions
and
40 deletions
+64
-40
YHServiceCenterViewController.swift
...ligentService(服务中心)/C/YHServiceCenterViewController.swift
+0
-5
YHResignGuidelinesExampleShareViewController.swift
...份指引)/C/YHResignGuidelinesExampleShareViewController.swift
+1
-1
YHResignGuidelinesExampleViewController.swift
...s(续期身份指引)/C/YHResignGuidelinesExampleViewController.swift
+59
-33
YHResignGuidelinesModel.swift
.../ResignGuidelines(续期身份指引)/M/YHResignGuidelinesModel.swift
+2
-0
YHResignGuidelinesViewModel.swift
...gnGuidelines(续期身份指引)/VM/YHResignGuidelinesViewModel.swift
+2
-1
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/C/YHServiceCenterViewController.swift
View file @
9709ff9d
...
@@ -229,11 +229,6 @@ extension YHServiceCenterViewController {
...
@@ -229,11 +229,6 @@ extension YHServiceCenterViewController {
}
}
@objc
func
pushOrderView
()
{
@objc
func
pushOrderView
()
{
// let vc = YHResignGuidelinesExampleViewController()
// self.navigationController?.pushViewController(vc)
// return
var
flag
=
true
var
flag
=
true
if
self
.
state
==
1
||
self
.
state
==
3
{
if
self
.
state
==
1
||
self
.
state
==
3
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignGuidelines(续期身份指引)/C/YHResignGuidelinesExampleShareViewController.swift
View file @
9709ff9d
...
@@ -94,7 +94,6 @@ extension YHResignGuidelinesExampleShareViewController {
...
@@ -94,7 +94,6 @@ extension YHResignGuidelinesExampleShareViewController {
centerImageView
=
{
centerImageView
=
{
let
view
=
UIImageView
()
let
view
=
UIImageView
()
view
.
image
=
UIImage
(
named
:
centerImageName
)
return
view
return
view
}()
}()
view
.
addSubview
(
centerImageView
)
view
.
addSubview
(
centerImageView
)
...
@@ -126,6 +125,7 @@ extension YHResignGuidelinesExampleShareViewController {
...
@@ -126,6 +125,7 @@ extension YHResignGuidelinesExampleShareViewController {
make
.
center
.
equalToSuperview
()
make
.
center
.
equalToSuperview
()
make
.
width
.
height
.
equalTo
(
21
)
make
.
width
.
height
.
equalTo
(
21
)
}
}
centerImageView
.
kf
.
setImage
(
with
:
URL
(
string
:
centerImageName
))
let
qrString
=
url
let
qrString
=
url
if
let
qrCode
=
qrString
.
generateQRCode
()
{
if
let
qrCode
=
qrString
.
generateQRCode
()
{
// 可以将qrCode设置为UIImageView的image属性来显示二维码
// 可以将qrCode设置为UIImageView的image属性来显示二维码
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignGuidelines(续期身份指引)/C/YHResignGuidelinesExampleViewController.swift
View file @
9709ff9d
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
//
//
import
UIKit
import
UIKit
import
Kingfisher
enum
YHResignGuidelinesExampleType
:
Int
{
enum
YHResignGuidelinesExampleType
:
Int
{
case
house
case
house
...
@@ -23,6 +24,9 @@ class YHResignGuidelinesExampleViewController: YHBaseViewController {
...
@@ -23,6 +24,9 @@ class YHResignGuidelinesExampleViewController: YHBaseViewController {
var
type
:
YHResignGuidelinesExampleType
=
.
house
var
type
:
YHResignGuidelinesExampleType
=
.
house
// var viewModel = YHResignCertificateListViewModel()
// var viewModel = YHResignCertificateListViewModel()
var
viewModel
=
YHResignGuidelinesViewModel
()
var
viewModel
=
YHResignGuidelinesViewModel
()
var
height
:
CGFloat
=
0
var
id
=
3473
override
func
viewDidLoad
()
{
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
super
.
viewDidLoad
()
gk_navTitle
=
"银河续签案例分享"
gk_navTitle
=
"银河续签案例分享"
...
@@ -37,21 +41,21 @@ class YHResignGuidelinesExampleViewController: YHBaseViewController {
...
@@ -37,21 +41,21 @@ class YHResignGuidelinesExampleViewController: YHBaseViewController {
}
}
func
getData
()
{
func
getData
()
{
if
type
==
.
house
{
//
if type == .house {
imageName
=
"resign_guidelines_example_house"
//
imageName = "resign_guidelines_example_house"
}
else
if
type
==
.
work
{
//
} else if type == .work {
imageName
=
"resign_guidelines_example_work"
//
imageName = "resign_guidelines_example_work"
}
else
if
type
==
.
taxation
{
//
} else if type == .taxation {
imageName
=
"resign_guidelines_example_taxation"
//
imageName = "resign_guidelines_example_taxation"
}
else
{
//
} else {
imageName
=
"resign_guidelines_example_nowork"
//
imageName = "resign_guidelines_example_nowork"
}
//
}
viewModel
.
getResignDetail
(
Id
:
3473
)
{[
weak
self
]
success
,
error
in
viewModel
.
getResignDetail
(
Id
:
id
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
self
.
imageName
=
self
.
viewModel
.
mainModel
.
content_url
self
.
getImageSizeFromURL
(
urlString
:
self
.
imageName
)
}
}
tableView
.
reloadData
()
}
}
func
setView
()
{
func
setView
()
{
...
@@ -104,21 +108,41 @@ class YHResignGuidelinesExampleViewController: YHBaseViewController {
...
@@ -104,21 +108,41 @@ class YHResignGuidelinesExampleViewController: YHBaseViewController {
}
}
@objc
func
nextStep
()
{
@objc
func
nextStep
()
{
var
imageName
=
""
//
var imageName = ""
if
type
==
.
house
{
//
if type == .house {
imageName
=
"resign_guidelines_example_house_share"
//
imageName = "resign_guidelines_example_house_share"
}
else
if
type
==
.
work
{
//
} else if type == .work {
imageName
=
"resign_guidelines_example_work_share"
//
imageName = "resign_guidelines_example_work_share"
}
else
if
type
==
.
taxation
{
//
} else if type == .taxation {
imageName
=
"resign_guidelines_example_taxation_share"
//
imageName = "resign_guidelines_example_taxation_share"
}
else
{
//
} else {
imageName
=
"resign_guidelines_example_nowork_share"
//
imageName = "resign_guidelines_example_nowork_share"
}
//
}
let
vc
=
YHResignGuidelinesExampleShareViewController
()
let
vc
=
YHResignGuidelinesExampleShareViewController
()
vc
.
centerImageName
=
imageName
vc
.
centerImageName
=
self
.
viewModel
.
mainModel
.
share_url
vc
.
url
=
"https://baidu.com"
vc
.
url
=
"https://baidu.com"
self
.
navigationController
?
.
pushViewController
(
vc
)
self
.
navigationController
?
.
pushViewController
(
vc
)
}
}
func
getImageSizeFromURL
(
urlString
:
String
)
{
let
imageURL
=
URL
(
string
:
urlString
)
!
// 使用Kingfisher的ImageDownloader下载图片数据
ImageDownloader
.
default
.
downloadImage
(
with
:
imageURL
,
options
:
[],
progressBlock
:
nil
)
{
(
result
)
in
switch
result
{
case
.
success
(
let
response
):
// 使用UIImage初始化图片数据
let
image
=
response
.
image
let
size
=
image
.
size
let
scale
=
size
.
width
>
0
?
Double
(
size
.
height
/
size
.
width
)
:
0.0
// 获取图片的宽度和高度
self
.
height
=
KScreenWidth
*
scale
self
.
tableView
.
reloadData
()
case
.
failure
(
let
error
):
print
(
error
)
}
}
}
}
}
extension
YHResignGuidelinesExampleViewController
:
UITableViewDelegate
,
UITableViewDataSource
{
extension
YHResignGuidelinesExampleViewController
:
UITableViewDelegate
,
UITableViewDataSource
{
...
@@ -133,15 +157,17 @@ extension YHResignGuidelinesExampleViewController: UITableViewDelegate, UITableV
...
@@ -133,15 +157,17 @@ extension YHResignGuidelinesExampleViewController: UITableViewDelegate, UITableV
}
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
if
type
==
.
house
{
// if type == .house {
return
986
.
fix
// return 986.fix
}
else
if
type
==
.
work
{
// } else if type == .work {
return
925
.
fix
// return 925.fix
}
else
if
type
==
.
taxation
{
// } else if type == .taxation {
return
946
.
fix
// return 946.fix
}
else
{
// } else {
return
1069
.
fix
// return 1069.fix
}
// }
return
height
}
}
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
...
@@ -154,7 +180,7 @@ class YHResignGuidelinesExampleTableViewCell: UITableViewCell {
...
@@ -154,7 +180,7 @@ class YHResignGuidelinesExampleTableViewCell: UITableViewCell {
var
bgImageView
:
UIImageView
!
var
bgImageView
:
UIImageView
!
var
imageName
:
String
?
{
var
imageName
:
String
?
{
didSet
{
didSet
{
bgImageView
.
image
=
UIImage
(
named
:
imageName
??
""
)
bgImageView
.
kf
.
setImage
(
with
:
URL
(
string
:
imageName
)
)
}
}
}
}
override
func
awakeFromNib
()
{
override
func
awakeFromNib
()
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignGuidelines(续期身份指引)/M/YHResignGuidelinesModel.swift
View file @
9709ff9d
...
@@ -21,6 +21,8 @@ class YHResignGuidelinesModel: SmartCodable {
...
@@ -21,6 +21,8 @@ class YHResignGuidelinesModel: SmartCodable {
var
is_finished_transcode
:
Int
=
0
var
is_finished_transcode
:
Int
=
0
var
img_url_compress
:
String
=
""
var
img_url_compress
:
String
=
""
var
clue_classify_img_url
:
String
=
""
var
clue_classify_img_url
:
String
=
""
var
share_url
:
String
=
""
var
content_url
:
String
=
""
required
init
()
{
required
init
()
{
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignGuidelines(续期身份指引)/VM/YHResignGuidelinesViewModel.swift
View file @
9709ff9d
...
@@ -18,10 +18,11 @@ class YHResignGuidelinesViewModel: YHBaseViewModel {
...
@@ -18,10 +18,11 @@ class YHResignGuidelinesViewModel: YHBaseViewModel {
//1. json字符串 转 对象
//1. json字符串 转 对象
guard
self
!=
nil
else
{
return
}
guard
self
!=
nil
else
{
return
}
if
json
.
code
==
200
{
if
json
.
code
==
200
{
guard
let
dic
=
json
.
data
?
.
peel
as?
[
String
:
Any
],
let
data
=
dic
[
"data"
]
as?
[
String
:
Any
],
let
result
=
YHResignGuidelinesModel
.
deserialize
(
from
:
data
)
else
{
guard
let
dic
=
json
.
data
?
.
peel
as?
[
String
:
Any
],
let
result
=
YHResignGuidelinesModel
.
deserialize
(
from
:
dic
)
else
{
callBackBlock
(
false
,
nil
)
callBackBlock
(
false
,
nil
)
return
return
}
}
self
?
.
mainModel
=
result
self
?
.
mainModel
=
result
callBackBlock
(
true
,
nil
)
callBackBlock
(
true
,
nil
)
}
else
{
}
else
{
...
...
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