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
6b6b9cf8
Commit
6b6b9cf8
authored
Nov 11, 2024
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加密 解密算法XXTEA导入
parent
3c77e3af
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
3 deletions
+16
-3
Podfile
galaxy/Podfile
+2
-1
YHLoginViewModel.swift
...alaxy/Classes/Modules/Login(登录)/VM/YHLoginViewModel.swift
+3
-1
YHAllApiName.swift
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
+1
-1
YHOSSManager.swift
galaxy/galaxy/Classes/Tools/Upload/YHOSSManager.swift
+9
-0
galaxy-Bridge-Header.h
galaxy/galaxy/Res/galaxy-Bridge-Header.h
+1
-0
No files found.
galaxy/Podfile
View file @
6b6b9cf8
...
@@ -107,7 +107,8 @@ target 'galaxy' do
...
@@ -107,7 +107,8 @@ target 'galaxy' do
pod
'QY_iOS_SDK'
,
'9.9.0'
pod
'QY_iOS_SDK'
,
'9.9.0'
#阿里云日志
#阿里云日志
pod
'AliyunLogProducer'
,
'4.3.3'
pod
'AliyunLogProducer'
,
'4.3.3'
#加密
pod
'xxtea'
,
'1.0.2'
end
end
...
...
galaxy/galaxy/Classes/Modules/Login(登录)/VM/YHLoginViewModel.swift
View file @
6b6b9cf8
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
import
UIKit
import
UIKit
import
SmartCodable
import
SmartCodable
import
xxtea
class
YHLoginViewModel
:
YHBaseViewModel
{
class
YHLoginViewModel
:
YHBaseViewModel
{
var
userModel
:
YHUserModel
?
var
userModel
:
YHUserModel
?
...
@@ -22,9 +23,10 @@ extension YHLoginViewModel {
...
@@ -22,9 +23,10 @@ extension YHLoginViewModel {
//发送验证码
//发送验证码
func
getLoginCode
(
_
phone
:
String
,
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
func
getLoginCode
(
_
phone
:
String
,
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
let
params
:
[
String
:
Any
]
=
[
"type"
:
"Phone"
,
let
params
:
[
String
:
Any
]
=
[
"type"
:
"Phone"
,
"value"
:
phone
,
"value"
:
XXTEA
.
encryptString
(
toBase64String
:
phone
,
stringKey
:
"galaxyapps"
)
??
phone
,
"extend"
:
"register"
]
"extend"
:
"register"
]
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
User
.
verifyCode
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
User
.
verifyCode
let
_
=
YHNetRequest
.
postRequest
(
url
:
strUrl
,
params
:
params
)
{[
weak
self
]
json
,
code
in
let
_
=
YHNetRequest
.
postRequest
(
url
:
strUrl
,
params
:
params
)
{[
weak
self
]
json
,
code
in
guard
self
!=
nil
else
{
return
}
guard
self
!=
nil
else
{
return
}
...
...
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
View file @
6b6b9cf8
...
@@ -267,7 +267,7 @@ class YHAllApiName {
...
@@ -267,7 +267,7 @@ class YHAllApiName {
//获取验证
//获取验证
struct
User
{
struct
User
{
static
let
verifyCode
=
"cuser/user/verify-code"
static
let
verifyCode
=
"cuser/user/v
2/v
erify-code"
static
let
userInfo
=
"super-app/user/current-info"
static
let
userInfo
=
"super-app/user/current-info"
}
}
...
...
galaxy/galaxy/Classes/Tools/Upload/YHOSSManager.swift
View file @
6b6b9cf8
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
import
UIKit
import
UIKit
import
AliyunOSSiOS
import
AliyunOSSiOS
import
SmartCodable
import
SmartCodable
import
xxtea
struct
YHOSSModel
:
SmartCodable
{
struct
YHOSSModel
:
SmartCodable
{
var
bucket
:
String
=
""
var
bucket
:
String
=
""
...
@@ -18,6 +19,14 @@ struct YHOSSModel: SmartCodable {
...
@@ -18,6 +19,14 @@ struct YHOSSModel: SmartCodable {
var
accessKeySecret
:
String
=
""
var
accessKeySecret
:
String
=
""
var
endpoint
:
String
=
""
var
endpoint
:
String
=
""
var
securityToken
:
String
=
""
var
securityToken
:
String
=
""
// var id: String {
// return XXTEA.decryptBase64String(to: accessKeyId, stringKey: "galaxyapps")
// }
//
// var secret: String {
// return XXTEA.decryptBase64String(to: accessKeySecret, stringKey: "galaxyapps")
// }
}
}
class
YHOSSManager
:
NSObject
,
URLSessionDelegate
{
class
YHOSSManager
:
NSObject
,
URLSessionDelegate
{
...
...
galaxy/galaxy/Res/galaxy-Bridge-Header.h
View file @
6b6b9cf8
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
#import <Bugly/Bugly.h>
#import <Bugly/Bugly.h>
#import <ATAuthSDK_D/ATAuthSDK.h>
#import <ATAuthSDK_D/ATAuthSDK.h>
#import "XXTEA.h"
//#import <AliyunOSSiOS/OSSService.h>
//#import <AliyunOSSiOS/OSSService.h>
#import "WXApi.h"
#import "WXApi.h"
#import "JPUSHService.h"
#import "JPUSHService.h"
...
...
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