Skip to content

Commit

Permalink
Merge branch 'master' into major
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongweiguang committed May 25, 2023
2 parents 691c9ee + 039917e commit 10e35ef
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class _MyAppState extends State<MyApp> {
_buildAppletItem(appletId, "打开小程序", () {
// Mop.instance.openApplet(appletId,
// path: 'pages/index/index', query: '');
RemoteAppletRequest request = RemoteAppletRequest(apiServer: 'https://api.finclip.com', appletId: appletId);
RemoteAppletRequest request = RemoteAppletRequest(apiServer: 'https://api.finclip.com', appletId: appletId, transitionStyle: TranstionStyle.TranstionStyleUp);
Mop.instance.startApplet(request);
}),
_buildAppletItem(appletId, "finishRunningApplet", () {
Expand Down
1 change: 1 addition & 0 deletions ios/Classes/Api/MOP_startApplet.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, copy) NSString *offlineMiniprogramZipPath;
@property (nonatomic, copy) NSString *offlineFrameworkZipPath;
@property (nonatomic, strong) NSString *animated;
@property (nonatomic, strong) NSString *transitionStyle;

@end

Expand Down
1 change: 1 addition & 0 deletions ios/Classes/Api/MOP_startApplet.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ - (void)setupApiWithSuccess:(void (^)(NSDictionary<NSString *,id> * _Nonnull))su
request.offlineMiniprogramZipPath = self.offlineMiniprogramZipPath;
request.offlineFrameworkZipPath = self.offlineFrameworkZipPath;
request.animated = [self.animated boolValue];
request.transitionStyle = [self.transitionStyle intValue];

// 启动小程序
[[FATClient sharedClient] startAppletWithRequest:request InParentViewController:currentVC completion:^(BOOL result, NSError *error) {
Expand Down
4 changes: 2 additions & 2 deletions ios/mop.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ A finclip miniprogram flutter sdk.
s.dependency 'Flutter'
s.ios.deployment_target = '9.0'

s.dependency 'FinApplet' , '2.40.7'
s.dependency 'FinAppletExt' , '2.40.7'
s.dependency 'FinApplet' , '2.40.9'
s.dependency 'FinAppletExt' , '2.40.9'
end

5 changes: 5 additions & 0 deletions lib/mop.dart
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,9 @@ class RemoteAppletRequest {
// iOS端打开小程序时是否显示动画,默认为true。
bool animated;

// iOS端打开小程序时的动画方式
TranstionStyle transitionStyle;

// 是否以单进程模式运行,仅限android,默认为false
bool isSingleProcess;

Expand All @@ -810,6 +813,7 @@ class RemoteAppletRequest {
this.offlineMiniprogramZipPath,
this.offlineFrameworkZipPath,
this.animated = true,
this.transitionStyle = TranstionStyle.TranstionStyleUp,
this.isSingleProcess = false,
});

Expand All @@ -820,6 +824,7 @@ class RemoteAppletRequest {
"appletId": appletId,
"animated": animated,
"isSingleProcess": isSingleProcess,
"transitionStyle":transitionStyle.index,
};
if (startParams != null) result["startParams"] = startParams;
if (offlineMiniprogramZipPath != null)
Expand Down

0 comments on commit 10e35ef

Please sign in to comment.