Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-fluwx
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
openSourceLibrary
clx-fluwx
Commits
daca43e4
提交
daca43e4
authored
8月 28, 2021
作者:
JarvanMo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
support OpenCustomerServiceChat on ios
上级
3c7356b0
显示空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
48 行增加
和
39 行删除
+48
-39
Podfile.lock
example/ios/Podfile.lock
+2
-9
project.pbxproj
example/ios/Runner.xcodeproj/project.pbxproj
+0
-19
FluwxAuthHandler.h
ios/Classes/FluwxAuthHandler.h
+1
-1
FluwxPlugin.m
ios/Classes/FluwxPlugin.m
+8
-0
FluwxResponseHandler.h
ios/Classes/FluwxResponseHandler.h
+2
-2
FluwxResponseHandler.m
ios/Classes/FluwxResponseHandler.m
+15
-1
SendMessageToWXReq+requestWithTextOrMediaMessage.h
...lasses/SendMessageToWXReq+requestWithTextOrMediaMessage.h
+1
-1
WXApiRequestHandler.h
ios/Classes/WXApiRequestHandler.h
+5
-1
WXApiRequestHandler.m
ios/Classes/WXApiRequestHandler.m
+8
-2
WXMediaMessage+messageConstruct.h
ios/Classes/WXMediaMessage+messageConstruct.h
+1
-1
fluwx.podspec
ios/fluwx.podspec
+1
-1
wechat_response.dart
lib/src/response/wechat_response.dart
+4
-1
没有找到文件。
example/ios/Podfile.lock
浏览文件 @
daca43e4
...
@@ -2,17 +2,11 @@ PODS:
...
@@ -2,17 +2,11 @@ PODS:
- Flutter (1.0.0)
- Flutter (1.0.0)
- fluwx (0.0.1):
- fluwx (0.0.1):
- Flutter
- Flutter
- WechatOpenSDK (= 1.8.7.1)
- WechatOpenSDK (1.8.7.1)
DEPENDENCIES:
DEPENDENCIES:
- Flutter (from `Flutter`)
- Flutter (from `Flutter`)
- fluwx (from `.symlinks/plugins/fluwx/ios`)
- fluwx (from `.symlinks/plugins/fluwx/ios`)
SPEC REPOS:
trunk:
- WechatOpenSDK
EXTERNAL SOURCES:
EXTERNAL SOURCES:
Flutter:
Flutter:
:path: Flutter
:path: Flutter
...
@@ -20,9 +14,8 @@ EXTERNAL SOURCES:
...
@@ -20,9 +14,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/fluwx/ios"
:path: ".symlinks/plugins/fluwx/ios"
SPEC CHECKSUMS:
SPEC CHECKSUMS:
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c
fluwx: 07a55ed66bf3a4961e836a2a411b02dcada32902
fluwx: c64c2b84b965279aaa251a80b5b6a1cd0ef7bd45
WechatOpenSDK: 6a4d1436c15b3b5fe2a0bd383f3046010186da44
PODFILE CHECKSUM: 8e679eca47255a8ca8067c4c67aab20e64cb974d
PODFILE CHECKSUM: 8e679eca47255a8ca8067c4c67aab20e64cb974d
...
...
example/ios/Runner.xcodeproj/project.pbxproj
浏览文件 @
daca43e4
...
@@ -149,7 +149,6 @@
...
@@ -149,7 +149,6 @@
97C146EC1CF9000F007C117D
/* Resources */
,
97C146EC1CF9000F007C117D
/* Resources */
,
9705A1C41CF9048500538489
/* Embed Frameworks */
,
9705A1C41CF9048500538489
/* Embed Frameworks */
,
3B06AD1E1E4923F5004D2608
/* Thin Binary */
,
3B06AD1E1E4923F5004D2608
/* Thin Binary */
,
193B0A2F7BBE7B22CD4D85EA
/* [CP] Embed Pods Frameworks */
,
);
);
buildRules
=
(
buildRules
=
(
);
);
...
@@ -207,24 +206,6 @@
...
@@ -207,24 +206,6 @@
/* End PBXResourcesBuildPhase section */
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
193B0A2F7BBE7B22CD4D85EA
/* [CP] Embed Pods Frameworks */
=
{
isa
=
PBXShellScriptBuildPhase
;
buildActionMask
=
2147483647
;
files
=
(
);
inputPaths
=
(
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh"
,
"${PODS_ROOT}/../Flutter/Flutter.framework"
,
);
name
=
"[CP] Embed Pods Frameworks"
;
outputPaths
=
(
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework"
,
);
runOnlyForDeploymentPostprocessing
=
0
;
shellPath
=
/bin/sh
;
shellScript
=
"\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"
;
showEnvVarsInLog
=
0
;
};
3B06AD1E1E4923F5004D2608
/* Thin Binary */
=
{
3B06AD1E1E4923F5004D2608
/* Thin Binary */
=
{
isa
=
PBXShellScriptBuildPhase
;
isa
=
PBXShellScriptBuildPhase
;
buildActionMask
=
2147483647
;
buildActionMask
=
2147483647
;
...
...
ios/Classes/FluwxAuthHandler.h
浏览文件 @
daca43e4
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
#import <Flutter/Flutter.h>
#import <Flutter/Flutter.h>
#import "FluwxPlugin.h"
#import "FluwxPlugin.h"
#import "WXApiRequestHandler.h"
#import "WXApiRequestHandler.h"
#import
<WechatOpenSDK/WechatAuthSDK.h>
#import
"WechatAuthSDK.h"
@class
FluwxStringUtil
;
@class
FluwxStringUtil
;
...
...
ios/Classes/FluwxPlugin.m
浏览文件 @
daca43e4
...
@@ -74,6 +74,8 @@ FlutterMethodChannel *channel = nil;
...
@@ -74,6 +74,8 @@ FlutterMethodChannel *channel = nil;
[
self
handelGetExtMsgWithCall
:
call
result
:
result
];
[
self
handelGetExtMsgWithCall
:
call
result
:
result
];
}
else
if
([
call
.
method
hasPrefix
:
@"share"
])
{
}
else
if
([
call
.
method
hasPrefix
:
@"share"
])
{
[
_fluwxShareHandler
handleShare
:
call
result
:
result
];
[
_fluwxShareHandler
handleShare
:
call
result
:
result
];
}
else
if
([
@"openWeChatCustomerServiceChat"
isEqualToString
:
call
.
method
])
{
[
self
checkWeChatInstallation
:
call
result
:
result
];
}
else
{
}
else
{
result
(
FlutterMethodNotImplemented
);
result
(
FlutterMethodNotImplemented
);
}
}
...
@@ -109,6 +111,12 @@ FlutterMethodChannel *channel = nil;
...
@@ -109,6 +111,12 @@ FlutterMethodChannel *channel = nil;
result
(
@
([
WXApi
isWXAppInstalled
]));
result
(
@
([
WXApi
isWXAppInstalled
]));
}
}
-
(
void
)
openWeChatCustomerServiceChat
:(
FlutterMethodCall
*
)
call
result
:(
FlutterResult
)
result
{
NSString
*
url
=
call
.
arguments
[
@"url"
];
NSString
*
corpId
=
call
.
arguments
[
@"corpId"
];
result
(
@
([
WXApi
isWXAppInstalled
]));
}
-
(
void
)
handlePayment
:(
FlutterMethodCall
*
)
call
result
:(
FlutterResult
)
result
{
-
(
void
)
handlePayment
:(
FlutterMethodCall
*
)
call
result
:(
FlutterResult
)
result
{
...
...
ios/Classes/FluwxResponseHandler.h
浏览文件 @
daca43e4
...
@@ -7,8 +7,8 @@
...
@@ -7,8 +7,8 @@
#import <Flutter/Flutter.h>
#import <Flutter/Flutter.h>
#import <Flutter/Flutter.h>
#import <Flutter/Flutter.h>
#import
<WechatOpenSDK/WXApi.h>
#import
"WXApi.h"
#import
<WechatOpenSDK/WXApiObject.h>
#import
"WXApiObject.h"
@protocol
WXApiManagerDelegate
<
NSObject
>
@protocol
WXApiManagerDelegate
<
NSObject
>
...
...
ios/Classes/FluwxResponseHandler.m
浏览文件 @
daca43e4
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
#import <Flutter/Flutter.h>
#import <Flutter/Flutter.h>
#import "FluwxStringUtil.h"
#import "FluwxStringUtil.h"
#import
<WechatOpenSDK/WXApiObject.h>
#import
"WXApiObject.h"
#import "FluwxResponseHandler.h"
#import "FluwxResponseHandler.h"
@implementation
FluwxResponseHandler
@implementation
FluwxResponseHandler
...
@@ -189,6 +189,20 @@ FlutterMethodChannel *fluwxMethodChannel = nil;
...
@@ -189,6 +189,20 @@ FlutterMethodChannel *fluwxMethodChannel = nil;
};
};
[
fluwxMethodChannel
invokeMethod
:
@"onWXOpenBusinessWebviewResponse"
arguments
:
result
];
[
fluwxMethodChannel
invokeMethod
:
@"onWXOpenBusinessWebviewResponse"
arguments
:
result
];
}
else
if
([
resp
isKindOfClass
:[
WXOpenCustomerServiceResp
class
]])
{
WXOpenCustomerServiceResp
*
customerResp
=
(
WXOpenCustomerServiceResp
*
)
resp
;
NSDictionary
*
result
=
@{
description:
[
FluwxStringUtil
nilToEmpty
:
customerResp
.
description
],
errStr:
[
FluwxStringUtil
nilToEmpty
:
resp
.
errStr
],
errCode:
@
(
customerResp
.
errCode
),
type:
@
(
customerResp
.
type
),
@"extMsg"
:
[
FluwxStringUtil
nilToEmpty
:
customerResp
.
extMsg
]
};
[
fluwxMethodChannel
invokeMethod
:
@"onWXOpenBusinessWebviewResponse"
arguments
:
result
];
// 相关错误信息
}
}
}
}
...
...
ios/Classes/SendMessageToWXReq+requestWithTextOrMediaMessage.h
浏览文件 @
daca43e4
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
//
//
//
//
#import
<WechatOpenSDK/WXApiObject.h>
#import
"WXApiObject.h"
@interface
SendMessageToWXReq
(
requestWithTextOrMediaMessage
)
@interface
SendMessageToWXReq
(
requestWithTextOrMediaMessage
)
...
...
ios/Classes/WXApiRequestHandler.h
浏览文件 @
daca43e4
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
#import <Foundation/Foundation.h>
#import <Foundation/Foundation.h>
#import
<WechatOpenSDK/WXApiObject.h>
#import
"WXApiObject.h"
#import "FluwxResponseHandler.h"
#import "FluwxResponseHandler.h"
NS_ASSUME_NONNULL_BEGIN
NS_ASSUME_NONNULL_BEGIN
...
@@ -144,6 +144,10 @@ NS_ASSUME_NONNULL_BEGIN
...
@@ -144,6 +144,10 @@ NS_ASSUME_NONNULL_BEGIN
Package
:(
NSString
*
)
package
Package
:(
NSString
*
)
package
Sign
:(
NSString
*
)
sign
Sign
:(
NSString
*
)
sign
completion
:(
void
(
^
__nullable
)(
BOOL
success
))
completion
;
completion
:(
void
(
^
__nullable
)(
BOOL
success
))
completion
;
+
(
void
)
openCustomerService
:(
NSString
*
)
url
CorpId
:(
NSString
*
)
corpId
completion
:(
void
(
^
__nullable
)(
BOOL
success
))
completion
;
@end
@end
NS_ASSUME_NONNULL_END
NS_ASSUME_NONNULL_END
ios/Classes/WXApiRequestHandler.m
浏览文件 @
daca43e4
...
@@ -2,12 +2,12 @@
...
@@ -2,12 +2,12 @@
// Created by mo on 2020/3/7.
// Created by mo on 2020/3/7.
//
//
#import
<WechatOpenSDK/WXApi.h>
#import
"WXApi.h"
#import "WXApiRequestHandler.h"
#import "WXApiRequestHandler.h"
#import "SendMessageToWXReq+requestWithTextOrMediaMessage.h"
#import "SendMessageToWXReq+requestWithTextOrMediaMessage.h"
#import "WXMediaMessage+messageConstruct.h"
#import "WXMediaMessage+messageConstruct.h"
#import "FluwxStringUtil.h"
#import "FluwxStringUtil.h"
#import
<WechatOpenSDK/WXApiObject.h>
#import
"WXApiObject.h"
@implementation
WXApiRequestHandler
@implementation
WXApiRequestHandler
...
@@ -400,4 +400,10 @@
...
@@ -400,4 +400,10 @@
[
WXApi
sendReq
:
req
completion
:
completion
];
[
WXApi
sendReq
:
req
completion
:
completion
];
}
}
+
(
void
)
openCustomerService
:(
NSString
*
)
url
CorpId
:(
NSString
*
)
corpId
completion
:(
void
(
^
)(
BOOL
))
completion
{
WXOpenCustomerServiceReq
*
req
=
[[
WXOpenCustomerServiceReq
alloc
]
init
];
req
.
corpid
=
corpId
;
//企业ID
req
.
url
=
url
;
//客服URL
[
WXApi
sendReq
:
req
completion
:
completion
];
}
@end
@end
ios/Classes/WXMediaMessage+messageConstruct.h
浏览文件 @
daca43e4
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
// Created by Jeason on 15/7/14.
// Created by Jeason on 15/7/14.
//
//
//
//
#import
<WechatOpenSDK/WXApiObject.h>
#import
"WXApiObject.h"
@interface
WXMediaMessage
(
messageConstruct
)
@interface
WXMediaMessage
(
messageConstruct
)
...
...
ios/fluwx.podspec
浏览文件 @
daca43e4
...
@@ -17,7 +17,7 @@ A new Flutter plugin for Wechat SDK.
...
@@ -17,7 +17,7 @@ A new Flutter plugin for Wechat SDK.
s
.
public_header_files
=
'Classes/public/*.h'
s
.
public_header_files
=
'Classes/public/*.h'
s
.
static_framework
=
true
s
.
static_framework
=
true
s
.
dependency
'Flutter'
s
.
dependency
'Flutter'
s
.
dependency
'WechatOpenSDK'
,
'1.8.7.1'
#
s.dependency 'WechatOpenSDK', '1.8.7.1'
# s.dependency 'OpenWeChatSDK','~> 1.8.3+10'
# s.dependency 'OpenWeChatSDK','~> 1.8.3+10'
# s.xcconfig = { 'HEADER_SEARCH_PATHS' => "${PODS_ROOT}/Headers/Public/#{s.name}" }
# s.xcconfig = { 'HEADER_SEARCH_PATHS' => "${PODS_ROOT}/Headers/Public/#{s.name}" }
...
...
lib/src/response/wechat_response.dart
浏览文件 @
daca43e4
...
@@ -128,8 +128,11 @@ class WeChatPaymentResponse extends BaseWeChatResponse {
...
@@ -128,8 +128,11 @@ class WeChatPaymentResponse extends BaseWeChatResponse {
}
}
class
WeChatOpenCustomerServiceChatResponse
extends
BaseWeChatResponse
{
class
WeChatOpenCustomerServiceChatResponse
extends
BaseWeChatResponse
{
final
String
?
extMsg
;
WeChatOpenCustomerServiceChatResponse
.
fromMap
(
Map
map
)
WeChatOpenCustomerServiceChatResponse
.
fromMap
(
Map
map
)
:
super
.
_
(
map
[
_errCode
],
map
[
_errStr
]);
:
extMsg
=
map
[
"extMsg"
],
super
.
_
(
map
[
_errCode
],
map
[
_errStr
]);
}
}
class
WeChatSubscribeMsgResponse
extends
BaseWeChatResponse
{
class
WeChatSubscribeMsgResponse
extends
BaseWeChatResponse
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论