Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
iOSTeam
/
Majiabao
/
TealiveModule
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
51c536a4
authored
Jun 21, 2024
by
pierce
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、修复微信登录异常的问题
2、去除通用弹窗顶部的图片
parent
a4f4f9bd
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
26 deletions
LocalPodSpec/GDRouter/GDRouter/Classes/Service/Module/GDSocialCenterRouter.swift
LocalPodSpec/GDToolBox/GDToolBox/Classes/Tool/UI/GDAlertView/GDAlertView.swift
Module/GDSocialCenter/GDSocialCenter/Module/GDSocialCenterModule.swift
TealiveModule/TealiveModule/AppDelegate.swift
LocalPodSpec/GDRouter/GDRouter/Classes/Service/Module/GDSocialCenterRouter.swift
View file @
51c536a4
...
@@ -51,4 +51,6 @@ public protocol GDSocialCenterSwiftRouter: GDSocialCenterRouter {
...
@@ -51,4 +51,6 @@ public protocol GDSocialCenterSwiftRouter: GDSocialCenterRouter {
/// - type: 分享类型
/// - type: 分享类型
/// - completion: 完成回调
/// - completion: 完成回调
func
share
(
with
model
:
GDShareModel
,
expireTime
:
CGFloat
)
func
share
(
with
model
:
GDShareModel
,
expireTime
:
CGFloat
)
func
handlerWithUserActivity
(
_
userActivity
:
NSUserActivity
)
->
Bool
}
}
LocalPodSpec/GDToolBox/GDToolBox/Classes/Tool/UI/GDAlertView/GDAlertView.swift
View file @
51c536a4
...
@@ -235,7 +235,7 @@ public class GDAlertView: BaseView {
...
@@ -235,7 +235,7 @@ public class GDAlertView: BaseView {
width
:
280
,
width
:
280
,
height
:
180
))
height
:
180
))
private
let
bgImageView
=
UIImageView
(
image
:
GDToolBoxBundle
.
imageNamed
(
"alert_bg"
)?
.
resizableImage
(
withCapInsets
:
.
init
(
top
:
48
,
left
:
24
,
bottom
:
24
,
right
:
24
),
resizingMode
:
.
stretch
))
//
private let bgImageView = UIImageView(image: GDToolBoxBundle.imageNamed("alert_bg")?.resizableImage(withCapInsets: .init(top: 48, left: 24, bottom: 24, right: 24), resizingMode: .stretch))
private
let
titleLabel
=
YYLabel
(
frame
:
.
zero
)
private
let
titleLabel
=
YYLabel
(
frame
:
.
zero
)
private
let
contentLabel
=
YYLabel
(
frame
:
.
zero
)
private
let
contentLabel
=
YYLabel
(
frame
:
.
zero
)
private
let
buttonBgView
=
UIView
(
frame
:
.
zero
)
private
let
buttonBgView
=
UIView
(
frame
:
.
zero
)
...
@@ -262,13 +262,13 @@ public class GDAlertView: BaseView {
...
@@ -262,13 +262,13 @@ public class GDAlertView: BaseView {
bgView
.
layer
.
cornerRadius
=
15
bgView
.
layer
.
cornerRadius
=
15
self
.
addSubview
(
bgView
)
self
.
addSubview
(
bgView
)
bgImageView
.
contentMode
=
.
scaleToFill
//
bgImageView.contentMode = .scaleToFill
bgView
.
addSubview
(
bgImageView
)
//
bgView.addSubview(bgImageView)
//
bgImageView
.
snp
.
makeConstraints
{
make
in
//
bgImageView.snp.makeConstraints { make in
make
.
left
.
top
.
equalToSuperview
()
.
offset
(
-
2
)
//
make.left.top.equalToSuperview().offset(-2)
make
.
right
.
bottom
.
equalToSuperview
()
.
offset
(
2
)
//
make.right.bottom.equalToSuperview().offset(2)
}
//
}
}
}
private
func
makeContentView
()
{
private
func
makeContentView
()
{
...
...
Module/GDSocialCenter/GDSocialCenter/Module/GDSocialCenterModule.swift
View file @
51c536a4
...
@@ -50,6 +50,24 @@ public class GDSocialCenterModule: NSObject, GDSocialCenterSwiftRouter {
...
@@ -50,6 +50,24 @@ public class GDSocialCenterModule: NSObject, GDSocialCenterSwiftRouter {
public
func
share
(
with
model
:
GDShareModel
,
expireTime
:
CGFloat
)
{
public
func
share
(
with
model
:
GDShareModel
,
expireTime
:
CGFloat
)
{
GDSocialPlatCenter
.
shared
.
share
(
with
:
model
,
expireTime
:
expireTime
)
GDSocialPlatCenter
.
shared
.
share
(
with
:
model
,
expireTime
:
expireTime
)
}
}
public
func
handlerWithUserActivity
(
_
userActivity
:
NSUserActivity
)
->
Bool
{
if
userActivity
.
activityType
==
NSUserActivityTypeBrowsingWeb
{
if
let
url
=
userActivity
.
webpageURL
{
let
center
=
GDSocialPlatCenter
.
shared
if
url
.
absoluteString
.
contains
(
GDSDK
.
gd_wechatAppid
)
{
// 微信
return
center
.
handle
(
for
:
.
wechat
,
userActivity
:
userActivity
)
}
else
{
// QQ
return
center
.
handle
(
for
:
.
qq
,
userActivity
:
userActivity
)
}
}
}
return
true
}
}
}
extension
GDSocialCenterModule
:
BifrostModuleProtocol
{
extension
GDSocialCenterModule
:
BifrostModuleProtocol
{
...
@@ -88,21 +106,4 @@ extension GDSocialCenterModule: BifrostModuleProtocol {
...
@@ -88,21 +106,4 @@ extension GDSocialCenterModule: BifrostModuleProtocol {
return
true
return
true
}
}
}
}
public
func
application
(
_
application
:
UIApplication
,
continue
userActivity
:
NSUserActivity
,
restorationHandler
:
@escaping
([
UIUserActivityRestoring
]?)
->
Void
)
->
Bool
{
if
userActivity
.
activityType
==
NSUserActivityTypeBrowsingWeb
{
if
let
url
=
userActivity
.
webpageURL
{
if
url
.
absoluteString
.
contains
(
GDSDK
.
gd_wechatAppid
)
{
// 微信
return
GDSocialPlatCenter
.
shared
.
handle
(
for
:
.
wechat
,
userActivity
:
userActivity
)
}
else
{
// QQ
return
GDSocialPlatCenter
.
shared
.
handle
(
for
:
.
qq
,
userActivity
:
userActivity
)
}
}
}
return
true
}
}
}
TealiveModule/TealiveModule/AppDelegate.swift
View file @
51c536a4
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
import
UIKit
import
UIKit
import
Bifrost
import
Bifrost
import
GDToolBox
import
GDToolBox
import
GDRouter
@main
@main
class
AppDelegate
:
UIResponder
,
UIApplicationDelegate
{
class
AppDelegate
:
UIResponder
,
UIApplicationDelegate
{
...
@@ -37,7 +38,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
...
@@ -37,7 +38,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
}
}
func
application
(
_
application
:
UIApplication
,
continue
userActivity
:
NSUserActivity
,
restorationHandler
:
@escaping
([
any
UIUserActivityRestoring
]?)
->
Void
)
->
Bool
{
func
application
(
_
application
:
UIApplication
,
continue
userActivity
:
NSUserActivity
,
restorationHandler
:
@escaping
([
any
UIUserActivityRestoring
]?)
->
Void
)
->
Bool
{
Bifrost
.
checkAllModules
(
with
:
#selector(
application(_:continue:restorationHandler:)
)
,
arguments
:
[
application
,
userActivity
,
restorationHandler
])
return
GDRouter
.
SocialCenter
?
.
handlerWithUserActivity
(
userActivity
)
??
true
}
}
func
applicationDidBecomeActive
(
_
application
:
UIApplication
)
{
func
applicationDidBecomeActive
(
_
application
:
UIApplication
)
{
...
...
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