Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-fluwx
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
openSourceLibrary
clx-fluwx
Commits
e328c3bf
提交
e328c3bf
authored
5月 23, 2019
作者:
jieliu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add sign auto-deduct example & doc.
上级
fa7d175f
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
168 行增加
和
9 行删除
+168
-9
README.md
README.md
+2
-1
README_CN.md
README_CN.md
+2
-2
AUTO_DEDUCT.md
doc/AUTO_DEDUCT.md
+18
-0
AUTO_DEDUCT_CN.md
doc/AUTO_DEDUCT_CN.md
+18
-0
project.pbxproj
example/ios/Runner.xcodeproj/project.pbxproj
+3
-3
main.dart
example/lib/main.dart
+14
-3
sign_auto_deduct_page.dart
example/lib/sign_auto_deduct_page.dart
+111
-0
没有找到文件。
README.md
浏览文件 @
e328c3bf
...
...
@@ -23,6 +23,7 @@ QQ Group:892398530。
*
Launch Mini-Program.
*
Subscribe Message.
*
Auth By QRCode
*
Sign Auto-Deduct
## Sample
...
...
@@ -71,7 +72,7 @@ Before using`Fluwx`,you should init `FLuwx`:
*
[
Subscribe Message
](
./doc/SUBSCRIBE_MESSAGE.md
)
*
[
Response
](
./doc/RESPONSE.md
)
*
[
Auth By QRCode
](
./doc/AUTH_BY_QR_CODE.md
)
*
[
Sign Auto-Deduct
](
./doc/AUTO_DEDUCT.md
)
### Other
*
[
Using Swift?
](
./doc/USING_SWIFT.md
)
*
[
Having Questions?
](
./doc/QUESTIONS.md
)
...
...
README_CN.md
浏览文件 @
e328c3bf
...
...
@@ -22,7 +22,7 @@ QQ群:892398530。
*
打开小程序。
*
一次性订阅消息。
*
二维码登录。
*
签约免密支付。
## 示例
...
...
@@ -69,7 +69,7 @@ dependencies:
*
[
一次性订阅消息
](
./doc/SUBSCRIBE_MESSAGE_CN.md
)
。
*
[
微信回调
](
./doc/RESPONSE_CN.md
)
。
*
[
二维码登录
](
./doc/AUTH_BY_QR_CODE_CN.md
)
。
*
[
签约免密支付
](
./doc/AUTO_DEDUCT_CN.md
)
。
### Q&A
请先看文档,再看Q&A,再查看issue,自我排查错误,方便你我他。依然无法解决的问题可以加群提问。
...
...
doc/AUTO_DEDUCT.md
0 → 100644
浏览文件 @
e328c3bf
## SIGN AUTO-DEDUCT
see
[
details
](
https://pay.weixin.qq.com/wiki/doc/api/pap.php?chapter=18_5&index=2
)
.
```
dart
import
'package:fluwx/fluwx.dart'
as
fluwx
;
fluwx
.
autoDeDuct
(
appId:
""
,
mchId:
""
,
planId:
""
,
contractCode:
""
,
requestSerial:
""
,
contractDisplayAccount:
""
,
notifyUrl:
""
,
version:
""
,
sign:
""
,
timestamp:
""
,
returnApp:
'3'
);
```
\ No newline at end of file
doc/AUTO_DEDUCT_CN.md
0 → 100644
浏览文件 @
e328c3bf
## 签约微信免密支付
查看
[
详情
](
https://pay.weixin.qq.com/wiki/doc/api/pap.php?chapter=18_5&index=2
)
.
```
dart
import
'package:fluwx/fluwx.dart'
as
fluwx
;
fluwx
.
autoDeDuct
(
appId:
""
,
mchId:
""
,
planId:
""
,
contractCode:
""
,
requestSerial:
""
,
contractDisplayAccount:
""
,
notifyUrl:
""
,
version:
""
,
sign:
""
,
timestamp:
""
,
returnApp:
'3'
);
```
\ No newline at end of file
example/ios/Runner.xcodeproj/project.pbxproj
浏览文件 @
e328c3bf
...
...
@@ -183,7 +183,6 @@
TargetAttributes
=
{
97C146ED1CF9000F007C117D
=
{
CreatedOnToolsVersion
=
7.3.1
;
DevelopmentTeam
=
8JJXUFV6F7
;
SystemCapabilities
=
{
com.apple.BackgroundModes
=
{
enabled
=
1
;
...
...
@@ -197,6 +196,7 @@
developmentRegion
=
English
;
hasScannedForEncodings
=
0
;
knownRegions
=
(
English
,
en
,
Base
,
);
...
...
@@ -437,7 +437,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES
=
YES
;
CURRENT_PROJECT_VERSION
=
1
;
DEVELOPMENT_TEAM
=
8JJXUFV6F7
;
DEVELOPMENT_TEAM
=
""
;
ENABLE_BITCODE
=
NO
;
FRAMEWORK_SEARCH_PATHS
=
(
"$(inherited)"
,
...
...
@@ -465,7 +465,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES
=
YES
;
CURRENT_PROJECT_VERSION
=
1
;
DEVELOPMENT_TEAM
=
8JJXUFV6F7
;
DEVELOPMENT_TEAM
=
""
;
ENABLE_BITCODE
=
NO
;
FRAMEWORK_SEARCH_PATHS
=
(
"$(inherited)"
,
...
...
example/lib/main.dart
浏览文件 @
e328c3bf
...
...
@@ -2,8 +2,9 @@ import 'dart:async';
import
'package:flutter/material.dart'
;
import
'package:fluwx/fluwx.dart'
as
fluwx
;
import
'package:fluwx_example/launch_mini_program_page.dart'
;
import
'package:fluwx_example/subscribe_message_page.dart'
;
import
'launch_mini_program_page.dart'
;
import
'subscribe_message_page.dart'
;
import
'auth_by_qr_code_page.dart'
;
import
'pay_page.dart'
;
...
...
@@ -14,6 +15,7 @@ import 'share_music.dart';
import
'share_text_image.dart'
;
import
'share_video_page.dart'
;
import
'share_web_page.dart'
;
import
'sign_auto_deduct_page.dart'
;
void
main
(
)
=>
runApp
(
new
MyApp
());
...
...
@@ -56,7 +58,8 @@ class _MyAppState extends State<MyApp> {
"pay"
:
(
context
)
=>
PayPage
(),
"launchMiniProgram"
:
(
context
)
=>
LaunchMiniProgramPage
(),
"subscribeMessage"
:
(
ctx
)
=>
SubscribeMessagePage
(),
"AuthByQRCode"
:
(
ctx
)
=>
AuthByQRCodePage
()
"AuthByQRCode"
:
(
ctx
)
=>
AuthByQRCodePage
(),
'AutoDeduct'
:
(
ctx
)
=>
SignAutoDeductPage
(),
},
home:
new
Scaffold
(
appBar:
new
AppBar
(
...
...
@@ -161,6 +164,14 @@ class ShareSelectorPage extends StatelessWidget {
},
child:
const
Text
(
"AuthByQRCode"
)),
),
Padding
(
padding:
const
EdgeInsets
.
all
(
8.0
),
child:
new
OutlineButton
(
onPressed:
()
{
Navigator
.
of
(
context
).
pushNamed
(
"AutoDeduct"
);
},
child:
const
Text
(
"SignAuto-deduct"
)),
),
],
),
);
...
...
example/lib/sign_auto_deduct_page.dart
0 → 100644
浏览文件 @
e328c3bf
import
'package:flutter/material.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:fluwx/fluwx.dart'
as
fluwx
;
class
SignAutoDeductPage
extends
StatefulWidget
{
@override
_SignAutoDeductPageState
createState
()
=>
_SignAutoDeductPageState
();
}
/// see wechat [document](https://pay.weixin.qq.com/wiki/doc/api/pap.php?chapter=18_5&index=2)
class
_SignAutoDeductPageState
extends
State
<
SignAutoDeductPage
>
{
TextEditingController
appId
=
TextEditingController
(
text:
"wx316f9c82e99ac105"
);
TextEditingController
mchId
=
TextEditingController
(
text:
""
);
TextEditingController
planId
=
TextEditingController
(
text:
""
);
TextEditingController
contractCode
=
TextEditingController
(
text:
""
);
TextEditingController
requestSerial
=
TextEditingController
(
text:
""
);
TextEditingController
contractDisplayAccount
=
TextEditingController
(
text:
""
);
TextEditingController
notifyUrl
=
TextEditingController
(
text:
""
);
TextEditingController
version
=
TextEditingController
(
text:
"1.0"
);
TextEditingController
sign
=
TextEditingController
(
text:
""
);
TextEditingController
timestamp
=
TextEditingController
(
text:
""
);
TextEditingController
returnApp
=
TextEditingController
(
text:
"3"
);
@override
void
initState
()
{
super
.
initState
();
fluwx
.
responseFromSubscribeMsg
.
listen
((
resp
)
{
print
(
"resp =
$resp
"
);
});
}
@override
void
dispose
()
{
appId
.
dispose
();
mchId
.
dispose
();
planId
.
dispose
();
contractCode
.
dispose
();
contractDisplayAccount
.
dispose
();
requestSerial
.
dispose
();
notifyUrl
.
dispose
();
version
.
dispose
();
sign
.
dispose
();
timestamp
.
dispose
();
returnApp
.
dispose
();
super
.
dispose
();
}
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
appBar:
AppBar
(
title:
Text
(
'SubscribeMessagePage'
),
),
body:
Container
(
child:
ListView
(
children:
<
Widget
>[
_buildTextField
(
title:
"appId"
,
textEditController:
appId
),
_buildTextField
(
title:
"mchId"
,
textEditController:
mchId
),
_buildTextField
(
title:
"planId"
,
textEditController:
planId
),
_buildTextField
(
title:
"contractCode"
,
textEditController:
contractCode
),
_buildTextField
(
title:
"requestSerial"
,
textEditController:
requestSerial
),
_buildTextField
(
title:
"contractDisplayAccount"
,
textEditController:
contractDisplayAccount
),
_buildTextField
(
title:
"notifyUrl"
,
textEditController:
notifyUrl
),
_buildTextField
(
title:
"version"
,
textEditController:
version
),
_buildTextField
(
title:
"sign"
,
textEditController:
sign
),
_buildTextField
(
title:
"timestamp"
,
textEditController:
timestamp
),
_buildTextField
(
title:
"returnApp"
,
textEditController:
returnApp
),
CupertinoButton
(
child:
Text
(
'request once sign auto-deduct message'
),
onPressed:
_signAutoDeduct
,
),
],
),
),
);
}
Widget
_buildTextField
({
String
title
,
TextEditingController
textEditController
,
})
{
return
TextField
(
decoration:
InputDecoration
(
labelText:
title
,
),
controller:
textEditController
,
);
}
void
_signAutoDeduct
()
{
fluwx
.
autoDeDuct
(
appId:
appId
.
text
??
""
,
mchId:
mchId
.
text
??
""
,
planId:
planId
.
text
??
""
,
contractCode:
contractCode
.
text
??
""
,
requestSerial:
requestSerial
.
text
??
""
,
contractDisplayAccount:
contractDisplayAccount
.
text
??
""
,
notifyUrl:
notifyUrl
.
text
??
""
,
version:
version
.
text
??
""
,
sign:
sign
.
text
??
""
,
timestamp:
timestamp
.
text
??
""
,
returnApp:
'3'
);
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论