ios支持启动小程序时设置动画方式

master
wanghualei 2023-05-24 22:06:29 +08:00
parent 37772abdb1
commit 039917ee11
4 changed files with 8 additions and 1 deletions

View File

@ -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", () {

View File

@ -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

View File

@ -25,6 +25,7 @@
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) {

View File

@ -788,6 +788,9 @@ class RemoteAppletRequest {
// iOStrue
bool animated;
// iOS
TranstionStyle transitionStyle;
// androidfalse
bool isSingleProcess;
@ -799,6 +802,7 @@ class RemoteAppletRequest {
this.offlineMiniprogramZipPath,
this.offlineFrameworkZipPath,
this.animated = true,
this.transitionStyle = TranstionStyle.TranstionStyleUp,
this.isSingleProcess = false,
});
@ -809,6 +813,7 @@ class RemoteAppletRequest {
"appletId": appletId,
"animated": animated,
"isSingleProcess": isSingleProcess,
"transitionStyle":transitionStyle.index,
};
if (startParams != null) result["startParams"] = startParams;
if (offlineMiniprogramZipPath != null)