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
136a1a74
Commit
136a1a74
authored
Apr 03, 2025
by
Steven杜宇
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'plan' of
http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS
into plan
parents
799d155a
c26756ba
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
83 additions
and
6 deletions
+83
-6
AppDelegate.swift
galaxy/galaxy/AppDelegate.swift
+32
-4
YHCustomerInformationQuestionnaireVC.swift
...les/Plan(方案)/C/YHCustomerInformationQuestionnaireVC.swift
+21
-0
YHMakePlanCardView.swift
...sses/Modules/Plan(方案)/MakePlan/V/YHMakePlanCardView.swift
+30
-2
No files found.
galaxy/galaxy/AppDelegate.swift
View file @
136a1a74
...
@@ -153,8 +153,23 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate {
...
@@ -153,8 +153,23 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate {
printLog
(
"需要登录"
)
printLog
(
"需要登录"
)
return
return
}
}
let
surveyViewModel
=
YHSurveyViewModel
()
// 跳转分析
// 跳转分析
surveyViewModel
.
getRenewalPlanGenerated
{
state
,
error
in
guard
let
state
=
state
else
{
if
let
msg
=
error
?
.
errorMsg
,
!
msg
.
isEmpty
{
YHHUD
.
flash
(
message
:
msg
)
}
return
}
if
state
.
isGeneratePlan
==
true
{
let
vc
=
YHPlanViewController
()
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
}
else
{
let
vc
=
YHCustomerInformationQuestionnaireVC
()
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
}
}
}
}
}
else
if
iType
==
6
{
}
else
if
iType
==
6
{
// 跳转方案商品
// 跳转方案商品
...
@@ -164,9 +179,22 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate {
...
@@ -164,9 +179,22 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate {
printLog
(
"需要登录"
)
printLog
(
"需要登录"
)
return
return
}
}
let
surveyViewModel
=
YHSurveyViewModel
()
let
vc
=
YHMakePlanViewController
()
surveyViewModel
.
getRenewalPlanGenerated
{
state
,
error
in
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
guard
let
state
=
state
else
{
if
let
msg
=
error
?
.
errorMsg
,
!
msg
.
isEmpty
{
YHHUD
.
flash
(
message
:
msg
)
}
return
}
if
state
.
isGeneratePlan
==
true
{
let
vc
=
YHMakePlanViewController
()
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
else
{
let
vc
=
YHCustomerInformationQuestionnaireVC
()
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
}
}
}
}
}
else
{
}
else
{
printLog
(
"未处理的类型
\(
iType
)
"
)
printLog
(
"未处理的类型
\(
iType
)
"
)
...
...
galaxy/galaxy/Classes/Modules/Plan(方案)/C/YHCustomerInformationQuestionnaireVC.swift
View file @
136a1a74
...
@@ -254,6 +254,7 @@ class YHCustomerInformationQuestionnaireVC: YHBaseViewController {
...
@@ -254,6 +254,7 @@ class YHCustomerInformationQuestionnaireVC: YHBaseViewController {
if
let
first
=
questions
.
first
,
surveyContainerModel
.
defaultAnswers
.
contains
(
where
:
{
answer
in
if
let
first
=
questions
.
first
,
surveyContainerModel
.
defaultAnswers
.
contains
(
where
:
{
answer
in
answer
.
questionKey
==
first
.
businessKey
answer
.
questionKey
==
first
.
businessKey
})
{
})
{
/*
for answer in surveyContainerModel.defaultAnswers {
for answer in surveyContainerModel.defaultAnswers {
if let question = questions.first(where: { item in
if let question = questions.first(where: { item in
item.businessKey == answer.questionKey
item.businessKey == answer.questionKey
...
@@ -268,6 +269,26 @@ class YHCustomerInformationQuestionnaireVC: YHBaseViewController {
...
@@ -268,6 +269,26 @@ class YHCustomerInformationQuestionnaireVC: YHBaseViewController {
self.answerDic[question.id] = options
self.answerDic[question.id] = options
}
}
}
}
*/
for
(
index
,
answer
)
in
surveyContainerModel
.
defaultAnswers
.
enumerated
()
{
if
let
question
=
questions
.
first
(
where
:
{
item
in
item
.
businessKey
==
answer
.
questionKey
})
{
displayedQuestions
.
append
(
question
)
let
options
=
answer
.
optionKey
.
compactMap
{
optionKey
in
let
option
=
question
.
options
.
first
{
optionItem
in
optionItem
.
businessKey
==
optionKey
}
return
YHSurveyConditionOptionExtra
(
extra
:
""
,
optionId
:
option
?
.
id
??
""
,
title
:
option
?
.
title
??
""
,
optionKey
:
answer
.
questionKey
)
}
self
.
answerDic
[
question
.
id
]
=
options
}
if
surveyContainerModel
.
defaultAnswers
.
count
>
index
+
1
,
let
lastModel
=
displayedQuestions
.
last
,
let
nextQuestion
=
self
.
findNextQuestion
(
allQuestions
:
self
.
allQuestions
,
displayedQuestions
:
self
.
displayedQuestions
,
answerDic
:
self
.
answerDic
,
currentIndex
:
displayedQuestions
.
count
-
1
,
currentOptionId
:
lastModel
.
id
),
nextQuestion
.
businessKey
!=
surveyContainerModel
.
defaultAnswers
[
index
+
1
]
.
questionKey
{
self
.
displayedQuestions
.
append
(
nextQuestion
)
break
}
}
if
let
lastModel
=
displayedQuestions
.
last
,
let
nextQuestion
=
self
.
findNextQuestion
(
allQuestions
:
self
.
allQuestions
,
displayedQuestions
:
self
.
displayedQuestions
,
answerDic
:
self
.
answerDic
,
currentIndex
:
displayedQuestions
.
count
-
1
,
currentOptionId
:
lastModel
.
id
)
{
if
let
lastModel
=
displayedQuestions
.
last
,
let
nextQuestion
=
self
.
findNextQuestion
(
allQuestions
:
self
.
allQuestions
,
displayedQuestions
:
self
.
displayedQuestions
,
answerDic
:
self
.
answerDic
,
currentIndex
:
displayedQuestions
.
count
-
1
,
currentOptionId
:
lastModel
.
id
)
{
self
.
displayedQuestions
.
append
(
nextQuestion
)
self
.
displayedQuestions
.
append
(
nextQuestion
)
...
...
galaxy/galaxy/Classes/Modules/Plan(方案)/MakePlan/V/YHMakePlanCardView.swift
View file @
136a1a74
...
@@ -15,9 +15,10 @@ class YHMakePlanCardView: UIView {
...
@@ -15,9 +15,10 @@ class YHMakePlanCardView: UIView {
// MARK: - UI Elements
// MARK: - UI Elements
var
data
:
YHMakePlanMainModel
?
var
data
:
YHMakePlanMainModel
?
private
lazy
var
containerView
:
UI
View
=
{
private
lazy
var
containerView
:
UI
Button
=
{
let
view
=
UI
View
()
let
view
=
UI
Button
()
view
.
backgroundColor
=
.
white
view
.
backgroundColor
=
.
white
view
.
addTarget
(
self
,
action
:
#selector(
gotoDetail
)
,
for
:
.
touchUpInside
)
return
view
return
view
}()
}()
...
@@ -136,6 +137,33 @@ class YHMakePlanCardView: UIView {
...
@@ -136,6 +137,33 @@ class YHMakePlanCardView: UIView {
}
}
@objc
func
gotoDetail
()
{
var
url
=
YHBaseUrlManager
.
shared
.
curH5URL
()
+
"superAppBridge.html#/goods/sales-detail"
+
"?id=
\(
self
.
data
?
.
product_id
??
0
)
"
+
"&source=renewal_customize"
if
YHLoginManager
.
shared
.
isLogin
()
{
let
token
=
YHLoginManager
.
shared
.
h5Token
let
urlHasParam
=
String
.
hasQueryParameters
(
urlString
:
url
)
if
urlHasParam
{
url
=
url
+
"¶m="
+
token
}
else
{
url
=
url
+
"?param="
+
token
}
}
// 2.增加导航栏高度 https://test-hklife.galaxy-immi.com/superAppBridge.html#/goods/sales-detail?id=
var
tUrl
=
url
if
!
url
.
contains
(
"navigationH="
)
{
tUrl
=
url
+
"?navigationH=
\(
k_Height_NavigationtBarAndStatuBar
)
"
if
url
.
contains
(
"?"
)
{
tUrl
=
url
+
"&navigationH=
\(
k_Height_NavigationtBarAndStatuBar
)
"
}
}
let
vc
=
YHH5WebViewVC
()
vc
.
url
=
tUrl
vc
.
isHideNavigationBar
=
false
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
}
@objc
func
selectAction
()
{
@objc
func
selectAction
()
{
YHMakePlanSelectAlertView
.
show
(
dataSource
:
data
??
YHMakePlanMainModel
())
{
tag
in
YHMakePlanSelectAlertView
.
show
(
dataSource
:
data
??
YHMakePlanMainModel
())
{
tag
in
self
.
actionHandler
?(
tag
)
self
.
actionHandler
?(
tag
)
...
...
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