Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-fluwx
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
openSourceLibrary
clx-fluwx
Commits
034c3394
提交
034c3394
authored
1月 08, 2020
作者:
knoyo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
StringUtil renamed to FluwxStringUtil
上级
03dcd3d3
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
29 行增加
和
29 行删除
+29
-29
FluwxShareHandler.m
ios/Classes/handler/FluwxShareHandler.m
+9
-9
FluwxWXApiHandler.m
ios/Classes/handler/FluwxWXApiHandler.m
+3
-3
FluwxStringUtil.h
ios/Classes/helper/FluwxStringUtil.h
+1
-1
FluwxStringUtil.m
ios/Classes/helper/FluwxStringUtil.m
+2
-2
FluwxAuthHandler.h
ios/Classes/public/FluwxAuthHandler.h
+1
-1
FluwxLaunchMiniProgramHandler.h
ios/Classes/public/FluwxLaunchMiniProgramHandler.h
+1
-1
FluwxPaymentHandler.h
ios/Classes/public/FluwxPaymentHandler.h
+1
-1
FluwxShareHandler.h
ios/Classes/public/FluwxShareHandler.h
+1
-1
FluwxResponseHandler.m
ios/Classes/wechat/FluwxResponseHandler.m
+7
-7
WXApiRequestHandler.m
ios/Classes/wechat/WXApiRequestHandler.m
+3
-3
没有找到文件。
ios/Classes/handler/FluwxShareHandler.m
浏览文件 @
034c3394
...
...
@@ -10,7 +10,7 @@
#import "FluwxKeys.h"
#import "StringToWeChatScene.h"
#import "FluwxMethods.h"
#import "StringUtil.h"
#import "
Fluwx
StringUtil.h"
#import "ThumbnailHelper.h"
#import "NSStringWrapper.h"
...
...
@@ -73,7 +73,7 @@ NSObject <FlutterPluginRegistrar> *_fluwxRegistrar;
-
(
void
)
shareImage
:(
FlutterMethodCall
*
)
call
result
:(
FlutterResult
)
result
{
NSString
*
imagePath
=
call
.
arguments
[
fluwxKeyImage
];
if
([
StringUtil
isBlank
:
imagePath
])
{
if
([
Fluwx
StringUtil
isBlank
:
imagePath
])
{
FlutterStandardTypedData
*
imageData
=
call
.
arguments
[
fluwxKeyImageData
];
[
self
shareMemoryImage
:
call
result
:
result
imageData
:
imageData
.
data
];
}
else
if
([
imagePath
hasPrefix
:
SCHEMA_ASSETS
])
{
...
...
@@ -92,7 +92,7 @@ NSObject <FlutterPluginRegistrar> *_fluwxRegistrar;
NSString
*
thumbnail
=
call
.
arguments
[
fluwxKeyThumbnail
];
UIImage
*
thumbnailImage
=
nil
;
if
([
StringUtil
isBlank
:
thumbnail
])
{
if
([
Fluwx
StringUtil
isBlank
:
thumbnail
])
{
UIImage
*
tmp
=
[
UIImage
imageWithData
:
imageData
];
thumbnailImage
=
[
ThumbnailHelper
compressImage
:
tmp
toByte
:
32
*
1024
isPNG
:
FALSE
];
}
else
{
...
...
@@ -140,7 +140,7 @@ NSObject <FlutterPluginRegistrar> *_fluwxRegistrar;
NSString
*
thumbnail
=
call
.
arguments
[
fluwxKeyThumbnail
];
if
([
StringUtil
isBlank
:
thumbnail
])
{
if
([
Fluwx
StringUtil
isBlank
:
thumbnail
])
{
thumbnail
=
imagePath
;
}
...
...
@@ -183,7 +183,7 @@ NSObject <FlutterPluginRegistrar> *_fluwxRegistrar;
NSString
*
thumbnail
=
call
.
arguments
[
fluwxKeyThumbnail
];
if
([
StringUtil
isBlank
:
thumbnail
])
{
if
([
Fluwx
StringUtil
isBlank
:
thumbnail
])
{
thumbnail
=
imagePath
;
}
...
...
@@ -231,7 +231,7 @@ NSObject <FlutterPluginRegistrar> *_fluwxRegistrar;
NSString
*
thumbnail
=
call
.
arguments
[
fluwxKeyThumbnail
];
if
([
StringUtil
isBlank
:
thumbnail
])
{
if
([
Fluwx
StringUtil
isBlank
:
thumbnail
])
{
thumbnail
=
imagePath
;
}
...
...
@@ -409,7 +409,7 @@ NSObject <FlutterPluginRegistrar> *_fluwxRegistrar;
NSData
*
hdImageData
=
nil
;
NSString
*
hdImagePath
=
call
.
arguments
[
@"hdImagePath"
];
if
(
!
[
StringUtil
isBlank
:
hdImagePath
])
{
if
(
!
[
Fluwx
StringUtil
isBlank
:
hdImagePath
])
{
if
([
hdImagePath
hasPrefix
:
SCHEMA_ASSETS
])
{
hdImageData
=
[
NSData
dataWithContentsOfFile
:[
self
readImageFromAssets
:
hdImagePath
]];
...
...
@@ -469,7 +469,7 @@ NSObject <FlutterPluginRegistrar> *_fluwxRegistrar;
UIImage
*
thumbnailImage
=
nil
;
if
([
StringUtil
isBlank
:
thumbnail
])
{
if
([
Fluwx
StringUtil
isBlank
:
thumbnail
])
{
return
nil
;
}
...
...
@@ -504,7 +504,7 @@ NSObject <FlutterPluginRegistrar> *_fluwxRegistrar;
-
(
NSString
*
)
readImageFromAssets
:(
NSString
*
)
imagePath
{
NSArray
*
array
=
[
self
formatAssets
:
imagePath
];
NSString
*
key
;
if
([
StringUtil
isBlank
:
array
[
1
]])
{
if
([
Fluwx
StringUtil
isBlank
:
array
[
1
]])
{
key
=
[
_fluwxRegistrar
lookupKeyForAsset
:
array
[
0
]];
}
else
{
key
=
[
_fluwxRegistrar
lookupKeyForAsset
:
array
[
0
]
fromPackage
:
array
[
1
]];
...
...
ios/Classes/handler/FluwxWXApiHandler.m
浏览文件 @
034c3394
...
...
@@ -4,7 +4,7 @@
#import "FluwxWXApiHandler.h"
#import "StringUtil.h"
#import "
Fluwx
StringUtil.h"
#import "FluwxPlugin.h"
#import "CallResults.h"
#import "FluwxKeys.h"
...
...
@@ -23,14 +23,14 @@
}
NSString
*
appId
=
call
.
arguments
[
@"appId"
];
if
([
StringUtil
isBlank
:
appId
])
{
if
([
Fluwx
StringUtil
isBlank
:
appId
])
{
result
([
FlutterError
errorWithCode
:
@"invalid app id"
message
:
@"are you sure your app id is correct ? "
details
:
appId
]);
return
;
}
NSString
*
universalLink
=
call
.
arguments
[
@"universalLink"
];
if
([
StringUtil
isBlank
:
universalLink
])
{
if
([
Fluwx
StringUtil
isBlank
:
universalLink
])
{
result
([
FlutterError
errorWithCode
:
@"invalid universal link"
message
:
@"are you sure your universal link is correct ? "
details
:
universalLink
]);
return
;
}
...
...
ios/Classes/helper/StringUtil.h
→
ios/Classes/helper/
Fluwx
StringUtil.h
浏览文件 @
034c3394
...
...
@@ -5,7 +5,7 @@
#import <Foundation/Foundation.h>
@interface
StringUtil
:
NSObject
@interface
Fluwx
StringUtil
:
NSObject
+
(
BOOL
)
isBlank
:(
NSString
*
)
string
;
+
(
NSString
*
)
nilToEmpty
:(
NSString
*
)
string
;
...
...
ios/Classes/helper/StringUtil.m
→
ios/Classes/helper/
Fluwx
StringUtil.m
浏览文件 @
034c3394
...
...
@@ -2,10 +2,10 @@
// Created by mo on 2018/8/15.
//
#import "StringUtil.h"
#import "
Fluwx
StringUtil.h"
@implementation
StringUtil
@implementation
Fluwx
StringUtil
+
(
BOOL
)
isBlank
:(
NSString
*
)
string
{
...
...
ios/Classes/public/FluwxAuthHandler.h
浏览文件 @
034c3394
...
...
@@ -8,7 +8,7 @@
#import "WXApiRequestHandler.h"
#import "WechatAuthSDK.h"
@class
StringUtil
;
@class
Fluwx
StringUtil
;
@interface
FluwxAuthHandler
:
NSObject
<
WechatAuthAPIDelegate
>
-
(
instancetype
)
initWithRegistrar
:
(
NSObject
<
FlutterPluginRegistrar
>
*
)
registrar
methodChannel
:
(
FlutterMethodChannel
*
)
flutterMethodChannel
;
...
...
ios/Classes/public/FluwxLaunchMiniProgramHandler.h
浏览文件 @
034c3394
...
...
@@ -3,7 +3,7 @@
#import "FluwxPlugin.h"
@class
StringUtil
;
@class
Fluwx
StringUtil
;
@interface
FluwxLaunchMiniProgramHandler
:
NSObject
-
(
instancetype
)
initWithRegistrar
:(
NSObject
<
FlutterPluginRegistrar
>
*
)
registrar
;
...
...
ios/Classes/public/FluwxPaymentHandler.h
浏览文件 @
034c3394
...
...
@@ -7,7 +7,7 @@
#import "FluwxPlugin.h"
@class
StringUtil
;
@class
Fluwx
StringUtil
;
@interface
FluwxPaymentHandler
:
NSObject
...
...
ios/Classes/public/FluwxShareHandler.h
浏览文件 @
034c3394
...
...
@@ -8,7 +8,7 @@
#import "FluwxPlugin.h"
#import "WXApiRequestHandler.h"
@class
StringUtil
;
@class
Fluwx
StringUtil
;
@interface
FluwxShareHandler
:
NSObject
-
(
instancetype
)
initWithRegistrar
:(
NSObject
<
FlutterPluginRegistrar
>
*
)
registrar
;
...
...
ios/Classes/wechat/FluwxResponseHandler.m
浏览文件 @
034c3394
...
...
@@ -8,7 +8,7 @@
#import "FluwxResponseHandler.h"
#import "FluwxKeys.h"
#import "StringUtil.h"
#import "
Fluwx
StringUtil.h"
#import "WXApiObject.h"
#import "WXApi.h"
@implementation
FluwxResponseHandler
...
...
@@ -83,8 +83,8 @@ FlutterMethodChannel *fluwxMethodChannel = nil;
country:
authResp
.
country
==
nil
?
@""
:
authResp
.
country
,
lang:
authResp
.
lang
==
nil
?
@""
:
authResp
.
lang
,
fluwxKeyPlatform:
fluwxKeyIOS
,
@"code"
:
[
StringUtil
nilToEmpty
:
authResp
.
code
],
@"state"
:
[
StringUtil
nilToEmpty
:
authResp
.
state
]
@"code"
:
[
Fluwx
StringUtil
nilToEmpty
:
authResp
.
code
],
@"state"
:
[
Fluwx
StringUtil
nilToEmpty
:
authResp
.
state
]
};
[
fluwxMethodChannel
invokeMethod
:
@"onAuthResponse"
arguments
:
result
];
...
...
@@ -172,8 +172,8 @@ FlutterMethodChannel *fluwxMethodChannel = nil;
PayResp
*
payResp
=
(
PayResp
*
)
resp
;
NSDictionary
*
result
=
@{
description:
[
StringUtil
nilToEmpty
:
payResp
.
description
],
errStr:
[
StringUtil
nilToEmpty
:
resp
.
errStr
],
description:
[
Fluwx
StringUtil
nilToEmpty
:
payResp
.
description
],
errStr:
[
Fluwx
StringUtil
nilToEmpty
:
resp
.
errStr
],
errCode:
@
(
payResp
.
errCode
),
type:
payResp
==
nil
?
@5
:
@
(
payResp
.
type
),
@"returnKey"
:
payResp
.
returnKey
==
nil
?
@""
:
payResp
.
returnKey
,
...
...
@@ -184,8 +184,8 @@ FlutterMethodChannel *fluwxMethodChannel = nil;
WXOpenBusinessWebViewResp
*
businessResp
=
(
WXOpenBusinessWebViewResp
*
)
resp
;
NSDictionary
*
result
=
@{
description:
[
StringUtil
nilToEmpty
:
businessResp
.
description
],
errStr:
[
StringUtil
nilToEmpty
:
resp
.
errStr
],
description:
[
Fluwx
StringUtil
nilToEmpty
:
businessResp
.
description
],
errStr:
[
Fluwx
StringUtil
nilToEmpty
:
resp
.
errStr
],
errCode:
@
(
businessResp
.
errCode
),
type:
businessResp
==
nil
?
@5
:
@
(
businessResp
.
type
),
@"resultInfo"
:
businessResp
.
result
,
...
...
ios/Classes/wechat/WXApiRequestHandler.m
浏览文件 @
034c3394
...
...
@@ -10,7 +10,7 @@
#import "WXApiRequestHandler.h"
#import "SendMessageToWXReq+requestWithTextOrMediaMessage.h"
#import "WXMediaMessage+messageConstruct.h"
#import "StringUtil.h"
#import "
Fluwx
StringUtil.h"
#import "WXApiObject.h"
@implementation
WXApiRequestHandler
...
...
@@ -98,7 +98,7 @@
completion
:(
void
(
^
__nullable
)(
BOOL
success
))
completion
{
WXMusicObject
*
ext
=
[
WXMusicObject
object
];
if
([
StringUtil
isBlank
:
musicURL
])
{
if
([
Fluwx
StringUtil
isBlank
:
musicURL
])
{
ext
.
musicLowBandUrl
=
musicLowBandUrl
;
ext
.
musicLowBandDataUrl
=
(
musicLowBandDataUrl
==
(
id
)
[
NSNull
null
])
?
nil
:
musicLowBandDataUrl
;
}
else
{
...
...
@@ -142,7 +142,7 @@
[
message
setThumbImage
:
thumbImage
];
WXVideoObject
*
ext
=
[
WXVideoObject
object
];
if
([
StringUtil
isBlank
:
videoURL
])
{
if
([
Fluwx
StringUtil
isBlank
:
videoURL
])
{
ext
.
videoLowBandUrl
=
videoLowBandUrl
;
}
else
{
ext
.
videoUrl
=
videoURL
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论