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
2f949963
Commit
2f949963
authored
Feb 22, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into duyu
parents
be23db7b
f75b3010
Changes
11
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
71 additions
and
34 deletions
+71
-34
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+2
-2
AppDelegate.swift
galaxy/galaxy/AppDelegate.swift
+0
-1
YHScorePersonInfoCell.swift
...ceProcess(流程)/MyScore(我的评分)/V/YHScorePersonInfoCell.swift
+1
-1
YHCodeSueecssViewController.swift
...ses/Modules/Login(登录)/C/YHCodeSueecssViewController.swift
+11
-4
YHPhoneLoginViewController.swift
...sses/Modules/Login(登录)/C/YHPhoneLoginViewController.swift
+1
-1
YHLoginManager.swift
...axy/Classes/Modules/Login(登录)/Server/YHLoginManager.swift
+2
-1
YHLoginPrivacyView.swift
...laxy/Classes/Modules/Login(登录)/V/YHLoginPrivacyView.swift
+2
-2
YHLoginViewModel.swift
...alaxy/Classes/Modules/Login(登录)/VM/YHLoginViewModel.swift
+34
-12
YHMyViewController.swift
...alaxy/Classes/Modules/Mine(我的)/C/YHMyViewController.swift
+6
-6
YHNetRequest.swift
galaxy/galaxy/Classes/Tools/NetWork/YHNetRequest.swift
+7
-4
Info.plist
galaxy/galaxy/Res/Info.plist
+5
-0
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
2f949963
...
...
@@ -2148,7 +2148,7 @@
"$(inherited)"
,
"@executable_path/Frameworks"
,
);
MARKETING_VERSION
=
1.0
.0
;
MARKETING_VERSION
=
0.1
.0
;
PRODUCT_BUNDLE_IDENTIFIER
=
com.intelligence.galaxy
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PROVISIONING_PROFILE_SPECIFIER
=
""
;
...
...
@@ -2190,7 +2190,7 @@
"$(inherited)"
,
"@executable_path/Frameworks"
,
);
MARKETING_VERSION
=
1.0
.0
;
MARKETING_VERSION
=
0.1
.0
;
PRODUCT_BUNDLE_IDENTIFIER
=
com.intelligence.galaxy
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PROVISIONING_PROFILE_SPECIFIER
=
""
;
...
...
galaxy/galaxy/AppDelegate.swift
View file @
2f949963
...
...
@@ -91,7 +91,6 @@ extension AppDelegate {
print
(
"Ali Cloud login completed : /(dic) "
)
}
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MyScore(我的评分)/V/YHScorePersonInfoCell.swift
View file @
2f949963
...
...
@@ -192,7 +192,7 @@ extension YHScorePersonInfoCell {
return
}
nameLable
.
text
=
"DavidHuang for test"
//
model.user_info?.username ?? "-"
nameLable
.
text
=
model
.
user_info
?
.
username
??
"-"
phoneLable
.
text
=
model
.
user_info
?
.
mobile
??
"-"
let
score
:
String
=
String
(
model
.
total_score
?
.
sum_score
??
0
)
...
...
galaxy/galaxy/Classes/Modules/Login(登录)/C/YHCodeSueecssViewController.swift
View file @
2f949963
...
...
@@ -94,13 +94,20 @@ class YHCodeSueecssViewController: YHBaseViewController {
let
view
=
YHSmsCodeInputView
(
config
:
YHSmsCodeViewConfig
())
view
.
complete
=
{
[
weak
self
]
code
in
guard
let
self
=
self
else
{
return
}
self
.
viewModel
?
.
login
(
self
.
phoneNumber
??
""
,
code
:
code
,
callBackBlock
:
{[
weak
self
]
success
in
if
let
phone
=
self
.
phoneNumber
{
self
.
viewModel
?
.
login
(
phone
:
phone
,
code
:
code
,
callBackBlock
:
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
YHLoginManager
.
shared
.
userModel
=
success
if
success
?
.
token
?
.
count
!=
0
{
if
success
==
false
{
YHHUD
.
flash
(
message
:
"登录失败"
)
}
else
{
YHHUD
.
flash
(
message
:
"登录成功"
)
self
.
dismiss
(
animated
:
true
)
}
})
}
else
{
printLog
(
"errror : 电话号码为空"
)
}
}
return
view
}()
...
...
@@ -183,7 +190,7 @@ class YHCodeSueecssViewController: YHBaseViewController {
@objc
func
startClicked
()
{
viewModel
?
.
getLoginCode
(
phoneNumber
??
""
,
callBackBlock
:
{[
weak
self
]
success
in
viewModel
?
.
getLoginCode
(
phoneNumber
??
""
,
callBackBlock
:
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
self
.
startTime
()
})
...
...
galaxy/galaxy/Classes/Modules/Login(登录)/C/YHPhoneLoginViewController.swift
View file @
2f949963
...
...
@@ -175,7 +175,7 @@ class YHPhoneLoginViewController: YHBaseViewController {
return
}
if
privacyView
.
isAgree
{
viewModel
?
.
getLoginCode
(
phoneNumer
,
callBackBlock
:
{[
weak
self
]
success
in
viewModel
?
.
getLoginCode
(
phoneNumer
,
callBackBlock
:
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
let
vc
=
YHCodeSueecssViewController
()
vc
.
phoneNumber
=
self
.
phoneMessageView
.
phoneTextField
.
text
...
...
galaxy/galaxy/Classes/Modules/Login(登录)/Server/YHLoginManager.swift
View file @
2f949963
...
...
@@ -16,7 +16,8 @@ class YHLoginManager: NSObject {
private
override
init
()
{}
func
isLogin
()
->
Bool
{
if
userModel
?
.
token
?
.
count
!=
0
{
let
ttt
=
userModel
?
.
token
?
.
count
??
0
if
ttt
!=
0
{
return
true
}
return
false
...
...
galaxy/galaxy/Classes/Modules/Login(登录)/V/YHLoginPrivacyView.swift
View file @
2f949963
...
...
@@ -45,7 +45,7 @@ class YHLoginPrivacyView: UIView {
let
label
=
UILabel
()
label
.
text
=
"我已阅读并同意"
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
12
)
label
.
textColor
=
UIColor
.
contentBkgColor
label
.
textColor
=
UIColor
.
labelTextColor2
label
.
textAlignment
=
.
left
return
label
}()
...
...
@@ -75,7 +75,7 @@ class YHLoginPrivacyView: UIView {
let
label
=
UILabel
()
label
.
text
=
"和"
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
12
)
label
.
textColor
=
UIColor
.
contentBkgColor
label
.
textColor
=
UIColor
.
labelTextColor2
label
.
textAlignment
=
.
left
return
label
}()
...
...
galaxy/galaxy/Classes/Modules/Login(登录)/VM/YHLoginViewModel.swift
View file @
2f949963
...
...
@@ -19,45 +19,67 @@ class YHLoginViewModel: YHBaseViewModel {
//接口
extension
YHLoginViewModel
{
//发送验证码
func
getLoginCode
(
_
phone
:
String
,
callBackBlock
:
@escaping
(
_
success
:
Bool
)
->
())
{
func
getLoginCode
(
_
phone
:
String
,
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?
)
->
())
{
let
params
:
[
String
:
Any
]
=
[
"type"
:
"Phone"
,
"value"
:
phone
]
let
strUrl
=
"http://192.168.35.135:18087/"
+
"user/verify-code"
"value"
:
phone
,
"extend"
:
"register"
]
let
strUrl
=
"http://test-cuser.galaxy-immi.com/"
+
"user/verify-code"
let
_
=
YHNetRequest
.
postRequest
(
url
:
strUrl
,
params
:
params
)
{[
weak
self
]
json
,
code
in
guard
let
self
=
self
else
{
return
}
guard
let
model
=
NetBaseModel
.
deserialize
(
dict
:
json
)
else
{
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
YHErrorCode
.
dictParseError
.
rawValue
,
errorMsg
:
YHErrorCode
.
dictParseError
.
description
())
callBackBlock
(
false
,
error
)
return
}
//1. json字符串 转 对象
if
code
==
200
{
callBackBlock
(
true
)
if
model
.
code
==
200
{
callBackBlock
(
true
,
nil
)
}
else
{
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
Int32
(
model
.
code
),
errorMsg
:
model
.
msg
)
callBackBlock
(
false
,
error
)
}
}
failBlock
:
{
err
in
callBackBlock
(
false
)
callBackBlock
(
false
,
err
)
}
}
func
login
(
_
phone
:
String
,
code
:
String
,
callBackBlock
:
@escaping
(
_
success
:
YHUse
rModel
?)
->
())
{
func
login
(
phone
:
String
,
code
:
String
,
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErro
rModel
?)
->
())
{
let
params
:
[
String
:
Any
]
=
[
"mobile"
:
phone
,
"sms_code"
:
code
,
"channel"
:
"app"
,
"client"
:
"super_app"
]
let
strUrl
=
"http://192.168.25.12:18083/"
+
"auth/login"
let
strUrl
=
"http://test.api.diymanager.galaxy-immi.com/"
+
"auth/login"
let
_
=
YHNetRequest
.
postRequest
(
url
:
strUrl
,
params
:
params
)
{[
weak
self
]
json
,
code
in
//1. json字符串 转 对象
guard
let
self
=
self
else
{
return
}
guard
let
model
=
NetBaseModel
.
deserialize
(
dict
:
json
)
else
{
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
YHErrorCode
.
dictParseError
.
rawValue
,
errorMsg
:
YHErrorCode
.
dictParseError
.
description
())
callBackBlock
(
nil
)
callBackBlock
(
false
,
error
)
return
}
let
dic
=
model
.
data
?
.
peel
guard
let
resultModel
=
YHUserModel
.
deserialize
(
dict
:
dic
as?
[
AnyHashable
:
Any
])
else
{
callBackBlock
(
nil
)
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
-
1
,
errorMsg
:
"数据解析不成功"
)
callBackBlock
(
false
,
error
)
return
}
if
resultModel
.
token
?
.
count
!=
0
{
//token 正常
self
.
userModel
=
resultModel
callBackBlock
(
resultModel
)
YHLoginManager
.
shared
.
userModel
=
resultModel
callBackBlock
(
true
,
nil
)
}
else
{
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
-
2
,
errorMsg
:
"token 不合法"
)
callBackBlock
(
false
,
error
)
}
}
failBlock
:
{
err
in
callBackBlock
(
nil
)
callBackBlock
(
false
,
err
)
}
}
}
galaxy/galaxy/Classes/Modules/Mine(我的)/C/YHMyViewController.swift
View file @
2f949963
...
...
@@ -101,13 +101,13 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
if
(
indexPath
.
row
>=
items
.
count
)
{
return
}
if
YHLoginManager
.
shared
.
isLogin
()
==
false
{
let
vc
=
UINavigationController
(
rootVC
:
YHPhoneLoginViewController
())
vc
.
modalPresentationStyle
=
.
custom
self
.
navigationController
?
.
present
(
vc
,
animated
:
true
)
// let vc = YHFamilyMemberFormVC(orderId: 133971)
// self.navigationController?.pushViewController(vc)
return
}
return
//for test hjl
let
item
:
PersonalModuleItem
=
items
[
indexPath
.
row
];
...
...
@@ -134,8 +134,8 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
}
else
{
let
vc
=
YHLoginViewController
()
self
.
navigationController
?
.
pushViewController
(
vc
)
//
let vc = YHLoginViewController()
//
self.navigationController?.pushViewController(vc)
}
}
...
...
galaxy/galaxy/Classes/Tools/NetWork/YHNetRequest.swift
View file @
2f949963
This diff is collapsed.
Click to expand it.
galaxy/galaxy/Res/Info.plist
View file @
2f949963
...
...
@@ -2,6 +2,11 @@
<
!
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
"
>
<
d
i
c
t
>
<
k
e
y
>
NSAppTransportSecurity
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
NSAllowsArbitraryLoads
<
/k
e
y
>
<
tru
e
/
>
<
/
d
i
c
t
>
<
k
e
y
>
NSCameraUsageDescription
<
/k
e
y
>
<
string
>
cameraDesciption
<
/string
>
<
k
e
y
>
NSPhotoLibraryUsageDescription
<
/k
e
y
>
...
...
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