Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-fluwx
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
openSourceLibrary
clx-fluwx
Commits
84635370
提交
84635370
authored
7月 02, 2019
作者:
JarvanMo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update doc
上级
3acd1188
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
50 行增加
和
39 行删除
+50
-39
README.md
README.md
+1
-1
RESPONSE.md
doc/RESPONSE.md
+31
-23
RESPONSE_CN.md
doc/RESPONSE_CN.md
+18
-15
没有找到文件。
README.md
浏览文件 @
84635370
...
...
@@ -75,7 +75,7 @@ Before using`Fluwx`,you should init `FLuwx`:
*
[
Subscribe Message
](
./doc/SUBSCRIBE_MESSAGE.md
)
*
[
Auth By QRCode
](
./doc/AUTH_BY_QR_CODE.md
)
*
[
Sign Auto-Deduct
](
./doc/AUTO_DEDUCT.md
)
*
[
Obtain
response f
rom WeChat
](
./doc/RESPONSE.md
)
*
[
Obtain
Response F
rom WeChat
](
./doc/RESPONSE.md
)
### Other
*
[
Having Questions?
](
./doc/QUESTIONS.md
)
...
...
doc/RESPONSE.md
浏览文件 @
84635370
### Response From WeChat
There's some work we have to do on the particular platform(if you don't need this,just ignore).
### Flutter
We can get the reponse from WeChat after sharing and etc:
```
dart
fluwx
.
responseFromShare
.
listen
((
response
){
//do something
});
fluwx
.
responseFromAuth
.
listen
((
response
){
//do something
});
fluwx
.
responseFromPayment
.
listen
((
response
){
//do something
});
```
> NOTE:If the field starts with "android" or "iOS", it means that only android or iOS has the field.
The type of return value is
`WeChatResponse`
,and
`type`
is an enum:
```
dart
enum
WeChatResponseType
{
SHARE
,
AUTH
,
PAYMENT
}
```
`result`
is the real response from WeChat,it's a
`Map`
, read the WeChat documents for more details.
Howver,there an addtional param
`platform`
,the value of
`platform`
is
`android`
or
`iOS`
.
### Android
Fluwx will create
`WXEntryActivity`
or
`WXPayEntryActivity`
by itself since
*0.4.0*
. So the following
code isn't necessary.
...
...
@@ -100,27 +131,4 @@ don't override this since 1.0.0:
> NOTE:Don't forget to add URL Schema in order to go back to your app.
### Flutter
We can get the reponse from WeChat after sharing and etc:
```
dart
fluwx.responseFromShare.listen((response){
//do something
});
fluwx.responseFromAuth.listen((response){
//do something
});
fluwx.responseFromPayment.listen((response){
//do something
});
```
> NOTE:If the field starts with "android" or "iOS", it means that only android or iOS has the field.
The type of return value is `WeChatResponse`,and `type` is an enum:
```
dart
enum WeChatResponseType {
SHARE,
AUTH,
PAYMENT }
```
`result`
is the real response from WeChat,it's a
`Map`
, read the WeChat documents for more details.
Howver,there an addtional param
`platform`
,the value of
`platform`
is
`android`
or
`iOS`
.
doc/RESPONSE_CN.md
浏览文件 @
84635370
### 微信调回
微信的回调也要根据平台的不同进行差异化处理(如果你不需要回调,请忽略)。
### Flutter
```
dart
fluwx
.
responseFromShare
.
listen
((
response
){
//do something
});
fluwx
.
responseFromAuth
.
listen
((
response
){
//do something
});
fluwx
.
responseFromPayment
.
listen
((
response
){
//do something
});
```
> 注意:如果一个字段以*android*或者*iOS*开头,那么意味这个字段只存在于*android*或者*iOS*。
### Android
从
*0.4.0*
开始,开发者不必手动添加
`WXEntryActivity`
和
`WXPayEntryActivity`
了,所以下面的不是必需要的了:
~~由于机制问题,
`Android`
端需要在
`WXEntryActivity`
或
`WXPayEntryActivity`
中添加如下代码:~~
...
...
@@ -97,18 +115,3 @@
```
> 注意:为了能够返回你的app,请不要忘记添加URL Schema。
### Flutter
```
dart
fluwx
.
responseFromShare
.
listen
((
response
){
//do something
});
fluwx
.
responseFromAuth
.
listen
((
response
){
//do something
});
fluwx
.
responseFromPayment
.
listen
((
response
){
//do something
});
```
> 注意:如果一个字段以*android*或者*iOS*开头,那么意味这个字段只存在于*android*或者*iOS*。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论