ios支持启动小程序时设置动画方式
parent
37772abdb1
commit
039917ee11
|
@ -131,7 +131,7 @@ class _MyAppState extends State<MyApp> {
|
||||||
_buildAppletItem(appletId, "打开小程序", () {
|
_buildAppletItem(appletId, "打开小程序", () {
|
||||||
// Mop.instance.openApplet(appletId,
|
// Mop.instance.openApplet(appletId,
|
||||||
// path: 'pages/index/index', query: '');
|
// 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);
|
Mop.instance.startApplet(request);
|
||||||
}),
|
}),
|
||||||
_buildAppletItem(appletId, "finishRunningApplet", () {
|
_buildAppletItem(appletId, "finishRunningApplet", () {
|
||||||
|
|
|
@ -18,6 +18,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
@property (nonatomic, copy) NSString *offlineMiniprogramZipPath;
|
@property (nonatomic, copy) NSString *offlineMiniprogramZipPath;
|
||||||
@property (nonatomic, copy) NSString *offlineFrameworkZipPath;
|
@property (nonatomic, copy) NSString *offlineFrameworkZipPath;
|
||||||
@property (nonatomic, strong) NSString *animated;
|
@property (nonatomic, strong) NSString *animated;
|
||||||
|
@property (nonatomic, strong) NSString *transitionStyle;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
request.offlineMiniprogramZipPath = self.offlineMiniprogramZipPath;
|
request.offlineMiniprogramZipPath = self.offlineMiniprogramZipPath;
|
||||||
request.offlineFrameworkZipPath = self.offlineFrameworkZipPath;
|
request.offlineFrameworkZipPath = self.offlineFrameworkZipPath;
|
||||||
request.animated = [self.animated boolValue];
|
request.animated = [self.animated boolValue];
|
||||||
|
request.transitionStyle = [self.transitionStyle intValue];
|
||||||
|
|
||||||
// 启动小程序
|
// 启动小程序
|
||||||
[[FATClient sharedClient] startAppletWithRequest:request InParentViewController:currentVC completion:^(BOOL result, NSError *error) {
|
[[FATClient sharedClient] startAppletWithRequest:request InParentViewController:currentVC completion:^(BOOL result, NSError *error) {
|
||||||
|
|
|
@ -788,6 +788,9 @@ class RemoteAppletRequest {
|
||||||
// iOS端打开小程序时是否显示动画,默认为true。
|
// iOS端打开小程序时是否显示动画,默认为true。
|
||||||
bool animated;
|
bool animated;
|
||||||
|
|
||||||
|
// iOS端打开小程序时的动画方式
|
||||||
|
TranstionStyle transitionStyle;
|
||||||
|
|
||||||
// 是否以单进程模式运行,仅限android,默认为false
|
// 是否以单进程模式运行,仅限android,默认为false
|
||||||
bool isSingleProcess;
|
bool isSingleProcess;
|
||||||
|
|
||||||
|
@ -799,6 +802,7 @@ class RemoteAppletRequest {
|
||||||
this.offlineMiniprogramZipPath,
|
this.offlineMiniprogramZipPath,
|
||||||
this.offlineFrameworkZipPath,
|
this.offlineFrameworkZipPath,
|
||||||
this.animated = true,
|
this.animated = true,
|
||||||
|
this.transitionStyle = TranstionStyle.TranstionStyleUp,
|
||||||
this.isSingleProcess = false,
|
this.isSingleProcess = false,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -809,6 +813,7 @@ class RemoteAppletRequest {
|
||||||
"appletId": appletId,
|
"appletId": appletId,
|
||||||
"animated": animated,
|
"animated": animated,
|
||||||
"isSingleProcess": isSingleProcess,
|
"isSingleProcess": isSingleProcess,
|
||||||
|
"transitionStyle":transitionStyle.index,
|
||||||
};
|
};
|
||||||
if (startParams != null) result["startParams"] = startParams;
|
if (startParams != null) result["startParams"] = startParams;
|
||||||
if (offlineMiniprogramZipPath != null)
|
if (offlineMiniprogramZipPath != null)
|
||||||
|
|
Loading…
Reference in New Issue