diff --git a/README.md b/README.md index 0296848..bed8c4c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # react-native-wechat -[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) +[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) **SDK Version** iOS 1.8.4 @@ -10,6 +10,8 @@ Android 5.3.1 Xcode 10.2.1 react-native 0.59.5 +## [Example](example/App.js) + ## Getting Started ```bash @@ -147,7 +149,7 @@ RNWechat.getSDKVersion() interface IAuthOption { state: string; scope?: AuthScope; - supportWeb?: boolean; + fallback?: boolean; } RNWechat.auth({ state: "", diff --git a/dist/api/OAuth2.d.ts b/dist/api/OAuth2.d.ts index 83add61..6cf8d56 100644 --- a/dist/api/OAuth2.d.ts +++ b/dist/api/OAuth2.d.ts @@ -2,7 +2,7 @@ import { PromiseResult } from "../module"; export interface IOAuth2Option { scope?: OAuth2Scope; state: string; - supportWeb?: boolean; + fallback?: boolean; } export declare enum OAuth2Scope { UserInfo = "snsapi_userinfo" diff --git a/dist/api/OAuth2.js b/dist/api/OAuth2.js index 21ad3bc..9217203 100644 --- a/dist/api/OAuth2.js +++ b/dist/api/OAuth2.js @@ -12,7 +12,7 @@ export function OAuth2(option) { const defaultOption = { scope: OAuth2Scope.UserInfo, state: "", - supportWeb: false, + fallback: false, }; function parseOption(o) { const option = Object.assign({}, defaultOption); @@ -22,8 +22,8 @@ function parseOption(o) { if (typeof o.state === "string") { option.state = o.state; } - if (typeof o.supportWeb === "boolean") { - option.supportWeb = o.supportWeb; + if (typeof o.fallback === "boolean") { + option.fallback = o.fallback; } return option; } diff --git a/dist/api/auth.d.ts b/dist/api/auth.d.ts index 949b8a1..4339db0 100644 --- a/dist/api/auth.d.ts +++ b/dist/api/auth.d.ts @@ -2,7 +2,7 @@ import { PromiseResult } from "../module"; export interface IAuthOption { scope?: AuthScope; state: string; - supportWeb?: boolean; + fallback?: boolean; } export declare enum AuthScope { UserInfo = "snsapi_userinfo" diff --git a/dist/api/auth.js b/dist/api/auth.js index 2f44c63..3fa640a 100644 --- a/dist/api/auth.js +++ b/dist/api/auth.js @@ -12,7 +12,7 @@ export function auth(option) { const defaultOption = { scope: AuthScope.UserInfo, state: "", - supportWeb: false, + fallback: false, }; function parseOption(o) { const option = Object.assign({}, defaultOption); @@ -22,8 +22,8 @@ function parseOption(o) { if (typeof o.state === "string") { option.state = o.state; } - if (typeof o.supportWeb === "boolean") { - option.supportWeb = o.supportWeb; + if (typeof o.fallback === "boolean") { + option.fallback = o.fallback; } return option; } diff --git a/example/App.js b/example/App.js index 7e069b5..8efe1a5 100644 --- a/example/App.js +++ b/example/App.js @@ -71,7 +71,7 @@ export default class App extends Component { // interface IAuthOption { // state: string; // scope?: AuthScope; - // supportWeb?: boolean; + // fallback?: boolean; // } console.log("invoke auth"); console.log(