Skip to content

Commit

Permalink
feat(wechat): add openMiniProgram method (#3380)
Browse files Browse the repository at this point in the history
  • Loading branch information
SanLeen committed Apr 16, 2020
1 parent be05235 commit 6458640
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/@ionic-native/plugins/wechat/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ export class Wechat extends IonicNativePlugin {
WEBPAGE: 7;
};

Mini: {
RELEASE: 0; // 正式版
TEST: 1, // 测试版
PREVIEW: 2; // 体验版
};

@Cordova()
isInstalled(): Promise<any> {
return;
Expand Down Expand Up @@ -167,4 +173,22 @@ export class Wechat extends IonicNativePlugin {
chooseInvoiceFromWX(params: any): Promise<any> {
return;
}

/**
* openMiniProgram exq:app opens wechat mini program
*
* @example
* <code>
* params: userName, path, miniprogramType all required
* Wechat.openMiniProgram(params, function (data) {
* alert(data.extMsg);
* }, function (reason) {
* alert("Failed: " + reason);
* });
* </code>
*/
@Cordova()
openMiniProgram(params: any): Promise<any> {
return;
}
}

0 comments on commit 6458640

Please sign in to comment.