Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-fluwx
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
openSourceLibrary
clx-fluwx
Commits
d1c3dc0a
提交
d1c3dc0a
authored
4月 23, 2023
作者:
JarvanMo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
config log in pubspec.yaml
上级
a40a414e
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
18 行增加
和
26 行删除
+18
-26
build.gradle
android/build.gradle
+11
-1
AndroidManifest.xml
android/src/main/AndroidManifest.xml
+3
-0
FluwxPlugin.kt
android/src/main/kotlin/com/jarvan/fluwx/FluwxPlugin.kt
+4
-3
fluwx_method_channel.dart
lib/src/method_channel/fluwx_method_channel.dart
+0
-14
fluwx_platform_interface.dart
lib/src/method_channel/fluwx_platform_interface.dart
+0
-8
没有找到文件。
android/build.gradle
浏览文件 @
d1c3dc0a
...
...
@@ -72,6 +72,7 @@ Map loadManifestPlaceholder() {
String
appId
=
""
String
interruptWxRequest
=
"true"
String
flutterActivity
=
""
String
debugLogging
=
"disabled"
Map
fluwx
=
(
Map
)
projectConfig
.
get
(
"fluwx"
)
if
(
fluwx
)
{
Map
android
=
(
Map
)
fluwx
.
get
(
"android"
)
...
...
@@ -86,7 +87,16 @@ Map loadManifestPlaceholder() {
flutterActivity
=
(
String
)
activity
}
}
def
logging
=
fluwx
.
get
(
"debug_logging"
)
if
(
logging
&&
logging
==
"enabled"
)
{
debugLogging
=
"enabled"
}
}
return
[
"WeChatAppId"
:
appId
,
"InterruptWeChatRequestByFluwx"
:
interruptWxRequest
,
"FluwxFlutterActivity"
:
flutterActivity
]
return
[
"WeChatAppId"
:
appId
,
"InterruptWeChatRequestByFluwx"
:
interruptWxRequest
,
"FluwxFlutterActivity"
:
flutterActivity
,
"WeChatDebugLogging"
:
debugLogging
]
}
android/src/main/AndroidManifest.xml
浏览文件 @
d1c3dc0a
...
...
@@ -20,6 +20,9 @@
android:name=
"InterruptWeChatRequestByFluwx"
android:value=
"${InterruptWeChatRequestByFluwx}"
/>
<meta-data
android:name=
"WeChatDebugLogging"
android:value=
"${WeChatDebugLogging}"
/>
<meta-data
android:name=
"FluwxFlutterActivity"
android:value=
"${FluwxFlutterActivity}"
/>
...
...
android/src/main/kotlin/com/jarvan/fluwx/FluwxPlugin.kt
浏览文件 @
d1c3dc0a
...
...
@@ -2,9 +2,11 @@ package com.jarvan.fluwx
import
android.content.Context
import
android.content.Intent
import
android.content.pm.PackageManager
import
android.util.Log
import
androidx.annotation.NonNull
import
com.jarvan.fluwx.handlers.*
import
com.jarvan.fluwx.utils.KEY_FLUWX_REQUEST_INFO_EXT_MSG
import
com.jarvan.fluwx.utils.WXApiUtils
import
com.tencent.mm.opensdk.modelbiz.*
import
com.tencent.mm.opensdk.modelpay.PayReq
...
...
@@ -36,7 +38,7 @@ class FluwxPlugin : FlutterPlugin, MethodCallHandler, ActivityAware,
private
var
context
:
Context
?
=
null
private
fun
handelIntent
(
intent
:
Intent
)
{
intent
.
getStringExtra
(
FluwxRequestHandler
.
KEY_FLUWX_REQUEST_INFO_EXT_MSG
)
?.
let
{
intent
.
getStringExtra
(
KEY_FLUWX_REQUEST_INFO_EXT_MSG
)
?.
let
{
extMsg
=
it
}
}
...
...
@@ -44,6 +46,7 @@ class FluwxPlugin : FlutterPlugin, MethodCallHandler, ActivityAware,
override
fun
onAttachedToEngine
(
flutterPluginBinding
:
FlutterPlugin
.
FlutterPluginBinding
)
{
val
channel
=
MethodChannel
(
flutterPluginBinding
.
binaryMessenger
,
"com.jarvanmo/fluwx"
)
channel
.
setMethodCallHandler
(
this
)
val
applicationContext
=
flutterPluginBinding
.
applicationContext
fluwxChannel
=
channel
context
=
flutterPluginBinding
.
applicationContext
authHandler
=
FluwxAuthHandler
(
channel
)
...
...
@@ -56,8 +59,6 @@ class FluwxPlugin : FlutterPlugin, MethodCallHandler, ActivityAware,
callingChannel
=
fluwxChannel
when
{
call
.
method
==
"registerApp"
->
WXAPiHandler
.
registerApp
(
call
,
result
,
context
)
call
.
method
==
"startLog"
->
WXAPiHandler
.
startLog
(
call
,
result
)
call
.
method
==
"stopLog"
->
WXAPiHandler
.
stopLog
(
call
,
result
)
call
.
method
==
"sendAuth"
->
authHandler
?.
sendAuth
(
call
,
result
)
call
.
method
==
"authByQRCode"
->
authHandler
?.
authByQRCode
(
call
,
result
)
call
.
method
==
"stopAuthByQRCode"
->
authHandler
?.
stopAuthByQRCode
(
result
)
...
...
lib/src/method_channel/fluwx_method_channel.dart
浏览文件 @
d1c3dc0a
...
...
@@ -118,20 +118,6 @@ class MethodChannelFluwx extends FluwxPlatform {
return
methodChannel
.
invokeMethod
(
'getExtMsg'
);
}
/// start Log
/// default [WXLogLevel.unspecific]
@override
Future
<
bool
?>
startLog
({
WXLogLevel
logLevel
=
WXLogLevel
.
unspecific
})
async
{
return
await
methodChannel
.
invokeMethod
(
'startLog'
,
{
'logLevel'
:
logLevel
.
level
});
}
/// stop log
@override
Future
<
bool
?>
stopLog
()
async
{
return
await
methodChannel
.
invokeMethod
(
'stopLog'
);
}
/// Share your requests to WeChat.
/// This depends on the actual type of [what].
/// see [_shareModelMethodMapper] for detail.
...
...
lib/src/method_channel/fluwx_platform_interface.dart
浏览文件 @
d1c3dc0a
...
...
@@ -67,14 +67,6 @@ abstract class FluwxPlatform extends PlatformInterface {
throw
UnimplementedError
(
'getExtMsg() has not been implemented.'
);
}
Future
<
bool
?>
startLog
({
WXLogLevel
logLevel
=
WXLogLevel
.
unspecific
})
{
throw
UnimplementedError
(
'startLog() has not been implemented.'
);
}
Future
<
bool
?>
stopLog
()
{
throw
UnimplementedError
(
'stopLog() has not been implemented.'
);
}
Future
<
bool
>
share
(
WeChatShareModel
what
)
{
throw
UnimplementedError
(
'share() has not been implemented.'
);
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论