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
52ca2c3f
Commit
52ca2c3f
authored
Nov 25, 2024
by
David黄金龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加 环信 SDK
parent
06a31cdd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
169 additions
and
80 deletions
+169
-80
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+12
-0
AppDelegate.swift
galaxy/galaxy/AppDelegate.swift
+8
-0
YHIMTestViewController.swift
...vestreamSales(直播销售)/IM(环信)/C/YHIMTestViewController.swift
+66
-0
YHMyViewController.swift
...alaxy/Classes/Modules/Mine(我的)/C/YHMyViewController.swift
+83
-80
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
52ca2c3f
...
@@ -875,6 +875,7 @@
...
@@ -875,6 +875,7 @@
A567E5B62BD7643D00D5D5A0
/* YHHomeBannerIndicatorView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A567E58F2BD7643D00D5D5A0
/* YHHomeBannerIndicatorView.swift */
;
};
A567E5B62BD7643D00D5D5A0
/* YHHomeBannerIndicatorView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A567E58F2BD7643D00D5D5A0
/* YHHomeBannerIndicatorView.swift */
;
};
A567E5B82BD7643D00D5D5A0
/* YHSearchItemLayout.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A567E5912BD7643D00D5D5A0
/* YHSearchItemLayout.swift */
;
};
A567E5B82BD7643D00D5D5A0
/* YHSearchItemLayout.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A567E5912BD7643D00D5D5A0
/* YHSearchItemLayout.swift */
;
};
A56D2D612B62020C009C83A8
/* YHContractMainItemStatusCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A56D2D602B62020C009C83A8
/* YHContractMainItemStatusCell.swift */
;
};
A56D2D612B62020C009C83A8
/* YHContractMainItemStatusCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A56D2D602B62020C009C83A8
/* YHContractMainItemStatusCell.swift */
;
};
A574C8D02CF4A9C900E1E586
/* YHIMTestViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A574C8CF2CF4A9C900E1E586
/* YHIMTestViewController.swift */
;
};
A5765B262C771F86002CD3C1
/* YHRangeDatePickerView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5765B252C771F86002CD3C1
/* YHRangeDatePickerView.swift */
;
};
A5765B262C771F86002CD3C1
/* YHRangeDatePickerView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5765B252C771F86002CD3C1
/* YHRangeDatePickerView.swift */
;
};
A5765B282C772185002CD3C1
/* YHRangeDatePickerCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5765B272C772185002CD3C1
/* YHRangeDatePickerCell.swift */
;
};
A5765B282C772185002CD3C1
/* YHRangeDatePickerCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5765B272C772185002CD3C1
/* YHRangeDatePickerCell.swift */
;
};
A5765B2A2C77268C002CD3C1
/* YHRangeDatePickerSheetView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5765B292C77268C002CD3C1
/* YHRangeDatePickerSheetView.swift */
;
};
A5765B2A2C77268C002CD3C1
/* YHRangeDatePickerSheetView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5765B292C77268C002CD3C1
/* YHRangeDatePickerSheetView.swift */
;
};
...
@@ -1928,6 +1929,7 @@
...
@@ -1928,6 +1929,7 @@
A567E58F2BD7643D00D5D5A0
/* YHHomeBannerIndicatorView.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHHomeBannerIndicatorView.swift
;
sourceTree
=
"<group>"
;
};
A567E58F2BD7643D00D5D5A0
/* YHHomeBannerIndicatorView.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHHomeBannerIndicatorView.swift
;
sourceTree
=
"<group>"
;
};
A567E5912BD7643D00D5D5A0
/* YHSearchItemLayout.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHSearchItemLayout.swift
;
sourceTree
=
"<group>"
;
};
A567E5912BD7643D00D5D5A0
/* YHSearchItemLayout.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHSearchItemLayout.swift
;
sourceTree
=
"<group>"
;
};
A56D2D602B62020C009C83A8
/* YHContractMainItemStatusCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHContractMainItemStatusCell.swift
;
sourceTree
=
"<group>"
;
};
A56D2D602B62020C009C83A8
/* YHContractMainItemStatusCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHContractMainItemStatusCell.swift
;
sourceTree
=
"<group>"
;
};
A574C8CF2CF4A9C900E1E586
/* YHIMTestViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHIMTestViewController.swift
;
sourceTree
=
"<group>"
;
};
A5765B252C771F86002CD3C1
/* YHRangeDatePickerView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHRangeDatePickerView.swift
;
sourceTree
=
"<group>"
;
};
A5765B252C771F86002CD3C1
/* YHRangeDatePickerView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHRangeDatePickerView.swift
;
sourceTree
=
"<group>"
;
};
A5765B272C772185002CD3C1
/* YHRangeDatePickerCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHRangeDatePickerCell.swift
;
sourceTree
=
"<group>"
;
};
A5765B272C772185002CD3C1
/* YHRangeDatePickerCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHRangeDatePickerCell.swift
;
sourceTree
=
"<group>"
;
};
A5765B292C77268C002CD3C1
/* YHRangeDatePickerSheetView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHRangeDatePickerSheetView.swift
;
sourceTree
=
"<group>"
;
};
A5765B292C77268C002CD3C1
/* YHRangeDatePickerSheetView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHRangeDatePickerSheetView.swift
;
sourceTree
=
"<group>"
;
};
...
@@ -2903,6 +2905,7 @@
...
@@ -2903,6 +2905,7 @@
04564D542CF413A1004456E4
/* IM(环信) */
=
{
04564D542CF413A1004456E4
/* IM(环信) */
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
A574C8CE2CF4A95900E1E586
/* C */
,
);
);
path
=
"IM(环信)"
;
path
=
"IM(环信)"
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -4848,6 +4851,14 @@
...
@@ -4848,6 +4851,14 @@
path
=
V
;
path
=
V
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
};
};
A574C8CE2CF4A95900E1E586
/* C */
=
{
isa
=
PBXGroup
;
children
=
(
A574C8CF2CF4A9C900E1E586
/* YHIMTestViewController.swift */
,
);
path
=
C
;
sourceTree
=
"<group>"
;
};
A5765B242C771F51002CD3C1
/* RangeDatePicker */
=
{
A5765B242C771F51002CD3C1
/* RangeDatePicker */
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
...
@@ -5747,6 +5758,7 @@
...
@@ -5747,6 +5758,7 @@
04256DE02C72DC0600A37BA4
/* YHCertificateAppointOptionView.swift in Sources */
,
04256DE02C72DC0600A37BA4
/* YHCertificateAppointOptionView.swift in Sources */
,
04CA2BEE2CB7771000F36DE7
/* YHResignUploadTravelCardFootViewController.swift in Sources */
,
04CA2BEE2CB7771000F36DE7
/* YHResignUploadTravelCardFootViewController.swift in Sources */
,
044D0C062C22736F00C5CF5E
/* YHSetExplainView.swift in Sources */
,
044D0C062C22736F00C5CF5E
/* YHSetExplainView.swift in Sources */
,
A574C8D02CF4A9C900E1E586
/* YHIMTestViewController.swift in Sources */
,
04256DF02C733B2D00A37BA4
/* YHGrabNumberInfoView.swift in Sources */
,
04256DF02C733B2D00A37BA4
/* YHGrabNumberInfoView.swift in Sources */
,
04213B252C48C15400797900
/* YHHomeIdentityViewController.swift in Sources */
,
04213B252C48C15400797900
/* YHHomeIdentityViewController.swift in Sources */
,
0472E25C2C521E64008EAB6E
/* YHHomeIdentityListVC.swift in Sources */
,
0472E25C2C521E64008EAB6E
/* YHHomeIdentityListVC.swift in Sources */
,
...
...
galaxy/galaxy/AppDelegate.swift
View file @
52ca2c3f
...
@@ -17,6 +17,7 @@ import SensorsAnalyticsSDK
...
@@ -17,6 +17,7 @@ import SensorsAnalyticsSDK
import
AGConnectCore
import
AGConnectCore
import
AGConnectCredential
import
AGConnectCredential
import
AGConnectAppLinking
import
AGConnectAppLinking
import
HyphenateChat
@main
@main
class
AppDelegate
:
UIResponder
,
UIApplicationDelegate
,
WXApiDelegate
{
class
AppDelegate
:
UIResponder
,
UIApplicationDelegate
,
WXApiDelegate
{
...
@@ -75,6 +76,13 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate {
...
@@ -75,6 +76,13 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate {
// QiYu SDK初始化
// QiYu SDK初始化
YHButlerServiceManager
.
shared
.
setupSDK
()
YHButlerServiceManager
.
shared
.
setupSDK
()
//初始化 环信IM SDK
DispatchQueue
.
main
.
async
{
let
options
:
EMOptions
=
EMOptions
(
appkey
:
"1126241122157016#demo"
)
EMClient
.
shared
()
.
initializeSDK
(
with
:
options
)
}
//设置主窗口
//设置主窗口
setupRootVC
()
setupRootVC
()
return
true
return
true
...
...
galaxy/galaxy/Classes/Modules/LivestreamSales(直播销售)/IM(环信)/C/YHIMTestViewController.swift
0 → 100644
View file @
52ca2c3f
//
// YHIMTestViewController.swift
// galaxy
//
// Created by davidhuangA on 2024/11/25.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
import
HyphenateChat
class
YHIMTestViewController
:
YHBaseViewController
{
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
//1.
gk_navTitle
=
"IM 测试"
//2
//注册用户
// 异步方法
// [[EMClient sharedClient] registerWithUsername:@"username"
// password:@"your password"
// completion:^(NSString *aUsername, EMError *aError) {
// }];
EMClient
.
shared
()
.
register
(
withUsername
:
"davidTest"
,
password
:
"galaxy-666"
)
{
aUsername
,
error
in
if
let
err
=
error
{
print
(
"注册失败"
)
print
(
err
.
description
)
}
else
{
print
(
"注册成功"
)
//登录账号
// [[EMClient sharedClient] loginWithUsername:@"username"
// password:@"your password"
// completion:^(NSString *aUsername, EMError *aError) {
//
// }];
EMClient
.
shared
()
.
login
(
withUsername
:
"davidTest"
,
password
:
"galaxy-666"
)
{
aUsername
,
error
in
if
let
err
=
error
{
print
(
"登录失败"
)
print
(
err
.
description
)
}
else
{
print
(
"登录成功"
)
}
}
}
}
}
}
galaxy/galaxy/Classes/Modules/Mine(我的)/C/YHMyViewController.swift
View file @
52ca2c3f
...
@@ -342,87 +342,90 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
...
@@ -342,87 +342,90 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
}
}
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
let
vc
=
YHIMTestViewController
()
self
.
navigationController
?
.
pushViewController
(
vc
)
return
//for test hjl
if
(
indexPath
.
row
>=
items
.
count
)
{
return
}
//
if (indexPath.row >= items.count) { return }
//
if
!
checkLogin
()
{
//
if !checkLogin() {
return
//
return
}
//
}
//
let
item
:
PersonalModuleItem
=
items
[
indexPath
.
row
]
//
let item: PersonalModuleItem = items[indexPath.row]
switch
item
.
type
{
//
switch item.type {
case
.
myCard
:
//我的名片
//
case .myCard://我的名片
if
let
userId
=
YHLoginManager
.
shared
.
userModel
?
.
id
,
!
userId
.
isEmpty
{
//
if let userId = YHLoginManager.shared.userModel?.id, !userId.isEmpty {
let
vc
=
YHNameCardViewController
()
//
let vc = YHNameCardViewController()
vc
.
userId
=
userId
//
vc.userId = userId
self
.
navigationController
?
.
pushViewController
(
vc
)
//
self.navigationController?.pushViewController(vc)
}
else
{
//
} else {
YHHUD
.
show
(
.
progress
(
message
:
"加载中..."
))
//
YHHUD.show(.progress(message: "加载中..."))
self
.
loginViewModel
.
getUserId
{
//
self.loginViewModel.getUserId {
[
weak
self
]
uid
in
//
[weak self] uid in
YHHUD
.
hide
()
//
YHHUD.hide()
guard
let
self
=
self
else
{
return
}
//
guard let self = self else { return }
if
!
uid
.
isEmpty
{
//
if !uid.isEmpty {
YHLoginManager
.
shared
.
userModel
?
.
id
=
uid
//
YHLoginManager.shared.userModel?.id = uid
let
vc
=
YHNameCardViewController
()
//
let vc = YHNameCardViewController()
vc
.
userId
=
uid
//
vc.userId = uid
self
.
navigationController
?
.
pushViewController
(
vc
)
//
self.navigationController?.pushViewController(vc)
}
//
}
}
//
}
}
//
}
case
.
myMessage
:
//我的消息
//
case .myMessage://我的消息
printLog
(
"我的消息"
)
//
printLog("我的消息")
goToMessagePage
()
//
goToMessagePage()
//
case
.
scoreCenter
:
////积分中心
//
case .scoreCenter:////积分中心
printLog
(
"积分中心"
)
//
printLog("积分中心")
if
let
param
=
YHLoginManager
.
shared
.
userModel
?
.
token
,
param
.
count
>
5
{
//
if let param = YHLoginManager.shared.userModel?.token,param.count>5 {
printLog
(
param
)
//
printLog(param)
var
url
=
YHBaseUrlManager
.
shared
.
curH5URL
()
+
"superApp/integral"
//
var url = YHBaseUrlManager.shared.curH5URL() + "superApp/integral"
url
=
url
+
"?param="
+
YHLoginManager
.
shared
.
h5Token
//
url = url + "?param=" + YHLoginManager.shared.h5Token
//
let
vc
=
YHH5WebViewVC
()
//
let vc = YHH5WebViewVC()
vc
.
navTitle
=
"积分中心"
//
vc.navTitle = "积分中心"
vc
.
url
=
url
//
vc.url = url
vc
.
isFullScreenFlag
=
false
//
vc.isFullScreenFlag = false
vc
.
isSupportWebviewInterBackFlag
=
true
//
vc.isSupportWebviewInterBackFlag = true
self
.
navigationController
?
.
pushViewController
(
vc
)
//
self.navigationController?.pushViewController(vc)
}
//
}
case
.
myTestCode
:
//我的测评码
//
case .myTestCode://我的测评码
printLog
(
"我的测评码"
)
//
printLog("我的测评码")
let
vc
=
YHHomeWebViewController
()
//
let vc = YHHomeWebViewController()
vc
.
vcTitle
=
"香港身份测评码"
//
vc.vcTitle = "香港身份测评码"
vc
.
showSavePicBottomFlag
=
true
//
vc.showSavePicBottomFlag = true
vc
.
url
=
"https://cdn-public.galaxy-immi.com/app/cepingma.png"
//
vc.url = "https://cdn-public.galaxy-immi.com/app/cepingma.png"
self
.
navigationController
?
.
pushViewController
(
vc
)
//
self.navigationController?.pushViewController(vc)
case
.
appointGalaxyBay
:
//预约银河湾
//
case .appointGalaxyBay://预约银河湾
printLog
(
"预约银河湾"
)
//
printLog("预约银河湾")
let
vc
=
YHListViewController
()
//
let vc = YHListViewController()
self
.
navigationController
?
.
pushViewController
(
vc
)
//
self.navigationController?.pushViewController(vc)
case
.
myActivity
:
//
case .myActivity:
printLog
(
"我的活动"
)
//
printLog("我的活动")
let
vc
=
YHActivityListViewController
()
//
let vc = YHActivityListViewController()
vc
.
type
=
1
//
vc.type = 1
self
.
navigationController
?
.
pushViewController
(
vc
)
//
self.navigationController?.pushViewController(vc)
case
.
aboutUs
:
//
case .aboutUs:
let
vc
=
YHAboutGalaxyViewController
()
//
let vc = YHAboutGalaxyViewController()
self
.
navigationController
?
.
pushViewController
(
vc
)
//
self.navigationController?.pushViewController(vc)
case
.
myOrder
:
//
case .myOrder:
// 我的订单
//
//
我的订单
if
let
token
=
YHLoginManager
.
shared
.
userModel
?
.
token
,
token
.
count
>
5
{
//
if let token = YHLoginManager.shared.userModel?.token,token.count > 5 {
var
url
=
YHBaseUrlManager
.
shared
.
curH5URL
()
+
"superAppBridge.html#/order/my"
//
var url = YHBaseUrlManager.shared.curH5URL() + "superAppBridge.html#/order/my"
url
=
url
+
"?param="
+
YHLoginManager
.
shared
.
h5Token
//
url = url + "?param=" + YHLoginManager.shared.h5Token
printLog
(
"URL:
\(
url
)
"
)
//
printLog("URL: \(url)")
let
vc
=
YHH5WebViewVC
()
//
let vc = YHH5WebViewVC()
vc
.
url
=
url
//
vc.url = url
vc
.
isFullScreenFlag
=
false
//
vc.isFullScreenFlag = false
vc
.
navTitle
=
"我的订单"
//
vc.navTitle = "我的订单"
vc
.
isSupportWebviewInterBackFlag
=
true
//
vc.isSupportWebviewInterBackFlag = true
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
//
UIViewController.current?.navigationController?.pushViewController(vc)
}
//
}
default
:
//
default:
printLog
(
"不需要响应"
)
//
printLog("不需要响应")
}
//
}
}
}
private
func
tableView
(
_
tableView
:
UITableView
,
viewForHeaderInSection
section
:
Int
)
->
CGFloat
{
private
func
tableView
(
_
tableView
:
UITableView
,
viewForHeaderInSection
section
:
Int
)
->
CGFloat
{
...
...
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