Skip to content
This repository was archived by the owner on Feb 24, 2024. It is now read-only.

Commit 1c98527

Browse files
committed
fix: 更正 auth api 参数名错误
1 parent 1edac89 commit 1c98527

File tree

6 files changed

+13
-11
lines changed

6 files changed

+13
-11
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# react-native-wechat
22

3-
[WeChat SDK](https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list) [![npm version](https://badge.fury.io/js/%40yyyyu%2Freact-native-wechat.svg)](https://www.npmjs.com/package/@yyyyu/react-native-wechat)
3+
[WeChat SDK](https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list) [![npm version](https://badge.fury.io/js/%40yyyyu%2Freact-native-wechat.svg)](https://www.npmjs.com/package/@yyyyu/react-native-wechat) [![Build Status](https://travis-ci.org/yyyyu/react-native-wechat.svg?branch=master)](https://travis-ci.org/yyyyu/react-native-wechat)
44

55
**SDK Version**
66
iOS 1.8.4
@@ -10,6 +10,8 @@ Android 5.3.1
1010
Xcode 10.2.1
1111
react-native 0.59.5
1212

13+
## [Example](example/App.js)
14+
1315
## Getting Started
1416

1517
```bash
@@ -147,7 +149,7 @@ RNWechat.getSDKVersion()
147149
interface IAuthOption {
148150
state: string;
149151
scope?: AuthScope;
150-
supportWeb?: boolean;
152+
fallback?: boolean;
151153
}
152154
RNWechat.auth({
153155
state: "",

dist/api/OAuth2.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { PromiseResult } from "../module";
22
export interface IOAuth2Option {
33
scope?: OAuth2Scope;
44
state: string;
5-
supportWeb?: boolean;
5+
fallback?: boolean;
66
}
77
export declare enum OAuth2Scope {
88
UserInfo = "snsapi_userinfo"

dist/api/OAuth2.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export function OAuth2(option) {
1212
const defaultOption = {
1313
scope: OAuth2Scope.UserInfo,
1414
state: "",
15-
supportWeb: false,
15+
fallback: false,
1616
};
1717
function parseOption(o) {
1818
const option = Object.assign({}, defaultOption);
@@ -22,8 +22,8 @@ function parseOption(o) {
2222
if (typeof o.state === "string") {
2323
option.state = o.state;
2424
}
25-
if (typeof o.supportWeb === "boolean") {
26-
option.supportWeb = o.supportWeb;
25+
if (typeof o.fallback === "boolean") {
26+
option.fallback = o.fallback;
2727
}
2828
return option;
2929
}

dist/api/auth.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { PromiseResult } from "../module";
22
export interface IAuthOption {
33
scope?: AuthScope;
44
state: string;
5-
supportWeb?: boolean;
5+
fallback?: boolean;
66
}
77
export declare enum AuthScope {
88
UserInfo = "snsapi_userinfo"

dist/api/auth.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export function auth(option) {
1212
const defaultOption = {
1313
scope: AuthScope.UserInfo,
1414
state: "",
15-
supportWeb: false,
15+
fallback: false,
1616
};
1717
function parseOption(o) {
1818
const option = Object.assign({}, defaultOption);
@@ -22,8 +22,8 @@ function parseOption(o) {
2222
if (typeof o.state === "string") {
2323
option.state = o.state;
2424
}
25-
if (typeof o.supportWeb === "boolean") {
26-
option.supportWeb = o.supportWeb;
25+
if (typeof o.fallback === "boolean") {
26+
option.fallback = o.fallback;
2727
}
2828
return option;
2929
}

example/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export default class App extends Component {
7171
// interface IAuthOption {
7272
// state: string;
7373
// scope?: AuthScope;
74-
// supportWeb?: boolean;
74+
// fallback?: boolean;
7575
// }
7676
console.log("invoke auth");
7777
console.log(

0 commit comments

Comments
 (0)