diff --git a/README.md b/README.md index dc4bcf8..980b47e 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,8 @@ ## 安装 ```sh -$ npm install react-native-wechat-lib --save +npm install react-native-wechat-lib --save +react-native link react-native-wechat-lib ``` ## 起步 diff --git a/index.d.ts b/index.d.ts index e00de4c..bde08d0 100644 --- a/index.d.ts +++ b/index.d.ts @@ -23,6 +23,22 @@ declare module "react-native-wechat-lib" { lang?: string; country?: string; } + export interface WeChatReq { + type?: string, + errStr?: string, + extMsg?: string, + country?: string, + state?: string, + returnKey?: string + } + export interface WeChatResp { + type?: string, + errStr?: string, + extMsg?: string, + country?: string, + state?: string, + returnKey?: string + } export function sendAuthRequest( scope: string | string[], state?: string diff --git a/ios/RCTWeChat.m b/ios/RCTWeChat.m index 1a9b07c..24c983c 100644 --- a/ios/RCTWeChat.m +++ b/ios/RCTWeChat.m @@ -467,7 +467,7 @@ RCT_EXPORT_METHOD(pay:(NSDictionary *)data body[@"type"] = @"LaunchFromWX.Req"; body[@"lang"] = launchReq.lang; body[@"country"] = launchReq.country; - body[@"appParameter"] = appParameter; + body[@"extMsg"] = appParameter; [self.bridge.eventDispatcher sendDeviceEventWithName:RCTWXEventNameWeChatReq body:body]; } } diff --git a/package.json b/package.json index 53d5cda..73b62b5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-wechat-lib", - "version": "1.1.0", + "version": "1.1.1", "description": "react-native library for wechat app", "main": "index.js", "scripts": {