提交 99e4feb2 authored 作者: JarvanMo's avatar JarvanMo

add SEN_AUTH.md

上级 e5596ccd
## 发送Auth验证
```Fluwx```目前只支持获取```code```,若要获取```access_token```请在服务器端完成。
```dart
fluwx.sendAuth(WeChatSendAuthModel(
scope: "snsapi_userinfo",
state:"wechat_sdk_demo_test",
));
```
...@@ -17,10 +17,6 @@ class _ShareImagePageState extends State<ShareImagePage> { ...@@ -17,10 +17,6 @@ class _ShareImagePageState extends State<ShareImagePage> {
void initState() { void initState() {
super.initState(); super.initState();
fluwx = new Fluwx(); fluwx = new Fluwx();
fluwx.sendAuth(WeChatSendAuthModel(
scope: "snsapi_userinfo",
state:"wechat_sdk_demo_test",
));
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
......
import 'package:flutter/foundation.dart';
class WeChatSendAuthModel { class WeChatSendAuthModel {
final String scope; final String scope;
final String state; final String state;
final String openId; final String openId;
WeChatSendAuthModel(this.scope, this.state,this.openId) : WeChatSendAuthModel({
@required this.scope,
this.state,
this.openId }) :
assert(scope != null && scope assert(scope != null && scope
.trim() .trim()
.isNotEmpty); .isNotEmpty);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论