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
d9772d33
Commit
d9772d33
authored
Jul 23, 2024
by
DavidHuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
身份优势 接口联调
parent
b3b1b50c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
17 deletions
+22
-17
YHStatusAdvantageVC.swift
...laxy/Classes/Modules/Home(首页)/C/YHStatusAdvantageVC.swift
+20
-13
YHHomePageViewModel.swift
...axy/Classes/Modules/Home(首页)/VM/YHHomePageViewModel.swift
+2
-4
No files found.
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHStatusAdvantageVC.swift
View file @
d9772d33
...
...
@@ -66,14 +66,29 @@ class YHStatusAdvantageVC: YHBaseViewController, WKUIDelegate, WKNavigationDeleg
private
extension
YHStatusAdvantageVC
{
func
loadQrInfo
()
{
let
params
:
[
String
:
Any
]
=
[
"pid
"
:
16
]
let
params
:
[
String
:
Int
]
=
[
"pid[0]"
:
14
,
"pid[1]
"
:
16
]
viewModel
.
getHKEvent
(
param
:
params
)
{
success
,
error
in
if
success
{
self
.
isQrInfoOk
=
true
if
let
arr
=
self
.
viewModel
.
hkList
,
arr
.
count
>
1
{
let
item0
:
YHHKEventModel
=
arr
[
0
]
if
item0
.
list
.
count
>
0
{
self
.
url
=
item0
.
list
[
0
]
self
.
reloadWebUrl
()
}
}
}
}
}
func
reloadWebUrl
()
{
let
url
=
NSURL
(
string
:
url
)
// 创建请求
let
request
=
NSURLRequest
(
url
:
url
!
as
URL
)
// 加载请求
webview
.
load
(
request
as
URLRequest
)
}
func
setupUI
()
{
gk_navBarAlpha
=
1.0
gk_navLineHidden
=
false
...
...
@@ -92,12 +107,7 @@ private extension YHStatusAdvantageVC {
webview
.
navigationDelegate
=
self
webview
.
scrollView
.
contentInsetAdjustmentBehavior
=
.
never
webview
.
scrollView
.
bounces
=
false
// 创建网址
let
url
=
NSURL
(
string
:
url
)
// 创建请求
let
request
=
NSURLRequest
(
url
:
url
!
as
URL
)
// 加载请求
webview
.
load
(
request
as
URLRequest
)
// reloadWebUrl()
view
.
addSubview
(
webview
)
view
.
addSubview
(
bottomHoldView
)
...
...
@@ -120,9 +130,8 @@ private extension YHStatusAdvantageVC {
self
.
navigationController
?
.
pushViewController
(
vc
)
}
else
if
tag
==
1
{
if
self
.
isQrInfoOk
{
if
let
arr
=
self
.
viewModel
.
hkList
,
arr
.
count
>
0
{
let
item
:
YHHKEventModel
=
arr
[
0
]
if
let
arr
=
self
.
viewModel
.
hkList
,
arr
.
count
>
1
{
let
item
:
YHHKEventModel
=
arr
[
1
]
if
item
.
list
.
count
>
1
{
let
codeUrl
=
item
.
list
[
0
]
//"https://public-resuorces.oss-cn-shenzhen.aliyuncs.com/app/article_clue_default_user_code1.png"
let
downloadUrl
=
item
.
list
[
1
]
//"https://public-resuorces.oss-cn-shenzhen.aliyuncs.com/app/article_clue_default_user_code.png"
...
...
@@ -156,9 +165,7 @@ private extension YHStatusAdvantageVC {
}
updateNetWorkStatusUI
(
needReload
:
false
)
if
!
YHLoginManager
.
shared
.
isLogin
()
{
loadQrInfo
()
}
loadQrInfo
()
}
func
addRightItems
()
{
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/VM/YHHomePageViewModel.swift
View file @
d9772d33
...
...
@@ -408,11 +408,9 @@ extension YHHomePageViewModel {
}
}
func
getHKEvent
(
param
:
[
String
:
Any
]
=
[:],
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
func
getHKEvent
(
param
:
[
String
:
Int
]
=
[:],
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Common
.
hklistApi
// let param = ["pid":16]
let
_
=
YHNetRequest
.
getRequest
(
url
:
strUrl
,
params
:
param
)
{
[
weak
self
]
json
,
code
in
let
_
=
YHNetRequest
.
getRequest
(
url
:
strUrl
,
params
:
param
)
{
[
weak
self
]
json
,
code
in
guard
let
self
=
self
else
{
return
}
//1. json字符串 转 对象
if
json
.
code
==
200
{
...
...
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