This repository was archived by the owner on Feb 24, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +13
-11
lines changed Expand file tree Collapse file tree 6 files changed +13
-11
lines changed Original file line number Diff line number Diff line change 1
1
# react-native-wechat
2
2
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 )
4
4
5
5
** SDK Version**
6
6
iOS 1.8.4
@@ -10,6 +10,8 @@ Android 5.3.1
10
10
Xcode 10.2.1
11
11
react-native 0.59.5
12
12
13
+ ## [ Example] ( example/App.js )
14
+
13
15
## Getting Started
14
16
15
17
``` bash
@@ -147,7 +149,7 @@ RNWechat.getSDKVersion()
147
149
interface IAuthOption {
148
150
state: string;
149
151
scope? : AuthScope;
150
- supportWeb ? : boolean;
152
+ fallback ? : boolean;
151
153
}
152
154
RNWechat.auth({
153
155
state: " " ,
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { PromiseResult } from "../module";
2
2
export interface IOAuth2Option {
3
3
scope ?: OAuth2Scope ;
4
4
state : string ;
5
- supportWeb ?: boolean ;
5
+ fallback ?: boolean ;
6
6
}
7
7
export declare enum OAuth2Scope {
8
8
UserInfo = "snsapi_userinfo"
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ export function OAuth2(option) {
12
12
const defaultOption = {
13
13
scope : OAuth2Scope . UserInfo ,
14
14
state : "" ,
15
- supportWeb : false ,
15
+ fallback : false ,
16
16
} ;
17
17
function parseOption ( o ) {
18
18
const option = Object . assign ( { } , defaultOption ) ;
@@ -22,8 +22,8 @@ function parseOption(o) {
22
22
if ( typeof o . state === "string" ) {
23
23
option . state = o . state ;
24
24
}
25
- if ( typeof o . supportWeb === "boolean" ) {
26
- option . supportWeb = o . supportWeb ;
25
+ if ( typeof o . fallback === "boolean" ) {
26
+ option . fallback = o . fallback ;
27
27
}
28
28
return option ;
29
29
}
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { PromiseResult } from "../module";
2
2
export interface IAuthOption {
3
3
scope ?: AuthScope ;
4
4
state : string ;
5
- supportWeb ?: boolean ;
5
+ fallback ?: boolean ;
6
6
}
7
7
export declare enum AuthScope {
8
8
UserInfo = "snsapi_userinfo"
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ export function auth(option) {
12
12
const defaultOption = {
13
13
scope : AuthScope . UserInfo ,
14
14
state : "" ,
15
- supportWeb : false ,
15
+ fallback : false ,
16
16
} ;
17
17
function parseOption ( o ) {
18
18
const option = Object . assign ( { } , defaultOption ) ;
@@ -22,8 +22,8 @@ function parseOption(o) {
22
22
if ( typeof o . state === "string" ) {
23
23
option . state = o . state ;
24
24
}
25
- if ( typeof o . supportWeb === "boolean" ) {
26
- option . supportWeb = o . supportWeb ;
25
+ if ( typeof o . fallback === "boolean" ) {
26
+ option . fallback = o . fallback ;
27
27
}
28
28
return option ;
29
29
}
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ export default class App extends Component {
71
71
// interface IAuthOption {
72
72
// state: string;
73
73
// scope?: AuthScope;
74
- // supportWeb ?: boolean;
74
+ // fallback ?: boolean;
75
75
// }
76
76
console . log ( "invoke auth" ) ;
77
77
console . log (
You can’t perform that action at this time.
0 commit comments